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
Rules when you open a new thread Details »»
Rules when you open a new thread
Version: 1.00, by cionfs cionfs is offline
Developer Last Online: Dec 2022 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.x Rating:
Released: 05-02-2009 Last Update: Never Installs: 45
Template Edits
Re-useable Code Translations  
No support by the author.

Many people have asked how to insert rules that can be displayed when the member starts a new thread.

In style manager, open the editor templates -> editor_toolbar_on. At the very top of the file, above the line $vBeditTemplate[clientscript], insert this code:

Code:
<if condition="THIS_SCRIPT == 'newthread'">
<if condition="$show['member']">
<strong>Hello $bbuserinfo[username]! We ask that you follow these simple rules:</strong><br />
<ul>
<li>First rules. </li>
<li>Second rules. </li>
<li>Third rules. </li>
</ul>
</if>
</if>
For add new rules add a new line with the code

Code:
<li>Rules</li>
NB: Obviously, the text "Message:" always appear above the rules. To delete or modify the search for phrases.


Sample



PS: sorry for my english

Original modification in Italian version available here.

Cionfs of Cionfs'Forum CMS

PS: Thanks to ctrlbrk for translation

Show Your Support

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

Comments
  #2  
Old 05-03-2009, 01:28 PM
Manoel J?nior Manoel J?nior is offline
 
Join Date: Feb 2009
Location: SP / Brasil
Posts: 778
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not functionally for me.
Reply With Quote
  #3  
Old 05-04-2009, 11:12 AM
EidolonAH EidolonAH is offline
 
Join Date: Apr 2009
Location: London, England
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Brilliant, thank you.
Reply With Quote
  #4  
Old 05-04-2009, 11:55 AM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Manoel J?nior View Post
Not functionally for me.
in what way an explination of the problem may help
Reply With Quote
  #5  
Old 05-04-2009, 12:02 PM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Manoel J?nior View Post
Not functionally for me.
vB version?
Reply With Quote
  #6  
Old 05-09-2009, 12:14 AM
PhilG PhilG is offline
 
Join Date: Apr 2003
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How would i make it show only for a certain forum?
Reply With Quote
  #7  
Old 05-09-2009, 05:21 AM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can use before code

Code:
<if condition="in_array($forum['forumid'], array(X,X,X,X))">
and after code
Code:
</if>
Change X with your forum's ID.
Reply With Quote
  #8  
Old 05-15-2009, 01:36 PM
Markos Markos is offline
 
Join Date: Aug 2006
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi i dont under stand whare i put this in the template can any one tell me ??

and whare do i put the code so it only shows in serting forums
Code:
<if condition="in_array($forum['forumid'], array(104,108,102,308,27,106,107,109,294,263))">

Code:
<if condition="THIS_SCRIPT == 'newthread'">
<if condition="$show['member']">
<strong>Hello $bbuserinfo[username]! We ask that you follow these simple rules:</strong><br />
<ul>
<li>First rules. </li>
<li>Second rules. </li>
<li>Third rules. </li>
</ul>
</if>
</if>
Reply With Quote
  #9  
Old 05-15-2009, 01:57 PM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Markos View Post
hi i dont under stand whare i put this in the template can any one tell me ??
At the start of editor_toolbar_on template. Before all code.

Quote:
Originally Posted by Markos View Post
and whare do i put the code so it only shows in serting forums
Use thid code.
Code:
<if condition="in_array($forum['forumid'], array(104,108,102,308,27,106,107,109,294,263))">
<if condition="THIS_SCRIPT == 'newthread'">
<if condition="$show['member']">
<strong>Hello $bbuserinfo[username]! We ask that you follow these simple rules:</strong><br />
<ul>
<li>First rules. </li>
<li>Second rules. </li>
<li>Third rules. </li>
</ul>
</if>
</if>
</if>
Reply With Quote
  #10  
Old 05-15-2009, 01:59 PM
Markos Markos is offline
 
Join Date: Aug 2006
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks very much that did the trick
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 06:41 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.04878 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
  • (7)bbcode_code
  • (4)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
  • (2)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