Go Back   vBulletin Setup > vBulletinSetup Information > Community Forum Management > vBulletin Tutorials

Reply 
 
LinkBack Thread Tools Display Modes
Old 10-03-2006, 05:09 PM   #1
Community Manager
Supporters
vBulletin Owner
vBSetup Mods
 
Brandon Sheley's Avatar
 
Join Date: Jul 2006
Location: Topeka, KS
Posts: 14,115
Blog Entries: 35
Brandon Sheley is a splendid one to beholdBrandon Sheley is a splendid one to beholdBrandon Sheley is a splendid one to beholdBrandon Sheley is a splendid one to beholdBrandon Sheley is a splendid one to beholdBrandon Sheley is a splendid one to behold
Send a message via AIM to Brandon Sheley Send a message via MSN to Brandon Sheley Send a message via Yahoo to Brandon Sheley
Coding vBulletin To Web Standards

Who Defines Web Standards?
--------------------------------------------------
The World Wide Web Consortium (W3C) is an international consortium where member organizations, a full-time staff and the public work together to develop standards for the World Wide Web. W3C's stated mission is "To lead the World Wide Web to its full potential by developing protocols and guidelines that ensure long-term growth for the Web."

What is XHTML?
--------------------------------------------------
For further reading on what XHTML is please see XHTML 1.0: The Extensible HyperText Markup Language (Second Edition)

How Does This Involve Your vBulletin Forum?
--------------------------------------------------
vBulletin comes by default as XHTML 1.0 Transitional. Whenever you do modifications to your forum you want to keep in mind that you should adhear to atleast XHTML 1.0 Transitional standards.

What Are Common Mistakes Between HTML 4.0 and XHTML 1.0?
--------------------------------------------------
Some of the biggest mistakes I see people making are not properly closing tags.

Here are a few examples:
Non XHTML 1.0 Compliant
Code:
<br>
XHTML 1.0 Compliant
Code:
<br />
Non XHTML 1.0 Compliant
Code:
<img src="imagelocation.jpg">
XHTML 1.0 Compliant
Code:
<img src="imagelocation.jpg" alt="Description of image" />
Non XHTML 1.0 Compliant
Code:
<p>First New Paragraph
<p>Second New Paragraph
XHTML 1.0 Compliant
Code:
<p>First New Paragraph</p>
<p>Second New Paragraph</p>
Non XHTML 1.0 Compliant
Code:
<b><i>A sentence that is both italized and bolded but not closed properly</b></i>
XHTML 1.0 Compliant
Code:
<strong><em>A sentence that is both italized and bolded but not closed properly</em></strong>
Deprecated Code
--------------------------------------------------
Deprecated code is code that is no longer supported or recommended for use on XHTML 1.0 webpages.

<center>
The <center> tag is no longer supported as the correct way to center text or elements on your forum. To center in compliance with XHTML 1.0 use the following CSS code:
Code:
text-align: center;
<font>
This is another one that many people still use. Instead of using <font> use css to define font colors. If you want a certain text to be red use css or use the style attribute directly in the code (using a seperate CSS file and then using a class to call it is preferred as a way to keep your page smaller (less code) )
An example on how to make text red using style:
Code:
<span style="color: #910000;">This is red text</span>
<u>
There is really no need to use the underline attribute.

For a list of all other xhtml attributes see this: HTML 4.01 / XHTML 1.0 Reference

Last edited by Brandon Sheley; 02-07-2008 at 05:10 PM.
Brandon Sheley is offline   Reply With Quote

Advertisement [Remove Advertisement]

Old 04-11-2007, 11:34 AM   #2
php4ever
Guest
 
Posts: n/a
Nice article, just thought I'd ask though about one of your compliance variant.

You have
<b><i>A sentence that is both italized and bolded but not closed properly</i></b>

Shouldn't that be
<strong><em>A sentence that is both italized and bolded but not closed properly</em></strong>

~ Jared
  Reply With Quote
Old 04-14-2007, 11:34 PM   #3
eJM
vBulletin Owner
 
eJM's Avatar
 
Join Date: Nov 2006
Location: teh Ether
Posts: 42
eJM has a spectacular aura about
Quote:
Originally Posted by Brent View Post
<u>
There is really no need to use the underline attribute.
That would, of course, be up to the web designer and in some instances is a desired markup. It is very easily accomplished with CSS:
Code:
style="text-decoration:underline;"
You can also use other values. The default is none, but you may want to indicate it to prevent hyperlinks from automatically being underlined. Others are overline, line-through and blink (which doesn't work in IE or Opera).

I'd also like to mention that centering may not always work with just text-align:center. You may find it necessary to use:
Code:
style="margin:0 auto;"
or the combined:
Code:
style="text-align:center;margin:0 auto;"
R'gards,

Jim
eJM is offline   Reply With Quote
Old 04-16-2007, 01:10 AM   #4
vBulletin Owner
 
RedMatrix's Avatar
 
Join Date: Sep 2006
Location: Texas
Posts: 207
RedMatrix is just really niceRedMatrix is just really nice
That is so true, Jim.

Also, Brent, maybe you could add a second line to that code example, as the nuance was missed. Improper closing of nested tags gets to me.

Code:
<strong><em>A sentence that is both italized and bolded but not closed properly</strong></em>
:eek:
RedMatrix is offline   Reply With Quote
Old 04-10-2009, 09:13 PM   #5
BFC
vBulletin Owner
 
BFC's Avatar
 
Join Date: Apr 2009
Posts: 12
BFC will become famous soon enough
Re: Coding vBulletin To Web Standards

Nice, thanks for the info, I got some templates to check now. LOL
BFC is offline   Reply With Quote
Old 04-25-2009, 07:19 PM   #6
Supporters
vBulletin Owner
 
glennybee's Avatar
 
Join Date: Mar 2008
Location: Scotland
Posts: 1,058
glennybee is just really niceglennybee is just really nice
Re: Coding vBulletin To Web Standards

I regularly check my sites and urls on this page...

The W3C Markup Validation Service

It's the very first thing I use if I have a problem because 9 times out of 10 it will be faulty code that you're using or something that's just not quite right.

And it will offer advice on how to correct the errors so it doesn't just say what's wrong, it tells you how to fix it too.

A must for all webmasters!
glennybee is offline   Reply With Quote
Old 04-26-2009, 04:36 AM   #7
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

Yikes! Just checked my homepage and found it to have 642 Errors and 28 warnings!

Glenn, how do you determine based on "Line" and "Column" where to do the adjustments? And, do you suggest to start from the top or on the warnings or anything in particular?
ArnyVee is offline   Reply With Quote
Old 04-26-2009, 06:25 AM   #8
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

Okay, just did a couple of fixes and I've cut the errors in half nearly!

327 Errors, 28 warning(s) left....so, still working on it.
ArnyVee is offline   Reply With Quote
Old 04-26-2009, 07:13 AM   #9
Supporters
vBulletin Owner
 
glennybee's Avatar
 
Join Date: Mar 2008
Location: Scotland
Posts: 1,058
glennybee is just really niceglennybee is just really nice
Re: Coding vBulletin To Web Standards

Yeah the lines and columns are pretty much useless because it thinks the code is all on the one page when in fact, as you know, it's made up of loads of templates.

You just gotta take a snippit of the code that failing and search for it in the templates. Viewing the source of the index page in a browser and doing a CTRL + F to find the faulty code might also give you an idea of which template the code is in.

Popular templates are:

header
footer
navbar
forumhome
forumdisplay
showthread

If you have vBadvanced installed then check all your templates in that category or custom 'adv_portal_' templates that you've created yourself.

I'd say most of the errors are things like not nesting correctly, i.e. forgetting to close a <div> or a <td>, correcting that one mistake can reduce your errors by hundreds.

Mods/hacks written several years ago are other good culprits. Sometimes it's as simple as they've used a capital letter instead of a small letter, i.e. 'onClick' is fine for HTML but you need to change it to 'onclick' for XHTML.

Last edited by glennybee; 04-26-2009 at 07:16 AM.
glennybee is offline   Reply With Quote
Old 04-26-2009, 12:00 PM   #10
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

Can anyone help me out here? I'm getting several errors that seem to be in my footer, but since I'm a relative novice in HTML, I can't seem to spot the errors.

I've attached my footer text file and a few of the errors that I keep getting. Can someone take a quick look and give me some pointers?
Attached Images
File Type: jpg footer_errors.jpg (83.8 KB, 6 views)
Attached Files
File Type: txt footer.txt (3.5 KB, 2 views)
ArnyVee is offline   Reply With Quote
Old 04-26-2009, 12:45 PM   #11
Supporters
vBulletin Owner
 
Michael Biddle's Avatar
 
Join Date: Aug 2006
Location: Anaheim, CA
Posts: 1,657
Michael Biddle is just really niceMichael Biddle is just really niceMichael Biddle is just really nice
Re: Coding vBulletin To Web Standards

Shoot me a quick PM with admincp access to the styles. Easier to do then to explain.
__________________
I hate that someone changed my signature.
Michael Biddle is offline   Reply With Quote
Old 04-26-2009, 12:57 PM   #12
Supporters
vBulletin Owner
 
glennybee's Avatar
 
Join Date: Mar 2008
Location: Scotland
Posts: 1,058
glennybee is just really niceglennybee is just really nice
Re: Coding vBulletin To Web Standards

Where ever you see 'end tag for "img" omitted' that's an easy one to fix.

HTML CODE:
<img src="/images/icon1.gif" alt="icon1">

XHTML CODE:
<img src="/images/icon1.gif" alt="icon1" />

You need to close the code with a /> instead of a > and there needs to be a space before it. I just checked your disney boards forum and there's a lot of them need correcting.

Some HTML tags are now obsolete in XHTML so I found that if you google the tag and add XHTML after it, i.e. allowtransparency xhtml, it will give you an alternative to use or a way to fix it.

I'm also available for the next 9 hours or so (nightshift) if you need any help.
glennybee is offline   Reply With Quote
Old 04-26-2009, 01:28 PM   #13
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

Michael, PM sent.

Glenn, I cleaned up a few of those easier ones like the ones you mentioned. But, I'm still working on stuff. If Michael can't get to it and I'm still working on it (going to have some dinner in a bit) then I'll definitely need your help and I'll post here in this thread

Thanks guys!
ArnyVee is offline   Reply With Quote
Old 04-26-2009, 05:15 PM   #14
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

I'm getting validation errors...this is in line 95 of a mod I have....

Code:
<td class="alt2 smallfont" nowrap>
....what do I have to do to 'fix' it?
ArnyVee is offline   Reply With Quote
Old 04-26-2009, 05:22 PM   #15
Supporters
vBulletin Owner
 
glennybee's Avatar
 
Join Date: Mar 2008
Location: Scotland
Posts: 1,058
glennybee is just really niceglennybee is just really nice
Re: Coding vBulletin To Web Standards

Do you have "alt2 smallfont" set in your CSS?

What is the error?

Try this:

Code:
<td class="alt2 smallfont" nowrap="nowrap">
glennybee is offline   Reply With Quote
Old 04-26-2009, 05:29 PM   #16
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

I've attached what I'm getting surrounding that line.
Attached Images
File Type: jpg validationerror.jpg (103.8 KB, 3 views)
ArnyVee is offline   Reply With Quote
Old 04-26-2009, 05:32 PM   #17
Supporters
vBulletin Owner
 
glennybee's Avatar
 
Join Date: Mar 2008
Location: Scotland
Posts: 1,058
glennybee is just really niceglennybee is just really nice
Re: Coding vBulletin To Web Standards

Yeah try what I suggested above.
glennybee is offline   Reply With Quote
Old 04-26-2009, 05:49 PM   #18
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

Looks like that did the trick Glenn!

I've got more that I need help with, but now I'm down to under 200 on both the homepage and the forum homepage
ArnyVee is offline   Reply With Quote
Old 04-26-2009, 06:03 PM   #19
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

Glenn, I've got quite a few with the attached error. I've also attached my navbar template which looks like it has the culprit in it.
Attached Images
File Type: jpg validationerror2.jpg (88.4 KB, 2 views)
Attached Files
File Type: txt navbar.txt (6.3 KB, 1 views)
ArnyVee is offline   Reply With Quote
Old 04-26-2009, 07:02 PM   #20
Supporters
vBulletin Owner
 
Michael Biddle's Avatar
 
Join Date: Aug 2006
Location: Anaheim, CA
Posts: 1,657
Michael Biddle is just really niceMichael Biddle is just really niceMichael Biddle is just really nice
Re: Coding vBulletin To Web Standards

I did some changes already. Took a few minutes away. Will get back to it in a few.
__________________
I hate that someone changed my signature.
Michael Biddle is offline   Reply With Quote
Old 04-26-2009, 07:19 PM   #21
Supporters
vBulletin Owner
 
glennybee's Avatar
 
Join Date: Mar 2008
Location: Scotland
Posts: 1,058
glennybee is just really niceglennybee is just really nice
Re: Coding vBulletin To Web Standards

Sorry Arny, I'm not that good with iframes, never really used them.

I would generally take things out or google certain elements and look for examples, etc.

Hopefully Michael will be able to help on that one.
glennybee is offline   Reply With Quote
Old 04-27-2009, 03:57 PM   #22
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

Okay, down to 129 errors on WaltDisneyBoards.com with no warnings

Getting closer.
ArnyVee is offline   Reply With Quote
Old 04-27-2009, 03:58 PM   #23
Supporters
vBulletin Owner
vBSetup Mods
 
Cerberus's Avatar
 
Join Date: Mar 2008
Posts: 1,631
Cerberus is a glorious beacon of lightCerberus is a glorious beacon of lightCerberus is a glorious beacon of lightCerberus is a glorious beacon of light
Re: Coding vBulletin To Web Standards

I managed to get mine down to 8, though I dont know what the hell these 8 are..LOL Though, 8 seems good
__________________
Cerberus / vBulletinSetup Staff
Check the Newsletter & Marketplace for the latest deals.
Looking for a place to Support vBulletinSetup?
Submit your Forum and other Quality Websites.


Cerberus is offline   Reply With Quote
Old 04-27-2009, 04:43 PM   #24
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

I'll consider it a HUGE victory if I can get it down to 8.

It seems like a couple of mods have a lot of validation errors. So, not sure how successful I will be in getting it down, but we'll see.
ArnyVee is offline   Reply With Quote
Old 04-27-2009, 04:49 PM   #25
Supporters
vBulletin Owner
 
Michael Biddle's Avatar
 
Join Date: Aug 2006
Location: Anaheim, CA
Posts: 1,657
Michael Biddle is just really niceMichael Biddle is just really niceMichael Biddle is just really nice
Re: Coding vBulletin To Web Standards

Well mine is 0 on forumhome, forumdisplay, and showthread pages .
__________________
I hate that someone changed my signature.
Michael Biddle is offline   Reply With Quote
Old 04-27-2009, 04:52 PM   #26
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

Bragging, I see!

That's definitely something to be proud of!

How should we check for the forumdisplay and other pages like that?
ArnyVee is offline   Reply With Quote
Old 04-27-2009, 05:16 PM   #27
Supporters
vBulletin Owner
 
Michael Biddle's Avatar
 
Join Date: Aug 2006
Location: Anaheim, CA
Posts: 1,657
Michael Biddle is just really niceMichael Biddle is just really niceMichael Biddle is just really nice
Re: Coding vBulletin To Web Standards

yoursite.com/forumdisplay.php?f=X.
__________________
I hate that someone changed my signature.
Michael Biddle is offline   Reply With Quote
Old 04-28-2009, 06:30 AM   #28
Supporters
vBulletin Owner
 
glennybee's Avatar
 
Join Date: Mar 2008
Location: Scotland
Posts: 1,058
glennybee is just really niceglennybee is just really nice
Re: Coding vBulletin To Web Standards

I have mine down to 0 on those pages too.

Although I have an Amazon deals of the week block that throws that could way up and I'm not great with objects and flash blocks so I left it as is.
glennybee is offline   Reply With Quote
Old 04-28-2009, 03:53 PM   #29
vBulletin Owner
 
ArnyVee's Avatar
 
Join Date: Apr 2008
Location: South Florida
Posts: 2,884
Blog Entries: 1
ArnyVee is just really niceArnyVee is just really niceArnyVee is just really nice
Send a message via AIM to ArnyVee Send a message via Yahoo to ArnyVee Send a message via Skype™ to ArnyVee
Re: Coding vBulletin To Web Standards

Glenn, I also have some Amazon ads which have those ampersand signs which give me a few errors.
ArnyVee is offline   Reply With Quote
Old 04-29-2009, 04:31 AM   #30
Supporters
vBulletin Owner
 
glennybee's Avatar
 
Join Date: Mar 2008
Location: Scotland
Posts: 1,058
glennybee is just really niceglennybee is just really nice
Re: Coding vBulletin To Web Standards

The also give you code which is made up of capital letters and there is no capital letters in XHTML anymore so that flags up all the time. Not that hard to fix though but you'd think that a company like that would have correct code lol.
glennybee is offline   Reply With Quote
Reply 
vBulletin Setup > vBulletinSetup Information > Community Forum Management > vBulletin Tutorials

Tags
coding, standards, vbulletin, web

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Recommendation For PSD to VBulletin Coding Services? Glitto General Discussion 3 08-25-2009 01:20 AM
vBulletin Module Coding Trekkan Troubleshooting vBulletin Problems 2 10-24-2008 03:59 AM
[Coding] vBulletin Skin Upgrade Compu vBulletin Services 1 04-29-2008 10:07 AM
New to Vbulletin, how much do I need to know about coding? Luigi Troubleshooting vBulletin Problems 5 10-09-2007 03:37 PM
[how] vBulletin Coding, where to start ? Brandon Sheley vBulletin Modifications 7 11-12-2006 01:24 PM


All times are GMT -8. The time now is 03:01 AM.