Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
Hide threads to guests according to title Details »»
Hide threads to guests according to title
Version: 1.00, by Arcade Fire Arcade Fire is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.4 Rating:
Released: 11-15-2009 Last Update: Never Installs: 16
Supported Uses Plugins Template Edits
Re-useable 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/showthread.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));
}

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 02-13-2012, 10:36 AM
suko22 suko22 is offline
 
Join Date: Jan 2009
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gracias por el código Arcade Fire. Ahora para rizar el rizo, ¿sabes cómo se podría ocultar los banners de adsense en los post +18? Por más que lo intento no se me ocurre la forma...

TR: Thanks for the mod Arcade Fire. Bytheway, you know how to hide adsense in +18 threads? I´ve been trying it whitout any success...
Reply With Quote
  #13  
Old 05-28-2012, 09:37 PM
matrex722's Avatar
matrex722 matrex722 is offline
 
Join Date: Jan 2007
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if i used this i think it will effict seachangine like google
how spiders will see my threads ?
Reply With Quote
  #14  
Old 12-02-2012, 01:00 AM
al2thero al2thero is offline
 
Join Date: Aug 2008
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot
Reply With Quote
  #15  
Old 10-23-2013, 03:03 PM
packosoft packosoft is offline
 
Join Date: Nov 2007
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I make a little modification.
from
PHP Code:
<if condition="($onlyreg == TRUE) and ($bbuserinfo[posts]<=1)"
to
PHP Code:
<if condition="($onlyreg == TRUE) and ($bbuserinfo['userid'] == 0)"
because before, users with 0 posts can't see the posts. I will use it with +reg to force user to register an with +prv to have at least 100 posts

he hecho una peque?a modificacion para que los usuarios con 0 posts puedan ver el hilo.
Yo lo voy a usar para que poniendo +reg haga falta registrarse y con +prv adem?s hagan falta 100 mensajes

PHP Code:
<if condition="($onlyreg == TRUE) and ($bbuserinfo['userid'] == 0)"
                <
br><br><br>
                <
center><h2>Este hilo solo estdisponible para usuarios registrados</h2></center>
                <
br><br><br>
         <else /> 
i.e.: http://www.hardlimit.com/off-topic/t...reg-76600.html

PHP Code:
<if condition="($onlyprv == TRUE) and ($bbuserinfo[posts]<=100)">
                <
br><br><br>
                <
center><h2>Este hilo solo estdisponible para usuarios con m?s de 100 mensajes</h2></center>
                <
br><br><br>
         <else /> 
i.e.: http://www.hardlimit.com/off-topic/t...prv-76603.html
Reply With Quote
  #16  
Old 03-12-2014, 08:50 PM
booble booble is offline
 
Join Date: Apr 2012
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't understand what is the template...showthread? navbar?

thanks
Reply With Quote
  #17  
Old 03-14-2014, 05:27 PM
booble booble is offline
 
Join Date: Apr 2012
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any help?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04252 seconds
  • Memory Usage 2,289KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete