Friday July 30 , 2010

Category: Software Development

Fix an incorrect blog URL on your WordPress Blog

Recently I ran into a problem I have seen all too many times, someone had entered the wrong URL in the admin panel of a WordPress blog and they could no longer log into the application to fix the issue. Normally this would break wordpress so that you couldn’t use the admin panel and require a manual update to the database however I came up with the idea to use WordPress’ own functions to enable an update of the URL without using the admin panel.

So there was born the idea of WP-Recover. A simple script to do one very simple task, allow you to change the wordpress blog URL when it is not working or you have entered it incorrectly.

I have decided to use the new power of my Open Source Battlefield Wiki to document the script so you can access WP-Recover on the OSBattlefield site.

A brief how-to:

1. Upload recover.php to your root wordpress folder (the same folder that wp-config.php exists in).
2. Open your wp-config.php file however you would like and get the first five charaters of the AUTH_KEY string (excluding the ‘ )
3. In a web browser access http://www.yoursite.com/yourwordpressfolder/recover.php
4. Enter the new URL for your site (ensuring it is in the format ‘http://www.yoursite.com/yourwordpressfolder’ without the ”)
5. Click Submit
6. Once you receive a confirmation message DELETE recover.php from your wordpress folder. Leaving it there is a DRASTIC security risk.

Download

WP-Recover v1.0 Stable

Getting Help

Ideally if you need assistance please pop over and log a bug/support request on the JIRA Bug Tracking Site, although if you have any issues using that you can also use the Open Source Battlefield Contact Page or leave a comment here.

 

Bid Request Documentation on Rent A Coder

As I have recently been through a good handful of projects using Rent A Coder I have had the opportunity to fine  tune the way I do bid requests within the system. For my latest bid request I had two somewhat complex coding problems that needed resolving and using the simple description  boxes would not allow me to define the problem completely. Therefore I found myself with a need to better define and document small projects/bid requests so that I could ensure the Workers bidding on my project would have a detailed understanding of what is required.

The result of this is a new document I have put together to help new users to Rent A Coder gather all the details they need to ensure when a bid request is put in they will eliminate a lot of the potential for confusion in putting forward a bid request. The aim of the document is to enable an easy and standard means of documenting a bid request when there is a greater level of complexity required than the standard descriptions boxes but simple enough to be used for a project in the sub $100USD or sub $500USD range.

Most of my bid requests have focused around getting CSS fixes for my WordPress or Joomla sites and sometimes resolving layout issues or making small design changes. While the document has been written with my specific bid requests in mind I have made every effort ensure it is generic enough that it could be used for other small projects such as logo design and so on.

I am making this template freely available, all I ask is that the template copyright notice at the bottom is kept in tact if you use the document template.

The document is available in Microsoft Word 2003 .doc format from my documentation subversion repository or by clicking the image below.

Click Here to Download Rent A Coder Project Initiation Document

I welcome any feedback on the template as I would like to continue to try to perfect it and tweak it with suggestions from the community.

Stuart

Disclaimer: In this post I have used affiliate links to Rent A Coder, these links in no way affect the content of my post but in the interest of complete disclosure I like to mention that they are there.

 

WordPress: Getting SplashScreen to work with WP-SuperCache

If you have ever attempted to use the SplashScreen plugin for WordPress with WP-SuperCache, you may have run into issues with WP-SuperCache caching the splash screen and not letting users past it.

There is a quick and simple fix for this, in your template file for what to display on the splash page, put the following code just before the </body> tag:

<?php define ("DONOTCACHEPAGE",1); ?>

This will tell WP-SuperCache not to cache the page and will let the site operate as normal.

Stuart

 

WordPress Plugin SplashScreen – SEO Fix

After doing some work recently for a client, I discovered that I needed to make some modifications to a plugin for WordPress called SplashScreen.

To be honest when I wrote the fix I did not realise there was a new version released, however I have found out that my fix still provides features I need.

For those that are looking to permit bots and search indexers to access your site using the SplashScreen plugin modify splashcreen.php to reflect the following updated function:

function display_splash() {
 function isBot() {
 $user_agent= array("bot", "ia_archive", "slurp", "crawl", "spider", "Yandex");
 $count = 0;
 foreach ($user_agent as $substring) {
 $count += substr_count( strtolower($_SERVER['HTTP_USER_AGENT']), $substring);
 }
 return $count;
 }

 global $splash;
 $bot = isBot();
 $splash->getSettings();

 if (($splash->allSettings['splashscreen_enable']) && (!is_admin()) &&
   (!$splash->is_excluded_url()) && (!isset($_COOKIE["splash"])) && ($bot == 0)) {
 // display the splash screen
 $dir = dirname(__FILE__) . '/';
 @include_once($dir . $splash->allSettings['splashscreen_type']);
 exit();
 }
 }
}

The benefit this has over the newer version is that you can still use an entirely separate page.

Hope it helps someone else.

Stuart

 

Software Design – The joys!

Well I have been wanting to develop a few different programs for some time, and after recently releasing cPanelSVNManager on OpenSourceBattlefield.com. Therefore I decided to pull out some of my documents from a few semesters ago. Namely the System Requirements Specification (SRS) among other things from the subject System Development Project (SDP) at the University of Technology Sydney (UTS).

After removing all the details from the previous project I hold in my hand (so to speak) a 25 page skeleton of all the details I need to fill out. At least I have managed to get all the details into Redmine and so now I can begin working on the SRSs for both of the new programs I want to work on.

The first is an extension of cPanelSVNManager, not completely sure on all the details yet, hence the reason for the SRS. The other is one you will just have to keep your eyes out for that will be released as Open Source software and will mostly be targeted at bloggers or people with personal websites.

If you are interested I will be tweeting somewhat more regularly as http://twitter.com/OSBField_Stuart or as always you can follow me on my personal twitter account http://twitter.com/ereality.

Alas at this stage I will not be releasing the SRS for cPanelSVNManager however I may do so for the other program that I am working on.

Stuart

 

Advertisement