Timan |
07-14-2006 08:36 AM |
Adv Skinning: Thread Rating Ajax (vb3.6)
Hey guys, I'm trying to edit the SHOWTHREAD templates and change the look and feel of how the thread rating works.
Here is the default code that I am trying to edit...
Code:
<if condition="$show['threadrating']">
<td class="vbmenu_control" id="threadrating" nowrap="nowrap">
<a href="$show[nojs_link]#goto_threadrating"><span id="threadrating_current"><if condition="$show['rating']">$vbphrase[rating]: <img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" border="0" /><else />$vbphrase[rate_thread]</if></span></a>
<if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("threadrating"); </script></if>
</td>
</if>
This is what I have right now after editing it.
Code:
<if condition="$show['threadrating']">
<a id="threadrating" style="margin-left:8px;" href="$show[nojs_link]#goto_threadrating" title="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>">
<span id="threadrating_current">
<if condition="$show['rating']">
<img src="$stylevar[imgdir_rating]/ftools_rating_$thread[rating].gif" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" />
<else />
<img src="$stylevar[imgdir_button]/ftools_rating.gif" alt="$vbphrase[rate_thread]" />
</if>
</span>
</a>
<if condition="$show['popups']"><script type="text/javascript"> vbmenu_register("threadrating",1); </script></if>
</if>
So far that template edit works, but it doesn't make the changes instantly via ajax. Instead of goes to that redirect page and then makes the changes.
Here is a short animated gif of what should happen after you press rate thread.
http://www.vastyles.com/ajaxrate.gif
Any help on this would be appreciated it. Thanks Again!
|