Latestloots addon

Fetches the last 20 loots from eqdkp

Moderator: Thumann

So, what do you think?

Cool!
22
81%
It's okay i guess, could use som more features.. like...
2
7%
Hmm.. i've seen better..
0
No votes
Omg! i can't get anything to work.. and i read your so called README!
3
11%
 
Total votes : 27

Latestloots addon

Postby Thumann » Thu Jul 13, 2006 9:03 pm

Latest Loots is a rather simple addon that fetches the last 20 loots, number can be changed, from eqdkp.

It's currently in version 1.1, so don't expect to much! :pirate:

English and German version.

Demo (3 database version though)

Check README file for instructions.

Requirements:
Eqdkp, A working and configured eqdkp installtion
Itemstats, A working itemstats 'installation', info can be found in README

That's all i think :)

Give it a twirl and let me know what you think.. :blackeye:

DOWNLOAD


Version history:

v.1.1:
* Now with multidatabase support (eqdkp_config.php)
* Moved the css file from itemstats to default.css
* Latest loot is now sorted by date instead of ID

v.1.0:
* The first release of latestloot
* Single database support


Regs. Thumann
Last edited by Thumann on Mon Jul 17, 2006 2:16 pm, edited 5 times in total.
Regs. Thumann
http://fc-guild.org | Go Joomla! | Author of the Joomla Integration Guide
Thumann
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 78
Joined: Mon Jul 10, 2006 11:03 pm
Location: Copenhagen, Denmark

Re: Latestloots addon

Postby joehail » Thu Jul 13, 2006 11:56 pm

very nice work. can you also post the other 2 eqdkp pages?

Thanks
Joe
Image
User avatar
joehail
WR.net Journeyman
WR.net Journeyman
 
Posts: 103
Joined: Tue Jul 04, 2006 4:54 pm
Location: Cincinnati, Ohio USA

Latestloots addon

Postby Thumann » Fri Jul 14, 2006 12:16 am

Regs. Thumann
http://fc-guild.org | Go Joomla! | Author of the Joomla Integration Guide
Thumann
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 78
Joined: Mon Jul 10, 2006 11:03 pm
Location: Copenhagen, Denmark

Latestloots addon

Postby Subxero » Fri Jul 14, 2006 5:40 am

Thumann can be the EQDKP tables in another database ?
User avatar
Subxero
WR.net Artisan
WR.net Artisan
 
Posts: 234
Joined: Thu Jul 06, 2006 4:08 pm
Realm: Zul'jin (PvE) - US

Re: Latestloots addon

Postby Subxero » Fri Jul 14, 2006 6:19 am

A primary try to do it :) with different DB
Code: Select all
<?php
#--[ EQDKP CONFIG ]--------------------------------------------------------    
    
$addon_conf['eqdkp']['db_user2'] = 'user';            // MYSQL Database Username
    
$addon_conf['eqdkp']['db_passwd2'] = 'password';        // MYSQL Database Password
    
$addon_conf['eqdkp']['db_name2'] = 'dbname';        // MYSQL Database Name
    
$addon_conf['eqdkp']['db_host2'] = 'localhost';        // MYSQL Server Address (localhost if the database is on the same machine)
      
$addon_conf['eqdkp']['eqdkp_prefix'] = 'eqdkp_';        // MYSQL Database Table prefix for EQDKP tables. (Must match EQDKP setup)
      
// Connect DB
$link mysql_connect($addon_conf['eqdkp']['db_host2'], $addon_conf['eqdkp']['db_user2'], $addon_conf['eqdkp']['db_passwd2']) or die($_SERVER['PHP_SELF'].":".__LINE__." "."Could not connect");
mysql_select_db($addon_conf['eqdkp']['db_name2']) or die($_SERVER['PHP_SELF'].":".__LINE__." "."Could not select DB");

//Get Main title from eqdkp
$query "SELECT config_value FROM ".$addon_conf['eqdkp']['eqdkp_prefix']."config WHERE config_name = 'main_title'";
$result mysql_query($query) or die(mysql_error());
if (
$row mysql_fetch_array($result))
{
    
$eqname $row[0];
}
mysql_free_result($result);

//Get total drops from eqdkp
$query "select count(*) from ".$addon_conf['eqdkp']['eqdkp_prefix']."items";
$result mysql_query($query) or die(mysql_error());
if (
$row mysql_fetch_array($result))
{
    
$total_drops $row[0];
}
mysql_free_result($result);
if (
$roster_conf['sqldebug'])
{
    print 
"<!-- $query -->\n";
}

$query "SELECT `item_name`, `item_buyer` FROM `".$addon_conf['eqdkp']['eqdkp_prefix']."items` ORDER BY item_date DESC limit 20";
if (
$roster_conf['sqldebug'])
{
    print 
"<!-- $query -->\n";
}
echo 
border('syellow','start');
echo 
'<table cellpadding="0" cellspacing="0"> ';
echo 
'<tr>';
echo 
'<tr><td class="membersHeader">'.$eqname.'</td></tr>';
$result mysql_query($query) or die(mysql_error());

