Dzhuneyt
Forum Replies Created
-
Forum: Hacks
In reply to: Problem with $wpdb->get_resultsThis has been fixed by adding backticks (not single quotes) around the static variables in the Mysql query. In the above example you would need to surround the table name, and column name, but not the $unique variable. It is to be surrounded with single quotes and not backticks. I can’t post an example here, because the WordPress forums process content inside backticks as code quotes. This character is usually located to the left of the key for number one on your keyboard.
Forum: Requests and Feedback
In reply to: WordPress Upgrade Should Only Update Modified FilesI don’t use auto-update, at least not those on shared hosts.
However, if this suggestion would be implemented, it should make the whole update process quicker and easier for ALL the WP users (not only those on shared hosts).
Forum: Themes and Templates
In reply to: Get Current Post Tags (Without Link to Tag Page)I’ve quickly figured it out.
I had to clean the contents of $tagdisplay before the loop rotates for the second post, because the contents of the variable were prepended to the tags of current post.
A better example:
You have posts named 1, 2, 3, 4 and 5.
Each post has 1 tag: tag1, tag2, tag3, tag4, tag5.
The loop runs for post 1 and displays tag1, the value of tag1 is inserted into $tagdisplay.
The loop runs for post 2, but the above code caused it to display the value of $tagdisplay and then display any other tags, associated with the current post, causing an output: tag1, tag2.So the fix is easy as inserting this above the code in the first post:
$tagdisplay=''; unset($tagdisplay); // failsafe
Forum: Fixing WordPress
In reply to: Admin blown up & possible Virus??Seems like your admin pages (and probably your entire blog) is stuffed with trojan horses. Clean it up as fast as possible, so it won’t affect your visitors.
Forum: Fixing WordPress
In reply to: How To Get a Post Author’s ID (In Single Post View)?It does work! Only instead of posts[0] it should be $posts[0].
This is the code that works for me:
$getid = $posts[0]->post_author; if($getid == 5){ // Do something that is specific for user with ID 5 } if($getid == 2){ // Do something for user with ID = 2 } // And so on...
Forum: Fixing WordPress
In reply to: How To Get a Post Author’s ID (In Single Post View)?I will display custom JavaScript code based on the author.
I will try the solution that MichaelH provided and post. If I don’t post, it means it works and I have forgot about this thread ??
Forum: Fixing WordPress
In reply to: Don’t show byline if by author XHow does this work when there is NO FUNCTION called get_the_author_ID()?
Forum: Fixing WordPress
In reply to: Setting UsernameEasiest steps:
1. Install blog with default logins (admin and random password).
2. Immediately login and create a new user with your preferred details (ignore the message saying that you should change the auto-generated password). Set this new user’s role to Admin.
3. Logout of Admin and login with the new user. Delete Admin.Optionally, you will be asked to delete or transfer existing data from Admin to another user. I choose to delete them, because the default data is just some links to WordPress, a generic About page, a simple Welcome post and an example comment. Those are to be deleted anyway, you may just choose to delete them during this process.
Forum: Fixing WordPress
In reply to: Advertising Manager – Ads Not Showing Up On SiteI figured out the problem. After some messing around with the users and a plugin upgrade it seems that the individual ads (at Advertising Manager) decided to change the “show” mode of ads from “All Authors” to just one author/member of my blog which I deleted. That’s why the ad wasn’t showing, because none of the content on the blog is owned by this author anymore.
Forum: Plugins
In reply to: [plugin: Contact Form 7 2.0] Upgrade fails?Just disable the plugin before upgrading to avoid this problem.
Forum: Plugins
In reply to: [plugin: Contact Form 7 2.0] Upgrade fails?I tried deleting, re-uploading with and without disabling CF7 first and both give the same result:
The database table for Contact Form 7 does not exist. You must create the table for it to work.
NOTE: I checked my database and there is no contact_form_7 or whatever the plugin’s associated table is called there. There are only:
wp_cformsdata wp_cformssubmissions wp_comments wp_links wp_options wp_postmeta wp_posts wp_terms wp_term_relationships wp_term_taxonomy wp_usermeta wp_users
I am guessing the CFORMS plugin I used as an alternative for Contact Form 7 caused the conflict, but I have disabled CFORMS before trying to get Contact Form 7 working, so I assume it is not CFORMS fault.
Forum: Alpha/Beta/RC
In reply to: Fatal error in wp-includes\http.php and wp-db.phpYour server is either very slow and takes more than 30 seconds to process the query or 30 second time limit for script execution is too less. You should increase this limit.
Search and modify this line in your php.ini file if you have access to your server (I guess you have based on the directory structure the error gives):
max_execution_time = 30 ; Maximum execution time of each script, in seconds
Another way is to add this code to your wp-config.php (might not work on all servers):
set_time_limit (60); // replace 60 with value in seconds, use 0 for unlimited script execution time
Third way is to set this in your wp-config.php:
ini_set(‘max_execution_time’, 300); //300 seconds = 5 minutes
Forum: Fixing WordPress
In reply to: Problems with Advertising ManagerDo you want to place it in your template’s code, as a widget or inside a post?
Forum: Plugins
In reply to: Advertising Manager : TroubleForum: Fixing WordPress
In reply to: Advertising Manager – Ads Not Showing Up On SiteI’ve just disabled all other plugins except Advertising Manger in order to see if there was some kind of conflict, but it doesn’t fix the issue, so it is just Advertising Manager’s fault somewhere.