MyBB Community Forums

Full Version: Rating not working.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Well i was customizing one theme. Aka the minimal theme by ThemeFreak and to the thread listing I added {$rating} for the rating module.

But it does not seem to work. What I mean that all though the stars are displayed it does not allow me to rate it.

Hovering on it also does nothing. Ie its just a static set of starts.

This is how my forumdisplay_thread template looks like:-

<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}" width="62%">
		{$attachment_count}
		<div>
			{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}
			<div class="author">Started by {$thread['profilelink']}</div>
		</div>
	</td>
{$rating}
	<td width="12%" class="{$bgcolor}{$thread_type_class}">
<a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts} replies<br />{$thread['views']} views</td>
	<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: left;">
		<span class="lastpost">Last post by <a href="{$thread['lastpostlink']}">{$lastposterlink}</a><br />
		<a href="{$thread['lastpostlink']}">{$lastpostdate} {$lastposttime}</a></span>
	</td>
{$modbit}
</tr>

Any help?Looking at you effone.
check the code in forumdisplay_thread_rating template - can be similar to below code
<td align="center" class="{$bgcolor}{$thread_type_class}" id="rating_table_{$thread['tid']}">
		<ul class="star_rating{$not_rated}" id="rating_thread_{$thread['tid']}">
			<li style="width: {$thread['width']}%" class="current_rating" id="current_rating_{$thread['tid']}">{$ratingvotesav}</li>
		</ul>
		<script type="text/javascript">
		<!--
			Rating.build_forumdisplay({$thread['tid']}, { width: '{$thread['width']}', extra_class: '{$not_rated}', current_average: '{$ratingvotesav}' });
		// -->
		</script>
	</td>
Same as the code you have given me. It looks the same.
^ {$ratingcol} needs to be added to forumdisplay_threadlist template

find <span style="margin-left: 10px;">{$inlinemodcol}</span> and you can add before it :
<td style="display: none;">{$ratingcol}</td>
I was having a similar problem with my theme as well. To fix it, I had to add the following to my CSS
.star_rating li {
	position: static;
}