1 kskhater Dec 09, 2005 12:32
3 kskhater Dec 09, 2005 19:29
I've done I think very nicely:
First I created this global varial in b2evocore/_functions_users.php
$admin = FALSE;
Next I added this line to the function "user_admin_link"
global $admin;
and at end of that function I put the flag
$admin = TRUE;
Last at the end of that same file I put the following function:
function mailinglist_admin_link() {
global $admin;
return $admin;
}
And in my _main.php of my skin after where the link for the admin:
if( mailinglist_admin_link() == TRUE){
echo '<li>', '<a href="http://www.alkhater.net/blog/addOns/mailinglist/admin">', 'Admin Mailing List', '</a>', '</li>';
}
I hope someone could be helped by either method! :lol:
There's a couple of ways to do this. If there's only one admin then you can make the link part of an if statement that checks the name of the person logged in. Check this thread for the code:
http://forums.b2evolution.net/viewtopic.php?t=4896&highlight=greet+name