TP 0.9.8
SMF 1.1.10
www.authorway.com/SMF
Hi all,
I would like to know if I could (and how if it is going to be hardcoded) change the shoutbox permissions so no one except the admin (and the moderators perhaps) can post messages.
I would like to use it as an announcements center for my forums and not as a ...shoutbox. :)
Thank you.
TP 0.9.7 is like 3 years old now. I wouldn't have the slightest clue on what options there were back then. I would suggest you at least update to TP 0.9.8. There were some security fixes in that update if I remember right. However, I don't think there are any options like that with even the most current shoutbox. You can't limit to any particular group who can post in the shoutbox. You will probably have to modify the code to manually check for the groups, and then only allow those groups to see the textbox and submit button.
IchBin, sorry, my mistake...
I meant 0.9.8.
I can see possibilities in v1 beta 4, but I don't have a forum with 0.9.8...
I could set one up if you are desperate to stay with 0.9.8 though.
I have a 0.98 Portal , anyone cares to test the ShoutBox ?
Me n my G/F could only see and post in the ShoutBox as she is Global mod ... no one else knows of it.
I'm here dude, just let me know what you want me to do..
OK, can someone give me a clue from where to start (what file) in order to change the permissions?
It's all in the permissions .. set it forget it
Sorry I misunderstood, I thought dimdom wanted other people to see it.. ::)
Quote from: Crip on August 26, 2009, 08:05:10 PM
It's all in the permissions .. set it forget it
Crip, what do you mean? The only permission that i can see is the one that permits guest to shout or not....
No , go to Admin>>Members>>Member Groups>> You and Gmod ..see now?
So, do you want allow only certain groups to post, and all other groups to read only? I'm not sure I'm clear here either.
Quote from: IchBinâ„¢ on August 26, 2009, 09:43:19 PM
So, do you want allow only certain groups to post, and all other groups to read only? I'm not sure I'm clear here either.
Yes, I would like only the admin to be able to post. All others, only to read.
In TP098 there are no shoutbox permissions in the 'permissions' control panel... to set the member groups who can see the shoutbox you must edit the shoutbox itself.
Admin>TinyPortal>Block Manager>Shoutbox block> edit the groups there.
EDIT: Whoops! Looks like everybody beat me! :coolsmiley:
The others may not even see a ShoutBox i do believe at least the way I set mine ?
Make a backup of the file before you change it. If you screw it up, you will be able to restore. :) If you open the Themes/default/TPortalBlocks.template.php file and change this line:
if(($context['TPortal']['guest_shout']) || (!$context['TPortal']['guest_shout'] && !$context['user']['is_guest']))
To this:
if($context['user']['is_admin'])
That should work I think.
code monkey ..
Thanks IchBin.
I ll give a try tomorrow and i ll let you know about the results... :)
It works!
Thanx once again, IchBin.
Lets say that i would like to add another two specific users next to admin at the code below that you gave us:
if($context['user']['is_admin'])
(admin, user1, user2), able to post in shoutbox.
Can you point me the correct syntax pls? :P
Are they both in a Global Moderator group or something?
if($context['user']['is_admin'] || $context['user']['id'] == 5 || $context['user']['id'] == 6)
That might work. Exchange the 5 and 6 with the ID's of those users you want.
No, they are just moderators in some threads.
I ll try and I ll give you the results.
Thanx!
Quote from: IchBinâ„¢ on August 27, 2009, 05:01:20 PM
Are they both in a Global Moderator group or something?
if($context['user']['is_admin'] || $context['user']['id'] == 5 || $context['user']['id'] == 6)
That might work. Exchange the 5 and 6 with the ID's of those users you want.
Hey Ichbin,
Could this be done for a whole membergroup instead of individual users? For instance, let's say that group 5 is the Shout group, which are the ones allowed to shout.
ZP
Yep!
if (in_array(5, $user_info['groups']))
5 would be your user group ID. If $user_info['groups'] doesn't work, I "think" $context['user']['groups'] might do the same thing. I can't remember exactly if that exists.
Thanks Ichbin,
I'm going to try this out when I get a chance.