Plugins blockCreating a block listing all plugins on your siteSometimes having all the plugins in the menu bar along the top of your page can create a cramped look, particularly if you also have lots of static pages there too. Here is a simple function (add it to your lib-custom.php file) that creates a block that lists all your plugins - at least the ones that would have appeared in the menu bar. That way you can remove the links in the menu bar and have a less cluttered site. The code is modified from lib-common.php. Firstly, copy the following code and add it to your lib-custom.php at the bottom of the file (or anywhere, just as long as it is inside the <?php ?> tags and not in the middle of another function):
/*
Next, you need to create the block. From the block manager on your administration control panel, create a new block. Set the title to "Plugins" or something like that, the name to anything unique you like, and set the topic and position options as you like. Make it a PHP block, and set the name of the function to "phpblock_Plugins". Finally set access permissions at the bottom of the page and save. You can also download the code from the downloads section or get the file directly from here. Another version here below, also checks the static pages database for a page with the same id as the plugin name with spaces removed, and then adds a link to that page in the block if the page exists. Ideal for developers who want to add a page explaining their plugin.
/*
Finally, to remove the links from your menu bar, the quickest way to hack this is to remove the item "" from the file header.thtml in each theme directory. This is not the best solution as it does not prevent Geeklog from processing the menu links and taking up server time, but it is quick and easy. If you are confident, you could hack lib-common.php to remove the code - only for the brave.
|
|
Copyright © 2010 Heather Engineering All trademarks and copyrights on this page are owned by their respective owners. |
Powered By Geeklog Built by Heather Engineering |