QuikPik Textpattern Menu Hack
UPDATE May 8, 2005: The QuikPik Textpattern Menu Hack will no longer be supported. You can find the same functionality in the newer rss_admin_quikpik plugin.
While for the most part I’ve had little complaint about the TXP admininstration interface, the one thing that has always bothered me was the tabbed navigation scheme. While working in the system it becomes very tedious to edit content, presentation and admin settings unless you’re not averse to opening multiple tabs at the same time. Thats been my workaround up until now thanks to the QuikPik Menu Hack.
What the hack does is create a nice drop down menu in the upper right hand corner of the TXP admin area. This list will display all of the available options that otherwise couldn’t be seen unless you had already selected the top level tab. The hack is respectful of privilege levels so the options in the menu are the same as those available through the tabs. Here’s what it looks like:

As an added bonus for people who manage multiple TXP sites, the site name will be displayed next to the menu. In order to install the hack, there are only 2 changes required to lib/txplib_head.php file. You can either make the changes as noted below or download my txplib_head.php, rename it to txplib_head.php and replace your existing file. As always, before replacing or updating your own file make sure you have a clean backup copy.
In order to update your own file, first insert the following code at the end of the file before the closing php tag.
// ----------QuikPik Hack - Rob Sable-----------------// ----------http://www.wilshireone.com---------------// ---------------------------------------------------function quikpik($event){global $siteurl,$path_from_root,$privs;$qpsarr = array(1=> array('content','1,2,3,4,5,6','article'),2=> array('presentation','1,2,3,6','page'),3=> array('admin','1,2','prefs'));$areas = areas();$out[] = '<form action="index.php" method="post">'.n;$out[] = $siteurl.substr($path_from_root, 0, -1).' :: QuikPik :: <select name="quikpik" class="list" onChange="location.href = document.forms[0].quikpik.options[ document.forms[0].quikpik.selectedIndex ].value;">'.n;foreach($qpsarr as $qps) {if (strstr ($qps[1], $privs)) {$out[] = '<option style="font-weight:bold; font-size:110%; color:#900;" value="index.php?event=' .$qps[2]. '">'.ucfirst($qps[0]).'</option>'.n;foreach($areas[$qps[0]] as $a=>$b) {$out[] = piker($a,$b,$event,2);}}}$out[] = '</select>'.n;$out[] = '</form>'.n;return join('',$out);}function piker($label,$tabevent,$event){$tc = ($event==$tabevent) ? ' selected="selected"' : '';$out = '<option value="index.php?event='.$tabevent.'"'.$tc.'> --'. ucfirst($label) .'</option>'.n;return $out;}// ---------------------------------------------------// ----------http://www.wilshireone.com---------------// ----------QuikPik Hack - Rob Sable------------------ Download this code: /code/quikpik.txt
Then, replace line 63 of the file (which begins with Then just reload your page and your QuikPik menu should appear. This has been tested on RC1 as well as the more current Rev 46/49. 6. November 2004 Thankyou for sharing! kamvik Commenting is closed for this article. Textpattern Solutions is the first book published on Textpattern. details at friends of ED or the official book website. buy it at amazon.com web development, textpattern, photos, general tech, miscellany<tr>) with the following code.
<tr><td align="right" style="background:#FFCC33 url(txp_img/textpattern.gif) no-repeat center left;padding:10px 10px 0 0;"><?php if (!$bm) echo quikpik($event) ?></td></tr>Comments
Textpattern Solutions
Journal Categories
Textpattern Plugins