collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 414
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

Author Topic: EQDKP Recent Drops with itemstats links  (Read 4865 times)

0 Members and 1 Guest are viewing this topic.

Offline danzou

  • Semi Newbie
  • *
  • Posts: 13
  • SMF Version: 1.1.6
  • SP Version: 2.0.4
EQDKP Recent Drops with itemstats links
« on: May 08, 2009, 03:30:37 AM »
Im just curious if someone could help me fix a block that shows the recent drops from my eqdkp item list.

there is a block to tinyportal that looks like this:
Code: [Select]
$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><a href='http://www.wowhead.com/?item=" . $row['item_ctrt_wowitemid'] . "'>" . $row['item_name'] . "</a></td></tr>   
     <tr><td>Buyer: </td>
     <td>" . $row['item_buyer'] ."
     </td></tr>";
   }
}
print "</table>";

also if it is possible to integrate so that the items that show up have the tooltip from itemstats on them would be awsome!

grateful for all help i can get
/danzou

this is how i would like it to look like:
http://bollklubben.mine.nu/test/recent_loot.jpg
« Last Edit: May 20, 2009, 12:06:18 AM by danzou »

Offline danzou

  • Semi Newbie
  • *
  • Posts: 13
  • SMF Version: 1.1.6
  • SP Version: 2.0.4
Re: EQDKP Recent Drops with itemstats links
« Reply #1 on: May 19, 2009, 11:55:41 PM »
Got it to work. only thing now is to get it to work with itemstats


The PHP File:
Code: [Select]
<?php
$db_host 
'XXXXXX';
$db_user 'XXXXXX';
$db_pass 'XXXXXX';
$db_db 'XXXXXX';

// edit variables above to your site's requirements

mysql_connect ($db_host$db_user$db_pass);
mysql_select_db ($db_db);


print 
"<head><link rel=stylesheet type=text/css href=lewt.css /></head><body>";

$items = array();
print 
"<table border=0 cellspacing=0 cellpadding=0>";
   
$result mysql_query("SELECT item_ctrt_wowitemid, item_name, item_buyer, raid_date
                     FROM YOURPREFIXHERE_items AS i
                     INNER JOIN YOURPREFIXHERE_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))
   {
     
$time $row['raid_date'];
     print 
"<tr><td class=left><a href='http://www.wowhead.com/?item=" $row['item_ctrt_wowitemid'] . "' target=_blank>[" $row['item_name'] . "]</a></td></tr><tr><td class=right>Looted by: <a href='http://eu.wowarmory.com/character-sheet.xml?r=Quel%27Thalas&n=" $row['item_buyer'] ."' target=_blank><b>" $row['item_buyer'] ."</b></a></td></tr>";
   }
print 
"</table></body>";

?>

The CSS File
Code: [Select]
a:link, a:visited {
   color: #b43c01;
   text-decoration: none;
}
a:hover {
   text-decoration: underline;
}
td.left{
text-align: left;
vertical-align: middle;
font-size: 10px !important;
}
td.center{
text-align: center;
vertical-align: middle;
font-size: 11px !important;
}
td.right{
text-align: right;
vertical-align: middle;
font-size: 9px !important;
}

body, td, th, tr {
   line-height: 150%;
   font-family: tahoma, sans-serif;
   color: #565656;
   font-size: 12px;
}
body {
   background: #efefe6;
   padding: 0;
   margin: 0;
}

The css file is tuned into my site ofc. you will have to change it so that it fits your site if u want to use this :P

also in the php file there is eu.wowarmory.com as default. if ur playing any other realm change that to whatever locale your armory is.

problem i got if i made it in a php block is that it tryed to add smff. befor the db name aka so in this example it got smff.XXXXXX.

so what i did was create the php file. and the css file seperatly and then just made a html block calling the php file via a iframe.

well got all that sorted out now so now i just need to get the file to work with itemstats.
« Last Edit: May 20, 2009, 12:07:36 AM by danzou »