Part of the EllisLab Network
pMachine Pro has been replaced by ExpressionEngine, our full featured web publishing solution. Please consider upgrading.
You can download pMachine Pro here: Download pMachine Pro  |  Download Language Packs
   
 
Adding Calendar controls to lower level admins
Posted: 21 November 2004 10:02 PM   [ Ignore ]  
Summer Student
Total Posts:  12
Joined  2003-09-19

I am doing a church website in pMachinePro. There will be many registered authors - most are very computer challenged. I would like to keep their access to website controls limited so they don’t break templates etc. The admin levels provided by the system work great for this with one exception.

I want to let my Admin Level 3 authors have access to the event calendar controls in their control panel. The Level 3 control panel doesn’t provide this. Raising these authors to Admin Level 4 does, but it also gives them access to most everything else as well - a scary thought.

Where is this controlled? I assume that a hack to the code will be needed. Any hints on adding the calendar controls to the Level 3 admin control panel would be appreciated.

Profile
 
 
Posted: 22 November 2004 12:21 AM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  2002-06-19

This is untested, but try this:

1. Make a backup of pm/index.php so that you can revert if things don’t work.

2. Open up pm/index.php for editing.

3. Look around line 913 and you’ll see the beginning of the code for the “calendar menu”.  It starts with this:

elseif ($m == "calendar")

4. Scroll down and you should see, by my count, seven instances of code containing this:

access_privs(10)

Simply change the “10” to the member level you desire.  For Admin Level 3, that would be “9”.  If you want finer control over exactly what the Admin Level 3 members can do then you can decide which of the above instances to update.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 25 November 2004 09:32 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  12
Joined  2003-09-19

Chris,
Thanks for the reply. I tried your suggestion but I couldn’t tell that anything changed at all. I tried a whole range of numbers to replace the “10” but nothing changed. Any other ideas?
Thanks.

Profile
 
 
Posted: 25 November 2004 12:48 PM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  2002-06-19

What exactly is the behavior you’re experiencing?  Can Admin Level 3 members see any of the calendar section?

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 25 November 2004 08:28 PM   [ Ignore ]   [ # 4 ]  
Summer Student
Total Posts:  12
Joined  2003-09-19

When an Admin Level 3 logs onto their control panel, there are no controls for entering events into the calendar. There is no mention of the calendar on the left-hand side of the screen where the other links are for control panel functions. (There is a mini-calendar showing entry dates for the author.)

The Admin Level 4 control panel has these links, but it has other links, such as the ones to templates, that I don’t want to give access to.

Profile
 
 
Posted: 26 November 2004 12:19 AM   [ Ignore ]   [ # 5 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  2002-06-19

This is strange: I can’t figure out where the member level is being set that’s necessary to view the calendar section.  However, I think maybe we can just force it.

Open up pm/index.php again and look around line 306.  You should see something like this:

if(!isset($m)) $m ="";

Immediately before that, add this code so that it looks like:

if (access_privs(9))
{
  $menu_ca
= "on";
}

if(!isset($m)) $m ="";

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 26 November 2004 07:52 AM   [ Ignore ]   [ # 6 ]  
Summer Student
Total Posts:  12
Joined  2003-09-19

Chris - Still no luck.

I don’t know if there is any connection, but a tried the fancy calendar hack that was listed in these forums, but I didn’t get it to work right. When it displayed the event popup, it showed the tags instead of inserting the information (ex: %%grp%%).

I gave up and tried to reverse my steps, but it never did stop displaying the tags. I don’t know if this is also affecting the control panel display.

Now that the image gallery module has been added to EE, I’m thinking seriously about upgrading to it. The publishing interface looks a lot more user friendly for my computer-shy authors, and the thumbnailing feature will be helpful. It doesn’t appear to have an event calendar at all, so this problem will be taken care of. Is there an event calendar on the drawing board for EE?

Thanks for the help. If you have any more ideas, I’d be glad to give them a try

Profile
 
 
Posted: 26 November 2004 12:47 PM   [ Ignore ]   [ # 7 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  2002-06-19

You can run an “event calendar” in EE by simply creating a weblog to store the event information and then creating the Templates to output it as you want.  There are at least a couple of threads where people discuss it.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 233, on December 18, 2007 12:04 AM
Total Registered Members: 64970 Total Logged-in Users: 0
Total Topics: 81990 Total Anonymous Users: 0
Total Replies: 440693 Total Guests: 11
Total Posts: 522683    
Members ( View Memberlist )
Active Members: