Hmm...i'm really not any php coder and could use a little help with Reacent Items Block for Dragonfly also...
i have fiddled around some time and got it working in to the point where i get names and items from eqdkp database..
but i don't have a clue how to get itemstats working on the Block....and all ready/working Reacent item blocks seemed to use same database for forum and eqdkp so that made things hard for me because because i have different databases for eqdkp and forums....and as i said i'm not a coder and little lost currently so if someone could push me to right way how to get this Block working with itemstats/wowhead...here's what i have gotten together with ripping of some code blocks here and there =)
<?php
/**
* CPG Dragonfly CMS
*/
// protect against direct access
if (!defined('CPG_NUKE')) { exit; }
// Figuring out itemstats to work ???
require_once('./includes/nbbcode.php');
require_once('./header.php');
include_once('./modules/item_stats/itemstats.php');
// Starting the content of the block
$content .= "<table>\n";
/* Connect to eqdkp database */
$link = mysql_connect("localhost", "---sencored---", "--sencored---")or die("Could not connect : " . mysql_error());
mysql_select_db("dkpdb") or die('Could not select database');
/* Perform SQL query */
//Grab the last 10 items - Change 10 to whatever number you want
$query = 'SELECT item_buyer, item_name FROM eqdkp_items ORDER BY raid_id DESC LIMIT 0,10';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
while ($row = mysql_fetch_row($result)){
$content .= "<tr><td>$row[0]\n</td>";
$content .= "<td>
</td>"; //adding itemstats/wowhead tags
$content .= "\t</tr>\n";
}
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
//Closing Content Block
$content .= "</table>\n";
?>
So as you see from code...it work ok for now..it gets names of last winners and items they won and puts them to table...next i though i need to add those
tags for item_stats parser to work....but proplematic is how to get itemparser scan this block for those tags ??
So if someone who has done these things could clarify me a bit...or just show me what the hell i have to do =)
* Running with DF 9.1.2.1 (too scared to upgrade if something custom fitted will brake)
* with item_stats module installed (altho i have standalone install for eqdkp also)
if you need any extra information pls ask i really could use some help =)