Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 12-30-2007, 09:26 AM
SauravG SauravG is offline
 
Join Date: May 2007
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Can certain box appear in certain forum / catagories?

I want a form to appear in specific forums or catagories after post #1. I am not sure how to do this. I have done it so it appears in all forums after post #1.

This is the code I use.

Code:
<!-- iRapid Links Checker starts here -->
<if condition="$post[postcount] == 1">

<iframe name="home" src="http://www.irapid.co.uk/test/link.html" border="0" frameborder="0" width="500" height="149"></iframe>

</if>
<!-- iRapid Links Checker starts here -->
Thanks in advance.
Reply With Quote
  #2  
Old 12-30-2007, 10:11 AM
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this conditional

Quote:
<if condition="$forum[forumid] == X"></if>
so now your box would be like this:

Quote:
<!-- iRapid Links Checker starts here -->

<if condition="$forum[forumid] == X">
<if condition="$post[postcount] == 1">

<iframe name="home" src="http://www.irapid.co.uk/test/link.html" border="0" frameborder="0" width="500" height="149"></iframe>

</if>
</if>
<!-- iRapid Links Checker starts here -->
I hope that helps you out.

Best regards,
Val.
Reply With Quote
  #3  
Old 12-30-2007, 10:33 AM
SauravG SauravG is offline
 
Join Date: May 2007
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by valdet View Post
Try this conditional

so now your box would be like this:

I hope that helps you out.

Best regards,
Val.
Awesome thank you!

I had a feeling it would be something similar to $forum[forumid] == X but wasnt sure if I could have two if's. Works

Is it possible so I only have to enter the catagory number rather than the forum number as I have over 200 (sub)forums and I only want it in half of them?

Regards,
Saurav
Reply With Quote
  #4  
Old 12-30-2007, 11:08 AM
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SauravG View Post

Is it possible so I only have to enter the catagory number rather than the forum number as I have over 200 (sub)forums and I only want it in half of them?
Try this one.

<if condition="in_array($forumid, array(X,Y,Z))"></if>

Add as much forum/category ids as you want separated by commas


Regards,
Val.
Reply With Quote
  #5  
Old 12-30-2007, 11:11 AM
SauravG SauravG is offline
 
Join Date: May 2007
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortunately it doesn't work
Thanks for trying.

Regards,
Saurav
Reply With Quote
  #6  
Old 12-30-2007, 11:14 AM
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how about this one

<if condition="in_array($forum['forumid'], array(1,2,4,6,10,21,38))"></if>
Reply With Quote
  #7  
Old 12-30-2007, 11:17 AM
SauravG SauravG is offline
 
Join Date: May 2007
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope, doesn't work sorry.

Regards,
Saurav
Reply With Quote
  #8  
Old 12-30-2007, 11:28 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$foruminfo instead of $forum
Reply With Quote
  #9  
Old 12-30-2007, 01:30 PM
SauravG SauravG is offline
 
Join Date: May 2007
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
$foruminfo instead of $forum
Just tried that, still no luck.

Regards,
Saurav
Reply With Quote
  #10  
Old 12-31-2007, 02:34 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Which template are you using this in?
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:43 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.04176 seconds
  • Memory Usage 2,251KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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