امتیاز دادن به تاپیک ها بصورت آجاکسی با [AJAX] Threads Rating
آخرین زمان حضور: Sep 2019


نگارش: انتخاب نشده امتیاز:
نصب شده: 0 بار

زمان انتشار: 2009/09/02 بروزرسانی: هرگز دریافت شده: 4 بار

Description:
This is a rewritten version of this version http://www.vbulletin.org/forum/showthread.php?t=185117. Functionality is same, but working it little bit by another way
Difference between versions 1.x and 2.x:
- much better code (php, js, html)
- eliminated one query on showthread
Compatibility:
3.7.x - 3.8.x
Features:
- choose forums, where a rating threads to display it is necessary or not necessary
- view rating statistic
- choose groups with view permission
- choose groups with view permission
- allow/deny rate self threads
- allow choose 10 point system
- fully realisation with AJAX
Install:
Extract all files from folder "Upload" in forum root directory
Find in file threadrate.php on youre server:
کد PHP:
<!-- php buffer start --> $xml->add_tag('voteavg', process_replacement_vars("$vbphrase[rating]: <img class=\"inlineimg\" src=\"$stylevar[imgdir_rating]/rating_$thread[rating].gif\" alt=\"" . construct_phrase($vbphrase['thread_rating_x_votes_y_average'], $thread['votenum'], $thread['voteavg']) . "\" border=\"0\" />"));
<!-- php buffer end -->
Replace with:
کد PHP:
<!-- php buffer start --> $currate = ($thread['voteavg']*25 . px);
$xml->add_tag('voteavg', process_replacement_vars("<table cellpadding=\"$stylevar[cellpadding]\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td align=\"right\" width=\"45%\" nowrap=\"nowrap\"><div><strong>$vbphrase[trate_currate]</strong></div></td><td align=\"left\" width=\"55%\" nowrap=\"nowrap\"><ul class=\"star-rating\" title=\"" . construct_phrase($vbphrase['thread_rating_x_votes_y_average'], $thread['votenum'], $thread['voteavg']) . "\"><li class=\"current-rating\" style=\"width:$currate;\"></li></td></tr></table>"));
<!-- php buffer end -->
Using the Product Manager, upload the Product that came with this modification.
###############################
For ten point system:
Open: threadrate.php
Find:
کد PHP:
<!-- php buffer start --> if ($vbulletin->GPC['vote'] < 1 OR $vbulletin->GPC['vote'] > 5)
<!-- php buffer end -->
Replace with:
کد PHP:
<!-- php buffer start --> if ($vbulletin->GPC['vote'] < 1 OR $vbulletin->GPC['vote'] > 10)
<!-- php buffer end -->
--------------------------------------------------------
Open: /includes/class_dm_threadrate.php
Find:
کد PHP:
<!-- php buffer start --> var $max_vote = 5;
<!-- php buffer end -->
Replace with:
کد PHP:
<!-- php buffer start --> var $max_vote = 10;
<!-- php buffer end -->
###############################
Admincp > Plugins and Products > Manage Products > [Add/Import Product] >
product-trate.xml
Update:
Uninstall old mod and replace all files with newest, import product (latest)
Enjoy!
DEMO
http://www.mixplay.ru/forum.php // choose any thread
user: Test
pass: 123456
PS Sorry, the screenshots in russian, but I think, and so everything is clear
Click Install, if you like this mod
علاقه مندی ها (Bookmarks)