vb.org Archive

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

cmedic101 07-31-2008 04:51 AM

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

MoT3rror 07-31-2008 06:08 AM

Try
Code:

<if condition="THIS_SCRIPT = 'forumdisplay' AND $forumid == 32">
<image scr="images/Mustanglogo.jpg" />
<else />
<image src="linktosecondimage" />
</if>


Dismounted 07-31-2008 06:53 AM

Code:

<if condition="$foruminfo['forumid'] == 32"><img scr="images/Mustanglogo.jpg" border="0" /></if>

cmedic101 07-31-2008 07:07 AM

Quote:

Originally Posted by MoT3rror (Post 1588067)
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

cmedic101 07-31-2008 07:38 AM

1 Attachment(s)
Quote:

Originally Posted by Dismounted (Post 1588088)
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

Dismounted 07-31-2008 07:42 AM

Code:

<if condition="$foruminfo['forumid'] == 32"><img scr="images/Mustanglogo.jpg" border="0" /><else />YOUR DEFAULT CODE HERE</if>

cmedic101 07-31-2008 08:39 AM

Quote:

Originally Posted by Dismounted (Post 1588120)
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

Opserty 07-31-2008 09:00 AM

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. ;)

cmedic101 07-31-2008 09:10 AM

Quote:

Originally Posted by Opserty (Post 1588169)
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

Opserty 07-31-2008 09:24 AM

Whats the code you are using? (Copy and paste it from your template)


All times are GMT. The time now is 04:47 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.01035 seconds
  • Memory Usage 1,738KB
  • 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
  • (6)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete