![]() |
Conditional Templates
Good Day,
I am trying to display a different Header logo in a single forum. Could this be done using the conditionals commands? Would this be done in the forums Display Template? I tryed using the entry below but it failed to work.. <if condition="($forumid,== 32))"><scr="images/Mustanglogo.jpg" </if> any help would be great Regards, Cmedic101 |
Try
Code:
<if condition="THIS_SCRIPT = 'forumdisplay' AND $forumid == 32"> |
Code:
<if condition="$foruminfo['forumid'] == 32"><img scr="images/Mustanglogo.jpg" border="0" /></if> |
Quote:
The following error occurred when attempting to evaluate this template: Parse error: parse error, unexpected '=' in /vb/includes/adminfunctions_template.php(3716) : eval()'d code on line 15 |
1 Attachment(s)
Quote:
any ideas? thanks for your help cmedic101 |
Code:
<if condition="$foruminfo['forumid'] == 32"><img scr="images/Mustanglogo.jpg" border="0" /><else />YOUR DEFAULT CODE HERE</if> |
Quote:
should I be putting the code in another tepmplate? thank you cmedic101 |
The missing graphics box means its a problem with your HTML not the condition or anything like that. Check the image is there e.t.c.
You have the condition now, so just look into the HTML code and see why it is not working. ;) |
Quote:
when i click properties there is no information avilable regarding an image path thank you cmedic101 |
Whats the code you are using? (Copy and paste it from your template)
|
Quote:
$stylevar[htmldoctype] <html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> $headinclude <title>$foruminfo[title_clean]<if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if> - $vboptions[bbtitle]</title> <if condition="$show['inlinemod']"><script type="text/javascript" src="clientscript/vbulletin_inlinemod.js?v=$vboptions[simpleversion]"></script></if> </head> <body> <if condition="$foruminfo['forumid'] == 32"><img scr="images/mustanglogo.gif" border="0" /><else />scr="images/storm/misc/stormlogo.gif"</if> $header$navbar <if condition="in_array($forumid, array(50,51))"><center><SCRIPT LANGUAGE="JavaScript1.2" src="http://www.codeamber.org/js/hcodea.js"> </script></center> </P> </if> I could not copy the the full template because of restrictions |
It should be:
Code:
<img src="<if condition="$foruminfo['forumid'] == 32">images/mustanglogo.gif<else />images/storm/misc/stormlogo.gif</if>" border="0" /> |
src not scr
|
Oops, fixed. Was copied and pasted from cmedic101's template :p.
|
Quote:
Quote:
After I placed that entry in Forum display it was showing both header logos.. I move it to the Header template and it works perfect! Thank you again Regards, Cmedic101 |
Ok... This is working great. Now the next question is how can I have a different graphic for all of my forums by to this command listed below but keep the origional forum home logo in place.
<img src="<if condition="$foruminfo['forumid'] == 32">images/mustanglogo.gif<else />images/storm/misc/stormlogo.gif</if>" border="0" /> thanks in advance cmedic101 |
Code:
<img src="<if condition="$foruminfo['forumid'] == 32">images/mustanglogo.gif<else /><if condition="$foruminfo['forumid'] == X">images/storm/misc/randomlogo.gif<else />images/storm/misc/stormlogo.gif</if></if>" border="0" /> |
Wow... that worked real well... thanks for your help and very quick reply
Sincerely, cmedic101:up: |
OK, can I break in here too?
I want to do the same thing but I can't figure out how to leave the default header/logo in place because I don't know where to find that information. (I'm not a programmer, I had someone install and load banners etc....) But, I need to display a different header/logo for one of my forums. |
The code caters for that.
|
I'm not sure what you mean?
What code would I need to display a separate logo/header on forum ID=11 and leave the default logo/header on the rest of the forums? Sorry if I'm not understanding, you're gonna need to dumb it down for me ;-) --------------- Added [DATE]1219985639[/DATE] at [TIME]1219985639[/TIME] --------------- How do I make it display a different logo on one page and leave the default on the rest of the pages? <img src="<if condition="$foruminfo['forumid'] == 11">images/misc/muskiecentral.png (here is where I get goofed up, if I put the following in there it shows two logos because one is hard coded in there.) <else />images/misc/headerlogo.png</if>" border="0" /> Since the default is hard coded somewhere.....I can't seem to make this work. This doesn't work: <img src="<if condition="$foruminfo['forumid'] == 11">images/misc/muskiecentral.png</if>" That shows the muskiecentral.png and the headerlogo.png at the same time. |
Code:
<img src="<if condition="$foruminfo['forumid'] == 11">images/misc/muskiecentral.png<else />images/misc/headerlogo.png</if>" border="0" /> |
Thanks for the reply but that still shows both banners.
https://vborg.vbsupport.ru/external/2008/08/8.jpg |
Post your template.
|
This is the FORUM DISPLAY template, is that the one?
I can't post the entire template, it's longer than allowed. |
Quote:
|
I'm sorry for the delayed response, I was out of town for a week.
That is the problem, I don't know where that is. I had a programmer do it for me and he has not returned my emails so I'm guessing he's not available so I am trying to figure this out. Where do you think he MIGHT have put that so it displays on every page? I'm no programmer......as you can tell ;-) |
Here is the Header code....possibly it's in here?
<!-- logo --> <a name="top"></a> <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center" bgcolor="#FFFFFF" <!--background="images/misc/topback.png"--> <tr> <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td> <td align="$stylevar[right]" id="header_right_cell"> <if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else /> </if> </td> </tr> </table> <!-- /logo --> <!-- content table --> $spacer_open $_phpinclude_output $ad_location[ad_header_end] |
Just found this thread and figured it a good place to get additional help...
I'm using the following code in template postbit_attachmentthumbnail Code:
<if condition="$forumid != 103"> I tried both <if condition="$forumid != 103"> and <if condition="!in_array($forumid, array(103))"> and neither worked. Anyone have any ideas? |
Any help....anyone?
I'm still trying to get more than one banner showing. |
@scoyote:
Code:
<!-- logo --> |
Sigh......I'm not really sure what you just said.
I'm guessing that something is wrong with the way my logo is being called and I cannot show a different logo on one of the forums? |
I just posted an edited version of your header template. Disregard what I'm saying to nando99.
|
Quote:
|
Dismounted.....thank you very much.
That is working perfectly.....! I almost hate to ask this question....but.... Now, if I want to add another logo for forum ID 9 Do I need to enter that whole line again or add a comma and the other forum id???? if condition="$foruminfo['forumid'] == 11">images/misc/muskiecentral.png, if condition="$foruminfo['forumid'] == 9">images/misc/ftm.png <else />$stylevar[titleimage]</if> Does it work like that? |
Code:
<!-- logo --> |
OK....just never satisfied I guess ;-)
Now, my customer wants that logo to be linked to his website so he can click it to go directly there. Can that logo be linked? If so....can someone give me an example or is it just normal HTML code? |
Making a logo clickable is basic html - the basic structure:
HTML Code:
<a href="whatever.php"><img src="logo.jpg"></a> |
Then I'm doing it wrong?
I tried that and it didn't work for me. Here is where I'm trying to do it: <img src="<if condition="$foruminfo['forumid'] == 11">images/misc/muskiecentral.png<else /><if condition="$foruminfo['forumid'] == 9">images/misc/ftm.png<else /> So...where do you put that code inside there? |
Before it, put:
Code:
<a href="whatever.php"> Code:
</a> |
All times are GMT. The time now is 03:02 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|