Tag Archives: wordpress

[HOWTO] Make disqus comments do-follow in WordPress

I am using Disqus Comment System v2.61 and it shows comments as nofollow. This is a concern for several WordPress users as their commentators may not be interested to comment if they get no link love via comment url. The disqus comments are later generated by Javascript but it also contains the basic comments for browsers without Javascript. While I have not yet figured out how the Javascript later inserts “nofollow” attribute later when regenerating the comments with Javascript, I have figured out how to remove the ‘rel=”nofollow”‘ from the link of the basic page, which should work for search engine robots. In the version of Disqus Comment System I am using, the comment_author_url() seems to not work. So, I replaced it with get_comment_author_url() and it seems to work. Following is the new comments.php which shows the links as do-follow.

Disqus Debug thread_id: ".get_post_meta($post->ID, 'dsq_thread_id', true)."

"; } ?>
blog comments powered by Disqus

You can replace your current comments.php with this file and have do-follow links for your blog readers. I have implemented it on this blog. Comment here and check the page source of my website to see a dofollow link to your website.

[SOLVED] Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid is is not allowed to access /tmp owned by uid 0 in /full_path/wp-admin/includes/file.php on line 198

I have moved one of my blogs to new server and I also updated to WordPress 3.0 at the same time. When I tried to update or add plugins, I got this error:

Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid is  is not allowed to access /tmp owned by uid 0 in /full_path_to_wordpress/wp-admin/includes/file.php on line 198 
Download failed. Could not create temporary file.

I have PHP Safe mode enabled in my server and don’t wish to disable it. So, I decided to give out a new temporary folder for wordpress installation. I created a folder named tmp in my wordpress installation directory and made the user of the temporary directory same as the user of /full_path_to_wordpress/wp-admin/includes/file.php. The following command shows the user, group and other details of a file:

ls -la /path/to/file

and the following can be used to make the directory writable and change the owner of the tmp directory to the same user displayed by the above command:

chmod 777 /path/to/file_or_dir
chown username /path/to/file_or_dir

Now, the following code must be appended to wp-config.php:

define('WP_TEMP_DIR','/full/path/to/tmp');

That did it for me. You will need shell access to your server to do this. If you do not have shell access, you should ask your hosting provider for help.

[SOLVED] API Key Installed but get the ERROR: WordPress.com Stats needs attention: please enter an API key or disable the plugin.

[ad#ad-1]
I ran into this problem. I got an error with WordPress.com Stats plugin. It was just a message but it looked ugly and although I had already installed API key and was getting stats, I wanted to remove it. Here is what I did.

I went into the database using phpmyadmin from my cPanel (your hosting may or may not have phpmyadmin, so you may want to edit the database some other way). I suggest you to backup your database, just in case you mess up.

Browse the wp_options table and locate stats_options. The value should look something like this:
a:7:{s:4:"host";s:16:"yourblogurl.tld/path";s:4:"path";s:1:"/";
s:7:"blog_id";i:blog_id_numeric;s:7:"version";s:1:"3";s:5:"error";
b:0;s:9:"key_check";b:0;s:7:"api_key";N;}

[ad#ad-2]
Then edit it and change the value to null (i.e. delete the contents and leave it blank). Now, go to admin area of your blog and add the API key.


DreamTemplate - Web Templates

[HOWTO] [UPDATED] Add Widgets to Notepad-Chaos WordPress Theme

[ad#ad-1]

UPDATE: As wordpress does not show characters correctly, the codes below may not work. So please do copy the codes from this file I have uploaded. Please read the post as well as the instructions included in the file. You may need to use WinRAR or 7zip to extract the file if you are running Windows.

The theme I’m using in this blog is widget unaware Notepad-Chaos theme. However, I have managed to allow it to add widgets. Continue reading [HOWTO] [UPDATED] Add Widgets to Notepad-Chaos WordPress Theme