TinyPortal

Development => Block Codes => Topic started by: baderick on May 09, 2007, 12:34:38 PM

Title: eqdkp latest loot
Post by: 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 ".$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)
Title: Re: eqdkp latest loot
Post by: G6Cad on May 09, 2007, 02:28:05 PM
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
Title: Re: eqdkp latest loot
Post by: baderick on May 09, 2007, 02:59:11 PM
is that better?
Title: Re: eqdkp latest loot
Post by: babjusi on May 09, 2007, 03:02:40 PM
What does eqdkp mean?
Title: Re: eqdkp latest loot
Post by: baderick on May 09, 2007, 03:14:13 PM
heres a link to the eqdkp website http://eqdkp.com/?p=about im sure it can explain it better than i can.
Title: Re: eqdkp latest loot
Post by: G6Cad on May 09, 2007, 03:22:26 PM
Much better :)
Title: Re: eqdkp latest loot
Post by: Ryushi32 on May 10, 2007, 01:46:42 PM
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?
Title: Re: eqdkp latest loot
Post by: G6Cad on May 10, 2007, 02:19:52 PM
Ryushi32  Please start a new topic about that question.
Title: Re: eqdkp latest loot
Post by: Allexandra on May 11, 2007, 12:52:30 AM
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.
Title: Re: eqdkp latest loot
Post by: Ryushi32 on May 11, 2007, 01:13:38 AM
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.
Title: Re: eqdkp latest loot
Post by: Allexandra on May 11, 2007, 01:53:57 AM
Thank you for the clarification Ryu.  :)

EDIT:

Changed Line 13 to reflect changes and now I am getting parse errors.

QuoteParse error: parse error, unexpected T_WHILE in /xxxxx/xx/xxxxxxx/htdocs/forums/Sources/Load.php(1746) : eval()'d code(35) : eval()'d code on line 16

Created a dummy php test page, ran it outside of TP/SMF will same result.

Originates from:

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

Much help would be appreciated.  Database values have been verified as correct.

Title: Re: eqdkp latest loot
Post by: baderick on May 12, 2007, 04:54:39 PM
yeah sorry about that il redo it when i get home from work  :)
Title: Re: eqdkp latest loot
Post by: baderick on May 12, 2007, 05:13:08 PM
$result = mysql_query("SELECT item_name, item_buyer FROM ".$DBName.".".$eqdkp_prefix."items order by item_date desc limit $limit") or die(mysql_error());

that should work you just need to fill your database name in the

$DBName = 'db_eqdkp';
Title: Re: eqdkp latest loot
Post by: Allexandra on May 14, 2007, 06:22:37 AM
Thanks a lot baderick, now I am getting the access denied error, so I will try to figure out what's going on since all of the values are correct in the db variables.  :-\
Title: Re: eqdkp latest loot
Post by: baderick on May 14, 2007, 11:04:41 AM
sorry i noticed it was producing errors in the smf and i tracked it down to my noobishness at php  ::)

these this code needs changing


$last_mc_loot = $row[item_name];

$buyer = $row[item_buyer];


to this

$last_mc_loot = $row['item_name'];

$buyer = $row['item_buyer'];


baderick
Title: Re: eqdkp latest loot
Post by: baderick on May 14, 2007, 11:15:12 AM
Quote from: Allexandra on May 14, 2007, 06:22:37 AM
Thanks a lot baderick, now I am getting the access denied error, so I will try to figure out what's going on since all of the values are correct in the db variables.  :-\

i think thats down to database access but im no expert on that
Title: Re: eqdkp latest loot
Post by: Allexandra on May 14, 2007, 10:02:40 PM
I am up against a wall then, db values are correct and getting errors.  I will tinker with it a bit and see if I can get it working for me.  It's a shame because at the moment I have to type the wowitem links manually in the block. Thanks for all the help though.  ;)
Title: Re: eqdkp latest loot
Post by: dwoolcott on June 01, 2007, 04:37:43 AM
I have added the code to a SMF/TP block and the info is being pulled out of the database correctly, but the itemstat info is not processing and showing up literally [item] etc.  Any suggestion?  Does any include need to be added somewhere?
Title: Re: eqdkp latest loot
Post by: baderick on June 04, 2007, 12:13:27 PM
you need itemstats working in smf and tinyportal,  there is a guide on this forum if you do a search on how to do it but i think that uses wowitem from memory.

but if itemstats working correctly it doesnt need the include as seen here

http://judeanpeoplesfront.net
Title: Re: eqdkp latest loot
Post by: Ryushi32 on June 04, 2007, 10:25:24 PM
I have searched and searched an cannot find the guide your talking about
Title: Re: eqdkp latest loot
Post by: dwoolcott on June 09, 2007, 10:47:24 PM
Well Itemstats does work in the SMF forums and in the main section of tinyportal, but not in any of the side modules, thus my dilemma.
Title: Re: eqdkp latest loot
Post by: baderick on June 12, 2007, 02:00:11 PM
if you done darkclouds mod to TP then use this code

echo TPparseWoWItems($myhtml);

that worked for me to get it working using his item stats
Title: Re: eqdkp latest loot
Post by: captain236 on July 10, 2007, 01:40:51 AM
wow.. nice TP demo site you have linked..   i see you havea  recruitment snippet and some others..  might you list those as well..  i dont think theres many WoW blocks readily available to good sites.

thanks
Title: Re: eqdkp latest loot
Post by: Hakker on July 16, 2007, 05:45:42 PM
Quote from: dwoolcott on June 09, 2007, 10:47:24 PM
Well Itemstats does work in the SMF forums and in the main section of tinyportal, but not in any of the side modules, thus my dilemma.
I have exactly the same problem even though I use the "echo TPparseWoWItems($myhtml);" part. I get the name of the item but nothing more and it looks like normal text although it's been added in a PHPbox
Title: Re: eqdkp latest loot
Post by: Phinhead54 on July 30, 2007, 05:33:15 PM
Can I ask what you did to display the icon of the loot in the block instead of just the link?   (talking about: http://www.judeanpeoplesfront.net/forum/index.php)

I have itemstats working, I got the DKP value out and showing, I get the link, it looks good but the way you have the icon with the name/dkp next to it looks great.
Title: Re: eqdkp latest loot
Post by: Ogopogo on August 04, 2007, 10:45:39 PM
How do you get BBC code working in the phpbox? Is there a work around?
Title: Re: eqdkp latest loot
Post by: IchBin on August 05, 2007, 12:26:15 AM
You can't use bbc code in a phpbox. Its run through an different eval statement. You wan bbc code you have to use a bbc/html box.
Title: Re: eqdkp latest loot
Post by: Hakker on August 07, 2007, 10:56:21 AM
As I see it now one of the requirements is that the db's are combined instead of seperate db's for the frontpage/forum and eqdkp and itemstats I think that's why several people have problems with the whole snippet of code.
Title: Re: eqdkp latest loot
Post by: Phinhead54 on August 07, 2007, 01:32:49 PM
My DB's are seperate and I have no problem with the code.
Title: Re: eqdkp latest loot
Post by: baderick on August 08, 2007, 11:09:55 AM
hi

you can have your eqdkp in a diffrent db, thats how my installation is atm.

the problem people are having is with the itemstats itself, i use this on my forum

http://itemstats.free.fr/news.php which alows you to use icons instead of just the name. there is a package for smf but its says its not compatible with smf but you just need to change the install xml and add 1.1.2, 1.1.3 to make it work then just follow the instructions and it seems to work on most of TP front pages with no problem.

i have made my own itemstats addon for smf but its a bit buggy atm which gets info from wow armoury and displays that and stores it in your db thats what i have on my website atm but ill be removing that soon as i just dont have the time to complete it.

if you need anymore help getting itemstats 1.5 to work ill be happy to make a instruction post for you.

baderick
Title: Re: eqdkp latest loot
Post by: rjackson on August 17, 2007, 06:16:27 PM
I have a few questions about your site http://judeanpeoplesfront.net/forums

The Upcoming Raid block..how did u do that? and Can u zip your images folder and post it? or send it to me in a email. I wanna update my images on my wow website with the images you use...

Thanks
Title: Re: eqdkp latest loot
Post by: baderick on August 18, 2007, 11:44:48 AM
the images come from phpraider which can be found here http://www.phpraider.com/ when the phpraider block is ready i will post it here for all to use :)
Title: Re: eqdkp latest loot
Post by: data-darius on August 18, 2007, 04:42:14 PM
baderick,
would you be so nice to provide us with the code you are using on your page (JPF) ?
I do not get it working using my existing bbcode (same as others?) which is based on [wowitem] which I changed properly in the code you provided.
So now yourself is using regular (not built-in) itemstats to get this done? Can you provide your code with the includes etc you are using there now ?

thanks a lot,
darius
Title: Re: eqdkp latest loot
Post by: baderick on August 18, 2007, 05:51:52 PM
if i get time tonight cus im not raiding  :) ill post a guide how to get itemstats working in smf and tinyportal v easy  ;D

