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.

baller1308

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.

Starbearer

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.

tomtom

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.

Phinhead54

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.

tomtom

#44
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/

baller1308

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.

Starbearer

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?

mOOwalker

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

laric

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);

mOOwalker

Thanks very much laric. The code you gave me worked flawlessly.

mOOwalker

This website is proudly hosted on Crocweb Cloud Website Hosting.