Back to vBulletin 3.8 Template Modifications

Hide threads to guests according to title
Mod Version: 1.00, by Arcade Fire

vB Version: 3.8.4 Rating: (2 votes - 5.00 average) Installs: 16
Released: 16 Nov 2009 Last Update: Never Downloads: 0
Not Supported Uses Plugins Template Edits Re-usable Code Translations  

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;
}
Plugin is Active: YES

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 />
and above $footer:

Code:
</if>
Tested on vB 3.7.x & 3.8.x

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 />
and above $footer:

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

vblts.ru supports vBulletin®, 2022-2024