Quantcast VBulletin, show code on newthread.php only for certain forums - digitalFAQ.com Support Forum
Go Back   digitalFAQ.com Support Forum > Digital Publishing / Web Design > Web/Print Publishing Technology

Reply
LinkBack Thread Tools
  #1  
06-06-2011, 03:58 AM
admin's Avatar
admin admin is offline
Site Staff / Media Project and Technical Adviser
 
Join Date: Oct 2003
Posts: 3,983
Thanks: 112
Thanked 417 Times in 363 Posts
This is quick note for myself (and anybody else that may find it helpful).

When creating subforum-specific warnings, or only shows posticons to certain sub-forums (for example, as used in conjunction with posticon-enforcing plugins/products and code edits), simply use this IF statement in the vBulletin style sheet.

PHP Code:
<if condition="in_array($forumid, array(5))">
CODE TO BE DISPLAYED
</if> 
In this code example, the subforum with forumid "5" will be the only forum where, when making a new thread, that code will be displayed to a member. In any other forum (for example, subforums 1-4) the code between the IF statements will be missing.

This was used on a site where posticons are required in specific subforums. Rather than create many subforums, and requiring users to click deeper and deeper, similar-but-different content is being sorted with posticons. With this change, however, the newthread style was edited, to move the post icons above the title/message box, with a warning that you MUST select an icon. Only forums that required icons had permission to view those icons, as they were not intended to be used site-wide. (Advanced posticon permissions via plugin from vBulletin.org.) Only a single generic icon was available/used in any other subforum. Since the non-required subforums did not need such text, and it would only confuse members (since there was only one icon to "choose" from), it was hidden via this PHP vBulletin query.

Yes, that's a bit rambling -- but it's my notes. I'm allowed.

If you have questions on this specific hack/mod, simply reply.
If you need other/more vBulletin help, hosting help, web design help, etc -- post a new topic.
__________________
If this site has been as helpful as a book or magazine, then Donate a few Dollars or Upgrade your Membership.
Don't forget to Like Us on Facebook or Follow Us on Twitter for special news and deals. Thanks!
Reply With Quote


  #2  
06-07-2011, 09:30 AM
admin's Avatar
admin admin is offline
Site Staff / Media Project and Technical Adviser
 
Join Date: Oct 2003
Posts: 3,983
Thanks: 112
Thanked 417 Times in 363 Posts
To add more than one forum, this would be the code:

PHP Code:
<if condition="in_array($forumid, array(1,2,3,4,5))">
CODE TO BE DISPLAYED
</if> 
Where 1,2,3,4,5 were the five forum IDs (forumid).
__________________
If this site has been as helpful as a book or magazine, then Donate a few Dollars or Upgrade your Membership.
Don't forget to Like Us on Facebook or Follow Us on Twitter for special news and deals. Thanks!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Code edits to send HTML email via admincp in vBulletin admin Web/Print Publishing Technology 0 03-06-2011 08:14 PM
Forums re-organized slightly admin General Discussion 0 01-03-2011 06:54 PM
NOTE: Ask your questions in the above sub-forums. Thanks. admin DVD Project Help 0 01-01-2011 10:42 PM
Ask Questions in Forums, not PMs admin General Discussion 0 01-07-2009 02:49 AM
Tv show downloads discussed lordsmurf Home Entertainment and Videography 1 05-18-2007 05:58 AM

Thread Tools



 
All times are GMT -5. The time now is 06:18 PM  —  vBulletin Copyright © 2011 Jelsoft Enterprises Ltd  —  SEO by vBSEO