Itemstats 1.5 for Serendipity?

Creating and modifying plugins.
Post Reply
Nintendo Gal
Regular
Posts: 44
Joined: Wed Oct 19, 2005 10:09 pm

Itemstats 1.5 for Serendipity?

Post by Nintendo Gal »

Hey again,

I tried hacking Itemstats 1.5 into a guild site but was unsuccessful it seems.

This page:

http://itemstats.free.fr/e107_plugins/c ... content.24

indicates you need to add in the code to headers and some php, so what I did was added:

Code: Select all

include_once("./itemstats/generic_itemstats.php");
$message = itemstats_parse($message);
into the index.php file (in the main directory).

Then it says to add in a link rel:

Code: Select all

<link rel="stylesheet" href="itemstats/templates/itemstats.css" type="text/css"\><script type="text/javascript" src="itemstats/overlib/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>
So I added that into the index.tpl file. I didn't get any errors so I tried an entry and it left me with something like this:

Code: Select all

[item]Gloves of Holy Might[/item]
I'm not sure if I'm doing it right or not and would appreciate any help!

Also of interest if maybe one of these could make it be hacked easier:

http://itemstats.free.fr/e107_plugins/c ... ?content.6

Thanks for looking!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Itemstats 1.5 for Serendipity?

Post by garvinhicking »

Hi!

Uh. You'd need that itemstats code into a s9y plugin first. By placing itinto index.php it will never get a variable $message.

You could usethe nl2br markup plugin as a starting point for creating your own markup plugin?

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Nintendo Gal
Regular
Posts: 44
Joined: Wed Oct 19, 2005 10:09 pm

Post by Nintendo Gal »

I have this already on my phpbb forum (not that that really has anything to do with this) and it has its own BBCode insertion. So I was wondering if you think it'd be possible to hack the BBCode plugin to allow for this to be put in there?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Phew, I can'T tell, I would need toinvestigate the itemstats thing. Sadly I'm a bit ill right now and can't do that. If you would remind me mid-next week, I could have a look at it - because I really love your site, it's an important source for me and my Wii :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Nintendo Gal
Regular
Posts: 44
Joined: Wed Oct 19, 2005 10:09 pm

Post by Nintendo Gal »

Sorry to hear you're not feeling well.

No hurry on this as it is a side project and not a main focus though if anyone else has any input into this I'd love to hear it as well! :)
Nintendo Gal
Regular
Posts: 44
Joined: Wed Oct 19, 2005 10:09 pm

Post by Nintendo Gal »

Anyway I can convince anyone to look at this at all? I looked at the code and tried to understand how they work but quite frankly when it comes to "heavy coding" I'm easily lost I'm afraid.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

What's the goal of itemstats? Simply to use some Tag that is then replaced with custom text?

you can achieve that with native serendipity plugins already, like the 'glossary' event plugin or the 'content rewrite' plugin. Or even with the regexpmarkup plugin and custom regexp files....

So before implementing that code, you might want to use existing serendipity plugins that can do the same. I first thought itemstats was a tool to display statistics on entries, as the name would suggest :-D

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Nintendo Gal
Regular
Posts: 44
Joined: Wed Oct 19, 2005 10:09 pm

Post by Nintendo Gal »

The goal of itemstats is to display a tooltip-like snippet of information that contains an icon of an item as well as the stats of said item.

I kinda get where you're going with what you've said but as I'm not even sure how to use the tooltip/content rewriter plugin properly I'm still lost.

Here's a screenshot of what it's supposed to do:

Image

The problem I'm forseeing is that this is very complex due to all the Javascript libraries this requires. It's not just a simple tooltip mod which is why I think I'm struggling with this so much.
Nintendo Gal
Regular
Posts: 44
Joined: Wed Oct 19, 2005 10:09 pm

Post by Nintendo Gal »

Sorry about the double post, but I found a German blog that apparently hacked the Wordpress itemstats plugin to work with Serendipity:

http://wow.tnt-computer.de/index.php?ur ... %5D=linear

I'm wondering if maybe that might be easier and if it is, what's involved with converting a WP plugin to s9y, such as what would I need to modify/add and what could I get away with not touching.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Ah, cool. I know Thomas, so I'll ask him if he can offer the plugin for download to you!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
nesges
Regular
Posts: 7
Joined: Tue Mar 06, 2007 1:57 pm
Location: Bonn/Lünebach
Contact:

Post by nesges »

Hello everybody!

Thanks for your email Garvin, nice to hear from the s9y community once again :)

The mentioned plugin is a wrapper round a wrapper. Seriously, Pieter Walsweer did a Wordpress plugin that utilizes Itemstats to show itemstats from Allakhazam (no WoW Junkie? go get one!) on http://www.gamersliving.com/wowblog/. I just picked up that one, wrote a wrapper for S9Y framework and changed data retrieval from Allakhazam to Blasc (buffed.de). My goal was to change as little as possible to make one plugin that works in both WP and S9Y without having to change anything after.

Unfortunately I'm a bit the quick and dirty guy and I tend to reuse everything I ever wrote by linking over the whole filesystem on my webspace... I tried to clean up, but if anything is missing in the package, please drop me a note!

Package? What Package? Here you go! -> http://www.soeldnerdesschattens.de/uplo ... mstats.zip <-

You just have to unzip into your plugins folder and create the table described by the tables.sql file. Feel free to use and enjoy! :) And if something is broke: please let me know!

Thomas
Nintendo Gal
Regular
Posts: 44
Joined: Wed Oct 19, 2005 10:09 pm

Post by Nintendo Gal »

I could kiss you both right now! Thank you so much for this, it seems to work perfectly for me!

I think I'll stash the zip away just in case one day the URL doesn't work any longer so that others who may come looking for it will find it.

Thanks again so much!! :D :D
sl4ppy
Regular
Posts: 5
Joined: Tue Mar 13, 2007 6:40 pm

Post by sl4ppy »

Any chance at an english version? I've attempted to modify the blasc.php to point back to Allakhazam, but without much luck. The rollovers are still in german.

Thanks in advance!
sl4ppy
Regular
Posts: 5
Joined: Tue Mar 13, 2007 6:40 pm

Post by sl4ppy »

I have written a sidebar plugin that queries an EQDKP installation and displays the last 5 raid encounters, and the last 10 recorded loot distributions complete with ItemStats rollovers, if you so choose. (yes, its optional)

It has a convenient customization page for font colors and headings, as well as your SQL EQDKP settings...

You can check it out an example at www.cascaders.com on the left hand sidebar, 2nd down, and you can download the plugin to try out here.
Post Reply