SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2003
    Location
    Hull, UK
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sympoll: converting to standards

    I've recently installed Sympoll and think it's wonderful. However, now my page no longer validates as strict XHTML due to the deprecated tags the code generates and reliance on tables for presentation.

    I'd rather have Sympoll output the HTML without <font> tags and the like and without table formatting, so I can control the output via CSS.

    Does anyone know if anyone has ever tried doing this? Would it be easy for me to do (as a PHP novice? - I've look at the code but...)? Are there any standards-based poll scripts out there? Would anyone be willing to convert the Sympoll code to web standards?

    Thanks in advance!

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2003
    Location
    Hull, UK
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone any ideas?

  3. #3
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never heard of it, but you certainly could update it to use XHTML standards.

    My suggestion would be to replace font tags with <span style="color: whatever"></span>

    You can even do a search and replace in your editor to replace them all at once!

    But maybe if you attach the code here (or upload it as .phps to your server for us to look at.

  4. #4
    SitePoint Zealot
    Join Date
    Oct 2003
    Location
    Hull, UK
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where font tags appear they seem to be fairly intertwined in the code, that is they seem to depend on other variables within the script. I must admit to being a PHP novice (if you hadn't guessed already!) so it may be easier to change than I think.

    Here are a couple of examples of where font appears:

    Code:
    $o.= "<font$s_qtx$s_txtsize$s_txtface>\n<b>$p[question]<br /></b></font>\n";
    
    $o.= "<font$s_tx$s_txtface$s_optsize>\n";
    I wanted to take out all the table-related tags too but I think I'll tackle the fonts first! If you want me to upload the lot to the server I will but it may be easy to see from just these examples.

    The poll code in action is here: http://www.newlandstjohnsschool.co.uk though the site hasn't gone live as yet.

    Thanks ever so much for your help.

  5. #5
    PHP manual bot bronze trophy Gaheris's Avatar
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, attach the code to a post please.

  6. #6
    SitePoint Zealot
    Join Date
    Oct 2003
    Location
    Hull, UK
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it best to copy and paste all the code into the message body or is there a more preferable way?

    Thanks!

  7. #7
    PHP manual bot bronze trophy Gaheris's Avatar
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Attach the code to your post. (Click on the "Manage Attachments" link).

  8. #8
    SitePoint Zealot
    Join Date
    Oct 2003
    Location
    Hull, UK
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK here it is. It's only one of a whole lot of files related to the whole polling application but it should give you an idea.

    Thanks in advance again!
    Attached Files Attached Files

  9. #9
    SitePoint Zealot
    Join Date
    Oct 2003
    Location
    Hull, UK
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can anyone help at all? I basically need to get rid of the font tags in the output html from the attached code, although the all table-related tags would be great too. I can format the output with css AND my page will validate as xhtml strict.

    I can upload the whole thing to my server if the attached file isn't enough to go on.

    Thanks very much in advance for any help.


Bookmarks

Posting Permissions

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