Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Advertise on this site

Joomlapolis Forums  


<< Start < Prev 1 2 Next > End >>
Gallery Moderator module shown to non mods.
Date: 2007/03/14 13:30 By: royce Status: CB Doc subscriber  
Karma: 0  
Junior Joomlapolitan

Posts: 48
graphgraph
Hi there, I've been looking, and looking, and looking.. I'm sure this must have been asked and answered before...

How can I stop the display of the Gallery Moderator Module to non moderators? I have the display set to special, but it still appears to non moderators. They can't perform any action, but I would rather them not see the module at all.

I tried posting in the newbies, but no response there...
Click here to see the profile of this user The administrator has disabled public write access.

Re:Gallery Moderator module shown to non mods.
Date: 2007/03/15 03:52 By: Syrinx Status: User  
Karma: 18  
Expert Joomlapolitan

Posts: 169
graphgraph
Here's how I handle this

1) Create new module position called "admin" (or whatever you want)

2) Assign the moderator module to the above module position

3) Edit your site template and put this php clip where you want the module to appear:

<?php if ($my->usertype=="Super Administrator") mosLoadModules ( 'admin' ); ?>


Now only Super Administrators will be able to view any modules that are assigned to the admin module position
Click here to see the profile of this user The administrator has disabled public write access.

Re:Gallery Moderator module shown to non mods.
Date: 2007/03/15 04:07 By: Syrinx Status: User  
Karma: 18  
Expert Joomlapolitan

Posts: 169
graphgraph
Oh yeah.. if you want to give more user types access to the admin module, just add them in using the OR operator "||" like this:

<?php if ($my->usertype=="Super Administrator" || $my->usertype=="Administrator" || $my->usertype=="Manager" ) mosLoadModules ( 'admin' ); ?>

In the above example, Super Administrators, Administrators and Managers will now see the admin modules.
Click here to see the profile of this user The administrator has disabled public write access.

Re:Gallery Moderator module shown to non mods.
Date: 2007/03/15 16:04 By: royce Status: CB Doc subscriber  
Karma: 0  
Junior Joomlapolitan

Posts: 48
graphgraph
Hi there, it worked like a charm! Big up Karma to you!

I was able to use an unused module position on my template instead of creating a new one. I added the PHP statement to my template and it works fine.

Not to be grumpy, but it seems like there should be a built in solution to this..I wonder why the "special" user type doesn't work? Is that a bug with this module or with Joomla!?

I've read a couple of places that user types will be enhanced in Joomla 1.5, I hope that will allow more elegant solutions to this type of problem.

Thanks again.
Click here to see the profile of this user The administrator has disabled public write access.

Re:Gallery Moderator module shown to non mods.
Date: 2007/03/15 18:13 By: Syrinx Status: User  
Karma: 18  
Expert Joomlapolitan

Posts: 169
graphgraph
The "special" category includes authors and above, not just admins/managers.

If you have an item set to special it will not appear or be accessible to registered users or guests.

The problem is, you don't always want your admin modules to be visible to authors etc. What I did with the little php clip solves this problem.

Anyway, glad to be of help

I've read a couple of places that user types will be enhanced in Joomla 1.5, I hope that will allow more elegant solutions to this type of problem.

Nope.. it won't be in 1.5 - they've decided to wait until a later release to expand the user access levels system. Too bad since that's one of the biggest weaknesses in Joomla.

Post edited by: Syrinx, at: 2007/03/15 18:27
Click here to see the profile of this user The administrator has disabled public write access.

Re:Gallery Moderator module shown to non mods.
Date: 2007/03/15 19:11 By: royce Status: CB Doc subscriber  
Karma: 0  
Junior Joomlapolitan

Posts: 48
graphgraph
Syrinx wrote:
The "special" category includes authors and above, not just admins/managers.

If you have an item set to special it will not appear or be accessible to registered users or guests.



aha..thats the first good definition of "special" that I have ever read!

And it also solves part of my mystery.. I had hacked the code to make all users "Author". So that combined with setting the module to "special" made the module show up for everybody!

Hope this helps someone else...
Click here to see the profile of this user The administrator has disabled public write access.

<< Start < Prev 1 2 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC2, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login