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,913
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 513
  • Total: 513

[Block] EQDKP Recent Drops

Started by Inny, May 06, 2009, 11:54:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

maviel

it should yes but since i have the dkp on another database instead of my current one i need to "call" my dkp database for the loot but then i need to call my portal database for the bb code i think. i did try this code on my own before and did not work since i dont have the wowitem tooldip for the dkp.

Hmm i think eqdkp.com have a tooltip thingy to! going to check! :D

maviel

#11
nope did not work, it shows like this:

Item:     [item]Metallic Loop of the Sufferer[/item]

EDIT: here is my code i am using now and i do not think i can use css and java like this :/  :idiot2:


$db_host = 'xxxx';
$db_user = 'xxxx';
$db_pass = 'xxxx';
$db_table = '_udkp';

// edit variables above to your site's requirements

mysql_connect ($db_host, $db_user, $db_pass);
mysql_select_db ($db_table);

$eqdkp_root_path = 'udkp/';
include_once($eqdkp_root_path . 'eqdkp_config_itemstats.php');                                             
include_once($eqdkp_root_path . '/itemstats/eqdkp_itemstats.php');
     
     // Get latest items from each dkp pool
$dkp_tables = array('eqdkp_');  // Your prefix may be different of course

$items = array();

echo '
<link REL=StyleSheet HREF="udkp/itemstats/templates/" TYPE="text/css" MEDIA=screen />
<script type="text/javascript" src="udkp/itemstats/overlib/"><!-- overLIB (c) Erik Bosrup --></script>
<table border=0 class=text cellspacing=0 cellpadding=0 color=555652 face=Verdana>
';
foreach ($dkp_tables as $table) {
   $result = mysql_query("SELECT item_name, item_buyer, raid_date
                     FROM eqdkp_items AS i
                     INNER JOIN eqdkp_raids AS r ON i.raid_id=r.raid_id
                     ORDER BY raid_date DESC LIMIT 7") or die(mysql_error());

   while ($row = mysql_fetch_array($result))
   {
      //$row['dkpsite'] = $table;
      //$items[] = $row;
     $time = $row['raid_date'];
     echo '<tr><td>Item: </td>
     <td>[item]'. $row['item_name'] .'[/item]</td></tr> 
     <tr><td>Buyer: </td>
     <td>' . $row['item_buyer'] .'
     </td></tr>';
   }
}
echo '</table>';


$db_host = 'xxxx';
$db_user = 'xxxx';
$db_pass = 'xxxx';
$db_table = '_portal';

mysql_connect ($db_host, $db_user, $db_pass);
mysql_select_db ($db_table);
     

Inny

Why use the ccs file and the script in the block?

That two should be already loaded from index.template

Inny

Seeing the installation of the itemstats you using, i think that mod lets say wont work with block because its looking for the tags in topic messages only.

Lets try to work this with an include, try the code below.


// Wowhead Tooltips
require_once(dirname(__FILE__) . '/../wowhead/parse.php');

$db_host = 'XXXX';
$db_user = 'XXXX';
$db_pass = 'XXXX';
$db_table = 'XXXX';

// edit variables above to your site's requirements

mysql_connect ($db_host, $db_user, $db_pass);
mysql_select_db ($db_table);
     
// Get latest items from each dkp pool
$dkp_tables = array('eqdkp');  // Your prefix may be different of course

$items = array();
print "<table border=0 class=text cellspacing=0 cellpadding=0 color=555652 face=Verdana>";
foreach ($dkp_tables as $table) {
   $result = mysql_query("SELECT item_ctrt_wowitemid, item_name, item_buyer, raid_date
                     FROM eqdkp_items AS i
                     INNER JOIN eqdkp_raids AS r ON i.raid_id=r.raid_id
                     ORDER BY raid_date DESC LIMIT 7") or die(mysql_error());

   while ($row = mysql_fetch_array($result))
   {
      //$row['dkpsite'] = $table;
      //$items[] = $row;
     $time = $row['raid_date'];
     print "<tr><td>Item: </td>
     <td>[item]" . $row['item_name'] . "[/item]</td></tr>   
     <tr><td>Buyer: </td>
     <td>" . $row['item_buyer'] ."
     </td></tr>";
   }
}
print "</table>";


In the first 2 lines of the code you will see:

// Wowhead Tooltips
require_once(dirname(__FILE__) . '/../wowhead/parse.php');


Change it with the correct directory with your wowhead script directory.

maviel

Quote from: Inny on May 08, 2009, 07:37:06 AM
Why use the ccs file and the script in the block?

That two should be already loaded from index.template

even if it is loaded from index.template does not mean it will load from the same database since i am "calling" my seperate dkp datarbase wich is only for dkp related stuff.  :D

and i cant find any file named "parse.php" mate... sorry for being an ass! and take your time but for the record it is real nice of you for helping me out.


Inny

The script you call and the css has nothing to do with the database.

You said you installed Itemstats modification, referring to this. Have you followed the installation steps for SMF?

If you are not having that mod what mod you have for the itemstats tooltips?

maviel

ok to make it simple....





Database 1Database 2
SMF Installation / TP Installation. All css related to this database is being readed from index.template right?DKP Installation / Tooltip for eqdkp. When switching to database 2 it is a whole different thing? since index.template is not here now i am reading from the root and using the css styles from my database 2 and index etc.. right? or am i wrong?

Inny

Quote from: maviel on May 08, 2009, 05:33:22 PM
DKP Installation / Tooltip for eqdkp. When switching to database 2 it is a whole different thing? since index.template is not here now i am reading from the root and using the css styles from my database 2 and index etc.. right? or am i wrong?

As it the block right now theres no any CSS related values to any of those, Tooltips scripts is using the script to get the css values as far as i know.

Major thing you need to tell me is if you get the tooltips right. Again CSS has nothing to do with the tooltips for now.

maviel

nope still have [item] issue... require_once(dirname(__FILE__) . '/../wowhead/parse.php'); i do not have any file named parse.php :(

Inny

Quote from: Inny on May 08, 2009, 09:25:28 AM
You said you installed Itemstats modification, referring to this. Have you followed the installation steps for SMF?

If you are not having that mod what mod you have for the itemstats tooltips?

Answer please :P

This website is proudly hosted on Crocweb Cloud Website Hosting.