Gallery Moderator module shown to non mods.

17 years 1 month ago #33410 by royce
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...

Please Log in to join the conversation.

17 years 1 month ago #33483 by Syrinx
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 ;)

Please Log in to join the conversation.

17 years 1 month ago #33484 by Syrinx
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. ;)

Please Log in to join the conversation.

17 years 1 month ago #33515 by royce
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.

Please Log in to join the conversation.

17 years 1 month ago #33535 by Syrinx
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

Please Log in to join the conversation.

17 years 1 month ago #33540 by royce
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...

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.512 seconds

Facebook Twitter LinkedIn