Forums

Validating a plugin (7 posts)

  1. shadow
    Moderator
    Posted 7 years ago #

    Hi,
    Site: http://www.os42.com
    I am trying to keep my site validated but having trouble with a plugin. The Gamerz poll hack includes some tables and &nbsp.
    Does anyone know how to fix this?

  2. Mark (podz)
    Support Maven
    Posted 7 years ago #

    I think the hack author may be the best person.
    Part of the reason I stopped doing polls was their lack of validation, though that was a few years ago :)

  3. davidchait
    Member
    Posted 7 years ago #

    Simple fix. The output for the poll creation needs to self-terminate the [input] blocks. that is,

    <input type="radio" name="poll-6" class="poll" value="34">

    should be

    <input type="radio" name="poll-6" class="poll" value="34" />

    The extra slash before the ending is required. I add a space for readability, though it may not be required.
    -d
    CHAITGEAR

  4. davidchait
    Member
    Posted 7 years ago #

    You want a closing / before the terminating > for the inputs -- there are a number of them in the form, all need the forward slash.
    If you can't quickly figure it out, I can post a modded polls.php later.
    -d

  5. davidchait
    Member
    Posted 7 years ago #

    Okay, I modded a copy (a bunch), and put it up at:
    http://www.chait.net/downloads/polls.phps
    Try that out -- I think I've fixed all the validation issues, and made the output HTML a bit more readable while I was at it. ;)
    -d

  6. shadow
    Moderator
    Posted 7 years ago #

    Excellent David,
    Thanks very much - first time I have seen a true validation since installing the poll.
    I am not sure what you did but whatever it was - it's great :)
    Thanks again...

  7. davidchait
    Member
    Posted 7 years ago #

    Aside from all the cleanup of the quoting strings, and adding more newlines...
    I just added a "/" before the closing ">" of each "<input" block. Rewriting the quoted strings made it a bit easier to see (a bit, not much) the ends. There were at least three (but I think it was five or so total, did an img tag too).
    -d
    CHAITGEAR

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.