vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Stop guests from viewing shoutbox (https://vborg.vbsupport.ru/showthread.php?t=143647)

JamieLee2k 03-30-2007 09:42 PM

Stop guests from viewing shoutbox
 
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 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.

PHP Code:

$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.

HTML Code:

<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:
PHP Code:

$Position '<!-- / nav buttons bar -->'
$vbulletin->templatecache['navbar'] = str_replace($Position$Position '<br /> $Shoutbox'$vbulletin->templatecache['navbar']); 

To This:
PHP Code:

$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?


All times are GMT. The time now is 12:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01707 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete