Topic: Adding links to admin panel

hello, I've read several posts on here about adding addional links to punbb, but none that I have found cover adding links to the Admin panel. I have an external website (outside the forum dir) that I have a couple things added to, like a poll, and a news manager, I was wondering if there was a way I can add links to these to the bottom of my admin panel? maybe add another nav block called something like "Additional Tasks" and in it have "News Manager, Poll Manger, blah blah"

Thanks
Juston

Re: Adding links to admin panel

if you just want to add a links page you can do it like this:

If your plugin is for administrators only, the filename must have the prefix "AP_". If it is for both administrators and moderators, use the prefix "AMP_".

create a test php page called AP_Hello_World.php Place this code into the page and put the page into the plugins folder and you are done:

<?php
// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
    exit;

// Tell admin_loader.php that this is indeed a plugin and that it is loaded
define('PUN_PLUGIN_LOADED', 1);

// Display the admin navigation menu
generate_admin_menu($plugin);

echo "Hello World";

Re: Adding links to admin panel

rapionet wrote:

if you just want to add a links page you can do it like this:

If your plugin is for administrators only, the filename must have the prefix "AP_". If it is for both administrators and moderators, use the prefix "AMP_".

create a test php page called AP_Hello_World.php Place this code into the page and put the page into the plugins folder and you are done:

<?php
// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
    exit;

// Tell admin_loader.php that this is indeed a plugin and that it is loaded
define('PUN_PLUGIN_LOADED', 1);

// Display the admin navigation menu
generate_admin_menu($plugin);

echo "Hello World";

This code is for adding a new link on the plugins section in the admin page.


If you only want links to show in the admin panel then you will need to make a new section in the admin.tpl <pun_customadminlinks>.

And in header.php add:

// START SUBST - <pun_customadminlinks>
$tpl_main = str_replace('<pun_customadminlinks>','<div id="brdmenu" class="inbox">'."\n\t\t\t". generate_adminnavlinks()."\n\t\t".'</div>', $tpl_main);
// END SUBST - <pun_customadminlinks>

And in functions add:

//
// Generate the "admin navigator" that appears at the top of the admin page
//
function generate_adminnavlinks()
{
    // Links
    $links[] = '<li id="adminlink ID"><a href="PAGE"> Message</a>';
    $links[] = '<li id="adminlink ID"><a href="PAGE"> Message</a>';
    
return '<ul>'."\n\t\t\t\t".implode($lang_common['Link separator'].'</li>'."\n\t\t\t\t", $links).'</li>'."\n\t\t\t".'</ul>';
}
Sorry. Unactive due to personal life.