View Full Version : Stop guests from viewing shoutbox
JamieLee2k
03-30-2007, 09:42 PM
I am looking for a php code so that only registered members can view the shoutbox?
Can anyone help here
Thanks
JamieLee2k
da420
03-30-2007, 11:14 PM
It looks like you are using This Hack (https://vborg.vbsupport.ru/showthread.php?t=96158) to show it on all your pages.
If that is the case, try this.
Remove this bit of code from the "vBShout [Template Alteration]" plug in in your plug in manager in your ACP.
$Position = '<!-- / nav buttons bar -->';
$vbulletin->templatecache['navbar'] = str_replace($Position, $Position . '<br /> $Shoutbox', $vbulletin->templatecache['navbar']);
Then you will have to go in and add this code to all pages you want to add the shout box to.
<if condition="$show['member']">
$Shoutbox
</if>
That should show it only to members.
EDIT:
Errrm... isn't there a way to ban certain usergroups from seeing the Shout Box in the admin cp?
EDIT 2:
I remember why I did this on my forum - it was giving me and error when I tried to ban members from seeing the shout box. But, if the setting in the ACP works for you then you should probably use that method, if not, mine should work.
Michael Biddle
03-31-2007, 04:17 AM
In the plugin listed above, why not just throw the if into it, so it will be global?
Make:
$Position = '<!-- / nav buttons bar -->';
$vbulletin->templatecache['navbar'] = str_replace($Position, $Position . '<br /> $Shoutbox', $vbulletin->templatecache['navbar']);
To This:
$Position = '<!-- / nav buttons bar -->';
$vbulletin->templatecache['navbar'] = str_replace($Position, $Position . '<br /> <if condition="$show['member']">$Shoutbox</if>', $vbulletin->templatecache['navbar']);
JamieLee2k
03-31-2007, 09:43 AM
The plugin I am using is one from vbnova, do you think if I do the same thing here it will work the same?
Michael Biddle
03-31-2007, 07:58 PM
Yes, its identical, except either its the newer version or u dled the one that shows on all pages. all code should stay same pretty much either way
JamieLee2k
03-31-2007, 09:42 PM
The code is not the same as what you are asking me to change isn't even in the in the template
Michael Biddle
03-31-2007, 10:29 PM
What one did you download?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.