Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

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
  #2  
Old 11-16-2009, 06:10 PM
concepts's Avatar
concepts concepts is offline
 
Join Date: May 2005
Location: Woodland Hills, Ca
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Work! Will Give It A Try!
Reply With Quote
  #3  
Old 11-16-2009, 07:38 PM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
reserved
Reply With Quote
  #4  
Old 11-24-2009, 02:07 PM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit: Available for vb4 if someone needs it.
Reply With Quote
  #5  
Old 07-16-2010, 02:10 PM
Mike08 Mike08 is offline
 
Join Date: Sep 2006
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gracias, siempre me hab?a preguntado como lo hacian en FC :roto2:
Solo una cosa, el <if> deber?a ir por encima de $footer, si no no sale todo el cuerpo de la pagina.

Only one thing. <if> must be above of $footer for proper page display.
Reply With Quote
  #6  
Old 07-29-2010, 04:03 AM
papalph papalph is offline
 
Join Date: Nov 2009
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FYI, if you have your archive pages turned on the thread is still fully visible through those pages.
Reply With Quote
  #7  
Old 08-01-2010, 09:04 AM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by papalph View Post
FYI, if you have your archive pages turned on the thread is still fully visible through those pages.
You can put the same code in the template file, check my site for testing (any + pv)

http://www.rotolandia.com/archive/in...f-2-p-246.html
Reply With Quote
  #8  
Old 08-01-2010, 09:13 AM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mike08 View Post
Gracias, siempre me hab?a preguntado como lo hacian en FC :roto2:
Solo una cosa, el <if> deber?a ir por encima de $footer, si no no sale todo el cuerpo de la pagina.

Only one thing. <if> must be above of $footer for proper page display.
My bad, thanks!

Ps: In Forocoches, is likely to use a similar plugin but based on user groups, as some posts are for users with +6 months old ... and others based on the date of the post (registered users subsequent to the creation of the post, can not see it.

Pd: En Fc, es probable que usen un plugin parecido pero basado en grupos de usuario, ya que algunos post son para usuarios con +6 meses de antig?edad... y otros basados en la fecha del post (usuarios registrados posteriormente a la creaci?n del post, no pueden verlo.
Reply With Quote
  #9  
Old 11-22-2011, 09:42 PM
rarauz rarauz is offline
 
Join Date: Feb 2009
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hola,

lo he probado y funciona. Tan solo hay que hacer un peque?o cambio en tu c?digo para v.4.*

<vb:if condition="($onlyreg == TRUE) and ($bbuserinfo[posts]<=1)">
<center><h2>Thread for Registered Users Only</h2></center>
<vb:else />

Muchas gracias.

-----

Hi,

I tried your plugin and works fine !!!

Only you must have one little change in the code for Vbulletin v.4.*


<vb:if condition="($onlyreg == TRUE) and ($bbuserinfo[posts]<=1)">
<center><h2>Thread for Registered Users Only</h2></center>
<vb:else />

Thanks a lot.
Reply With Quote
  #10  
Old 11-23-2011, 09:29 AM
Arcade Fire's Avatar
Arcade Fire Arcade Fire is offline
 
Join Date: May 2008
Location: Menorca, Spain
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My bad, thanks rarauz.
Reply With Quote
Reply


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 07:52 AM.


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.04320 seconds
  • Memory Usage 2,314KB
  • Queries Executed 24 (?)
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
  • (2)bbcode_quote
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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