News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

smf 2.0 rc2 core theme bug

Started by Zmey, February 21, 2010, 04:24:57 PM

Previous topic - Next topic

Zmey

When viewing unread messages:

http://localhost/forum/index.php?action=unread [nofollow]

There's exta </div> tag:


</div>
</div>
</div>  //// THIS ONE

</div>
<div id="footerarea" class="headerpadding topmargin clearfix">


Forum page does not pass validation and in some cases breaks layout.

The fix:

Themes/core/Recent.template.php, template_unread() function


Index: Recent.template.php
===================================================================
--- Recent.template.php.old
+++ Recent.template.php.new
@@ -91,9 +91,11 @@

$showCheckboxes = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $settings['show_mark_read'];

+ echo '
+ <div id="recent" class="main_content">';
+
if ($showCheckboxes)
echo '
- <div id="recent" class="main_content">
<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
<input type="hidden" name="qaction" value="markread" />


Zmey

#1
UPD: there's similar problem in template_replies() function.

Fix:


Index: Recent.template.php
===================================================================
--- Recent.template.old
+++ Recent.template.new
@@ -263,9 +263,11 @@

$showCheckboxes = !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $settings['show_mark_read'];

+ echo '
+ <div id="recent">';
+
if ($showCheckboxes)
echo '
- <div id="recent">
<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
<input type="hidden" name="qaction" value="markread" />

Marcus Forsberg

Thanks for your report. This has been fixed in the SVN.

* Core's Recent template had an extra div in two places, causing xHTML errors. Revision 9902

Advertisement: