Pligg Comment Rating in Safari
I have started using Pligg for one of my new projects and I am going to jot down the technical problems I come across while using it, for my own refernce and for the benefit of others using Pligg.
One of the issues I came across was that the comment rating did not work in Safari with the ygetblue template. After some searching, I came accross this article, whick works for a different template. So after some tweaking, I modified the code in comment_show.tpl (line 7-22) to this:
<div id="comment-head"> <span id="comment-subhead"> {if $Enable_Comment_Voting eq 1}
{#PLIGG_Visual_Comment_Rating#}: <a id="cvote-{$comment_id}" style='text-decoration: none';>{$comment_votes}</a>
{if $comment_user_vote_count eq 0 && $current_userid neq $comment_author}| <span id="ratetext-{$comment_id}">{#PLIGG_Visual_Comment_Rate_Comment#}:</span> <span id="ratebuttons-{$comment_id}"> <a class="ratemey" href="javascript:{$link_shakebox_javascript_votey}" style='text-decoration:none;'><span class="rateme">+</span></a>
<a class="ratemen" href="javascript:{$link_shakebox_javascript_voten}" style='text-decoration:none;'><span class="rateme">-</span></a>
</span>
{/if}
{/if}
</span>
{if $UseAvatars neq "0"}<span id="ls_avatar-{$link_shakebox_index}"> <img src="{$Avatar_ImgSrc}" align="absmiddle"/></span>{/if}
{#PLIGG_Visual_Comment_WrittenBy#} <a href="{$user_view_url}">{$user_username}</a> {$comment_age} {#PLIGG_Visual_Comment_Ago#} {if $comment_votes lt 0} - <span id = "show_hide_comment_content-{$comment_id}"> <a href = "javascript://" onclick="var replydisplay=document.getElementById('comment_content-{$comment_id}').style.display ? '' : 'none'; document.getElementById('comment_content-{$comment_id}').style.display = replydisplay;">{#PLIGG_Visual_Comment_Show_Hide#}</a> {#PLIGG_Visual_Comment_This_Comment#} </span> {/if}
</div>
Basically place the span “comment-head” at the top
and now comment rating in Safari works like a charm!














Post a Comment