"Recent Items" block

This mod will allow any part of DragonFly that uses bbcode to be able to use ItemStats
No longer maintained

"Recent Items" block

Postby robojerk » Wed May 23, 2007 2:53 am

I am having problems getting this to work.. I found this block here. It is a port from the nuke block.

Open up the file and edit these lines.

Code: Select all
/* ************ MAKE CHANGES HERE *********************** */

/*This should be changed to reflect your own database name */
$tabprefix "";

/*Your DKP install location, note to include the trailing / example (/eqdkp/)*/
$dkploc "";

/*What loot should show. 0=green and above(default), 1=blue and above, 2=epic and above*/
$uberloot 2;

/*Do you want to see who won the loot (1=yes 0=no)*/
$showwinner 1;

/* The item and raid tables from eqdkp, you shouldnt need to change this unless you are using a different prefix */
$eqdkploot "eqdkp_items";
$eqdkpraids "eqdkp_raids";

/* ************ END OF CHANGES *********************** */ 
Attachments
block-recent_items.zip
(2.43 KiB) Downloaded 395 times
recent_items.png
recent_items.png (1.89 KiB) Viewed 1384 times
Last edited by robojerk on Wed May 23, 2007 8:50 am, edited 15 times in total.
Image
For the Horde!
Image
User avatar
robojerk
WR.net Master
WR.net Master
 
Posts: 484
Joined: Wed Jul 05, 2006 12:17 am
Location: -The OmniMatrix- Web 3.0

"Recent Items" block

Postby robojerk » Wed May 23, 2007 4:14 am

nm, got it to work.. I don't have ftp access from work so I was having a friend try to install it on his site. After some frustrating IM's i fired up my crappy WAMP server and it works fine..

edit: or not, if I try to move the block I get an error.

Fatal error: Class 'ItemStats' not found in C:\wamp\www\blocks\block-Recent_Items.php on line 138


line 138
Code: Select all
    $item_stats = new ItemStats(); 
Last edited by robojerk on Wed May 23, 2007 5:04 am, edited 4 times in total.
Image
For the Horde!
Image
User avatar
robojerk
WR.net Master
WR.net Master
 
Posts: 484
Joined: Wed Jul 05, 2006 12:17 am
Location: -The OmniMatrix- Web 3.0

"Recent Items" block

Postby robojerk » Wed May 23, 2007 5:11 am

http://forums.eqdkp.com/index.php?s=&sh ... st&p=23875

sedrikk wrote:date='May 18 2006, 09:52 AM' post='23875'
ace2011 wrote: date='May 17 2006, 04:17 PM' post='23766'
I'm really confused. I'm getting a blank block, and I made sure itemstats and all the other stuff was set up the way that's posted. What I'm confused on is for

Code: Select all
/*This should be changed to reflect your own database name */
$tabprefix = " ";


What do I put there? I'm using two seperate databases for nuke and eqdkp. Do I put the database name, or the table prefix, and which database do I need?

Also, if that's not what's causing the blank block, what is?



That variable should be the database name that contains eqdkp data. Not individual tables or table prefixes.

The variable was originally supposed to just be the prefix, but i ended up changing what it was used for, but never changed the variable itself to reflect its purpose.


/sigh

I edited the code to make more sense.
Code: Select all
/* ************ MAKE CHANGES HERE *********************** */

/*This should be changed to reflect your own database name
  If Dragonfly & EQDKP are located on the same database it's okay to leave this blank */
$dbname "";

/* Table prefix, edit this if your eqdkp prefix is not the standard. */
$tabprefix "eqdkp";

/*Your DKP install location, note to include the trailing / example (/eqdkp/) */
$dkploc "";

/*What loot should show. 0=green and above(default), 1=blue and above, 2=epic and above */
$uberloot 2;

/*Do you want to see who won the loot (1=yes 0=no)*/
$showwinner 1;

/* The item and raid tables from eqdkp, you shouldnt need to change this unless you are using a different prefix */
$eqdkploot $tabprefix."_items";
$eqdkpraids $tabprefix."_raids";

/* ************ END OF CHANGES *********************** */ 
Last edited by robojerk on Wed May 23, 2007 5:25 am, edited 3 times in total.
Image
For the Horde!
Image
User avatar
robojerk
WR.net Master
WR.net Master
 
