PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
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 Back to top

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: 4624

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

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.
View user's profile Send private message
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2749

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

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
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum