Simple Portal

Support => English Support => Topic started by: ontime on September 01, 2010, 10:54:22 AM

Title: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 01, 2010, 10:54:22 AM
Hi I hope this is the right place to post this.
Here is the issue i have added ads from (Tiger Direct,Amazon.com,New Egg.com,Comp USA) into a html block I get several errors through http://www.w3.org/1999/xhtml (utf-8)477 Errors, 756 warning(s)  WHEN I CHECK (utf-16) I only get 2 Errors, 2 warning(s) is there any way to get rid of all these errors the info you will need below and a sample of the adds.Thank You

Add Sample I have removed some info from the add so the add will not work if clicked

<a href="http://click.linksynergy.com/fs-bin/click?id=mksCIc4iePI&subid=&offerid=1327.1&type=10&tmpid=3883&RD_PARM1=http%3A%2F%2Fwww.tigerdirect.com%2Fapplications%2FCategory%2Fcategory_tlc.asp%3FCatId%3D106%2526name%3DPower-Supplies" target="new">Power Supplies</a>
<img alt="icon" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=mksCIc4iePI&bids=102327.1&type=10"> |




    *   Powered by SMF 2.0 RC3 | SMF
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 02, 2010, 12:16:07 AM
Quote from: xvp40 on September 01, 2010, 06:24:45 PM
install the headers and footers mod on smf, then use the ads there, simple portal doesn't like header calls as it is not in the header information. so the end ad company doesn't get any info back.

hope this helps
Hi and thanks for the response I am trying to avoid the footers and header mod,Because of its positioning. This is where the portal comes in.
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 02, 2010, 09:25:48 AM
Quote from: xvp40 on September 01, 2010, 06:24:45 PM
install the headers and footers mod on smf, then use the ads there, simple portal doesn't like header calls as it is not in the header information. so the end ad company doesn't get any info back.

hope this helps
Hi again i did what you suggested and put the ads in the global footers and headers,I still get the same error,so now it is the codes or ads bad or old scripts,I am not a good enough with scripts to figure this out.Is There anyone that can see the script and maybe help me to stop the errors  Thank You Ontime
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: AngelinaBelle on September 02, 2010, 01:43:13 PM
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.fweclan.com%2Fsmf&charset=%28detect+automatically%29&doctype=Inline&group=0 (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.fweclan.com%2Fsmf&charset=%28detect+automatically%29&doctype=Inline&group=0)

Take a look at that line 341, where the long string of messages starts.
<div
Well -- you can't have a tag without a > can you?
That's your big problem.

There's a bug in SimplePortal when you check the "no body" box.
You can apply the fix: http://simpleportal.net/index.php?issue=376.0 (http://simpleportal.net/index.php?issue=376.0)
or you can avoid checking "no body" and wait for the fix in SimplePortal 2.4

After you get rid of those errors, it will be easy to find if you've got any problems actually related to adding the ad.

Title: Re: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 03, 2010, 07:42:51 PM
Quote from: AngelinaBelle on September 02, 2010, 01:43:13 PM
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.fweclan.com%2Fsmf&charset=%28detect+automatically%29&doctype=Inline&group=0 (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.fweclan.com%2Fsmf&charset=%28detect+automatically%29&doctype=Inline&group=0)

Take a look at that line 341, where the long string of messages starts.
<div
Well -- you can't have a tag without a > can you?
That's your big problem.

There's a bug in SimplePortal when you check the "no body" box.
You can apply the fix: http://simpleportal.net/index.php?issue=376.0 (http://simpleportal.net/index.php?issue=376.0)
or you can avoid checking "no body" and wait for the fix in SimplePortal 2.4

After you get rid of those errors, it will be easy to find if you've got any problems actually related to adding the ad.
Thanks very much for the reply.I went and unchecked the nobody box and this did not change any thing.This {Take a look at that line 341, where the long string of messages starts).  I do not see this in the ERRORS or line 341.
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: AngelinaBelle on September 06, 2010, 07:48:11 PM
OK.  You eliminated one problem. But you did not eliminate all of the "no body" problems.
You still have that problem, for example, with sp_block_35.

And you have other HTML errors

For example --

<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {

should be

<div id="google_translate_element"></div><script type="text/javascript" >
function googleTranslateElementInit() {


Keep working until you eliminate all of the <div problems and all the rest of your errors.

I do recommend the fix given for this <div bug.  I have applied it myself, and it works.

It can be a bit frustrating, but you will be able to sort through it.

Good luck!
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 09, 2010, 09:02:36 AM
Quote from: AngelinaBelle on September 06, 2010, 07:48:11 PM
OK.  You eliminated one problem. But you did not eliminate all of the "no body" problems.
You still have that problem, for example, with sp_block_35.

And you have other HTML errors

For example --

<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {

should be

<div id="google_translate_element"></div><script type="text/javascript" >
function googleTranslateElementInit() {


Keep working until you eliminate all of the <div problems and all the rest of your errors.

I do recommend the fix given for this <div bug.  I have applied it myself, and it works.

It can be a bit frustrating, but you will be able to sort through it.

Good luck!
Thanks for the reply, I do have another duplicate forums running for a fresh install I will add your correction code there  by itself then post the error .This code stand alone does not have errors  so this not the main issue

<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'en',
    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
  }, 'google_translate_element');
}
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>



However this code standalone in a header or in a block has 19 errors so i have to assume the code is outdated or just scripted poorly


<a target='new'  href="http://click.linksynergy.com/fs-bin/click?id=mksCIc4iePI&subid=&offerid=MY KEY HERE.1&type=10&tmpid=3883&RD_PARM1=http%3A%2F%2Fwww.tigerdirect.com%2Fapplications%2Fcategory%2Fcategory_tlc.asp%3FCatId%3D22" target="new">CPU Processors </a>
<img alt="icon" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=mksCIc4iePI&bids=102327.1&type=10">
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: AngelinaBelle on September 09, 2010, 04:35:20 PM
Whether or not <script> is legal depends on which doctype you declare.
This can depend on which theme you are using.  Which can depend on which version of SMF you are running, of course.

I assure you that you get errors for the following code block at http://validator.w3.org/#validate_by_input (http://validator.w3.org/#validate_by_input)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>some test code</title>
</head>
<body>
<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'en',
    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
  }, 'google_translate_element');
}
</script>
</body>
</html>


Title: Re: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 09, 2010, 11:41:09 PM
yes I did get errors there no doubt but when i moved that script to the new install that was the only script in the new install there were no errors.When i move 1 tiger direct add to the new forums i get 19 errors.Is it possible that the tiger direct ads are causerie havoc with all the other scripts.In all reality there are 500 and some errors and 700 warnings and i really don't know where to start.I can tell you this much you are right about the portal div error. 
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: AngelinaBelle on September 10, 2010, 09:19:12 AM
The validator gives you a lot of errors, but many of them are easy to see and correct.

The original problem you posted about is caused by the <div bug.  Once you fix that, you might not care about some of the other errors.

On your site, http://www.fweclan.com/smf/ (http://www.fweclan.com/smf/), you still have the <div error. I see it in block 35 and block 60.

--------------
The rest of your errors are  incorrect XHTML that most browsers can deal with, but the validator will point out to you.

In line 130, the validator tells you that you have put a table inside a paragraph:

<div id="random_news"><h3>News:</h3><p>
<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;">
<tr><td style="filter: Glow(color=black, strength=2); font: inherit;"><strong> You Have Entered Free Weapons Enjoy (USA) </strong></td></tr></table> .
We Are Adding New Features And New Category's To Our Forums.Pleas Feel Free To Ask Questions Or Comment On What You Think. Thank You {FWE} Clan</p></div>


In several places you use uppercase tag names like <IMG>, which is wrong in XHTML. Should be <img /> and </a>

In XHTML, an image tag has to end with a " />", but many of yours do not.

The tigerdirect block (block 50) has a lot of bad img tags

The bulk of your errors are because you aren't supposed to use "&" in the href part of the URL. You need to replace it with &amp;   Please see http://www.htmlhelp.com/tools/validator/problems.html#amp (http://www.htmlhelp.com/tools/validator/problems.html#amp) for more information on that.
Code (incorrect) Select

<a href="http://click.linksynergy.com/fs-bin/stat?id=mksCIc4iePI&offerid=7097.10000029&subid=0&type=4" target="new">
Code (correct) Select

<a href="http://click.linksynergy.com/fs-bin/stat?id=mksCIc4iePI&amp;offerid=7097.10000029&amp;subid=0&amp;type=4" target="new">
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 10, 2010, 02:22:26 PM
Quote from: AngelinaBelle on September 10, 2010, 09:19:12 AM
The validator gives you a lot of errors, but many of them are easy to see and correct.

The original problem you posted about is caused by the <div bug.  Once you fix that, you might not care about some of the other errors.

On your site, http://www.fweclan.com/smf/ (http://www.fweclan.com/smf/), you still have the <div error. I see it in block 35 and block 60.

--------------
The rest of your errors are  incorrect XHTML that most browsers can deal with, but the validator will point out to you.

In line 130, the validator tells you that you have put a table inside a paragraph:

<div id="random_news"><h3>News:</h3><p>
<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;">
<tr><td style="filter: Glow(color=black, strength=2); font: inherit;"><strong> You Have Entered Free Weapons Enjoy (USA) </strong></td></tr></table> .
We Are Adding New Features And New Category's To Our Forums.Pleas Feel Free To Ask Questions Or Comment On What You Think. Thank You {FWE} Clan</p></div>


In several places you use uppercase tag names like <IMG>, which is wrong in XHTML. Should be <img /> and </a>

In XHTML, an image tag has to end with a " />", but many of yours do not.

The tigerdirect block (block 50) has a lot of bad img tags

The bulk of your errors are because you aren't supposed to use "&" in the href part of the URL. You need to replace it with &amp;   Please see http://www.htmlhelp.com/tools/validator/problems.html#amp (http://www.htmlhelp.com/tools/validator/problems.html#amp) for more information on that.
Code (incorrect) Select

<a href="http://click.linksynergy.com/fs-bin/stat?id=mksCIc4iePI&offerid=7097.10000029&subid=0&type=4" target="new">
Code (correct) Select

<a href="http://click.linksynergy.com/fs-bin/stat?id=mksCIc4iePI&amp;offerid=7097.10000029&amp;subid=0&amp;type=4" target="new">

Thanks very much I will try what you suggest to attempt to fix these.As you very well can see I am new to the scripts,I can modify them but trouble shooting them with as many as I have BOY WHAT A TASK. I will attempt the fixes. Hey i have a registered Team speak would you be interested in meeting me in Team speak 3, I can pm you the information.
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 10, 2010, 03:20:15 PM
Hi I have removed all & and replaced with &amp; and removing all IMG changed to img,The forums have gone from 500+errors and 700+warnings to 300+errors to 400+ warnings.This is awesome,Thank you very much Still working on the rest. Here is a sample code I have revised per your instructions  AngelinaBelle you are awesome.


<a target='new'  href="http://click.linksynergy.com/fs-bin/click?id=mksCIc4iePI&amp;subid=&amp;offerid=102327.1&amp;type=10&amp;tmpid=3883&amp;RD_PARM1=http%3A%2F%2Fwww.tigerdirect.com%2Fapplications%2Fcategory%2Fcategory_tlc.asp%3FCatId%3D22" target="new">CPU Processors </a>
<img alt="icon" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=mksCIc4iePI&amp;bids=102327.1&amp;type=10">

Title: Re: ADDING html Portal Bocks with out creating errors
Post by: AngelinaBelle on September 10, 2010, 03:33:48 PM
Fixing the <div error might be your first priority.  That will get the layout right.

The broken page layout was what got you to post this topic in the first place.


Title: Re: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 10, 2010, 05:00:34 PM
Quote from: ontime on September 10, 2010, 03:20:15 PM
Hi I have removed all & and replaced with &amp; and removing all IMG changed to img,The forums have gone from 500+errors and 700+warnings to 300+errors to 400+ warnings.This is awesome,Thank you very much Still working on the rest. Here is a sample code I have revised per your instructions  AngelinaBelle you are awesome.


<a target='new'  href="http://click.linksynergy.com/fs-bin/click?id=mksCIc4iePI&amp;subid=&amp;offerid=102327.1&amp;type=10&amp;tmpid=3883&amp;RD_PARM1=http%3A%2F%2Fwww.tigerdirect.com%2Fapplications%2Fcategory%2Fcategory_tlc.asp%3FCatId%3D22" target="new">CPU Processors </a>
<img alt="icon" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=mksCIc4iePI&amp;bids=102327.1&amp;type=10">
Believe me I am working on this now the status on errors are from  500+ Errors, 700+ warning(s)  To 236 Errors, 287 warning(s)     
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 10, 2010, 05:01:34 PM
Quote from: AngelinaBelle on September 10, 2010, 03:33:48 PM
Fixing the <div error might be your first priority.  That will get the layout right.

The broken page layout was what got you to post this topic in the first place.
This will be fun to find
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 10, 2010, 09:02:29 PM
Quote from: ontime on September 10, 2010, 05:00:34 PM
Quote from: ontime on September 10, 2010, 03:20:15 PM
Hi I have removed all & and replaced with &amp; and removing all IMG changed to img,The forums have gone from 500+errors and 700+warnings to 300+errors to 400+ warnings.This is awesome,Thank you very much Still working on the rest. Here is a sample code I have revised per your instructions  AngelinaBelle you are awesome.


<a target='new'  href="http://click.linksynergy.com/fs-bin/click?id=mksCIc4iePI&amp;subid=&amp;offerid=102327.1&amp;type=10&amp;tmpid=3883&amp;RD_PARM1=http%3A%2F%2Fwww.tigerdirect.com%2Fapplications%2Fcategory%2Fcategory_tlc.asp%3FCatId%3D22" target="new">CPU Processors </a>
<img alt="icon" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=mksCIc4iePI&amp;bids=102327.1&amp;type=10">
Believe me I am working on this now the status on errors are from  500+ Errors, 700+ warning(s)  To 236 Errors, 287 warning(s)   
Believe me I am working on this now the status on errors are from  236 Errors, 287 + warning(s)  67 Errors, 3 warning(s)
The <div i have not found that yet I do not know where to look for that,I do not see it in any of the code I will need to research it more TO  understanding what it means Thanks
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: ontime on September 11, 2010, 12:57:21 PM
Hi AngelinaBelle the div issue I found, the div issue is a hit map.    Here the link         http://www.hit2map.com/myspace_map/66qqd6uy

here is the code from it.   this just solves the div issue only

<a href="http://www.hit2map.com/myspace_map/e8yn20ou">  Click to zoom in.<br/>
<img alt="You've been marked on my visitor map!" border=0 src="http://www.hit2map.com/maps/e8yn20ou.jpg"/>
</a><br/>

This code is the google search box WITHOUT THIS CODE I cannot get the language code to show just below the menu (that code is the last code I posted below)

<form action="http://www.fweclan.com/smf" id="cse-search-box">
  <div>
    <input type="hidden" name="cx" value="partner-pub-1231645645645666340:9z1czjesh64" />
    <input type="hidden" name="cof" value="FORID:10" />
    <input type="hidden" name="ie" value="ISO-8859-1" />
    <input type="text" name="q" size="31" />
    <input type="submit" name="sa" value="Search" />
  </div>
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box<=en"></script>


The language code 

<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'en',
    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
  }, 'google_translate_element');
}
</script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

I am down to ( 1 Error, 2 warning(s) )   The codes above are only errors i have left is there any way to solve these errors by fixing these codes,anything i do to them causes more errors or they just dont show up on the form portal at all.Thanks for all the help
with your help,we have cleaned up the forums from 500+errors and 700+ warnings down to these last (3) 1 Error, 2 warning(s)

Here is the link to the page again      http://www.fweclan.com/smf
Title: Re: ADDING html Portal Bocks with out creating errors
Post by: AngelinaBelle on September 13, 2010, 01:28:20 PM
The HTML errors caused by the <div error were the only ones that are actually SimplePortal related. You still have not fixed one of these.  You can see the unclosed tag in line 804 or so of
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.fweclan.com%2Fsmf%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator%2F1.1 (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.fweclan.com%2Fsmf%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator%2F1.1)

This is in the div with id "sp_block_60", which contains your hit2map. When you use the validator, select the "show source" option, and you will see the exact HTML/XHTML source the validator is telling you about.

In line 804, the validator warns you you have done something like <foo<bar>  That's your clue that you've still got <div <div class="sp_block"> in your page.

-------------------
As for all the other errors -- these are not at all related to SimplePortal.  They are just examples of incorrect XHTML.  The HTML validator tells you what the error is and how to fix it. To fix the error in line 130, just follow the instructions the validator gives you.

In line 128, the warning is similar to the ampersand warning -- you should avoid certain special characters in attribute values.  It even tells you how to fix a problem related to a "<" in an attribute value.

You can learn a lot from the validator messages, and you can follow up by reading more about correct XHTML at your favorite "learn XHTML" website.

Good Luck!
EhPortal 1.39.8 © 2024, WebDev