+  WebDKP at DKP Tracker - In Game and Self Hosted WebDKP Help
|-+  WebDKP - WoW Addon
| |-+  Suggestions
| | |-+  Recent Loot
« previous next »
Pages: [1] Print
Author Topic: Recent Loot  (Read 144 times)
tiburon
Newbie
*
Posts: 40


View Profile Email
« on: December 16, 2009, 03:10:02 PM »

I would kill for a php module that would pull recent loots from raids for the frontpage of my website. Has anyone managed to do this? If so please share Smiley
Logged
kc8pnd
Newbie
*
Posts: 2


View Profile Email
« Reply #1 on: February 13, 2010, 12:43:01 PM »

This is super easy to do with just a few lines of php hehe.

This is a sample I made up for our website. I use the same code in a php block.
Stand alone: http://www.wizardscouncil.net/Recent.php
Example using that code and the include from wowhead (http://www.wowhead.com/?powered).
http://wizardscouncil.net/site/index.php?page=31

Code:
$username = "";
$password = "";
$hostname = "localhost";
$database =  "";
$link = mysql_connect($hostname, $username, $password);
if (!$link) {
    die('Could not connect: ' . mysql_error());
}

$db_found = mysql_select_db($database, $link);

if ($db_found) {

$SQL = " SELECT * FROM `dkp_itemcache`LIMIT 0 , 10";
$result = mysql_query($SQL);

while ($db_field = mysql_fetch_assoc($result)) {
print "<a href='" . $db_field['link'] . "'>" . $db_field['name'] .  "</a><BR>";
}
mysql_close($link);
}
else {
mysql_close($link);
}
mysql_close($link);

Just input the info with your webdkp database information then you should be good to go!
Logged
tiburon
Newbie
*
Posts: 40


View Profile Email
« Reply #2 on: July 19, 2010, 09:37:48 AM »

ZOMG I LOVE YOU!!! WOOT THANK YOU SO MUCH!!!


Is there a way to list it so it will show who got the loot?
Like [Loot] to Membername
« Last Edit: July 20, 2010, 02:36:55 AM by tiburon » Logged
tiburon
Newbie
*
Posts: 40


View Profile Email
« Reply #3 on: July 20, 2010, 10:15:41 PM »

Ok next issue..I put this on and anytime i look at the loottable it fills the list up with loot from the loottable..not the list from the awards...can you please help me here?
Logged
Pages: [1] Print 
« previous next »
Jump to: