Thread Rating:
  • 35 Vote(s) - 4.34 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011)
I threw together a quick script a while back to show the top 100 most liked posts. It isn't pretty but it should provide you with a starting point for something better.

<?php
define("IN_MYBB", 1);
define("NO_ONLINE", 1);

require_once "./global.php";

$query = $db->query("SELECT l.pid, count( * ) AS likes, p.subject, p.username, p.uid
							FROM `mybb_g33k_thankyoulike_thankyoulike` l
							LEFT JOIN `mybb_posts` p ON l.pid = p.pid
							GROUP BY l.pid
							ORDER BY likes DESC, l.pid ASC
							LIMIT 100");

while($data = $db->fetch_array($query))
{
	echo '<br />Post #<a href="/showthread.php?pid='.$data['pid'].'#post_'.$data['pid'].'">'.$data['pid'].': '.$data['subject'].'</a>
	by <a href="/member.php?action=profile&uid='.$data['uid'].'">'.$data['username'].'</a> with '.$data['likes'].' likes.';
}


Messages In This Thread
Integration with MyAlerts plugin - by blogantinom - 2013-04-27, 03:06 PM
RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - by Cameron:D - 2014-08-10, 12:37 PM
Thank You/Like System v1.7 - by Eldenroot - 2015-01-08, 10:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)