vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Adv Skinning: Thread Rating Ajax (vb3.6) (https://vborg.vbsupport.ru/showthread.php?t=121175)

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!


All times are GMT. The time now is 07:20 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01004 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete