vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Post Icons (https://vborg.vbsupport.ru/showthread.php?t=181181)

Jibba Jabbas 06-01-2008 09:03 AM

Post Icons
 
Right, i have a football forum and i have forums of different leagues (English league, Spanish league ect) and i have post icons of teams logos in the leagues, as you can imagine with around 20 odd teams in each league, doing 20 post icons for each league... i have a lot of post icons and it looks a bit messy. So i thought i'd attempt to neaten it up.

I viewed source to find the HTML i need for the radio buttons because in the post icon templates it was just one variable holding everything.. so i replaced the variable with it's HTML equivilent if that makes sense.

I have them all in pure HTML and it all works like normal, now what i need to do is add if statements in, for example around the english club icons i need to put something like "if forum id = 4" and then show those icons, just unsure on what the if statement would be?

I tried using "<if condition="in_array($forumid, array(4))">" but it didn't work.... how do i go about doing this?

I'm doing this in the Post Icons template if that helps, would be better if an array could be used but not 100% nessacery.

Thanks!

Lynne 06-01-2008 01:35 PM

Did you try just
<if condition="$forumid == 4">

Other variables to try instead of $forumid.... $forum[forumid], $foruminfo[forumid], $thread[forumid], $threadinfo[forumid]. Hopefully one of those works. (Sorry, I have no time to try this out myself.)

Jibba Jabbas 06-01-2008 02:12 PM

Thanks for the reply, unfortunatly none of the above worked.

Are there any others or is there a way to make one of those work?

Lynne 06-01-2008 02:38 PM

What page (xxxx.php) exactly are you trying to get these to show up on?

Jibba Jabbas 06-01-2008 07:26 PM

newthread.php and i guess it would go under newreply.php (if thats what it is) too.. i know for a fact the post icon templates are on the newthread.php so yeah that one.

--------------- Added [DATE]1212356813[/DATE] at [TIME]1212356813[/TIME] ---------------

Ah i changed it up.. noticed there was ?f=4 in the address so i did <if condition="$_GET['f']" == 4>

Guessing theres nothing wrong with using that? It works fine.

Lynne 06-01-2008 09:49 PM

Quote:

Originally Posted by Jibba Jabbas (Post 1538133)
newthread.php and i guess it would go under newreply.php (if thats what it is) too.. i know for a fact the post icon templates are on the newthread.php so yeah that one.

--------------- Added 01 Jun 2008 at 14:46 ---------------

Ah i changed it up.. noticed there was ?f=4 in the address so i did <if condition="$_GET['f']" == 4>

Guessing theres nothing wrong with using that? It works fine.

That should be fine. Glad you got it working.

Jibba Jabbas 06-02-2008 12:39 AM

Thanks you for helping me out! Was just unfortunate one of the above didn't work.


All times are GMT. The time now is 06:23 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.01860 seconds
  • Memory Usage 1,723KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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