and give the code im using atm for the latest loot.

the problem with wowitemstats is  you need to add extra code in tp to get it to work, which can be found on these boards.
Title: Re: eqdkp latest loot
Post by: smokeajayson on August 27, 2007, 09:43:52 PM
Yeah, and I have the code added so wowitemstats works in blocks and articles.  The only problem is that it doesn't work in phpblocks.  I call itemstats_parse($data) just as you do, but it just returns the same data I passed the function without actually parsing it.

I know the function is being called, as I'm not getting a "this function doesn't exist" type error.

function itemstats_parse($message)
{
  global $db_character_set, $scripturl, $modSettings, $settings, $user_settings;
  static $iconcount = 0;
 
if (!empty($message))
{
    //don't allow encase of [wowitem] tag
    if (count($message) > 1)
    {
      if (strstr($message[0], '[wowitem]') || strstr($message[0], '[item]') || strstr($message[0], '<wowitem>'))
        return $message;
    }
    else
    {
      if (strstr($message, '[wowitem]') || strstr($message, '[item]') || strstr($message, '<wowitem>'))
        return $message;
    }


The problem is the last bit of code posted above.  If it finds [item] or [wowitem] it just returns the data you send the function without actually parsing it.
Title: Re: eqdkp latest loot
Post by: Phinhead54 on August 28, 2007, 12:16:29 AM
Search for how to setup TPparseWoWitems and use "echo TPparseWoWItems($myhtml);"
Title: Re: eqdkp latest loot
Post by: smokeajayson on August 28, 2007, 06:42:56 AM
Yeah, I figured it out.  lol.  Now, to hack the code to use the image like badericks' website.
Title: Re: eqdkp latest loot
Post by: Starbearer on October 02, 2007, 12:05:36 PM
Sry for dragging out an older post. I just installed a block with the code posted here, but it only shows up with an error message:

QuoteAccess denied for user 'd00XXXX'@'localhost' to database 'd00YYYY'

d00XXXX is the database of my forum and d00YYYY the one of the eqdkp.

My databases for the forum and the eqdkp are separated. I doublechecked the database details in the code and they are correct.
Can anyone help me with that, I am kinda noobish at coding. Thx in advance
Title: Re: eqdkp latest loot
Post by: Phinhead54 on October 02, 2007, 02:55:46 PM
You have to go into whatever mySQL admin tool you use and give the d00XXXX user rights to look into the d00YYYY database.

Keep in mind that I am not a security expert, what I suggest may or may not be the most secure way to do things.
Title: Re: eqdkp latest loot
Post by: baller1308 on October 02, 2007, 06:32:35 PM
nevermind, I got it to work ;D
Title: Re: eqdkp latest loot
Post by: baller1308 on October 03, 2007, 03:32:13 AM
Quote from: Starbearer on October 02, 2007, 12:05:36 PM
Sry for dragging out an older post. I just installed a block with the code posted here, but it only shows up with an error message:

QuoteAccess denied for user 'd00XXXX'@'localhost' to database 'd00YYYY'

d00XXXX is the database of my forum and d00YYYY the one of the eqdkp.

My databases for the forum and the eqdkp are separated. I doublechecked the database details in the code and they are correct.
Can anyone help me with that, I am kinda noobish at coding. Thx in advance

I was getting the same error, but the DB_Name wasn't the same for me, and once I changed that it worked.
Title: Re: eqdkp latest loot
Post by: Starbearer on October 03, 2007, 05:29:27 PM
QuoteI was getting the same error, but the DB_Name wasn't the same for me, and once I changed that it worked.

Uhm, what exactly did you change and where? Sry for my noobishness, but I never did such coding things before.
Title: Re: eqdkp latest loot
Post by: tomtom on October 04, 2007, 10:37:56 AM
I have a strange problem. Latest Loot shows items correctly on TinyPortal front page, parsing them through "echo TPparseWoWItems($myhtml);", but when I go under the Forums (or any other page which is essentially SMF) the parsing no longer works, and I get this as a result:

Quote[item]Emerald Ripper[/item]
Looted by Desola
[item]Belt of Gale Force[/item]
Looted by Eye
[item]Steelhawk Crossbow[/item]
Looted by Girering

However, ItemStats works in Forum posts.
Title: Re: eqdkp latest loot
Post by: Phinhead54 on October 04, 2007, 12:36:04 PM
Quote from: tomtom on October 04, 2007, 10:37:56 AM
I have a strange problem. Latest Loot shows items correctly on TinyPortal front page, parsing them through "echo TPparseWoWItems($myhtml);", but when I go under the Forums (or any other page which is essentially SMF) the parsing no longer works, and I get this as a result:

Quote[item]Emerald Ripper[/item]
Looted by Desola
[item]Belt of Gale Force[/item]
Looted by Eye
[item]Steelhawk Crossbow[/item]
Looted by Girering

However, ItemStats works in Forum posts.

I don't think you can use the same parser for inside SMF because the block is processing php/html code and the forum is processing BB code.  Try just outputting the open item tag, your item name only then the close item tag for use in the SMF forum.
Title: Re: eqdkp latest loot
Post by: tomtom on October 05, 2007, 05:04:47 AM
Quote from: Phinhead54 on October 04, 2007, 12:36:04 PM

I don't think you can use the same parser for inside SMF because the block is processing php/html code and the forum is processing BB code.  Try just outputting the open item tag, your item name only then the close item tag for use in the SMF forum.

Thanks for the reply, Pinhead, hadn't really thought of that. However, if I do that, then Im afraid my Frontpage stops working. Any suggestions for the syntax, or some other suggestion on how to handle this?

One other sympton, though.. as this might be important. I noticed that while it does not parse the items correctly while visiting the Forum frontpage, Help or Calendary, it works quite right when I am viewing a thread inside the forums. Im totally at a loss as to what might explain this.

The site is found at: http://devour.42nd.org/
Title: Re: eqdkp latest loot
Post by: baller1308 on October 06, 2007, 04:36:04 AM
Quote from: Starbearer on October 03, 2007, 05:29:27 PM
QuoteI was getting the same error, but the DB_Name wasn't the same for me, and once I changed that it worked.

Uhm, what exactly did you change and where? Sry for my noobishness, but I never did such coding things before.
I didn't change this part of the code first time around:

$DBName = 'db_eqdkp';

Once I changed it to the name of my site database not the name of the eqdkp database, and it worked.  Hope this helps.
Title: Re: eqdkp latest loot
Post by: Starbearer on October 10, 2007, 04:59:24 PM
Quote from: baller1308 on October 06, 2007, 04:36:04 AM
Quote from: Starbearer on October 03, 2007, 05:29:27 PM
QuoteI was getting the same error, but the DB_Name wasn't the same for me, and once I changed that it worked.

Uhm, what exactly did you change and where? Sry for my noobishness, but I never did such coding things before.
I didn't change this part of the code first time around:

$DBName = 'db_eqdkp';

Once I changed it to the name of my site database not the name of the eqdkp database, and it worked.  Hope this helps.

Sry, but now I am completely confused. If I change it to the database of the forum, how can it access any eqdkp data then?
Title: Re: eqdkp latest loot
Post by: mOOwalker on November 13, 2007, 12:12:10 AM
I got the same problem as allexandra. I get this error :
Parse error: syntax error, unexpected T_STRING in /xxxx/xxxxxxxxx/xxxxxxx/xxxxxxxx/public_html/smf/Sources/Load.php(1735) : eval()'d code(35) : eval()'d code on line 6

I have copy and paste all the corections you made, but still I cant get it to work. I am using SMF 1.1.4 and TP 0.9.8.
Link here : http://www.concept-guild.eu/smf/

Thanks,
mOOwalker
Title: Re: eqdkp latest loot
Post by: laric on November 20, 2007, 11:40:33 AM
My current eqpdkp latest loot that works just fine with itemlinks and such.

If I dropped the include_once then it worked on someplaces on the portal but not on others.

include_once("/localpathto/itemstats/smf_itemstats.php");

// db config

$linkmoreloot = '';
$DBhost = 'localhost';
$DBuser = 'xxx';
$DBpass = 'xxx';
$DBName = 'xxx';
$limit = 10;
$eqdkp_prefix = 'eqdkp2_';

//create the new database connection
$link = mysql_connect($DBhost, $DBuser, $DBpass);
$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($link);
Title: Re: eqdkp latest loot
Post by: mOOwalker on November 20, 2007, 11:56:27 AM
Thanks very much laric. The code you gave me worked flawlessly.

mOOwalker
Title: Re: eqdkp latest loot
Post by: laric on November 20, 2007, 01:40:12 PM
Ok updated it a little to be a bit prettier.


include_once("/localpathto/itemstats/smf_itemstats.php");

// db config

$linkmoreloot = '';
$DBhost = 'localhost';
$DBuser = 'xxx';
$DBpass = 'xxx';
$DBName = 'xxx';
$limit = 10;
$eqdkp_prefix = 'eqdkp2_';

//create the new database connection
$link = mysql_connect($DBhost, $DBuser, $DBpass);
$result = mysql_query("SELECT item_name, item_buyer FROM ".$DBName.".".$eqdkp_prefix."items order by item_date desc limit $limit") or die(mysql_error());

echo '<table>';
while ($row = mysql_fetch_array($result)) {

$last_mc_loot = $row['item_name'];
$buyer = $row['item_buyer'];
$myhtml = "<tr><td>[itemico]".$last_mc_loot."[/itemico]</td><td>[item]".$last_mc_loot."[/item]<br/>Looted  by ".$buyer."</td></tr>";
echo itemstats_parse($myhtml);
}
echo '</table>';
mysql_close($link);

Title: Re: eqdkp latest loot
Post by: Hakker on December 06, 2007, 08:39:37 PM
Finally got it working anyone know how to get the borders around the links gone? I think it's in the TP WoW Risen theme but dunno what part of the css.
Title: Re: eqdkp latest loot
Post by: Ferocity on December 06, 2007, 10:23:29 PM
Doesnt seem to work if eqdkp is in a seperate table from SMF as it seems to pull data as the SMF user acct.
Title: Re: eqdkp latest loot
Post by: laric on December 10, 2007, 10:42:19 AM
Quote from: Ferocity on December 06, 2007, 10:23:29 PM
Doesnt seem to work if eqdkp is in a seperate table from SMF as it seems to pull data as the SMF user acct.

If you use the one I have posted a few posts up it will work properly with a different database. Heck it even works with a different database server.
Title: Re: eqdkp latest loot
Post by: Cal on January 02, 2008, 01:58:38 PM
Okay, I'm kind of at a loss.  I am using the block snippet from the message immediately above, I have edited my Sources/TPortal.php file with the code for the TPparseWoWItems function, and I still can't make the Itemstats display.  It's pulling correctly from the EQDKP database, it's just only printing [item]Wildfury Greatstaff[/item] instead of the link and hover tooltip.

The code I am using is exactly as the most recent above.  I know I must be missing something really simple, I just don't know what it is.
Title: Re: eqdkp latest loot
Post by: laric on January 02, 2008, 03:49:08 PM
I think you are missing
echo itemstats_parse($myhtml);
Title: Re: eqdkp latest loot
Post by: Cal on January 02, 2008, 10:50:15 PM
Quote from: laric on January 02, 2008, 03:49:08 PM
I think you are missing
echo itemstats_parse($myhtml);

Unfortunately no, I checked that.  Here is my block, with identifying information removed:

include_once("/home/xxx/html/Sources/itemstats/smf_itemstats.php");

// db config

$linkmoreloot = '';
$DBhost = 'localhost';
$DBuser = 'xxx';
$DBpass = 'xxx';
$DBName = 'xxx';
$limit = 10;
$eqdkp_prefix = 'eqdkp_';

//create the new database connection
$link = mysql_connect($DBhost, $DBuser, $DBpass);
$result = mysql_query("SELECT item_name, item_buyer FROM ".$DBName.".".$eqdkp_prefix."items order by item_date desc limit $limit") or die(mysql_error());

echo '<table>';
while ($row = mysql_fetch_array($result)) {

$last_mc_loot = $row['item_name'];
$buyer = $row['item_buyer'];
$myhtml = "<tr><td style=\"font-size:10px\">[item]".$last_mc_loot."[/item]<br/>Looted  by ".$buyer."</td></tr>";
echo itemstats_parse($myhtml);
}
echo '</table>';


And I modified my Sources/TPortal.php using the instructions found here (http://www.darkcloud14.de/forum/tinyportal_article-t47.0.html;msg398#msg398).

Thanks for your help!
Title: Re: eqdkp latest loot
Post by: laric on January 03, 2008, 07:26:18 AM
Quote from: Cal on January 02, 2008, 10:50:15 PM
include_once("/home/xxx/html/Sources/itemstats/smf_itemstats.php");


I had a problem with this line at one time and thus got the problem. try changing it to require_once to see if it gets loaded.
Title: Re: eqdkp latest loot
Post by: Cal on January 03, 2008, 02:13:22 PM
Neither require_once nor include_once give me any change.  Just to test, I switched it to require(), and as expected it returned a cannot redeclare error, so it *is* being included in the page.

Itemstats is working correctly on forum posts and in standard HTML articles, just not in the block.
Title: Re: eqdkp latest loot
Post by: laric on January 03, 2008, 02:23:08 PM
Quote from: Cal on January 02, 2008, 10:50:15 PM
And I modified my Sources/TPortal.php using the instructions found here (http://www.darkcloud14.de/forum/tinyportal_article-t47.0.html;msg398#msg398).

It might because I have not done that part.
I am actually not using that version of itemstats. I am using the one with wowhead from the eqdkp forum.
Title: Re: eqdkp latest loot
Post by: Cal on January 03, 2008, 02:42:05 PM
Awesome, switching mods did it.  Thanks!
Title: Re: eqdkp latest loot
Post by: Setsuni1 on January 19, 2008, 11:09:08 PM
Hey, i was wondering how you got DKP to show inside your TP so well. Please contact me here via pm . Also i posted on your guilds website in the general forum with my other contact info.