Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 07-31-2008, 04:51 AM
cmedic101 cmedic101 is offline
 
Join Date: Feb 2008
Location: N.E.Pa
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 07-31-2008, 06:08 AM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try
Code:
<if condition="THIS_SCRIPT = 'forumdisplay' AND $forumid == 32">
<image scr="images/Mustanglogo.jpg" />
<else />
<image src="linktosecondimage" />
</if>
Reply With Quote
  #3  
Old 07-31-2008, 06:53 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<if condition="$foruminfo['forumid'] == 32"><img scr="images/Mustanglogo.jpg" border="0" /></if>
Reply With Quote
  #4  
Old 07-31-2008, 07:07 AM
cmedic101 cmedic101 is offline
 
Join Date: Feb 2008
Location: N.E.Pa
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MoT3rror View Post
Try
Code:
<if condition="THIS_SCRIPT = 'forumdisplay' AND $forumid == 32">
<image scr="images/Mustanglogo.jpg" />
<else />
<image src="linktosecondimage" />
</if>
Thanks for the reply... after using the entry I am getting the folowing error

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
Reply With Quote
  #5  
Old 07-31-2008, 07:38 AM
cmedic101 cmedic101 is offline
 
Join Date: Feb 2008
Location: N.E.Pa
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
Code:
<if condition="$foruminfo['forumid'] == 32"><img scr="images/Mustanglogo.jpg" border="0" /></if>
Thanks for the reply.. After using the above code I can see the image block above the default header logo graphic. I am thinking that maybe I need to do something in the header template to cancel the default logo when this fourm is called on.

any ideas?


thanks for your help

cmedic101
Attached Images
File Type: jpg screen shot.jpg (69.4 KB, 0 views)
Reply With Quote
  #6  
Old 07-31-2008, 07:42 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<if condition="$foruminfo['forumid'] == 32"><img scr="images/Mustanglogo.jpg" border="0" /><else />YOUR DEFAULT CODE HERE</if>
Reply With Quote
  #7  
Old 07-31-2008, 08:39 AM
cmedic101 cmedic101 is offline
 
Join Date: Feb 2008
Location: N.E.Pa
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
Code:
<if condition="$foruminfo['forumid'] == 32"><img scr="images/Mustanglogo.jpg" border="0" /><else />YOUR DEFAULT CODE HERE</if>
I tryed the above code in forum display template and I still get the missing graphic box.

should I be putting the code in another tepmplate?


thank you

cmedic101
Reply With Quote
  #8  
Old 07-31-2008, 09:00 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 07-31-2008, 09:10 AM
cmedic101 cmedic101 is offline
 
Join Date: Feb 2008
Location: N.E.Pa
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
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.
I checked the graphics and even re-uploaded them to be sure. The are there and working..

when i click properties there is no information avilable regarding an image path

thank you
cmedic101
Reply With Quote
  #10  
Old 07-31-2008, 09:24 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whats the code you are using? (Copy and paste it from your template)
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 12:36 PM.


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.05858 seconds
  • Memory Usage 2,274KB
  • Queries Executed 12 (?)
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
  • (6)bbcode_code
  • (4)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
  • (2)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
  • (1)postbit_attachment
  • (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_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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete