TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 629
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 466
  • Total: 466

eqdkp latest loot

Started by baderick, May 09, 2007, 12:34:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

baderick

this code i use for my world of warcraft guild ive adapted it from my joomla site to work with tiny portal as im gonna move over to it soon :) you will need to have eqdkp installed on your website to use this code and itemstats working in tinyportal.

this will grab the latest loot you have submitted to eqdkp and display it on your main page you can select how many it displays by changing $limit . you will also need to put your eqdkp db username, password and database name to get this to work.

Make a php block and use the php below


// db config

$linkmoreloot = '';
$DBhost = 'localhost';
$DBuser = 'db_username';
$DBpass = 'db_password';
$DBName = 'db_eqdkp';
$limit = 10;
$eqdkp_prefix = 'eqdkp_';

//create the new database connection

$result = mysql_query("SELECT item_name, item_buyer FROM ".$DBName.".".$eqdkp_prefix."items order by item_date desc limit $limit") or die(mysql_error());


while ($row = mysql_fetch_array($result)) {

$last_mc_loot = $row['item_name'];

$buyer = $row['item_buyer'];

$myhtml = "<span style=\"font-size:10px;font-family: Arial, Helvetica, sans-serif;\">[item]".$last_mc_loot."[/item]</span><br /><span style=\"font-size:9px;font-family: Arial, Helvetica, sans-serif;\">Looted  by ".$buyer."</span><br />";

echo itemstats_parse($myhtml);

}

mysql_close();



you can see it working here on my test forum www.judeanpeoplesfront.net/forums

my first code for tinyportal so be gental  8)

G6Cad

And you have to add how to make it work to.
that code is basicly just a DB install file and not a block code.

Specify how to get this to work in what sort of code block

baderick


babjusi


baderick

heres a link to the eqdkp website http://eqdkp.com/?p=about im sure it can explain it better than i can.

G6Cad


Ryushi32

#6
Quote from: baderick on May 09, 2007, 12:34:38 PM
this code i use for my world of warcraft guild ive adapted it from my joomla site to work with tiny portal as im gonna move over to it soon :) you will need to have eqdkp installed on your website to use this code and itemstats working in tinyportal.

this will grab the latest loot you have submitted to eqdkp and display it on your main page you can select how many it displays by changing $limit . you will also need to put your eqdkp db username, password and database name to get this to work.

Make a php block and use the php below


// db config

$linkmoreloot = '';
$DBhost = 'localhost';
$DBuser = 'db_username';
$DBpass = 'db_password';
$DBName = 'db_eqdkp';
$limit = 10;
$eqdkp_prefix = 'eqdkp_';

//create the new database connection

$result = mysql_query("SELECT item_name, item_buyer FROM jqipjisr_eqdkp2.".$eqdkp_prefix."items order by item_date desc limit $limit") or die(mysql_error());


while ($row = mysql_fetch_array($result)) {

$last_mc_loot = $row[item_name];

$buyer = $row[item_buyer];

$myhtml = "<span style=\"font-size:10px;font-family: Arial, Helvetica, sans-serif;\">[item]".$last_mc_loot."[/item]</span><br /><span style=\"font-size:9px;font-family: Arial, Helvetica, sans-serif;\">Looted  by ".$buyer."</span><br />";

echo itemstats_parse($myhtml);

}

mysql_close();



you can see it working here on my test forum www.judeanpeoplesfront.net/forum

my first code for tinyportal so be gental  8)
How do you get itemstats working in tinyportal?

G6Cad

Ryushi32  Please start a new topic about that question.

Allexandra

I am unable to connect to the database.  Not an SQL expert by any means, so I was wondering if this piece of information needs to be altered in any way.

Line 13
Quote$result = mysql_query("SELECT item_name, item_buyer FROM jqipjisr_eqdkp2.".$eqdkp_prefix."items order by item_date desc limit $limit")

jqipjisr_eqdkp2

Thanks for your help.

Ryushi32

Yes it needs to be

$result = mysql_query("SELECT item_name, item_buyer FROM ".$eqdkp_prefix."items order by item_date desc limit $limit")

that extra part was for baderick's database.

This website is proudly hosted on Crocweb Cloud Website Hosting.