Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.8
Author Message
HAMM3R
New Member
New Member



Joined: Jun 14, 2006
Posts: 22
Location: New Mexico, USA

PostPosted: Wed Nov 01, 2006 3:23 pm Reply with quote

Id like to be able to make certain sections of my module available only to admins. Id like to be able to have a seperate checkbox on the "edit admin" page for my module, this way i can give someone access without making them admin of my entire site. Ive seen this done with a few other modules before.

So what i need from you guys is how to make that check box, and what "if statement" i have to put it my module that checks if the logged in users is an admin.

Sorry i couldnt give you any more than this, I am very new to php.

Thanks in advance!
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Wed Nov 01, 2006 5:17 pm Reply with quote

I would suggest looking at existing modules (e.g. news) that allow admins to edit things directly from the module page. You could copy that logic in your custom module.

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Nov 01, 2006 11:07 pm Reply with quote

Generally for 7.5 and higher, if there's an modules/MODULENAME/admin script, there will be permissions automatically for that module script. Otherwise you would need to do as the old admin scripts did - create a permission in the authors table, authors.php script, and manually configure the scripts to use said permission

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.8

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©