Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 12:04 am EST
Geeklog Forums
Anyone know how to identify admin/super user in the code
Status: offline
ebizbuys
Forum User
Newbie
Registered: 03/18/05
Posts: 5
Hi,
Just getting my head around GL. Really getting somewhere with it so thanks to all who has made GL what it is and what it will be. I know there probably is a 'better' way to do this I am sure but I have been through the forum and cant find out how.
I dont want 'all users' to add links or add events to the calendar - only the admin. For the calendar I have turned off the personal calendar function in config. I have found the code for where to do this in the appropriate files but I want to eliminate the 'add event' button on the calendar and I am going to do something like:
if($ADMIN_USER == true)
load the 'add event' button
else
show no button
same with the add links functionality.
However, I havent quite worked out what is the 'admin' identifier handle. I havent quite grasped the autotags yet - but look powerful. Where are they stored? I plan to use GL a lot in the future with heaps of sites and I will hopefully make some good contributions somewhere down the track.
Just getting my head around GL. Really getting somewhere with it so thanks to all who has made GL what it is and what it will be. I know there probably is a 'better' way to do this I am sure but I have been through the forum and cant find out how.
I dont want 'all users' to add links or add events to the calendar - only the admin. For the calendar I have turned off the personal calendar function in config. I have found the code for where to do this in the appropriate files but I want to eliminate the 'add event' button on the calendar and I am going to do something like:
if($ADMIN_USER == true)
load the 'add event' button
else
show no button
same with the add links functionality.
However, I havent quite worked out what is the 'admin' identifier handle. I havent quite grasped the autotags yet - but look powerful. Where are they stored? I plan to use GL a lot in the future with heaps of sites and I will hopefully make some good contributions somewhere down the track.
10
17
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Text Formatted Code
if(!SEC_inGroup['root']){
don't do anything;
} else {
do something;
}
see lib-security.php for more info
for the most part, I think you can probably get by with the editable settings in config.php. They are designed to allow/disallow users access to various items and to various degrees.
18
11
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by ebizbuys: I havent quite grasped the autotags yet - but look powerful. Where are they stored?
They are coded into the plugins (and the one supported by Geeklog are in system/lib-plugins.php, function PLG_replaceTags).
Did you see About Autolinks And Autotags? (and, yes, that link is created by an autotag)
bye, Dirk
10
17
Quote
All times are EST. The time is now 12:04 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content