Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-02-2009, 07:46 PM
mathforum mathforum is offline
 
Join Date: Nov 2005
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 10-02-2009, 08:25 PM
Speysider's Avatar
Speysider Speysider is offline
 
Join Date: Apr 2009
Posts: 1,029
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #3  
Old 10-02-2009, 09:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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='' />
Reply With Quote
  #4  
Old 10-03-2009, 03:18 AM
mathforum mathforum is offline
 
Join Date: Nov 2005
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks you two! It works now
Reply With Quote
  #5  
Old 10-03-2009, 10:04 AM
Speysider's Avatar
Speysider Speysider is offline
 
Join Date: Apr 2009
Posts: 1,029
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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.
Reply With Quote
  #6  
Old 10-03-2009, 02:33 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Speysider View Post
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.
Reply With Quote
  #7  
Old 10-03-2009, 03:08 PM
Speysider's Avatar
Speysider Speysider is offline
 
Join Date: Apr 2009
Posts: 1,029
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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.
Reply With Quote
  #8  
Old 10-03-2009, 03:11 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 10-03-2009, 03:49 PM
Speysider's Avatar
Speysider Speysider is offline
 
Join Date: Apr 2009
Posts: 1,029
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So why does the code work when I use </img>? It's always worked for me.
Reply With Quote
  #10  
Old 10-03-2009, 03:52 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


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 02:39 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.04541 seconds
  • Memory Usage 2,255KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_code
  • (3)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete