Results 1 to 9 of 9

Thread: xhtml traansitional compliant directory

  1. #1
    Join Date
    Nov 2004
    Posts
    1,822

    Default xhtml traansitional compliant directory

    Heres mainly what you need to do ... just a few bits that took a long time to work out where the code was comign from youll probably have to make other changes as well, but this should give you a good start :

    add doctype to header.html
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    Close of all tag options with "" (eg. alt=whatever becomes alt="whatever")

    CLose image tags (eg. <img="whatever"> becomes <img="whatever" />

    global find and replace <br> to <br />

    change background= on the blocks to read style="background-image:url(<%$tpl_base%>/images/template_23.gif)"

    That should solve most, the validator will alert you to any line numbers you miss. Now heres some php code needs changing :

    category.class.php :

    Line 411
    Code:
            $category .= "<table width=\"$this->cat_table_width\" cellspacing=\"$this->cat_cellspacing\">\n";
    Line 421
    Code:
              $category .= "<td width=\"$width" . "%\" valign=\"top\">\n";
    Line 449
    Code:
                                $image = "<img src='$cat_image' border=\"0\" alt=\"folder\" />";
    Line 483 and 489 and 497
    Code:
                    $category .= "<br />";
    line 476
    Code:
      $category .= "<br /> <br />";

    settign.php :

    Line 32
    Code:
    $number_of_links_format = " <font color=\"#000000\"><b>(<%\$number_of_links%>)</b></font>";  // number of links
    Now, footer.html and login have javascript thats missing the type= tag :

    eg. footer.html change to :
    Code:
        <script type="text/javascript" language="javascript" src="<%$tpl_base%>/trackclick.js"></script>
    Dody, it would be fairly easy to make your software xhtml compliant / strict ... it would be a good selling point...
    Last edited by inspireme; 06-19-2006 at 04:37 AM.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  2. #2
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    Can people post further changes if they attempt to do this... you should do some global find and replace on the listing entres to make sure they dont cause problems... do this at your own risk!!!

    Admin > database (alter)

    im mysql box use this formula to find and replace on tablenames
    Code:
    update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');
    idx_link and idx_category should have the following find and replaces done on them :

    <br> to <br />
    & to &amp;

    in new and updated block and random block change the rss image to read : align="middle" not align="absmiddle"
    Last edited by inspireme; 06-14-2006 at 11:32 AM.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  3. #3
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    You need to remove the IDs as well, they are duplicated so you wont pass validation. in category class change :


    line 228
    Code:
      $href                = "<a href='{$href}' >";
    and possibly :


    line 529
    Code:
                    $category .= "<a href=\"$sub_url\" style=\"$this->subcat_link_style\">$sub_name</a>, ";
    I started with 217 errors, and 5 hours later i got the little green light come up on the validator
    Last edited by inspireme; 06-14-2006 at 03:17 PM.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  4. #4
    Join Date
    Jul 2004
    Posts
    37

    Default

    just some few things

    - <script type="text/javascript" and not <script language="javascript"
    - replace target="_blank" by onclick="target='_blank';"
    - always alt in tag img src
    - no height in tag table
    - no confusion and no mix between % and px or pt
    (eg: no <td width="100%" height="20" => error )
    - replace border=0 by style="border: 0"


  5. #5
    Join Date
    Jan 2005
    Posts
    164

    Default Thank you

    Thank you so much inspireme. Is there any chance that Dody can make these corrections in the code, so we won't have to keep making the changes everytime there is an update?

  6. #6
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    Quote Originally Posted by lexpression
    Thank you so much inspireme. Is there any chance that Dody can make these corrections in the code, so we won't have to keep making the changes everytime there is an update?
    Lets hope so! I have a few more things to change, im a little confused where some code is coming from on a few bits but i will get their. I could post the corrected cateogry.class table but any change is going to make it void... so its best to use the above as a guide until dody updates the code... it really isnt anything major to do, infact its 95% done in comparisson to 3.2.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  7. #7
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    ps. you cant have a tag with the same "id" indexU saves the categories in a database table "idx category with path", if on the main page you have a random listing, or 2 new listigns in the same category they have the same ID therefore the page doesnt validate.

    Im not hardcore enough to care, but some of you maybe... a quick fix is to remove the category path output on new and updated block and the random block
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  8. #8
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    Opps...!

    If anyone followed the code, do not delete the line 476, it messes up when you have more than 1 line of cateogrys. instead replace it with

    Code:
      $category .= "<br /> <br />";
    i edited the original post now
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  9. #9
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    Thanks for doing this so far. I'll make update for next release.

Similar Threads

  1. Making Indexu XHTML 1.0 compliant
    By asimov in forum Tutorials, Hints & Tips
    Replies: 6
    Last Post: 10-04-2005, 09:39 AM
  2. Directory listing
    By 0870711 in forum v3.2
    Replies: 8
    Last Post: 08-29-2005, 10:54 PM
  3. Marcomm Directory
    By hobartimus in forum Sites in Action
    Replies: 4
    Last Post: 01-12-2005, 02:17 PM
  4. Up and running Directory
    By brickholius in forum Sites in Action
    Replies: 1
    Last Post: 11-22-2004, 01:28 AM
  5. Directory Links
    By Chris in forum v5.x
    Replies: 2
    Last Post: 01-10-2002, 12:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •