Admin to custom modules.

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Admin to custom modules.
Donovan
CZ Active Member
 Codezwiz Site Donator
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
How do you enable custom modules and assign admin permissions to others. For instance if I had Nuke Ladder installed but wanted to give the admin duties to others without giving that person a superuser account, how could I do it?



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
If you look in the admin.php you could easiily figure it out by copying another one and changing the field name.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: Admin to custom modules.
Donovan
CZ Active Member
 Codezwiz Site Donator
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
You mean from here html/admin.php

function GraphicAdmin() {
    global $aid, $admingraphic, $language, $admin, $prefix, $db;
    $newsubs = $db->sql_numrows($db->sql_query("SELECT qid FROM ".$prefix."_queue"));
    $sql = "SELECT radminarticle,radmintopic,radminuser,radminsurvey,radminsection,radminlink,radminephem,radminfaq,radmindownload,radminreviews,radminnewsletter,radminforum,radmincontent,radminency,radminsuper FROM ".$prefix."_authors WHERE aid='$aid'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $radminarticle = $row[radminarticle];
    $radmintopic = $row[radmintopic];
    $radminuser = $row[radminuser];
    $radminsurvey = $row[radminsurvey];
    $radminsection = $row[radminsection];
    $radminlink = $row[radminlink];
    $radminephem = $row[radminephem];
    $radminfaq = $row[radminfaq];
    $radmindownload = $row[radmindownload];
    $radminreviews = $row[radminreviews];
    $radminnewsletter = $row[radminnewsletter];
    $radminforum = $row[radminforum];
    $radmincontent = $row[radmincontent];
    $radminency = $row[radminency];
    $radminsuper = $row[radminsuper];
    OpenTable();
    echo "<center><a href=\"admin.php\"><font class='title'>"._ADMINMENU."</font></a>";
    echo "<br><br>";
    echo"<table border=\"0\" width=\"100%\" cellspacing=\"1\"><tr>";
    $linksdir = dir("admin/links");
    while($func=$linksdir->read()) {
        if(substr($func, 0, 6) == "links.") {
           $menulist .= "$func ";


Add another row and call it something like $radminladder = $row[radminladder];


Back to top Reply with quote
#4   re: Admin to custom modules.
FuZZyLoGic
CZ Super Newbie
FuZZyLoGic has been a member for over 20 year's 20 Year Member
usa.gif
Website:
Status: Offline
Joined: Jul 21, 2004
0.00 posts per day
Posts: 30
Points: 5,338
   
Hi, I had this same questiion once. The truth of the matter is if you add more fields to the table you may have to change other modules that call that table. What I did is if you go into root/admin/modules and root/admin/links and look for the files that relate to the mod you want to change the permissions on. You can hardcode the new permissions in there for example you will see something like this in the first few lines

if ($radminsuper==1) {


change that to reflect what you want the permissions to be for example if you wanted your superadmins or you enclopedia admin to be able to admin that you would change it to this

if ($radminsuper==1 or $radminency==1) {


you can also hard code a particular admins name in there so long as it is in the authors table like this

if ($radminsuper==1 or $aid==Mary) {


sometimes the permissions are only set in the root/admin.links/links.modulename.php file
sometimes you have to edit the file in /root/admin/modules as well.

hope this helps

Cheers
FuZZy


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum