Create A Forum - Support Forums

Support => Create a Forum Codes and Support => Topic started by: Agent Moose on August 02, 2010, 03:11:17 pm

Title: [Code] Add links to Admin Dropdown
Post by: Agent Moose on August 02, 2010, 03:11:17 pm
Footers: (Admin > Style Manager > Headers and Footers > Footers)
Code: [Select]
<script type="text/javascript">
function AdminLinks(Name, URL){
//Created by Agent Moose
if(document.getElementById("button_admin") !== null) document.getElementById("button_admin").getElementsByTagName("ul")[0].innerHTML += "<li><a href='" + URL + "'><span>" + Name + "</span></a></li>";
};
AdminLinks("Style Manager","/?action=admin;area=style;sa=headers");
AdminLinks("NAME","URL");
</script>

NAME = The Name of the link
URL = The URL of the link.

This code lets you add links to the Admin drop down menu :)
The link that is already added is just an example, you may remove it if you wish.

To add more links, add more of these lines:
Code: [Select]
AdminLinks("NAME","URL");
Enjoy :)
Title: Re: [Code] Add links to Admin Dropdown
Post by: Fate on August 02, 2010, 03:35:22 pm
Very nice.  ;)
Title: Re: [Code] Add links to Admin Dropdown
Post by: mickjav on July 09, 2020, 07:22:49 am
Thanks Works A treat.
I've edited the function so I can add items to the profile list but have one problem the member ID I know I can use this in the newletter section {$member.id} but think it would mess with the function but not sure as haven't played with this stuff for 15 years.
regards mick