Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Make A Music Player

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion
Register FAQ Community Calendar

An php gurus about (markup validation)
Reply
 
Thread Tools
Old 08-08-2006, 22:49   #1
handyman
Permanently Banned
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 50
Services: M6 Keele
Posts: 5,462
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Any html gurus about (markup validation)

I have successfully removed 36 of 39 errors from my web site but have the following 3 errors still remaining in the source included at the bottom.
  1. <LI class=msg_err>Error Line 24, column 55: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag .
    <input type="text" value="" name="s" id="s" size="21" />The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


    <LI class=msg_err>Error Line 25, column 55: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag . <input type="submit" id="searchsubmit" value="search" />The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

  2. Error Line 36, column 19: document type does not allow element "li" here; missing one of "ul", "ol" start-tag . <li class="pagenav"> <ul><li class="page_item"><a href="http://pinkforgirls.co.uThe mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Quote:
<div class="side">
<br/>
<form method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" size="21" />
<input type="submit" id="searchsubmit" value="search" />
</form>
<br/>
any help / pointers would be welcome
handyman is offline   Reply With Quote
Advertisement
Old 08-08-2006, 23:21   #2
Strzelecki
Inactive
 
Join Date: Jan 2004
Location: Essex
Age: 43
Services: 80/20Mbps FTTC on Freeola
Posts: 871
Strzelecki has reached the bronze age
Strzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze age
Re: An php gurus about (markup validation)

Why PHP markup, you've tried to put it through the XHTML validator. It's not complaining about the PHP. Any chance of seeing the whole document that you're trying to validate, can sometimes pick things that are causing these errors further on. What doctype are you using? For staters it appears that you specified a list (li) without saying what kind (Unordered UL or ordered OL).
Strzelecki is offline   Reply With Quote
Old 08-08-2006, 23:52   #3
Flobajob
Permanently Banned
 
Join Date: Mar 2006
Posts: 344
Flobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond repute
Re: An php gurus about (markup validation)

Quote:
Originally Posted by Strzelecki
Why PHP markup, you've tried to put it through the XHTML validator. It's not complaining about the PHP. Any chance of seeing the whole document that you're trying to validate, can sometimes pick things that are causing these errors further on. What doctype are you using? For staters it appears that you specified a list (li) without saying what kind (Unordered UL or ordered OL).
Try this: http://validator.w3.org/check?uri=ww...forgirls.co.uk

---------- Post added at 22:52 ---------- Previous post was at 22:43 ----------

To fix the form validation errors, just put <fieldset></fieldset> around your input tags
Flobajob is offline   Reply With Quote
Old 08-08-2006, 23:53   #4
handyman
Permanently Banned
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 50
Services: M6 Keele
Posts: 5,462
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: An php gurus about (markup validation)

Quote:
Originally Posted by Strzelecki
Why PHP markup, you've tried to put it through the XHTML validator. It's not complaining about the PHP. Any chance of seeing the whole document that you're trying to validate, can sometimes pick things that are causing these errors further on. What doctype are you using? For staters it appears that you specified a list (li) without saying what kind (Unordered UL or ordered OL).
re php I get a little confused with web stuff, your right its the html its not liking..

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

ful document is http://pinkforgirls.co.uk/wp-content...-101/index.php
handyman is offline   Reply With Quote
Old 08-08-2006, 23:53   #5
Paul
Dr Pepper Addict
Cable Forum Admin
 
Paul's Avatar
 
Join Date: Oct 2003
Location: Nottingham
Age: 63
Services: IDNet FTTP (1000M), Sky Q TV, Sky Mobile, Flextel SIP
Posts: 30,444
Paul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered stars
Paul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered starsPaul is seeing silvered stars
Re: An php gurus about (markup validation)

Sorry but I can't see what this has to do with php, and I know very little about html, which is what this appears to be.

Edit: NM, you replied at the same time.
__________________

Baby, I was born this way.
Paul is offline   Reply With Quote
Old 08-08-2006, 23:58   #6
handyman
Permanently Banned
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 50
Services: M6 Keele
Posts: 5,462
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: An php gurus about (markup validation)

Quote:
Originally Posted by Flobajob
Try this: http://validator.w3.org/check?uri=ww...forgirls.co.uk

---------- Post added at 22:52 ---------- Previous post was at 22:43 ----------

To fix the form validation errors, just put <fieldset></fieldset> around your input tags
Fantastic 1 error remaining
handyman is offline   Reply With Quote
Old 08-08-2006, 23:58   #7
Flobajob
Permanently Banned
 
Join Date: Mar 2006
Posts: 344
Flobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond reputeFlobajob has a reputation beyond repute
Re: An php gurus about (markup validation)

And to fix the <li> validation just remove the opening and closing LI tag on line 55/56 as you don't need them, the document will then validate as XHTML strict (I've tried it)

so it should just read: <ul><li class="page_item"><a href="http://pinkforgirls.co.uk/?page_id=2" title="Why Pinkforgirls?">Why Pinkforgirls?</a></li></ul>
Flobajob is offline   Reply With Quote
Old 09-08-2006, 00:10   #8
handyman
Permanently Banned
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 50
Services: M6 Keele
Posts: 5,462
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: An php gurus about (markup validation)

Cheers for the help.

That bit of html is the output from these php lines.

Code:
<div class="sideheading">pages</div>
<?php wp_list_pages('title_li= '); ?>
However what I cannot find is where I can modify wp_list_pages
handyman is offline   Reply With Quote
Old 09-08-2006, 00:23   #9
Strzelecki
Inactive
 
Join Date: Jan 2004
Location: Essex
Age: 43
Services: 80/20Mbps FTTC on Freeola
Posts: 871
Strzelecki has reached the bronze age
Strzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze age
Re: An php gurus about (markup validation)

Looks like a call to a function to me, you'll have to search through your php files for the
PHP Code:
function wp_list_pages() 
function. The clue will be in any includes that are in the page you are looking at.

---------- Post added at 23:23 ---------- Previous post was at 23:19 ----------

Code:
<li class="pagenav"> <ul><li class="page_item"><a href="http://pinkforgirls.co.u
Try wrapping that in a DIV instead, you're defining a li then defining it's type, then the list again. Try:
Code:
<div class="pagenav"> <ul><li class="page_item"><a href="http://pinkforgirls.co.u
Why are you using so many classes? Do these repaet themselves over the document?
Strzelecki is offline   Reply With Quote
Old 09-08-2006, 00:27   #10
handyman
Permanently Banned
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 50
Services: M6 Keele
Posts: 5,462
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: An php gurus about (markup validation)

Found the function , its a wordpress blog so it's pretty much as it came with a template over it.

edit almost found it, doh trying again

right this is the fella

PHP Code:
function wp_list_pages($args '') {
 
parse_str($args$r);
 if ( !isset(
$r['depth']) )
  
$r['depth'] = 0;
 if ( !isset(
$r['show_date']) )
  
$r['show_date'] = '';
 if ( !isset(
$r['child_of']) )
  
$r['child_of'] = 0;
 if ( !isset(
$r['title_li']) )
  
$r['title_li'] = __('Pages');
 if ( !isset(
$r['echo']) )
  
$r['echo'] = 1;
 
$output '';
 
// Query pages.
 
$pages = & get_pages($args);
 if ( 
$pages ) {
  if ( 
$r['title_li'] )
   
$output .= '<li class="pagenav">' $r['title_li'] . '<ul>';
  
// Now loop over all pages that were selected
  
$page_tree = Array();
  foreach ( 
$pages as $page ) {
   
// set the title for the current page
   
$page_tree[$page->ID]['title'] = $page->post_title;
   
$page_tree[$page->ID]['name'] = $page->post_name;
   
// set the selected date for the current page
   // depending on the query arguments this is either
   // the createtion date or the modification date
   // as a unix timestamp. It will also always be in the
   // ts field.
   
if ( !empty($r['show_date']) ) {
    if ( 
'modified' == $r['show_date'] )
     
$page_tree[$page->ID]['ts'] = $page->post_modified;
    else
     
$page_tree[$page->ID]['ts'] = $page->post_date;
   }
   
// The tricky bit!!
   // Using the parent ID of the current page as the
   // array index we set the curent page as a child of that page.
   // We can now start looping over the $page_tree array
   // with any ID which will output the page links from that ID downwards.
   
if ( $page->post_parent != $page->ID)
    
$page_tree[$page->post_parent]['children'][] = $page->ID;
  }
  
// Output of the pages starting with child_of as the root ID.
  // child_of defaults to 0 if not supplied in the query.
  
$output .= _page_level_out($r['child_of'],$page_tree$r0false);
  if ( 
$r['title_li'] )
   
$output .= '</ul></li>';
 }
 
$output apply_filters('wp_list_pages'$output);
 if ( 
$r['echo'] )
  echo 
$output;
 else
  return 
$output;

handyman is offline   Reply With Quote
Old 09-08-2006, 00:35   #11
Strzelecki
Inactive
 
Join Date: Jan 2004
Location: Essex
Age: 43
Services: 80/20Mbps FTTC on Freeola
Posts: 871
Strzelecki has reached the bronze age
Strzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze age
Re: An php gurus about (markup validation)

Try altering it to
PHP Code:
 function wp_list_pages($args '') {
  
parse_str($args$r);
  if ( !isset(
$r['depth']) )
   
$r['depth'] = 0;
  if ( !isset(
$r['show_date']) )
   
$r['show_date'] = '';
  if ( !isset(
$r['child_of']) )
   
$r['child_of'] = 0;
  if ( !isset(
$r['title_li']) )
   
$r['title_li'] = __('Pages');
  if ( !isset(
$r['echo']) )
   
$r['echo'] = 1;
  
$output '';
  
// Query pages.
  
$pages = & get_pages($args);
  if ( 
$pages ) {
   if ( 
$r['title_li'] )
    
$output .= '<ul><li class="pagenav">' $r['title_li'];
   
// Now loop over all pages that were selected
   
$page_tree = Array();
   foreach ( 
$pages as $page ) {
    
// set the title for the current page
    
$page_tree[$page->ID]['title'] = $page->post_title;
    
$page_tree[$page->ID]['name'] = $page->post_name;
    
// set the selected date for the current page
    // depending on the query arguments this is either
    // the createtion date or the modification date
    // as a unix timestamp. It will also always be in the
    // ts field.
    
if ( !empty($r['show_date']) ) {
     if ( 
'modified' == $r['show_date'] )
      
$page_tree[$page->ID]['ts'] = $page->post_modified;
     else
      
$page_tree[$page->ID]['ts'] = $page->post_date;
    }
    
// The tricky bit!!
    // Using the parent ID of the current page as the
    // array index we set the curent page as a child of that page.
    // We can now start looping over the $page_tree array
    // with any ID which will output the page links from that ID downwards.
    
if ( $page->post_parent != $page->ID)
     
$page_tree[$page->post_parent]['children'][] = $page->ID;
   }
   
// Output of the pages starting with child_of as the root ID.
   // child_of defaults to 0 if not supplied in the query.
   
$output .= _page_level_out($r['child_of'],$page_tree$r0false);
   if ( 
$r['title_li'] )
    
$output .= '</li></ul>';
  }
  
$output apply_filters('wp_list_pages'$output);
  if ( 
$r['echo'] )
   echo 
$output;
  else
   return 
$output;
 } 
Strzelecki is offline   Reply With Quote
Old 09-08-2006, 00:37   #12
handyman
Permanently Banned
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 50
Services: M6 Keele
Posts: 5,462
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: An php gurus about (markup validation)

I looked at many options for the site from writing it from scratch to using a cms system. trialled wordpress and found it was great because it auto updates blog list and drives traffic to the site. Plus it's easy to add new posts to it.

As and when My php skills mature I will look at creating similar sites frm scratch and measuring the raffic against the blog site.
handyman is offline   Reply With Quote
Old 09-08-2006, 00:41   #13
Graham M
-
 
Graham M's Avatar
 
Join Date: Jul 2003
Location: Poole, Dorset
Age: 40
Services: FreeSat+ Tivo V-Box VM 60MBit
Posts: 13,365
Graham M has a pair of shiny starsGraham M has a pair of shiny stars
Graham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny stars
Send a message via MSN to Graham M Send a message via Yahoo to Graham M
Re: An php gurus about (markup validation)

meh i never validate my sites and they work fine
Graham M is offline   Reply With Quote
Old 09-08-2006, 01:03   #14
Strzelecki
Inactive
 
Join Date: Jan 2004
Location: Essex
Age: 43
Services: 80/20Mbps FTTC on Freeola
Posts: 871
Strzelecki has reached the bronze age
Strzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze ageStrzelecki has reached the bronze age
Re: An php gurus about (markup validation)

It's good that you're trying to validate your site, especially to strict, that can be challenging. In theory doing so should mean that your site is viewed the same way in most modern browsers. Unfortunately though there are browsers such a Internet Explorer that just don't comply and get thrown into 'quirks' mode when they see anything they don't understand. This means now and then you ay have to use 'hacks', especially in CSS to mak sure the site is viewable how you want it across browsers. Standards are good, but not when browser makers choose not to implement them fully.
Strzelecki is offline   Reply With Quote
Old 09-08-2006, 01:05   #15
handyman
Permanently Banned
 
Join Date: Jun 2003
Location: Nr Carnforth
Age: 50
Services: M6 Keele
Posts: 5,462
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
handyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny starhandyman has a nice shiny star
Send a message via MSN to handyman
Re: An php gurus about (markup validation)

Quote:
Originally Posted by Strzelecki
Try altering it to
PHP Code:
 snip 
Nope still showing same error. Worst comes to worst I'll simply remove the call for that function and pop in the code myself without the extra ul tags, that will mean if I add any more static pages I'll simply have to add them manually to the sidebar.

Can I also just add thanks for the help so far. I really must get my **** on a new media course or something.
handyman is offline   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 +1. The time now is 08:15.


Server: osmium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum