vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Defining a forum id conditional? (https://vborg.vbsupport.ru/showthread.php?t=108556)

defi 02-21-2006 05:33 PM

Defining a forum id conditional?
 
Does anyone know anyway to define a forumid conditional?

What I'm basically looking to do is replace the new thread button on 4 different forums with a new link, but I want the other forums to remain intact.

Is there a global forumid conditional to call here?

Reeve of shinra 02-21-2006 05:54 PM

It would be something like this:

HTML Code:

<if condition="$forum[forumid] = 1 OR $forum[forumid] = 3 OR $forum[forumid] = 5">
<img src="./board/images/logo/logo-xbox.jpg" />
<else />

<if condition="$forum[forumid] = 2 OR $forum[forumid] = 4 OR $forum[forumid] = 6">
<img src="./board/images/logo/logo-playstation.jpg" />
<else />

<img src="$stylevar[titleimage]" />
</if>
</if>
</if>


defi 02-23-2006 05:04 AM

perfect - thanks!

ChrisBaktis 03-05-2006 03:17 PM

What would the conditional be if I wanted something to appear on all the pages EXCEPT the forumhome?

thanks

tehste 03-05-2006 07:49 PM

Quote:

Originally Posted by ChrisBaktis
What would the conditional be if I wanted something to appear on all the pages EXCEPT the forumhome?

thanks

<if condition="$forum[forumid]!=0">
hehe
</if>

Why not use in_array() rather than all the ORS

Reeve of shinra 03-05-2006 08:31 PM

I actually just learned about the array =)

ChrisBaktis 03-05-2006 10:03 PM

What im trying to do is add a second column in the navigation bar on all pages except the forum home - All the information appears if I remove the conditional (on all the pages) - If I add the <if> condition then none of the code shows up on any page.

any ideas?

PHP Code:

<if condition="$forum[forumid]!=0">
<
td class="alt1">
     <
table width="200" border="0">
           <
tr>
               <
td align="center">
<
a href="http://www.rustysoaptraders.com/forums/tickets.php"><b>Buy Tickets Here:</a> </b><br> <a href="http://www.coasttocoasttickets.com/concerts/">Concert Tickets</a>
- <
a href="http://www.coasttocoasttickets.com/nfl/">NFL Tickets</a><br><a
href
="http://www.coasttocoasttickets.com/mlb/">MLB Tickets</a><b></font></a><br>
</
td>
           </
tr>
     </
table>
</
td>
</if> 

*** Update ***

I just realized that the conditional is working if im in a thread - but doesnt work on any Main forum page - when I say main forum page I mean everything outside of a post...

this is the code

PHP Code:

<if condition="$forum[forumid] != 0">
<
td class="alt1">
     <
table width="200" border="0">
           <
tr>
               <
td align="center">
<
a href="http://www.rustysoaptraders.com/forums/tickets.php"><b>Buy Tickets Here:</a> </b><br> <a href="http://www.coasttocoasttickets.com/concerts/">Concert Tickets</a>
- <
a href="http://www.coasttocoasttickets.com/nfl/">NFL Tickets</a><br><a
href
="http://www.coasttocoasttickets.com/mlb/">MLB Tickets</a><b></font></a><br>
</
td>
           </
tr>
     </
table>
</
td>
</if> 


ChrisBaktis 03-08-2006 01:27 PM

Any ideas what I can change to make it show on the main forums?


All times are GMT. The time now is 09:27 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01011 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete