admin-only navigation bar to bridge several projects

Sometimes I want the home page of a project to look different to administrators than to regular users.  For instance, on a couple projects of mine I was integrating several different technologies, osTicket, osProject, and WPMU — each one of these has different locations for their administrative use, so it is therefor useful to have a navigation bar so administrators can toggle between locations as needed.  The thing is, we don’t want that navigation bar to show up to regular users because it would just confuse them as they don’t have access.  So… and this isn’t brain surgery, I just add the following code whereever I want the navigation bar to show up.  My personal preference is in the footer file of whatever theme I’m using:

<?php wp_register(”,’  <a href=”http://iwebspider.com/support/admin.php”>Support Admin</a>  <a href=”http://iwebspider.com/projects/”>Project Admin</a>’); ?>

You have to change the http addresses to correspond to YOUR projects of course, just hope this serves as a nice template if you need to bridge several projects with a cloaked navigation bar.

LaunchPad tweaks for WPMU

LaunchPad is a great WordPress theme for parked domains — allows you to accept requests for rss subscriptions to your site while you are still in development, thus you can build a database of people interested in your website before you even launch.  I’m using it with a WPMU project of mine and had to tweak a couple of the files to get the functionality I liked.  Here’s the files and the changes:

themes/launchpad/index.php      changed around line 29 that read:

<p class=”rss-subscribe”><a href=”<?php if($lp_feedburner_address) { echo $lp_feedburner_address; } else { bloginfo(‘rss2_url’); }?>”

to

<p class=”rss-subscribe”><a href=”http://MY_WPMU_DOMAIN_NAME.com/feed/rss/”

obviously put in your own domain name where it says MY_WPMU_DOMAIN_NAME.com

I also changed the footer to be kind of an advertisement for myself as the developer of the project, by changing around line 42 from:

<p>Powered by <a href=”http://wordpress.org/” title=”WordPress”>WordPress</a>, <a href=”http://feedburner.google.com/” title=”Google FeedBurner”>Google FeedBurner</a> and <a href=”http://themeshaper.com/” title=”A ThemeShaper Theme”>ThemeShaper</a>.</p>

to

<p>Powered by <a href=”http://mu.wordpress.org/” title=”WordPress Mu”>WPMU</a>, php/mysql application development and customization by <a href=”http://www.iwebspider.com/” title=”iwebspider.com”>iWebspider</a>, lead developer <a href=”http://www.iwebspider.com/stefan_christian/” title=”Stefan Christain Densmore”>Stefan Christian Densmore</a>.</p>

branding osTicket

One of the best things about Free Open Source Software is that you not only can tweak the code, you can re-brand it as well.  The osTicket platform has been a favorite of mine to track customer support requests.  The development community for osTicket came out with a new release of the software recently, here’s where the banner images are located (relative to the install folder) if you are interested in re-branding the software:

/images/… logo-support.gif, and ostlogo.jpg

/scp/images/… poweredby.jpg, logo.jpg and logo2.jpg

WP-Table plugin – Fatal Error fix for WordPress 2.5+

The following post first appear at http://www.wpsnippets.com/2008/06/wp-table-plugin-fatal-error-fix/

WP-Table plugin by Alex Boelinger is a unique WordPress plugin that allows admins to create tables, by this I mean the ones with rows and columns like in Excel, easily in WordPress. It is the only one that I am aware of at the moment that makes it possible to add actual tables without putting-in extra HTML when creating new posts and pages.

However, activating the latest version (1.52) of the plugin triggers a fatal error (shown below) in WordPress 2.5+:

Plugin could not be activated because it triggered a fatal error.

Fortunately there is a quick fix that can be done to resolve this issue, where the full credit for this solution goes to Michael Bester, the developer of the Kimili Flash Embed, who posted a comment on Jovel Stefan’s Embedded Video Plugin post about a fix to ensure that a plugin should check for the buttonsnap class upon activation.

This class is used to add a button to your WordPress editor, and should only ever be loaded once, so if any other plugin uses buttonsnap, it will cause the fatal error to occur.

To resolve this problem, find Line 344 in wp-table.php

require_once(WPTABLE_ABSPATH.'js/buttonsnap.php');

and add before it:

if(!class_exists('buttonsnap'))

So ultimately you should see this:

// ButtonSnap needs to be loaded outside the class in order to work right
if(!class_exists('buttonsnap'))
require_once(WPTABLE_ABSPATH.'js/buttonsnap.php');

I tested this on a local install of WordPress 2.5.1, and it worked very well. This quick fix has also been posted on the WordPress Support Forums, and hopefully others will find it helpful as well.

Any feedback would be brilliant! If it works for you, please let me know by posting in the comments. Similarly, if it doesn’t work for you, then again, please do post! I don’t see the plugin requiring any further edits for the time being (apart from new features) and am confident that it will also work with later WordPress versions as well.

UPDATE 20/07/08: Apparently the plugin does work with WP 2.6!
UPDATE 28/12/08: And in WP 2.7 as well!