Mark
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Need help displaying more lines of my postsJust keep in mind that if a theme doesn’t have a category.php file then WordPress will use archive.php instead, if that one exists.
Forum: Fixing WordPress
In reply to: Any idea why my newly created page doesn’t work?The problem is most likely because in your actual Web directory you have a subdirectory called “artists” so the Web server tries to load an index file from there before WP ever gets a chance to do its work. Since there’s no index file in the subdirectory you see that error message.
Rename the “artists” subdirectory or delete it if you don’t need it. That’ll fix your problem.
Forum: Fixing WordPress
In reply to: Login goes to… Loginafter logging in and you get returned to the login screen try manually accessing the admin panel by using the right url: some-sort-of-site-name.com/wp-admin
If you’ve recently added any new plugins then you might want to temporarily remove those (e.g. delete and reinstall later) to see if they cause the problem.
Forum: Fixing WordPress
In reply to: Inability to access data after upgrade to 2.7Best not have your browser remember passwords for exactly this reason – we forget. Either that or write them down somewhere in a rather cryptic form that you can figure out later if you need to.
Aside from that, got a database backup that you can restore into your db server using phpmyadmin? If so then restore it. Backing up your WP directory and files doesn’t create a database backup – all your data in some other files controlled by your database server. So you have to manually create a database backup using phpmyadmin, the mysql command line client, or maybe a backup plugin for WordPress.
Forum: Fixing WordPress
In reply to: Total newbie — can’t find front page displayFirst of all, if you’re using WordPress 2.3.x then you better upgrade before someone totally hacks your Web site. At least upgrade to WordPress 2.6.5. Have someone help you with that. I don’t recall off hand but you might need to first upgrade to WordPress 2.5.x, then jump up to 2.6.5.
Then to set a static page (that your created using the WordPress page editor) as your home page go to Settings, then Reading, and there you can select “A static page” and choose the page name in the dropdown list and save the settings. That’s all there is to it.
Forum: Fixing WordPress
In reply to: 2.7 Automatic Plugin UpgradesThe solution – really – is to simply not use the automatic upgrade feature. Handle upgrades manually. And you’re right, putting file permissions at 777 is begging for trouble…
Forum: Fixing WordPress
In reply to: Need help displaying more lines of my postslook in your theme’s archive.php file or possible category.php file if your theme has the latter, and find something like the_excerpt() and change that to the_content() – either of those could be get_the_excerpt() or get_the_content() depending on how the theme is designed.
the_excerpt() displays a portion of the post, the_content() displays then entire content of a post (or page depending on the template file).
Forum: Themes and Templates
In reply to: get_the_excerpt – Outside the Loopmaybe include something like
var_dump($post);after you is_single() line to make sure that the $post object is actually loaded with data. If you get a NULL result then obviously it isn’t. And if it is loaded then you’ll see an ID element.
Forum: Plugins
In reply to: [Plugin User Photo] Small PHP issueThat won’t work because the function returns a complete set of HTML and all you want is a URL path to the image source file itself.
After having a quick look at the plugin code it appears that you’ll have to get someone to modify the plugin for you so that it has a function to return just the image source.
Something like this:
function userphoto__get_userphoto_url($user_id, $photoSize, $before, $after, $attributes, $default_src){ global $userphoto_prevent_override_avatar; //Note: when we move to a global default user photo, we can always enter into the following conditional if($user_id && ($userdata = get_userdata($user_id))){ if(($userdata->userphoto_approvalstatus == USERPHOTO_APPROVED) && $image_file = ($photoSize == USERPHOTO_FULL_SIZE ? $userdata->userphoto_image_file : $userdata->userphoto_thumb_file)) { $width = $photoSize == USERPHOTO_FULL_SIZE ? $userdata->userphoto_image_width : $userdata->userphoto_thumb_width; $height = $photoSize == USERPHOTO_FULL_SIZE ? $userdata->userphoto_image_height : $userdata->userphoto_thumb_height; $upload_dir = wp_upload_dir(); if(!empty($upload_dir['error'])) return "Error: " . $upload_dir['error']; $src = trailingslashit($upload_dir['baseurl']) . 'userphoto/' . $image_file; } else if($default_src){ $src = $default_src; $width = $height = 0; } else if(get_option('userphoto_use_avatar_fallback') && !$userphoto_prevent_override_avatar){ $width = $height = get_option($photoSize == USERPHOTO_FULL_SIZE ? 'userphoto_maximum_dimension' : 'userphoto_thumb_dimension'); global $userphoto_using_avatar_fallback; $userphoto_using_avatar_fallback = true; $img = get_avatar($user_id, $width); $userphoto_using_avatar_fallback = false; if(!$img) return; if(!preg_match('{src=([\'"])(.+?)\1}', $img, $matches)) return; $src = str_replace('&', '&', $matches[2]); if(preg_match('{class=([\'"])(.+?)\1}', $img, $matches)) $attributes['class'] .= ' ' . $matches[2]; } else return ''; return $src; } } function userphoto_the_author_photo_url($before = '', $after = '', $attributes = array(), $default_src = ''){ global $authordata, $curauthor; if(!empty($authordata) && $authordata->ID) echo userphoto__get_userphoto_url($authordata->ID, USERPHOTO_FULL_SIZE, $before, $after, $attributes, $default_src); }Then use userphoto_the_author_photo_url() instead of userphoto_the_author_photo()
I’m not 100% sure that code will work but that’s basically what needs to be added to the plugin. I didn’t test it though.
Forum: Plugins
In reply to: Best Plugin For Small “Store”Good luck finding anything worthwhile for free. One thought to consider: If you’re going to sell stuff then maybe an investment of your own is in order? Just a thought…
Forum: Plugins
In reply to: Adding/creating multiple categories in one goI took some time to create a solution for you and others who might have this same need. Grab a copy of Bulk Category Importer for WordPress here:
http://wpsecurity.net/bulk-category-importer-for-wordpress/
It works with WordPress 2.5.x and newer.
Forum: Fixing WordPress
In reply to: WordPress Server Overload on Low Activity SiteYou should have a look at your Web site traffic logs (hopefully your ISP provides that feature) to see where your traffic is coming from. Maybe one or two visitors are hammering your site on purpose, or maybe it’s due to an ill-behaved Web spider, of which there are several – and some or most of those can be totally blocked.
Forum: Everything else WordPress
In reply to: HACKED twice in one week ver 2.7I’ve fixed many hacks like this in the past few months alone. Do your site 3 favors:
1. Create a new administrator user (so that it doesn’t have ID 1 in the database) then delete any other administrator accounts that you don’t need. And since you’ve already set your password using MD5 go reset it to something new (using the reset password feature of WordPress) so that it will use the encryption ‘salt’ built into more recent WP versions, otherwise your MD5 passwords are subject to dictionary attacks and rainbow table attacks…
2. Remove write permissions from all of your theme files. You will no longer be able to edit your theme files using the WP theme editor but that’s a small price to pay.
3. Sign up to get the soon-to-be-released beta of Maximum Security for WordPress. Ya, that’s a shameless plug… I hope it helps you though.
Finally, don’t believe for one second that you’ve really identified the bad guys responsible for messing with your sites. It’s extremely easy to cover one’s tracks on the Internet and make it look as though someone else is responsible for whatever activity. “False flag” operations are incredibly common. Most bad guys already know how to do that and do it as a matter of habit. To really track down a bad guy typically requires the cooperation of many ISPs across the world – although once in a while a bad guy turns out to be a complete idiot that is all too easy find. That’s rather rare.
Forum: Plugins
In reply to: Best Plugin For Small “Store”Check out Shopp – http://www.shopplugin.net – it’s new and looks pretty good. I’ve seen it in action and it fairly easy to use.
Forum: Themes and Templates
In reply to: Simple?! Custom Variable in a TemplateHere’s the basis of getting a menu item in the nav for theme options. This is extremely basic code that you will need to expand upon. If you need to hire someone do all this for you then you could contact me privately via my Web site or join the WP Pro list and hire someone there.
<?php add_theme_page("New Options", "New Options", 'edit_themes', basename(__FILE__), 'my_new_options); function my_new_options() { echo 'hello'; // put your HTML form here and whatever processing // code you need to grab submitted form vars // and store them in the database somewhere } ?>