Sivel.net  Throwing Hot Coals


Poll for New OPs in WordPress IRC Channel Opened

Over the past few months to a year I have noticed a lack of OPs in the WordPress IRC Channel. In the recent days there have been several times when an OP was needed but no one had OP access. I brought this to the attention of Matt Mullenweg via email over the weekend with hopes of getting new OPs in the channel. It seems as though Matt has come through by setting up a poll at http://surveys.polldaddy.com/s/3e0fcdaf55f1baed/.

For those of you who use the WordPress IRC channel, please help out by completing the survey and listing the users that you think would make good OPs in the channel.

I won’t be shy, and will come straight out an say that I would be honored to be an OP in this channel. I spend a large majority of my time in this channel, probably amounting to over 40 hours a week, helping users as best I can. If you decide that I would make a good OP and want to include me in your poll, my IRC nick is sivel.

WordPress

Shadowbox IE8 Woes

With the release of Microsoft Internet Explorer 8 and the high number of questions I have been fielding about Shadowbox.js not working under the newly released IE8; I figured I would work on a hack that would allow the Shadowbox JS plugin to work with IE8 until Michael J. I. Jackson releases a version that natively supports IE8. I intend on releasing an update to the Shadowbox JS plugin soon to include IE8 support. Stay tuned for the release.

Asides Plugins WordPress

Shadowbox JS WordPress Plugin v2.0.4.1 Released

The Shadowbox JS WordPress plugin has been updated to version 2.0.4.1. New to this version is Internet Explorer 8 support by way of the X-UA-Compatible meta tag. This hack is disabled by default because…well…it is a hack. To enable IE8 support visit the Shadowbox JS settings page in the WordPress admin and set ‘Internet Explorer 8 Hack’ to ‘true’. Enjoy!

Asides Plugins WordPress

Shadowbox JS WordPress Plugin v2.0.4.0 Released

The Shadowbox JS WordPress Plugin has been updated to version 2.0.4.0. More big changes in this version. Now using domready events for all javascript libraries other than ‘None’ for initialization of Shadowbox.js before the site is completely loaded, support for custom shadowbox.js skins by use of a filter and numerous other changes. Check the change log at the link provided. Enjoy!

Asides Plugins WordPress

WordPress Update/Install Clarifications and Requirements

Recently I have been responding to numerous questions about the update/install functionality in WordPress for core, plugins and soon themes. I wanted to take a few moments to make some clarifications and to inform people of the requirements.

To update the WordPress core or update/install plugins or themes without having to enter your FTP/SSH information you have 2 options:

  1. Define the required constants in wp-config.php
  2. Make the necessary file permission/ownership configurations required to use a direct update/install instead of using FTP or SSH

For information on achieving the first option see take a look at the follow links:

The second option is a little more confusing for some people. Most people think that as long as they give full write access to the plugins or wp-content directories that they will not be asked for their FTP/SSH connection information. Unfortunately, this falls short of the requirements for performing a direct update or install. There are 4 possible methods for performing the file operations. The operations are ‘direct’, ‘ftp’, ‘ssh2’, and ‘ftpsocket’. The direct method allows php to do all of the file operations on its own without requiring any external dependencies. For the ‘direct’ method to work, the web server, and by extension php, needs full write access to the files it is trying to modify.

WordPress determines if it can perform a direct update or install by performing a few file operations and looking at the ownership of those file operations. Here are the steps that WordPress goes through when making the determination.

  1. Returns a suitable temporary directory to create a test file (the following is in the order of precedence)
    • If WP_TEMP_DIR is defined it will return this value
    • If WP_CONTENT_DIR is writable by the web server user it will return the path to the wp-content directory
    • If you are running PHP 5.2 or newer it will determine the systems temp directory using sys_get_temp_dir()
    • As a fall back it will return /tmp/
  2. Creates a unique file via touch() in the temporary directory returned in step 1 and returns the path to this temporary file
  3. If the file system owner of wp-admin/includes/file.php and the file system owner of the temporary file that was created are equal to each other then it will use the direct method and then the temporary file is removed
    • The check that is performed uses the file system owner of wp-admin/includes/file.php and not the run time user of that script
    • This is, in my opinion, the most reliable way to make sure that the user the web server is running as can make modifications to all of the WordPress files
  4. If the check failed to use the direct method it will check for the possibility of using:
    • SSH2
    • FTP
    • Sockets (fsockopen, fwrite, fread)

So with the above steps for determining whether or not the ‘direct’ method can be used there are several things that can be done to allow WordPress to use the ‘direct’ method.

  1. If you want to do core upgrades as well as plugin and theme upgrades/installs you can change the ownership of all of the WordPress files to be that of what the web server is running as
  2. If you only want the ability to do plugin and theme upgrades/installs you can modify the ownership of wp-content, all of its contents and wp-admin/includes/file.php to be that of what the web server is running as
  3. If you want to do core upgrades as well as plugin and theme upgrades/installs you can set permissions on all of the WordPress files and all of its contents that give the web server write access to those files and then add a filter to the filesystem method by way of a plugin or addition to functions.php
  4. If you only want the ability to do plugin and theme upgrades/installs you can set permissions on wp-content and all of its contents that give the web server write access to those files and then add a filter to the filesystem method by way of a plugin or addition to functions.php

I am sure there are about 100 different combinations of the above methods, so feel free to experiment.

Since #1 and #2 are fairly self explanatory I will skip those and explain #3 and #4.

  1. Change the file/directory permissions of either the WordPress root or wp-content and all of their contents so that the web server user has the ability to modify those files and write to those directories
  2. Add the following bit of code to either your themes functions.php or to a plugin add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’));

In methods 1 and 2 we simply fulfill the requirements needed by WordPress to return the ‘direct’ method on its own. In methods 3 and 4 we have made sure that the web server can do what it needs to the WordPress files and because of this we can tell WordPress to always use the direct method.

I believe that should about cover it. If I have made any mistakes or forgot to include something please let me know. Enjoy!

HowTo WordPress

Page Restrict WordPress Plugin v1.6 Released

The Page Restrict WordPress Plugin has been updated to version 1.6. New to this update is a meta box for easy restriction on the write/edit page pages, restrict viewing comments on restricted pages and restrict page content in search results. Enjoy!

Asides Plugins WordPress

Server Troubles

Around 10PM EST last night (March 11, 2009) the server that hosts all of the sivel.net domains and FreeMyFeed went off line due to reasons unknown at this time. As of 8:40AM EST today (March 12, 2009) all sites and services are back up and running. Apologies for the down time.

Asides BullShit News Technology

Public Post Preview WordPress Plugin v1.1 Released

The Public Post Preview WordPress Plugin has been updated to version 1.1. New to this update is not limiting public previews to posts in draft or pending status. The plugin now allows public previews of any post that is not in ‘publish’ status. Enjoy!

Asides Plugins WordPress

Fast WordPress Function and Template Tag Lookups

If you are like me, then you are often referring to the function and template tag documentation on the WordPress Codex. My friend, Andy Stratton, got tired of having to open google, typing in the function name and then clicking on the link to the codex returned in the search results. To make his life easier he wrote WPLookup. WPLookup gives you a simple search box that will redirect you to the documentation for the function or if it doesn’t exist, redirect you to the WordPress.org search where you can see documents containing the function or text you are looking for.

To make the service even better you can integrate it into your web browsers search bar for even faster lookups.

I have taken his service one step further and written an IRC bot that is currelty sitting in the WordPress IRC Channel. To use this bot type something in the form of .codex get_pages and it will query WPLookup and return the resulting URL back to the channel.

See the following links for his release announcements about this new service:

  1. Find WordPress Function and Template Tag Documentation - Fast
  2. New WPLookup Features - Set WPLookup as a browser search engine
CoolStuff News Technology WordPress

Lightview JS Removed Due to Licensing

I was recently contacted by Nick Stackenburg in regards to my Lightview JS WordPress plugin. It seems as although the license stated that I was allowed to freely distribute the Lightview code, there was a per domain license involved as well. Since I am in conflict with his license I am removing the Lightview JS plugin completely from the WordPress Plugin Repository as all versions have contained the Lightview code.

For the users of my Lightview JS plugin I am recommending that you switch to either my Shadowbox JS plugin or to the Lightview Plus plugin written by Thorsten Puzich. Users switching to the Lightview Plus plugin should purchase the domain license from the Lightview project page.

News Plugins WordPress