MyBB Community Forums

Full Version: Thread info is messed up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello!

Can anyone help me fix this:

[Image: NovaImagem1_zps4700efbe.png]

-Total Posts are appearing under the threads name.
-The views are appearing in "replies".
-The stars are appearing in "views".
-The info about the last post is appearing in "Rating".

Edit: I have a problem in the sub-forum as well:

[Image: NovaImagem2_zpscc8330ab.png]

The total of threads and posts are not showing up.


Thanks! Blush
You have invalid HTML somewhere. Show your forumdisplay_thread and forumdisplay_threadlist templates below.
(2013-10-25, 07:02 PM)Destroy666 Wrote: [ -> ]You have invalid HTML somewhere. Show your forumdisplay_thread and forumdisplay_threadlist templates below.

forumdisplay_thread:

Quote:<tr>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%">{$icon}</td>
<td class="{$bgcolor}{$thread_type_class}">
{$attachment_count}
<div>
<div>
<span>{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$sticky_prf}{$closed_prf}{$closed_strike1}{$closed_color1}{$sticky_color1}{$thread['subject']}</a>{$sticky_color2}{$closed_color2}{$closed_strike2}{$closed_image}{$sticky_image}{$new_reply_button}{$thread['multipage']}</span>
<div class="author

</td>
<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
{$rating}
<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
</td>
{$modbit}
</tr>

forumdisplay_threadlist:

Quote:<div class="float_left">
{$multipage}
</div>
<div class="float_right">
{$newthread}
</div>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
<tr>
<td class="thead" colspan="{$colspan}">
<div style="float: right;">
<span class="smalltext"><strong><a href="misc.php?action=markread&amp;fid={$fid}{$post_code_string}">{$lang->markforum_read}</a> | <a href="usercp2.php?action={$add_remove_subscription}subscription&amp;type=forum&amp;fid={$fid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a>{$clearstoredpass}</strong></span>
</div>
<div>
<strong>{$foruminfo['name']}</strong>
</div>
</td>
</tr>
<tr>
<td class="tcat" colspan="3" width="66%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']} / <a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></span></td>
<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></span></td>
<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a> {$orderarrow['views']}</strong></span></td>
{$ratingcol}
<td class="tcat" align="right" width="20%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></span></td>
{$inlinemodcol}
</tr>
{$selectall}
{$announcementlist}
{$threads}
<tr>
<td class="tfoot" align="right" colspan="{$colspan}">
<form action="forumdisplay.php" method="get">
<input type="hidden" name="selectall" value="{$allselected}" />
<input type="hidden" name="fid" value="{$fid}" />
<select name="sortby">
<option value="subject" {$sortsel['subject']}>{$lang->sort_by_subject}</option>
<option value="lastpost" {$sortsel['lastpost']}>{$lang->sort_by_lastpost}</option>
<option value="starter" {$sortsel['starter']}>{$lang->sort_by_starter}</option>
<option value="started" {$sortsel['started']}>{$lang->sort_by_started}</option>
{$ratingsort}
<option value="replies" {$sortsel['replies']}>{$lang->sort_by_replies}</option>
<option value="views" {$sortsel['views']}>{$lang->sort_by_views}</option>
</select>
<select name="order">
<option value="asc" {$ordersel['asc']}>{$lang->sort_order_asc}</option>
<option value="desc" {$ordersel['desc']}>{$lang->sort_order_desc}</option>
</select>
<select name="datecut">
<option value="1" {$datecutsel['1']}>{$lang->datelimit_1day}</option>
<option value="5" {$datecutsel['5']}>{$lang->datelimit_5days}</option>
<option value="10" {$datecutsel['10']}>{$lang->datelimit_10days}</option>
<option value="20" {$datecutsel['20']}>{$lang->datelimit_20days}</option>
<option value="50" {$datecutsel['50']}>{$lang->datelimit_50days}</option>
<option value="75" {$datecutsel['75']}>{$lang->datelimit_75days}</option>
<option value="100" {$datecutsel['100']}>{$lang->datelimit_100days}</option>
<option value="365" {$datecutsel['365']}>{$lang->datelimit_lastyear}</option>
<option value="9999" {$datecutsel['9999']}>{$lang->datelimit_beginning}</option>
</select>
{$gobutton}
</form>
</td>
</tr>
</table>
<div class="float_left">
{$multipage}
</div>
<div class="float_right" style="margin-top: 4px;">
{$newthread}
</div>
<br style="clear: both;" />
<br />
<div class="float_left">
<div class="float_left">
<dl class="thread_legend smalltext">
<dd><img src="{$theme['imgdir']}/newfolder.gif" alt="{$lang->new_thread}" title="{$lang->new_thread}" /> {$lang->new_thread}</dd>
<dd><img src="{$theme['imgdir']}/newhotfolder.gif" alt="{$lang->new_hot_thread}" title="{$lang->new_hot_thread}" /> {$lang->new_hot_thread}</dd>
<dd><img src="{$theme['imgdir']}/hotfolder.gif" alt="{$lang->hot_thread}" title="{$lang->hot_thread}" /> {$lang->hot_thread}</dd>
</dl>
</div>

