WordPress › jQuery Lightbox « WordPress Plugins

I just changed out one of my WordPress Plugins. I generally use thumbnails of my images and let a plugin called Lightbox show a larger image when the image is clicked upon. Today I replaced WP Lightbox 2 plugin with jQuery Lightbox plugin. I was hoping to reduce the amount of JavaScript the page downloads and I was not disappointed. One one website I maintain the new plugin reduced the JavaScript downloaded from 161,100 to to 39,420 bytes. There are some minor formatting issues but I think I can handle that.

CSS Fix #1 – On the web site using CSS dropped shadows I had to add new selector to remove the dropped shadows.

#lightbox img {
background:none;
border:0;
padding:0;
}

CSS Fix #2 – One of my themes has tabs on the top and after installing jQuery Lightbox the body was overlaying most of the tabs. I found that I could restore the tabs and not cause any other problems if I removed the CSS attribute, “height: 100%”, from the body selector in the jquery.lightbox.packed.css.

WordPress › jQuery Lightbox « WordPress Plugins

WordPress 2.3.1

WordPress 2.3.1 is now available. 2.3.1 is a bug-fix and security release for the 2.3 series.

2.3.1 fixes over twenty bugs. Some of the notable fixes are:

  • Tagging support for Windows Live Writer
  • Fixes for a login bug that affected those with a Blog Address different than
    their WordPress Address
  • Faster taxonomy database queries, especially tag intersection queries
  • Link importer fixes

The part that interested me the most was the tagging support for Live Writer. After a little research I figured out that I did not need to anything except refresh my blog account. To test this feature I created a new post and placed my tags in the field at the bottom of the Live Writer window called keywords. After publishing my post the browser confirmed that the tags were correctly entered. That is simple!

WordPress 2.3.1

Updating my blog to WordPress 2.3 and migrating existing UTW tags to the WP native tags

Well, I finally updated this blog to WordPress 2.3. After I upgraded WordPress to version 2.3, I imported my tags from Ultimate Tag Warrior and then I made several changes to my theme before everything looked normal. To get there I had to:

  1. Replace the UTW function in my index.php, single.php, and archive.php files with this function, <?php the_tags(‘Tags:<ul><li>’, ’</li><li>’, ‘</li></ul>’); ?>. I had trouble finding the documentation for this function and Rich did not provide a good example of how to use it. After some guessing I came up with the correct parameters to generate valid html for an unordered list.
  2. Rename/delete my tag.php page. It interfered with the native tag support.
  3. I followed Rich’s suggestion and added the Executable PHP Widget widget to my blog. I used this widget to create a new tag cloud widget to replace my UTW tag cloud widget. I reduced the maximum font size down from 36 to 24 to get it to fit in my sidebar
  4. I added the wordpress-23-related-posts-plugin for related posts to replace the similar UTW function. I added the function call to display the related posts just under “the_tags” function call in my index.php, single.php, and archive.php files.

Upgrading WordPress to Version 2.3

Yesterday I started updating some of my WordPress sites to WordPress 2.3. I used the WPAU plugin to update two sites and it worked fine. The bad news is that I found several problems. One theme and one plugin were not compatible with the latest WordPress version. I was a little surprised since these were plain vanilla sites with little customization.

The first problem I found was that I got an “array_key_exists” error message on the blog’s main page. After a little research I found that the problem was related to the Misty Look theme and that Sadish had updated the theme to version 3.5 to fix the problem.

The second problem I found was a bit more subtle. When I made a post or updated a page I got a “‘wp_post2cat’ doesn’t exist”. There were a variety of recommendations on how to fix this problem but I finally figured out that I needed to upgrade the google-xml-sitemap-generator plugin to the latest version.

Considering the problems I have found with the easy sites, I will proceed very carefully when I update this site. This site may have too many bells and whistles for my own good.

Variations on Updating WordPress

The folks have updated WordPress again and I have been evaluating different methods of upgrading. The standard method works but I have been wanting to streamline the process for remote hosts.

For my locally hosted blog I used the Updating WordPress with Subversion method. This is pretty slick! I had previously checked out a copy of WordPress using Subversion and integrated the wp-content and a couple other files into the working copy. All I had to do this morning was to crank up TortoiseSVN on the checked out directory, change its tag to 2.3, and let Subversion do the rest. When I logged in as Admin, it updated the database. I did get some database errors about duplicate entries into wp_terms and wp_term_taxonomy but I do not think these errors are critical since this is the blog I use to test changes with. Its pretty funky!

Yesterday I got carried away again and did a little research on using Subversion on remote hosts. I found that some host providers provide it but most do not it. My host provider, bluehost.com, does not provide Subversion support directly but I found a post on a forum that described a method I could use to install it.  I kind of followed their instructions. It is working as a client and here are my instructions.

  1. Log in using SSH. I used PuTTy.
  2. Create a bin directory.
  3. Edit the .bashrc file to add the path statement to the bin directory.
  4. Create a source directory and then change to this directory.
  5. Use wget to download the tar version of both the Subversion package and the dependencies package.
  6. Untar both packages.
  7. Run configure, make, and then make install. You should have several executables in the bin directory. 
  8. Make sure that subversion works by typing in “svn –version”.

Here is the command line version:

mkdir ~/bin
# Use your favorite editor to edit the .bashrc file and add the path statement to the bin directory
mkdir ~/src
# get the subversion and dependencies tarballs
cd ~/src
wget http://subversion.tigris.org/downloads/subversion-1.4.5.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.4.5.tar.gz
tar -xzf subversion-1.4.5.tar.gz 
tar -xzf subversion-deps-1.4.5.tar.gz 

# Build it
cd subversion-1.4.3
./configure --prefix=$HOME --without-berkeley-db --with-zlib --with-ssl
make
make install

# check it works!  
svn --version

I am now able to check out a copy of WordPress and update it on my bluehost.com website. I am not sure this is much better than the WPAU plugin I used recently. I will probably continue to play with both methods. I am still working at setting up a repository on bluehost. I do not mind using the Subversion client to update the WordPress files but I would like my bluehost account to be a server for the wp-content files since I would like version control on my theme files. It would be nice if the folks at bluehost decided to directly support Subversion, too.

WordPress Automatic Upgrade plugin update « Techie Buzz

WordPress Automatic Upgrade (WPAU) is a plugin that automatically upgrades your wordpress version to the latest files provided by wordpress.org

WordPress Automatic Upgrade plugin update « Techie Buzz

Okay, I was short on time and was willing to take a chance on a minor WordPress upgrade. I had several sites I wanted to upgrade and this looked like it would make the process quick and painless if it worked. For me, the plugin worked and the upgrade was complete in a few minutes. Yea!

Updating PHPUnit on XAMPP

I have decided to do some playing around with unit tests for PHP. I saw a video on Getting Involved in WordPress and it reminded me of my interest in unit testing. Now I almost want to create some unit tests for verifying WordPress plugins or phpWebSite code. Fortunately, common sense will prevail and I will restrict my activities to playing. The instructions at Chapter 3. Installing PHPUnit looked pretty easy but since I wanted to do my testing under XAMPP I knew there would be problems. Hopefully the problems would be minor.

Confirm the PEAR configuration

The first thing I did was to open a command window in the PHP directory under xampp and ran the following command.

pear show-config

This command prompting elicited an error about improperly set environment variables. So I edited the file and inserted the full path to the XAMPP directory. I tried the command again and it showed the PEAR configuration. I checked the installed packages and it showed PHPUnit to be version 1.3.2. I would like to use the latest version so I am going to follow the instructions from the documentation.

Update the channel and install the PHPUnit

The next commands I tried were to update the channel and install PHPUnit.

pear channel-discover pear.phpunit.de

pear install phpunit/PHPUnit

The channel command worked. The install command did not work since it wanted the a dependency updated, GraphViz. After updating the dependency I ran the install command again. It installed 3.1.7 and it said I could also install pdo_sqlite and xdebug. I tried to install these extensions but they ended with a DSP error.

Test the PHPUnit

To test the installation I created a new folder under htdocs called phpunit so that I would have all of the unit test files in one spot. I quickly found out that I needed a copy of the phpunit.bat file in that directory, too. This file is in the PHP folder and it has the correct path to the php.exe file. I copied the example ArrayTest from the documentation into a file called ArrayTest.php and ran the command, “phpunit ArrayTest“. It worked. Now I can move on to more sophisticated unit tests.

Final Fixups

After a little searching I found that the xdebug and pdo_sqlite extenstions already exist in the extensions folder. XAMPP installs all of the extensions but only enables a couple of them in the default installation. All I had to do was to edit the php.ini file, remove the semi-colon in front of these extensions, and restart the web server.

Communication Styles and the Future of phpWebSite

I have been pondering for some time whether to convert existing web sites from phpWebSite to WordPress. It is difficult for me to think about these things since I quickly jump to the implementation details. So I decided to back off and look at the problem from the viewpoint of communication styles. For this quick analysis I am going to compare the diary, magazine, and product brochure formats to their Internet counterparts. These communication styles have existed for a long time in printed form. I think a little pondering on where these formats came from and where the web site versions of these formats are going will give me a better strategic view.

Diary Format

  • History – The diary format is the model that blogs originally copied.
  • Frequent Updates – One of its characteristics is that it generally involves short posts on a daily basis. This feature of blogs was quickly adopted by news organizations for syndicating news over the Internet.
  • Conversational tone – A key characteristic of both diaries and blogs is that they have a conversational tone.

Magazine Format

  • History – The magazine format came about as printed magazines established a presence on the Internet.
  • Monthly Updates – Originally the web sites mimicked the printed version and were updated on a monthly basis. As magazine publishers adapted to the positive and negative impacts of the Internet on their business, they eventually adopted RSS syndication for more frequent news updates(daily) and email newsletters for less frequent updates(weekly).
  • Both formal and conversational tones – The magazine format has traditionally had a mixture of both a formal tone and a conversational tone. The articles had a professional/formal tone while the editorials has a more personal tone.

Product Brochure Format

  • History – The product brochure format came about as businesses wanted a web presence to support their sales operation. Originally these sites were fairly static web sites that reproduced the sales information that already existed in brochure form.
  • Infrequent Updating – Most of these sites were static sites. It was commonly understood that if you wanted current information you need to call them on the phone. Many business site have since migrated to dynamic content. FAQs became an easy and quick way to support customers after the sale.
  • Primarily a formal tone – For the most part the tone used by these sites can be described as professional.

So how does WordPress and phpWebSite stack up in these areas?

  1. WordPress
    • The origin of WordPress is as a blog and it is one of the best blogs out there. It has a great development community out there.
    • WordPress has shown a lot of versatility and has expanded into the magazine format. Here is an example of the magazine format, Darren Hoyt Dot Com » Blog Archive » Mimbo v1.1 Released.
    • Although you can use WordPress as a simple product brochure or Internet sales site, it does not scale up as well as other packages. A few months ago I wrote a post in which I said that a nonprofit with a “product brochure” styled site might be better served by going to a more conversational format.
  2. phpWebSite
    • The blog portion of phpWebSite was originally called Announcements. phpWebSite can function as a blog but WordPress is free and a better blog.
    • The magazine format is probably the best use for phpWebSite. The “What’s Related” feature is a great feature. Similar features can be added in WordPress via plugins. I think that articles and calendars are the areas of with the greatest potential over WordPress but the phpWebSite development community is more limited.
    • Like WordPress you can use phpWebSite as a simple product brochure site but it does not scale up as well as other packages. Using the template system for product brochures is tempting because it may integrate the key data while allowing it a bit more scalability.

So there you have it. Both WordPress and phpWebSite are pursuing the magazine formats but phpWebSite is a more natural fit for the magazine format at this time. WordPress has a much larger development community but it has many diverse interests. The primary interests for WordPress is the blog format so it is hard to tell who has the better development community in the magazine format area.

WordPress Plugins | alexking.org | Share This

This plugin will allow your visitors to share your content via social bookmarking sites and/or e-mailing the post to a friend.

Source: WordPress Plugins | alexking.org

I decided to add another plugin to the mix. To get it to work the way I wanted it to:

  1. I edited the plugin itself to turn off the automatic placement of the link.
  2. I edited the Main Index Template and put the link, <?php akst_share_link(); ?>, on the same line as the comments.
  3. I adjusted the stylesheet.css to have a little more bottom padding for the categories class so the share_this icon did not overlap the bottom border.

My theme does not validate anymore?

After installing WP 2.2 I found out that my HTML would not validate any more. It was generating annoying errors about using ID=”links” more than once on a web page. All of these errors were occurring courtesy of the built-in links widget. It took me some time but I finally found the problem. I noticed that I was not getting the same type of error when I used a different theme. That led me to look at the functions.php in both themes. In the theme that worked correctly the links widget was redefined. In the Andreas09 theme the links widget was not changed. So I copied over the code that was working properly and integrated it into the Andreas09 theme. After a suitable amount of praying and crossing of my fingers and toes, I switched over to the modified version of the functions.php and refreshed the screen. Lo and behold, it worked!
[tags]wordpress[/tags]

WP 2.2 Installed

I just got finished installing WordPress 2.2. Everything went well except that I got nailed by the wp-cache plugin.  I had disabled it before I started the upgrade per the upgrade instructions. When I tried to run the upgrade.php file in the last step of the upgrade procedure, I got a blank screen.  After a little debugging I had to manually edit the wp-config.php and remove the line, define('WP_CACHE, true) line.

WordPress 2.2

On behalf of the entire WordPress team, I’m proud and excited to announce the immediate availability of version 2.2 “Getz” for download. This version includes a number of new features, most notably Widgets integration, and over two hundred bug fixes. It’s named in honor of tenor saxophonist Stan Getz.

Read more …

I typically try to update my WordPress web sites with the changed files since Mark provides a changed files archive. For kicks I decided to use WinMerge to compare the new version to the old version. After spending a couple of minutes creating a WinMerge filter to omit the wp-content directory, I see that there are 148 changed files and 22 new files. My filter may not be entirely accurate but that is a lot of files. Updating to the new version with an updated file list does not make sense to me. I am going to upload the new WordPress version to my website and upgrade to the latest version the “normal” way with one little modification. Due to problems I have had in the past with deleting files on my web server, I rename the original directories rather than deleting them.
[tags]wordpress[/tags]

Ricardo Galli, de software libre » WP-Cache 2.1

I finally bit the bullet and added the WP-Cache plugin to the site. I do not have a response time problem but this should help if I every get Dugg. I was a little concerned it might break things. Some folks are big fans and others says it causes more problems than it is worth. So far everything has worked as expected. Hopefully this is the end of my blog plugin changes.

Link to Ricardo Galli, de software libre » WP-Cache 2.1
[tags]wordpress[/tags]

Fixing My Technorati Tag Cloud widget

I have been using the “My Technorati Tag Cloud” widget for several weeks now and I finally decided to fix the HTML validation errors.

  1. The first problem is the embedded CSS in the body of the page. It should be in the header or in the stylesheet. I prefer the stylesheet fix so I commented out lines 169 through 174 and inserted the stylesheet info into my stylesheet.
  2. The W3C validator expects the widget to be a list item. So I added a <li> before the <h2> on line 179 and a </li> behind the </ul> on line 206.

For those who are not familiar with this plugin here is a short description and a link to its author.

This plugin will download your most used Technorati tags and display them in a tag cloud on your blog just like they show up on your Technorati profile. As always this plugin has caching so that it will only talk to technorait’s web site one an hour.

Source: Warping On » Blog Archive » My Technorati Tag Cloud
[tags]css, webdesign, wordpress[/tags]

Embracing the Ultimate Tag Warrior WordPress Plugin

I finally decided to bite the bullet and switch over to the Ultimate Tag Warrior. The Related Posts plugin “worked” but the posts it said were related were not very related. I was reasonably happy with the Technorati tag cloud. It is closely linked to categories so it showed me were most of my posts were focused but I was concerned about the dependence on Technorati. So I decided to change my tagging.

Adding the UTW plugin is relatively complex task by plugin standards since you need to manually edit two theme templates, main site index and single. The automatic version would have been acceptable except the results were not right so I decided to edit the files manually. Getting the UTW tag cloud in the sidebar required me to download another widget. I may end up hacking that widget since I would prefer an alphabetic list.

So everything is working.

Link to Ultimate Tag Warrior WordPress Plugin for Dummies « Lorelle on WordPress
[tags]wordpress[/tags]

Adding Related Posts to your WordPress blog

Today I was looking at a list of the top 30 WordPress plugins in blogosphere and decided to give the related entries plugin a try. Adding a related posts section to each post should make the post more informative and handy. It was a little more complicated to add the plugin to the blog than most plugins since I had to edit your my main Index template, my single post, and my archives in my theme. The first time I edited the main template it was fatal and I had to use the back button to fix the problem. After a little tinkering I got related entries working on all three templates and looking okay.

WordPress Themes by Sadish » MistyLook Version 3

Recently I found out that my Version 2 theme had a problem with the MistyLook options screen under the latest version of WordPress and I could no longer exclude pages from the navigation bar. Before I went about hacking his code to make it work I decided to see if Sadish had upgraded his theme. I was pleasantly surprised to find that Sadish had upgraded MistyLook to Version 3. Not only had he fixed this problem but he added several other nice features such as, drop shadows, custom block quotes. The drop shadows looked nice on the posts so I am going to leave them in. I did not like that the drop shadows were being applied everywhere so I turned them off for the sidebar. Although he added a custom image header feature, I overrode it in the header.php so I could use my existing image. At another site I overrode the code so that I could use my rotating random images code. Great job Sadish!

Link to WordPress Themes by Sadish » MistyLook Version 3

Use an XHTML Sitemap for Better Indexing

Link to Use an XHTML Sitemap for Better Indexing

I just finished adding a Sitemap page to my blog using the instructions on post I have linked to above. Chris did a great job. The instructions were easy and having a single page of all my pages is pretty handy. I think Google has done a fine job indexing my blogs but occasionally I have had trouble searching for a post I have made in the past.

WordPress 2.1.1 dangerous, Upgrade to 2.1.2

Long story short: If you downloaded WordPress 2.1.1 within the past 3-4 days, your files may include a security exploit that was added by a cracker, and you should upgrade all of your files to 2.1.2 immediately.

Longer explanation: This morning we received a note to our security mailing address about unusual and highly exploitable code in WordPress. The issue was investigated, and it appeared that the 2.1.1 download had been modified from its original code. We took the website down immediately to investigate what happened.

(more…)

Link to WordPress 2.1.1 dangerous, Upgrade to 2.1.2

Just when you thought it was smart to perform changed files upgrades, they find a security breach and recommend you flatten your installation and start over with a clean install. Oh well!

Using Version Control to Manage Web Site Changes

A while back I decided that Version Control software was a better way for me to manage web site changes. This adds a little bit more documentation and incremental control over the daily backups. For small shops Version Control looks like overkill but it is simple to use. So I bit the bullet and setup a Subversion repository on my Windows-based computer. Initially I thought I would only keep my theme customizations and content in the repository but I eventually decided to keep the entire directory. Today I decided to document the process I use to update a website. In this case I am upgrading WordPress from 2.1 to 2.1.1 with a zipped file of changed files. I will be using several open source programs in addition to Subversion and TortoiseSVN. I will be using WinMerge to compare directories and FileZilla to upload the files. There are many suitable programs for these tasks. These are the ones I used.

Step 1 – Update your working copies

Use TortoiseSVN to retrieve a clean working copy from the repository.

Step 2 – Download the updated files and expand into directories

In my case the updated 2.1.1 files are in a zip file which follows the WordPress directory structure. I download the file and expand it into directories. I also print the updated file list. I am going to use the file list as my check list for the rest of the process. Stuff happens!

Step 3 – Compare the directories and update the files.

I use WinMerge as a quick check to compare the directories. I have projects set up to automate my comparison settings. It should show that the files I am updating are the ones on the file list. Surprisingly I find I am missing a couple of files shown on the changed file list. I opt to download the full source and add the missing updated files to my updates. I use WinMerge to copy the changed files over the repository files.

 Step 4 – Update the website

In this step I use FileZilla and the file list to upload the changed files. It is a real plus that my host provider allows me to use sFTP. Every extra bit of security helps keep the hackers away. Since this is a minor update I will leave all of my plugins active during the upgrade. WordPress recommends that you deactivate your plugins before updating in case you run into problems. I sort the local directory based on Last Modified date so that the changed files are on the top and easier to find. I move from directory to directory updating the changed files. FileZilla continually reminds me that I am overwriting existing files. That is good. There are only four directories and twenty file so the process goes quickly. When I have finished uploading the files I go to my browser and click on the Site Admin link in WordPress. It prompts me with links to complete the upgrade. This is normal. I follow the links and finish updating the site within a minute. I do a quick check of the website to make sure everything is still working. I have finished updating the web site.

Step 5 – Commit the changes to the repository

I use TortoiseSVN to commit the changes and with a description. When I am finished I use TortoiseSVN to check the log and make sure that the  description I just added makes sense. This is probably the last time I will look at the description until I need to understand it sometime in the future. I am happy with what I wrote so I move on to my other projects.

Technorati tags: , ,