If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / Creating a new section in admin

Creating a new section in admin

Locked

Started by lrohenaz on 17 May 2006, 4:44 PM · Views: 2,532

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
17 May 2006, 4:44 PM
#1
lrohenaz avatar

lrohenaz

New Zenner

Join Date:
Mar 2006
Posts:
7
Plugin Contributions:
0

Creating a new section in admin

How do you just add a new section in the admin? I'm trying to get some of the basic work done for a module I am attempting to write, but I cant figure out how to just add a new item under Tools menu. Can someone help me out with this?

17 May 2006, 6:07 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Creating a new section in admin

lrohenaz:

How do you just add a new section in the admin? I'm trying to get some of the basic work done for a module I am attempting to write, but I cant figure out how to just add a new item under Tools menu. Can someone help me out with this?
Create your module called say "mymod.php".

Create a file called "mymod_tools_dhtml.php" with the following code```php

<?php /** * @mymod_tools_dhtml.php * @call to include mymod link in admin->tools * * @author * @copyright * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License V2.0 * @version $Id: mymod_tools_dhtml.php version no, date */ $za_contents[] = array('text' => BOX_TOOLS_MYMOD, 'link' => zen_href_link(FILENAME_MYMOD, '', 'NONSSL')); ?>
and put it in admin\includes\boxes\extra_boxes

create a file called mymod_data.php with the following code```php
<?php
/**
 * @mymod_tools_data.php
 * @defines for mymods
 *
 * @author
 * @copyright 
 * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License V2.0
 * @version $Id: mymod_tools_dtata.php version no, date
 */

define ('BOX_TOOLS_MYMOD', 'My Mod');
define ('FILENAME_MYMOD','mymod');
?>

and put it in admin\includes\extra_datafiles

More experienced forum members may suggest minor modifications to this, but overall I believe this should work.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

17 May 2006, 6:28 PM
#3
lrohenaz avatar

lrohenaz

New Zenner

Join Date:
Mar 2006
Posts:
7
Plugin Contributions:
0

Re: Creating a new section in admin

That's awesome. Something simple enough, would have taken me forever.

I thought the 'extra_boxes' was for adding something to the 'Layout Boxes Controller'.

Thanks!