<div class="float_left">
<dl class="thread_legend smalltext">
<dd><img src="{$theme['imgdir']}/folder.gif" alt="{$lang->no_new_thread}" title="{$lang->no_new_thread}" /> {$lang->no_new_thread}</dd>
<dd><img src="{$theme['imgdir']}/dot_folder.gif" alt="{$lang->posts_by_you}" title="{$lang->posts_by_you}" /> {$lang->posts_by_you}</dd>
<dd><img src="{$theme['imgdir']}/lockfolder.gif" alt="{$lang->locked_thread}" title="{$lang->locked_thread}" /> {$lang->locked_thread}</dd>
</dl>
</div>
<br style="clear: both" />
</div>

<div class="float_right" style="text-align: right;">
{$inlinemod}
{$searchforum}
{$forumjump}
</div>
<br style="clear: both" />
{$inline_edit_js}
forumdiplay_thread is a mess. Try replacing it with this:
<tr>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%">{$icon}</td>
<td class="{$bgcolor}{$thread_type_class}">
{$attachment_count}
<div>
<span>{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$sticky_prf}{$closed_prf}{$closed_strike1}{$closed_color1}{$sticky_color1}{$​thread['subject']}</a>{$sticky_color2}{$closed_color2}{$closed_strike2}{$closed_image}{$sticky_imag​e}{$new_reply_button}{$thread['multipage']}</span>
</div>
</td>
<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="jMyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
{$rating}
<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
</td>
{$modbit}
</tr>
(2013-10-25, 07:21 PM)Destroy666 Wrote: [ -> ]forumdiplay_thread is a mess. Try replacing it with this:

When I tried to do it, this message appeared:

Quote:Here you can edit the template's code, title or set.

The following errors were encountered:

A potential security issue was found in the template. Please review your changes or contact the MyBB Group for support.
Uhm... paste this instead:
<tr>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%">{$icon}</td>
<td class="{$bgcolor}{$thread_type_class}">
{$attachment_count}
<div>
<span>{$prefix} {$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$sticky_prf}{$closed_prf} {$closed_strike1}{$closed_color1}{$sticky_color1}{$thread['subject']}</a>{$sticky_color2}{$closed_color2}{$closed_strike2} {$closed_image}{$sticky_image}{$new_reply_button}{$thread['multipage']}</span>
</div>
<span class="author smalltext">{$thread['profilelink']}</span>
</td>
<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
{$rating}
<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
</td>
{$modbit}
</tr>

