Category Archives: Wordpress

Awesome WordPress Theme: Atahualpa

I just changed the theme of my blog to Atahualpa. I liked it when I first saw it because of the ability to have a rotating roster of random heading images. It’s really cool because it is so configurable that I don’t have to edit the theme files themselves.

The theme comes with some nice images. However, as a photo-phile, I wanted to use my own photos. The challenging part was finding images that I could crop to match the long proportions of the heading images. Once I figured out what I needed to do, I was able to generate more pictures without taking so much time on each photo.

Here are the steps that I have figured out. I used Picasa and Dreamweaver.

  1. In Picasa, look for landscape photos that had the most interesting elements in the horizontal axis.
  2. Select the desired image, File > Save a Copy
  3. Edit the copy, which will have the same filename with -1 appended (skip steps 2 & 3 if you don’t care about saving the original)
  4. Click on I’m Feeling Lucky to see if it improves the look of the picture. If not, undo
  5. Click on Crop and use the Manual option to select a long rectangle that contains the desired content
  6. Click on Preview to see the dimensions of the crop area. This might take experimentation since the size of photos vary but I found that I got good results if the height is no more than twice the max height set for the header image in the theme configurations. This is dependent on the width of the original and the size to which it will be reduced, if at all.
  7. Click Apply once satisfied with the crop area.
  8. File > Export Picture to Folder
  9. Select the desired Resize setting if the original is not the right size
  10. Click Export
  11. A Windows Explorer window should open that contains the new file
  12. In the local copy of the blog, copy or move the file to the folder: wp-content\themes\atahualpa\images\header
  13. In Dreamweaver, select the new file and upload

I hope that helps. It seems complicated with so many steps but after a while it gets easy to do.

Installed Google Friend Connect WordPress Plugin

Google just made the Google Friend Connect API available to developers. What made this interesting was that it would make it easier for site admins/developers to integrate Friend Connect into existing login systems. As a WordPress user, I was excited to see that there was a plugin for my blogging platform of choice. An added bonus was that I knew some of the people involved in the development of the plugin. :)

I wrote that first paragraph with the understanding that readers would know what Friend Connect was and what it was for. However, it is not that widely in use so I can’t expect people to know what it is.

Google Friend Connect provides a simple means of one-click user authentication using a pre-existing Google, Yahoo, AIM, or OpenID account. This means that a user doesn’t need to create a new account for every site that he comes across.

After installing the plugin to enable Friend Connect authentication on my blog, I tried out the Friend Connect sign-in process while I was logged out to see what it would look like to non-admin visitors. I had a few moments of panic after seeing that logging into the Friend Connect system also logged me into my blog. The scary part about that was that I saw a link that said Site Admin, which only I as admin should see. It turned out that I was only logged in as a Subscriber, and the Site Admin showed the dashboard, but only as much as subscribers can see. Basically, regular visitors were not getting admin access. It was a false alarm. I was able to confirm by checking the list of Users and saw my Friend Connect user identity was appropriately marked as Subscriber.

That’s the other cool thing about this plugin; it is able to add users to a website’s database. A couple of weeks ago, I was working on a Friend Connect login solution for Coppermine Photo Gallery but got stuck due to CPG needing database access to the application’s users. If I or any CPG developer can work with the GFC API, we could enable visitors to login with their Friend Connect credentials, and have those accounts create new users in the gallery’s user table in the database.

Feel free to try it out here by logging into Friend Connect to leave a comment. Of course, comments are still open to visitors who are not logged in, but when logged in, you won’t have to enter the usual blog comment form fields.

If you installed the plugin for your site and noticed that the blog looked different in places you did not want it to look different, it is due to some css definitions that the plugin has.  You will need to delete or comment out the unwanted css definitions in fc_plugin.php

Do Follow

I decided to join the Do Follow movement, which is… the opposite of the No Follow movement. The nofollow attribute was intended to discourage comment spammers by telling search engines not to trust links posted by visitors in blogs and forums. However, the spam problem has not gotten any better.

Despite the relentless efforts by spammers to pollute my blog, spam comments are not getting posted here. It is thanks to my triple threat spam fighting strategy. Since the bad links aren’t getting posted in my blog, and the good ones are, I might as well disable nofollow.

I do believe that Do Follow is not for everybody, though. I think it would be best to have nofollow implemented by default in applications that are vulnerable to comment spam. If people aren’t going to protect their sites from spam, they might not bother implementing nofollow manually and consequently not all of their user-contributed links should be trusted.

There are a lot of plugins to remove nofollow from links. I did some research for ones that would fit my needs. What I really wanted was to be able to have the option to add nofollow on a case by case basis for non-spam yet cr@ppy links. I found one that was even called that but it didn’t work… perhaps because it was tested through versions up to and including 2.2 and I’m using 2.3. I decided upon NoFollow Free because it almost does what I want. I can’t nofollow based on urls, but I can do it based on a couple of criteria.

I reserve the right to edit, delete or mark as spam any comments that are intended solely to get links from my blog, and basically abuse my trust, and consequently the trust of my visitors.

I don’t know if people request to be on those do follow sites lists, but I would appreciate not being on such lists since it could end up directing comment spammers to my blog. I won’t object to regular links, though. :)

How to Add RSS Feed Link to archive.php for WordPress

archive.php (in the WordPress theme folder) is the file that handles the output of posts grouped by categories, tags (in WP 2.3) and by dates. Since I have a wide variety of topics, I figured it would be helpful to provide feeds specific to a reader’s particular interest(s). The problem was I didn’t know how to do it easily. After playing around with the code, I came up with a solution which turned out to be pretty simple and straightforward. It is probably not perfect but it gets the job done.

Wherever you want to place the link, add this code:

<a href="feed/">Subscribe to Feed</a>

So, if you’re interested in my WordPress postings, you can use the link to the feed when viewing the WordPress category.

Upgraded to WordPress version 2.3

I just upgraded to WordPress version 2.3. It was daunting for me because I customized so much code, and installed so many plug-ins. To be on the safe side, I upgraded a copy of WordPress on my laptop last night to see if there were any issues. I had to edit the theme I’m using, Ocadia, to handle new features, such as tags. I went through my plug-ins list and looked for the latest versions. Once all was set, I prepared to upgrade my public blog.

Despite all my preparations, I still hit a couple of snags. I had set up Dreamweaver to upload a list of uploaded files. Once I was setting up the list, I went to my blog to disable all plugins. I then hit OK to upload the files. For some reason, DW didn’t upload all files so my blog was showing a fatal error. :( I had to go through the list of updated files again and then tried the upload again. It worked.

I was able to rely on two fewer plug-ins thanks to the new features that were built into version 2.3. I no longer need Jerome’s Keywords plugin which enabled me to tag my posts, though I am grateful that it served me well until now. WordPress comes with importers for tagging plugins that people used prior to 2.3. I had trouble finding the importer. I looked all over until I found it under Manage / Import. I am no longer using the Permalink Redirect plugin since this latest version of WP has the functionality built into the core.

Here’s a list of things–though probably not complete–to do that I learned in order to survive this upgrade. Please review documentation for details: backup all files and database. test first on local server if possible. disable all plugins. upload new files. test. activate plugins one-by-one and check that the blog hadn’t imploded. use a diff viewer to put back custom code, if any, as long as they don’t conflict with new version.

If you’re going to upgrade: Good luck!