vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Miscellaneous Hacks - How to add a post requirement to view a ShoutBox (https://vborg.vbsupport.ru/showthread.php?t=218345)

dreads 07-10-2009 10:00 PM

How to add a post requirement to view a ShoutBox
 
1 Attachment(s)
How to add a post requirement to view a ShoutBox
This mod was actually designed for Inferno Shoutbox Series, yet you could use this for many of the other sb mods.

Original Article: http://www.g4hq.com/forum/showthread.php?t=19981


How to add a post requirement to a ShoutBox
by: h0ly
Skill: 2 out of 10
Mod: Inferno Shoutbox. (Popular shoutbox software)

Original Code for Shoutbox

Code:


<!--{%SHOUTBOX%}-->

Replace it with this one.

Code:

<if condition="$bbuserinfo[posts] < '10' AND THIS_SCRIPT == 'index'">You require 10 Posts to see the shoutbox.<else /><!--{%SHOUTBOX%}--></if>
If you do not want guests to see the "You require 10 posts.." than instead use this code
Code:

<if condition="$bbuserinfo[posts] < '10' AND THIS_SCRIPT == 'index' AND $bbuserinfo[userid]">You require 10 Posts to see the shoutbox.<else/><!--{%SHOUTBOX%}--></if>
Now how does it work?
Well, You are putting down a condition.
$bbuserinfo[posts] gets the number of posts the user has.
THIS_SCRIPT == 'index' - this means that it must be the index.

Support is offered on G4HQ Forums as well as mod requests.
Thanks!

steve1966 07-11-2009 07:00 AM

Thanks

ssslippy 07-13-2009 08:44 PM

The best thing to do would to actually create another user group and give just this user group access to shoutbox. Then do a secondary user group promotion to add them to that group.

dreads 07-13-2009 10:06 PM

Quote:

Originally Posted by ssslippy (Post 1848302)
The best thing to do would to actually create another user group and give just this user group access to shoutbox. Then do a secondary user group promotion to add them to that group.

Having more usergroups is not always the greatest option. You would have to do more backwork. This is very simple, and easy. (Just copy and paste). If you added another usergroup, there would be more work involved, (such as setting permissions for future sections).

Eplexx 11-26-2010 04:08 PM

This didn't work.


All times are GMT. The time now is 10:37 AM.

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.01004 seconds
  • Memory Usage 1,720KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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