Posts: 484
Joined: Wed Jul 05, 2006 12:17 am
Location: -The OmniMatrix- Web 3.0

"Recent Items" block

Postby zanix » Wed May 23, 2007 5:45 am

I would try including itemstats.php

Somewhere before
Code: Select all
            $item_stats = new ItemStats();


You could add the itemstats code
Code: Select all
include(BASE_DIR . '/modules/item_stats/itemstats.php');
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

"Recent Items" block

Postby robojerk » Wed May 23, 2007 5:52 am

=\

same error..
Image
For the Horde!
Image
User avatar
robojerk
WR.net Master
WR.net Master
 
Posts: 484
Joined: Wed Jul 05, 2006 12:17 am
Location: -The OmniMatrix- Web 3.0

"Recent Items" block

Postby zanix » Wed May 23, 2007 6:14 am

Hey robo, hop on over to the IRC chat room
I'm there now
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: "Recent Items" block

Postby robojerk » Wed May 23, 2007 6:23 am

zanix wrote:Hey robo, hop on over to the IRC chat room
I'm there now


I can't while at work. ports are blocked.
I can PM you my gtalk
Image
For the Horde!
Image
User avatar
robojerk
WR.net Master
WR.net Master
 
Posts: 484
Joined: Wed Jul 05, 2006 12:17 am
Location: -The OmniMatrix- Web 3.0

"Recent Items" block

Postby zanix » Wed May 23, 2007 9:19 am

Well, dang
I did have to leave for awhile, sorry I wasn't there when I said I would be
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

"Recent Items" block

Postby mashed » Mon Aug 27, 2007 12:26 am

Hey Robo,

Did you ever manage to figure out this error? i only seem to get it whilst viewing forums but is annoying as it kills my right blocks
mashed
WR.net Apprentice
WR.net Apprentice
 
Posts: 24
Joined: Wed Jul 05, 2006 11:02 pm

Re: "Recent Items" block

Postby Prometheus » Wed Jan 09, 2008 8:32 pm

Hmm...i'm really not any php coder and could use a little help with Reacent Items Block for Dragonfly also...
i have fiddled around some time and got it working in to the point where i get names and items from eqdkp database..

but i don't have a clue how to get itemstats working on the Block....and all ready/working Reacent item blocks seemed to use same database for forum and eqdkp so that made things hard for me because because i have different databases for eqdkp and forums....and as i said i'm not a coder and little lost currently so if someone could push me to right way how to get this Block working with itemstats/wowhead...here's what i have gotten together with ripping of some code blocks here and there =)

<?php

/**
* CPG Dragonfly CMS
*/

// protect against direct access
if (!defined('CPG_NUKE')) { exit; }

// Figuring out itemstats to work ???
require_once('./includes/nbbcode.php');
require_once('./header.php');
include_once('./modules/item_stats/itemstats.php');

// Starting the content of the block

$content .= "<table>\n";

/* Connect to eqdkp database */
$link = mysql_connect("localhost", "---sencored---", "--sencored---")or die("Could not connect : " . mysql_error());
mysql_select_db("dkpdb") or die('Could not select database');

/* Perform SQL query */
//Grab the last 10 items - Change 10 to whatever number you want
$query = 'SELECT item_buyer, item_name FROM eqdkp_items ORDER BY raid_id DESC LIMIT 0,10';

$result = mysql_query($query) or die('Query failed: ' . mysql_error());

while ($row = mysql_fetch_row($result)){
$content .= "<tr><td>$row[0]\n</td>";
$content .= "<td></td>"; //adding itemstats/wowhead tags
$content .= "\t</tr>\n";
}

// Free resultset
mysql_free_result($result);

// Closing connection
mysql_close($link);

//Closing Content Block
$content .= "</table>\n";

?>


So as you see from code...it work ok for now..it gets names of last winners and items they won and puts them to table...next i though i need to add those tags for item_stats parser to work....but proplematic is how to get itemparser scan this block for those tags ??

So if someone who has done these things could clarify me a bit...or just show me what the hell i have to do =)

* Running with DF 9.1.2.1 (too scared to upgrade if something custom fitted will brake)
* with item_stats module installed (altho i have standalone install for eqdkp also)

if you need any extra information pls ask i really could use some help =)
Prometheus
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Fri May 18, 2007 6:00 pm


Return to ItemStatsDF

Who is online

Users browsing this forum: No registered users and 1 guest

cron