vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help fix this conditional (easy for coders) (https://vborg.vbsupport.ru/showthread.php?t=224434)

mathforum 10-02-2009 07:46 PM

Help fix this conditional (easy for coders)
 
Hi,

I want to have an ad only display on a certain forum so I am using this format.

In the SHOWTHREAD template, right below my Google ads I put:

<if condition="$forumid == 6">
<a href="www.calculus7.com" target="_blank">
<img src="http://www.mathhelpforum.com/math-help/images/possad2.jpg" border="0" ></a>

Nothing is showing up. Why?

Speysider 10-02-2009 08:25 PM

You did not complete the code.

It should read this:
Code:


<if condition="$forumid == 6">
<a href="www.calculus7.com" target="_blank">
<img src="http://www.mathhelpforum.com/math-help/images/possad2
.jpg" border="0" ></a></img>
</if>


Lynne 10-02-2009 09:25 PM

Do not add an </img> tag as there is not such thing as an </img> tag. You image tag, however, should be changed to look like this:
HTML Code:

<img src="http://www.mathhelpforum.com/math-help/images/possad2.jpg" border="0" alt='' />

mathforum 10-03-2009 03:18 AM

Thanks you two! It works now :)

Speysider 10-03-2009 10:04 AM

Quote:

Originally Posted by Lynne (Post 1893955)
Do not add an </img> tag as there is not such thing as an </img> tag. You image tag, however, should be changed to look like this:
HTML Code:

<img src="http://www.mathhelpforum.com/math-help/images/possad2.jpg" border="0" alt='' />

Yes there is. Don't state such things that are true.

Lynne 10-03-2009 02:33 PM

Quote:

Originally Posted by Speysider (Post 1894132)
Yes there is. Don't state such things that are true.

Really? And how well does your site validate when using an </img>?

World Wide Web Consortium (W3C) standards
Quote:

13.2 Including an image: the IMG element

......
Start tag: required, End tag: forbidden
Forbidden is a pretty strong word, I think.

Speysider 10-03-2009 03:08 PM

Quote:

Originally Posted by Lynne (Post 1894221)
Really? And how well does your site validate when using an </img>?

World Wide Web Consortium (W3C) standards

Forbidden is a pretty strong word, I think.

Just exactly like the img BBCode, it displays the image.

HMBeaty 10-03-2009 03:11 PM

BB Code and HTML are 2 totally different types of code. Yes, there is a closing img tag for bb code, but there isn't for html. If you have a closing img tag in html, your code is not valid. Any html image tag should look like:
HTML Code:

<img src="http://www.yoursite.com/image.gif" border="0" alt="" />
and where the /> is, is where it closes the image tag for html

Speysider 10-03-2009 03:49 PM

So why does the code work when I use </img>? It's always worked for me.

HMBeaty 10-03-2009 03:52 PM

It will still work, but if you try and validate it through something like this, it will probably come out as forbidden or not closed properly


All times are GMT. The time now is 07:09 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
  • Page Generation 0.01097 seconds
  • Memory Usage 1,730KB
  • 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
  • (3)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete