Go Back    Forum > Digital Publishing / Web Sites > Website and Server Troubleshooting

Reply
 
LinkBack Thread Tools
  #1  
06-06-2011, 03:58 AM
admin's Avatar
admin admin is offline
Site Staff | Web Development
 
Join Date: Jul 2003
Posts: 4,310
Thanked 654 Times in 457 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.

- Did this site help you? Then upgrade to Premium Member and show your support!
- Also: Like Us on Facebook for special DVD/Blu-ray news and deals!
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
06-07-2011, 09:30 AM
admin's Avatar
admin admin is offline
Site Staff | Web Development
 
Join Date: Jul 2003
Posts: 4,310
Thanked 654 Times in 457 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).

- Did this site help you? Then upgrade to Premium Member and show your support!
- Also: Like Us on Facebook for special DVD/Blu-ray news and deals!
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Code edits to send HTML email via admincp in vBulletin admin Website and Server Troubleshooting 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 Video 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 Videography: Cameras, TVs and Players 1 05-18-2007 05:58 AM

Thread Tools



 
All times are GMT -5. The time now is 01:09 AM