Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Zmey on February 21, 2010, 04:24:57 PM

Title: smf 2.0 rc2 core theme bug
Post by: Zmey on February 21, 2010, 04:24:57 PM
When viewing unread messages:

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

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" />

Title: Re: smf rc2 core theme bug
Post by: Zmey on February 22, 2010, 03:43:53 AM
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" />
Title: Re: smf 2.0 rc2 core theme bug
Post by: Marcus Forsberg on May 15, 2010, 05:05:40 AM
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