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 -> Old Articles Hack
Author Message
sharlein
Member Emeritus



Joined: Nov 19, 2002
Posts: 322
Location: On the Road

PostPosted: Wed Oct 29, 2003 12:35 pm Reply with quote

Is it possible to create an admin, and allow them to only update 3 scrolling blocks? They are tournament times, top 100 and top team scores. Thank you, Steve

_________________
Give Me Ambiguity Or Give Me Something Else! 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Oct 29, 2003 1:01 pm Reply with quote

Anything is possible, for sure Wink Yes, that could be done. I would probably use the approach mentioned in this post [ Only registered users can see links on this board! Get registered or login! ] and then modify admin/modules/blocks.php to only display the 3 blocks for that admin. Make sense?
 
View user's profile Send private message
sharlein







PostPosted: Wed Oct 29, 2003 6:39 pm Reply with quote

Yes, it does. Thank you Raven.
 
sharlein







PostPosted: Wed Oct 29, 2003 8:19 pm Reply with quote

I followed the instructions for the first part, allowing an admin assigned with encyc. permissions to have access to blocks. It worked, but, lol, access to MSAnalysis also appears. What did I do wrong? (Other than get up this morning.) Thanks, Steve
 
Raven







PostPosted: Wed Oct 29, 2003 8:30 pm Reply with quote

I don't use that package so I don't know how it's setup. Is it perchance using the encyc. admin? Check the module file for MSAnalysis to see if it grants permission to encyc admins.
 
sharlein







PostPosted: Thu Oct 30, 2003 2:21 pm Reply with quote

Yes, Raven, it does. I am trying to use content, but I am running into some problems. I will start all over to make sure I am doing it correctly.
 
sharlein







PostPosted: Sat Nov 01, 2003 12:47 pm Reply with quote

I got radmincontent to work - simple errors I made, but I wonder if you could please give me a start on admin/blocks.php (to allow only the three blocks to be edited for this particular admin). Thank you, Steve
 
Raven







PostPosted: Sat Nov 01, 2003 6:49 pm Reply with quote

Start with this. In BlocksAdmin() find
Code:
   echo "<td align=\"center\" bgcolor=\"$bgcolor2\"><b>"._FUNCTIONS."</b></tr>";

   $result = sql_query("select bid, bkey, title, url, bposition, weight, active, blanguage, blockfile, view from ".$prefix."_blocks order by bposition, weight", $dbi);
and modify it to
Code:
   if ($radmincontent&&!$radminsuper) $whereClause = "where bid = 1 ||bid = 2 ||bid = 3";

   else $whereClause = "";
   echo "<td align=\"center\" bgcolor=\"$bgcolor2\"><b>"._FUNCTIONS."</b></tr>";
   $result = sql_query("select bid, bkey, title, url, bposition, weight, active, blanguage, blockfile, view from ".$prefix."_blocks $whereClause order by bposition, weight", $dbi);
You will need to substitute the actual bid for the 3 blocks that you want to restrict. Also, you may want to remove/restrict othe functions, like the Add Block functionality, too. Do that by making a check for the admin level as above and just returning from the function instead of processing it.
 
sharlein







PostPosted: Sun Nov 02, 2003 4:25 pm Reply with quote

Thank you very much, Raven. Up and running. That solved the problem.
 
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 -> Old Articles Hack

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 ©