News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

where can i find admin panel links?

Started by ocelot16, September 29, 2008, 01:11:43 PM

Previous topic - Next topic

ocelot16

i want to add a link to my admin panel, where can i find the admin panel template? or where can i edit it?

Adish - (F.L.A.M.E.R)

it is located inside SMF, you dont have to make any. In case if you cannot find the path, then here it is:-

http://yoursite.com/index.php?action=admin

Marcus Forsberg

I don't think that ocelot16 want to access the admin panel (I could be wrong) , but edit the template file of it;
Admin.template.php


ocelot16

yeah thats what im looking for. thanks nascar and flamer  :D

[SiNaN]

As a small note; if you are going to add a link to the admin menu at the left, you should add it to the adminIndex() function in Subs.php file.
Former SMF Core Developer | My Mods | SimplePortal

ocelot16

thanks sinan. one more thing. can i add something in the Administration Center? how? just want to some links as well as some content there

[SiNaN]

Subs.php, Line 2766 you can see how the link is added for Manage Attachments area. Just below, you add this:

$context['admin_areas']['layout']['areas']['your_area'] = '<a href="' . $scripturl . '?action=your_area_action">Your Area Name</a>';

Then in index.php file in the root, you should add your action in the action array as:

'your_area_action' => array('YourFile.php', 'YourFunction'),

And in your area's source file, if you add:

adminIndex('your_area');

you will have the admin menus and template loaded in your area too.

You can check how this mod does that as an example.

But if you are just adding a few settings, you can use the ModSettings area too. Check this mod for that.
Former SMF Core Developer | My Mods | SimplePortal

ocelot16

Great! Thank you very much this helps me a lot!

Advertisement: