Welcome to Geeklog, Anonymous Sunday, October 13 2024 @ 12:07 pm EDT

Geeklog Forums

moderation.php problem???


Status: offline

bong

Forum User
Newbie
Registered: 02/17/07
Posts: 2
the w3c markup validator finds error in html that geeklog generates. i have changed some files of the professional theme to pass validator. now html pass it except my account and submissions, but submit button in submissions doesn't function. maybe I think the cause of this problem is in moderation.php.
Text Formatted Code
    if ($nrows > 0) {
        $retval .= LB . $table . LB
                . '<input type="hidden" name="type" value="' . $type . '">' . LB
                . '<input type="hidden" name="mode" value="moderation">' . LB
                . '<input type="hidden" name="count" value="' . $nrows . '">'
                . '<p align="center"><input type="submit" value="'
                . $LANG_ADMIN['submit'] . '"></p></form>' . LB;
    } else {
        $retval .= $table;
    }
the cause of the problem is that form is not open???
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
If you check the HTML source in your browser, you'll see that the form is properly opened. The opening tag comes from admin/lists/list.thtml

Not sure how you've got the W3C validator to see moderation.php in the first place, though. Since it can't log in, it would only see an "access denied" message ...

bye, Dirk
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
Dirk,

I just ran into an issue (while working on a theme) where ADMIN_simpleList() seems to have a problem. It is used to generate the site stats screen. Problem is, each stat block has a <form> tag, but none of them are ever closed. So on the Site Statistics screen you have a whole bunch of open <form> tags with no closing ones.

I'm willing to bet this is what bong was seeing too. His solution was probably to remove the opening form tag from admin/lists/list.thtml, which fixes the stats screen but then breaks all the admin / moderation screens.

Maybe if the form is going to be opened in the templates, it needs to be closed there as well instead of in the code. Or, possibly two list building functions, one for lists without forms and one with forms?

But, there is definitely an issue in stats.php as it stands right now.

Thanks!
Mark
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I agree, it is a bit messy having the opening tag in a template and the closing one hard-coded. There was probably a reason to do it that way at the time, but it sounds it's in need of a cleanup now ...

bye, Dirk
 Quote

bong

Anonymous
mevans,

thank you for good explanation. certainly, i removed it from admin/lists/list.thtml, as you said. i wish this issue will be solved to make geeklog better.

thanks, bong

 Quote

tokyoahead

Anonymous
Quote by: Dirk


Not sure how you've got the W3C validator to see moderation.php in the first place, though. Since it can't log in, it would only see an "access denied" message ...



You can post the resulting HTML into a form of the validator. Opera has a function built-in to do that for example.
 Quote

tokyoahead

Anonymous
Quote by: mevans

Dirk,

I just ran into an issue (while working on a theme) where ADMIN_simpleList() seems to have a problem. It is used to generate the site stats screen. Problem is, each stat block has a <form> tag, but none of them are ever closed. So on the Site Statistics screen you have a whole bunch of open <form> tags with no closing ones.
Maybe if the form is going to be opened in the templates, it needs to be closed there as well instead of in the code. Or, possibly two list building functions, one for lists without forms and one with forms?



This was fixed in CVS already some time ago.

This is the current CVS version of the list.thtml:

Text Formatted Code

                            {top_menu}
                            <form action="{form_url}" method="post">
                                {formfields_top}
                                <table class="admin-list-table">
                                    <tr style="background:#FFFFFF;">
                                     {header_row}
                                    </tr>
                                    {item_row}
                                </table>
                                <div style="padding:5px 0px 0px 9px;{show_deleteimage}">
                                    <input name="delbutton" type="image" src="{layout_url}/images/deleteitem.png" title="{lang_deleteall}" onclick="return confirm('{lang_delconfirm}');">

                                </div>
                                <div>
                                    {formfields_bottom}
                                </div>
                            </form>
                            <p class="aligncenter" style="{show_message}"><b>{message}</b></p>
                            {google_paging}
 
 Quote

Status: offline

bong

Forum User
Newbie
Registered: 02/17/07
Posts: 2
i changed the list.thtml to current version, and checked the html with validater again, but the error is found. do i need any files besides list.thtml?

end tag for element "FORM" which is not open.
…pe="submit" value="Submit"></p></form>
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
tokyoahead,

I'm not sure I would call that fixed. The issue is in stats.php, it uses ADMIN_simpleList(). But, it does not set {form_url} and also it does not set the {lang_delconfirm} either.

I haven't look in CVS to see if stats.php now uses something different than ADMIN_simpleList(). But if it is still using it, you have <form> with no action URL, incomplete 'delete' input. But, at least the form will be closed Smile

Thanks!
Mark
 Quote

tokyoahead

Anonymous
Quote by: mevans

tokyoahead,

I'm not sure I would call that fixed. You have <form> with no action URL, incomplete 'delete' input. But, at least the form will be closed Smile

Thanks!
Mark



well the HTML validates :-)

I know this is not a perfect solution. The issues with this form are so intricate I do not know where to start to explain. The form is used in many places in many different applications. I can make the html optional in case the form variables are not filled.

I wonder if it matters if the HTML validates.

Oliver
 Quote

tokyoahead

Anonymous
Quote by: bong

i changed the list.thtml to current version, and checked the html with validater again, but the error is found. do i need any files besides list.thtml?



Sorry I should have explained. I simply wanted to state that the problem will be fixed in the next version since it is in CVS. You cannot fix it easily on the current version, you would have to change at least 5 different files to do that, you rather wait for the validation until the next version. sorry for that. I hope however that the validation of administrator screens are something you can live with until then :-)
 Quote

All times are EDT. The time is now 12:07 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content