PDA

View Full Version : Miscellaneous Hacks - How to add a post requirement to view a ShoutBox


dreads
11 Jul 2009, 02:32
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



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


Replace it with this one.


<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

<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 (http://www.g4hq.com/forum) as well as mod requests.
Thanks!

steve1966
11 Jul 2009, 09:00
Thanks

ssslippy
13 Jul 2009, 22:44
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
14 Jul 2009, 00:06
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
26 Nov 2010, 18:08
This didn't work.