while (
$row mysql_fetch_array($result)) {
$last_mc_loot $row[item_name];
$buyer $row[item_buyer];

$myhtml "[item]".$last_mc_loot."[/item] ".'<span class="by-text">'.$wordings[$roster_conf['roster_lang']]['by'].'</span>'." ".'<a href="char.php?name='.urlencode($buyer).'&server='.$roster_conf['server_name'].'">'.utf8_encode($buyer).'</a>'"";

echo 
itemstats_parse('<tr><td class="membersHeader">'.$myhtml.'</td></tr>');
}
echo 
'<tr><td class="membersHeader">'.$wordings[$roster_conf['roster_lang']]['TotalDrops'].': '.$total_drops.'</td></tr>';
echo 
'</tr>';
echo 
'</table>';
echo 
border('syellow','end');
mysql_free_result($result);
$link $roster_dblink;
if( !
$link )
{
    die(
basename(__FILE__).': line['.(__LINE__).']<br />'.'User "'.$db_user.'" could not connect to database "'.$db_name.'" on host "'.$db_host.'"<br />MySQL said:<br />'.$wowdb->error());
}

?>
Last edited by Subxero on Fri Jul 14, 2006 5:06 pm, edited 1 time in total.
User avatar
Subxero
WR.net Artisan
WR.net Artisan
 
Posts: 234
Joined: Thu Jul 06, 2006 4:08 pm
Realm: Zul'jin (PvE) - US

Latestloots addon

Postby Thumann » Fri Jul 14, 2006 11:34 am

:) aye... from the old eqdkp addon..

it will be implemented in v. 1.1 :D
Regs. Thumann
http://fc-guild.org | Go Joomla! | Author of the Joomla Integration Guide
Thumann
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 78
Joined: Mon Jul 10, 2006 11:03 pm
Location: Copenhagen, Denmark

Latestloots addon

Postby Subxero » Fri Jul 14, 2006 5:09 pm

And its better use item_date than item_id because any edited item get a new id and can't be a new loot only a mistake o error, date its from loot not from edit.
User avatar
Subxero
WR.net Artisan
WR.net Artisan
 
Posts: 234
Joined: Thu Jul 06, 2006 4:08 pm
Realm: Zul'jin (PvE) - US

Latestloots addon

Postby Hakker » Sun Jul 16, 2006 2:02 am

yup v1.0 is currently useless for me simply because eqdkp has it's own db(s), but it looks really nice on your site though.
Last edited by Hakker on Sun Jul 16, 2006 2:03 am, edited 1 time in total.
Hakker
WR.net Apprentice
WR.net Apprentice
 
Posts: 3
Joined: Wed Jul 05, 2006 6:46 pm

Latestloots addon

Postby Subxero » Mon Jul 17, 2006 6:36 am

hakker use my modification to use different db :)
User avatar
Subxero
WR.net Artisan
WR.net Artisan
 
Posts: 234
Joined: Thu Jul 06, 2006 4:08 pm
Realm: Zul'jin (PvE) - US

Latestloots addon

Postby Thumann » Mon Jul 17, 2006 2:24 pm

New version available for download :)

Thanks subxero for your support btw ;)
Regs. Thumann
http://fc-guild.org | Go Joomla! | Author of the Joomla Integration Guide
Thumann
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 78
Joined: Mon Jul 10, 2006 11:03 pm
Location: Copenhagen, Denmark

Latestloots addon

Postby mrruin » Sun Jul 23, 2006 5:06 pm

great addon :)

What I am trying to do is integrate it into a joomla module so those 20 items are shown in the sidebar. But I havent figured out how.

Did anyone ever try this?
mrruin
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Sun Jul 23, 2006 12:23 pm

Latestloots addon

Postby Thumann » Mon Jul 24, 2006 12:30 am

yes.. :) that's no problem.. i've even made a joomla module for it..

;) i guess you wan't that..
Regs. Thumann
http://fc-guild.org | Go Joomla! | Author of the Joomla Integration Guide
Thumann
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 78
Joined: Mon Jul 10, 2006 11:03 pm
Location: Copenhagen, Denmark

Re: Latestloots addon

Postby mrruin » Mon Jul 24, 2006 1:01 pm

well I wouldnt mind at all :p Did you release it to the public at all?
mrruin
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Sun Jul 23, 2006 12:23 pm

Latestloots addon

Postby Thumann » Mon Jul 24, 2006 2:29 pm

No, i didn't.. but here it is :)

Loot History Module

When the download is authorized that is.. hehe

I made a few changes to it.. i moved all the configuration into joomla (module configuration) instead of having it in the php files.. that should make configuration alot easier.. hehe

it also features having eqdkp tables in another database..

Have fun.. and report bugs.. though do it in the integration forum.. i'll create a new topic..
Last edited by Thumann on Mon Jul 24, 2006 2:53 pm, edited 1 time in total.
Regs. Thumann
http://fc-guild.org | Go Joomla! | Author of the Joomla Integration Guide
Thumann
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 78
Joined: Mon Jul 10, 2006 11:03 pm
Location: Copenhagen, Denmark

Latestloots addon

Postby mrruin » Mon Jul 24, 2006 4:57 pm

thanks a lot, its much much appreciated!
mrruin
WR.net Apprentice
WR.net Apprentice
 
Posts: 17
Joined: Sun Jul 23, 2006 12:23 pm

Next

Return to Latest Loots

Who is online

Users browsing this forum: No registered users and 1 guest

cron