Be careful when editing templates because it had got at least 10 issues before I editted it.
(2013-10-25, 07:59 PM)Destroy666 Wrote: [ -> ]Uhm... paste this instead:
<tr>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%">{$icon}</td>
<td class="{$bgcolor}{$thread_type_class}">
{$attachment_count}
<div>
<span>{$prefix} {$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$sticky_prf}{$closed_prf} {$closed_strike1}{$closed_color1}{$sticky_color1}{$thread['subject']}</a>{$sticky_color2}{$closed_color2}{$closed_strike2} {$closed_image}{$sticky_image}{$new_reply_button}{$thread['multipage']}</span>
</div>
<span class="author smalltext">{$thread['profilelink']}</span>
</td>
<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
{$rating}
<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
</td>
{$modbit}
</tr>

Be careful when editing templates because it had got at least 10 issues before I editted it.

I did not edit anything. >_<

Looks like this now:

[Image: NovaImagem3_zps908f5bdc.png]

It works partially now. I still have 2 problems:

- When I click in the number of replies, I get a message saying that the page was not found and that I should contact my hosting. It was working before the changes.

The total of threads and posts are not showing up in the sub-forum.

[Image: NovaImagem2_zpscc8330ab.png]
To fix the 1st replace again:

<tr>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%">{$icon}</td>
<td class="{$bgcolor}{$thread_type_class}">
{$attachment_count}
<div>
<span>{$prefix} {$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$sticky_prf}{$closed_prf} {$closed_strike1}{$closed_color1}{$sticky_color1}{$thread['subject']}</a>{$sticky_color2}{$closed_color2}{$closed_strike2} {$closed_image}{$sticky_image}{$new_reply_button}{$thread['multipage']}</span>
</div>
<span class="author smalltext">{$thread['profilelink']}</span>
</td>
<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="jMyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
{$rating}
<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
</td>
{$modbit}
</tr>

It's invalid for default MyBB but I guess your style modified it and added j for some reason...

The 2nd has nothing to do with this topic.. It's a problem with forumbit_depth2_forum. There are 2 empty <td>s.
(2013-10-25, 08:58 PM)Destroy666 Wrote: [ -> ]To fix the 1st replace again:

The 1st problem is still there. Nothing changed.

forumbit_depth2_forum:

<tr>
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td>
<td class="{$bgcolor}" valign="top">
<strong><a href="{$forum_url}"  class="gzero right">{$forum['name']}<span class="tl"><i></i>Tópicos: {$threads}<br />Mensagens: {$posts}</span></a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap"></td>
<td class="{$bgcolor}" valign="top" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>
Ok, it didn't work before then because I copied the old code from your post with template.. - please don't provide invalid information. This must work now (tested in Firebug). Replace again:
<tr>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%">{$icon}</td>
<td class="{$bgcolor}{$thread_type_class}">
{$attachment_count}
<div>
<span>{$prefix} {$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$sticky_prf}{$closed_prf} {$closed_strike1}{$closed_color1}{$sticky_color1}{$thread['subject']}</a>{$sticky_color2}{$closed_color2}{$closed_strike2} {$closed_image}{$sticky_image}{$new_reply_button}{$thread['multipage']}</span>
</div>
<span class="author smalltext">{$thread['profilelink']}</span>
</td>
<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
{$rating}
<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
</td>
{$modbit}
</tr>

And forumbit_depth2_forum:
<tr>
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td>
<td class="{$bgcolor}" valign="top">
<strong><a href="{$forum_url}"  class="gzero right">{$forum['name']}<span class="tl"><i></i>Tópicos: {$threads}<br />Mensagens: {$posts}</span></a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$lang->forumbit_threads}: {$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$lang->forumbit_posts}: {$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" valign="top" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>

EDIT: Forgot to modify the code with Replies link issue in this post.. Updated, try again. Now it's 100% correct..
EDIT2 @next post: No thanks. this theme seems messier than my room after my 18th birthday party. Everytime I fix something next issue shows up. I give up...
Pages: 1 2