vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Can certain box appear in certain forum / catagories? (https://vborg.vbsupport.ru/showthread.php?t=166443)

SauravG 12-30-2007 09:26 AM

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.

valdet 12-30-2007 10:11 AM

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.

SauravG 12-30-2007 10:33 AM

Quote:

Originally Posted by valdet (Post 1411848)
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

valdet 12-30-2007 11:08 AM

Quote:

Originally Posted by SauravG (Post 1411855)

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.

SauravG 12-30-2007 11:11 AM

Unfortunately it doesn't work :(
Thanks for trying.

Regards,
Saurav

valdet 12-30-2007 11:14 AM

how about this one

<if condition="in_array($forum['forumid'], array(1,2,4,6,10,21,38))"></if>

SauravG 12-30-2007 11:17 AM

Nope, doesn't work sorry.

Regards,
Saurav

Opserty 12-30-2007 11:28 AM

$foruminfo instead of $forum

SauravG 12-30-2007 01:30 PM

Quote:

Originally Posted by Opserty (Post 1411869)
$foruminfo instead of $forum

Just tried that, still no luck.

Regards,
Saurav

Dismounted 12-31-2007 02:34 AM

Which template are you using this in?

SauravG 12-31-2007 11:42 AM

I am using it in postbit. Thats the only way I could think of having the form after every first post. But I only want it in some forums, not all.

Regards,
Saurav

Opserty 12-31-2007 01:31 PM

I thought foruminfo worked in the postbit, hmm. Try $post or $thread

P.S. Be aware that there may be conflicts between your form and the inlinemod form if you are adding forms to the postbit, make sure you test it out first.

SauravG 12-31-2007 01:53 PM

Quote:

Originally Posted by Opserty (Post 1412635)
I thought foruminfo worked in the postbit, hmm. Try $post or $thread

P.S. Be aware that there may be conflicts between your form and the inlinemod form if you are adding forms to the postbit, make sure you test it out first.

Hey

There were confilcts, thats why I put the form on a new HTML page and just added an iframe to save me time. Now I just need it in certain forums and not in every forum.

I tried this, but it doesnt work for catagories. So if forumid 234 has 10 subforums, it only works for the threads in the forum234, not its subforums.
Quote:

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

<if condition="in_array($thread['forumid'], array(234))">
<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 -->
Thanks for trying.


All times are GMT. The time now is 03:08 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.01107 seconds
  • Memory Usage 1,743KB
  • 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_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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