Hide threads to guests according to title
Hello, long time to create a plugin for my users to add a code in the title (+ pv) deprived his subjects could do if they wanted visitors.
You can change +pv (+private) to the other code you want. Go to AdminCP > Plugins & Products > Add New Plugin: Product: vBulletin Hook Location: showthread_postbit_create Title: Only Reg. Execution Order: 5 Plugin PHP Code: Code:
if(stristr($thread[title], '+pv') == TRUE) { $onlyreg = TRUE; } and in your showthread tempalte after $navbar: Code:
<if condition="($onlyreg == TRUE) and ($bbuserinfo[posts]<=1)"> <center><h2>Thread for Registered Users Only</h2></center> <else /> Code:
</if> Demo: http://www.rotolandia.com/index.php?t=70365(spanish site) and all titles with +pv in this forum http://www.rotolandia.com/forumdisplay.php?f=2 Please Mark Install Note for vB4.x.x updates: Only change <if...> for <vb:if...> Code:
<vb:if condition="($onlyreg == TRUE) and ($bbuserinfo[posts]<=1)"> <center><h2>Thread for Registered Users Only</h2></center> <vb:else /> Code:
</vb:if> And plugin: Code:
if(stristr($thread[title], '+pv') == TRUE) { $onlyreg = TRUE; vB_Template::preRegister('SHOWTHREAD', array('onlyreg' => $onlyreg)); } Download No files for download. |
Similar Mods
Show Thread Enhancements Hide the post title area and the default icon when there is no title | vBulletin 3.7 Add-ons |
Miscellaneous Hacks hide old threads from public view / guests | Modification Graveyard |