News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Mod: [item]name[/item] for World of Warcraft

Started by hugocz, November 04, 2005, 12:26:08 AM

Previous topic - Next topic

hugocz

hi, i've seen a cool phpbb mod that i would love in SMF:)

You simply type [item]name[/item] and it read's the item data from http://wow.allakhazam.com/ and show on mouse over, here's an example: http://wow.rytir.com/tmp/woodoo.jpg

Thanks :)

JayBachatero

Some one else asked for this too.  Can you show me a link to the mod.  Ill try to do sumthing but i dont garantee it.
Looking for a little help
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert


DarkCloud14

Hi I'm already working on a conversion of itemstats 1.2
At the moment you can see an example here: http://www.deadkings.darkcloud14.de/forum/index.php?topic=7.0
now I'm rewriting/changing some things so it fits better into SMF ...

JayBachatero

Its comming out real nice.  Good job.  Take a look at this tool to help you turn it into a MOD.
Package SDK, anyone?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

hugocz

Quote from: DarkCloud14 on November 10, 2005, 07:44:37 PM
Hi I'm already working on a conversion of itemstats 1.2
At the moment you can see an example here: http://www.deadkings.darkcloud14.de/forum/index.php?topic=7.0
now I'm rewriting/changing some things so it fits better into SMF ...

Cool thanks DarkCould looks perfect :)))  where you post it when it will be done pls ?

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

DarkCloud14

Hi again,

I'm a bit busy at the moment so it will take a bit longer than
I though first... I'll try to get it done until Friday or Saturday this week.


alianos

Ya the someone else that asked this already would be me 2 months ago. I never got an answer though  :(

It looks great mate, hope we can get it soon. Cheers

tattooedpierre

I too would love this. My guild recently asked if this could be implemented on the forums since we use the same feature on our eqdkp mini-site.


know1

#12
OK I've got this to work, even if it is in a rudimentary fashion, IE it changes the tags in a <code></code> block when it shouldn't etc. etc. but for the most part works fine.

Modifications necessary are:

Themes/Your_Theme_Name/index.template.php
Find the Line:
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />

Insert After:
<link rel="stylesheet" href="../itemstats/templates/itemstats.css" type="text/css">
<script type="text/javascript" src="../itemstats/overlib/overlib.js"><!-- overLIB © Erik Bosrup --></script>';
Note: My itemstats is install a directory above my SMF installation you might need to try ./itemstats/overlib/overlib.js


Sources/Display.php
Find the Lines:
if (!defined('SMF'))
   die('Hacking attempt...');

Insert After:
include('../itemstats/phpbb_itemstats.php');
Note: my itemstats is install a directory above SMF if you install it in the SMF directory you might need to try ./itemstats/phpbb_itemstats.php

Find the lines:
// Run BBC interpreter on the message.
$message['body'] = parse_bbc($message['body'], $message['smileysEnabled'], $message['ID_MSG']);

Insert After:
$message['body'] = strtr($message['body'], array('&#039;' => '\''));
$message['body'] = itemstats_parse($message['body']);

Hopefully that will help some people out. I probably wont read this thread in a long time, so I wouldn't hold your breath if you have any questions, but I saw it here when I was looking for some answers and coudln't find any. So when I got it working myself I thought I'd share what I did.

myndcraft

Darkcloud... I checked your example and that works great!

Do you plan on packaging it anytime soon?

tattooedpierre

Thanks for posting that code, however, I'm having problems getting it to work :( .. i'm getting back:

Parse error: parse error, unexpected T_FUNCTION in /home/theinfe/public_html/smf/Sources/Display.php on line 67

.. any ideas?

DarkCloud14

I was lazy in the last time but I'm working on it again.
There are some problems that I've to solve before I'll release
something. Another thing is that wow.allakhazam.com changed
some things in their xml files.

know1

Quote from: tattooedpierre on December 07, 2005, 05:48:38 PM
Thanks for posting that code, however, I'm having problems getting it to work :( .. i'm getting back:

Parse error: parse error, unexpected T_FUNCTION in /home/theinfe/public_html/smf/Sources/Display.php on line 67

.. any ideas?

I missed a ; off the end of the include line, try adding that, see how it goes. Also updated my post.

myndcraft

Quote from: DarkCloud14 on December 08, 2005, 03:30:09 AM
I was lazy in the last time but I'm working on it again.
There are some problems that I've to solve before I'll release
something. Another thing is that wow.allakhazam.com changed
some things in their xml files.

Thanks for the update :D

tattooedpierre

Quote from: know1 on December 09, 2005, 12:02:55 AM
Quote from: tattooedpierre on December 07, 2005, 05:48:38 PM
Thanks for posting that code, however, I'm having problems getting it to work :( .. i'm getting back:

Parse error: parse error, unexpected T_FUNCTION in /home/theinfe/public_html/smf/Sources/Display.php on line 67

.. any ideas?

I missed a ; off the end of the include line, try adding that, see how it goes. Also updated my post.

Thanks so much ;) .. its showing me the allakhazam link now, cheers! However.. (and I'm sorry to be a pain).. it's not showing me the mouseover tooltip? is this a limitation of this implementation?

DarkCloud14

Quote from: tattooedpierre on December 10, 2005, 03:06:35 PM
Quote from: know1 on December 09, 2005, 12:02:55 AM
Quote from: tattooedpierre on December 07, 2005, 05:48:38 PM
Thanks for posting that code, however, I'm having problems getting it to work :( .. i'm getting back:

Parse error: parse error, unexpected T_FUNCTION in /home/theinfe/public_html/smf/Sources/Display.php on line 67

.. any ideas?

I missed a ; off the end of the include line, try adding that, see how it goes. Also updated my post.

Thanks so much ;) .. its showing me the allakhazam link now, cheers! However.. (and I'm sorry to be a pain).. it's not showing me the mouseover tooltip? is this a limitation of this implementation?

its because allakhazam changed their xml files.. you need to change some things in allakhazam.php ...

tattooedpierre

Cheers, downloaded the fix for itemstats; now its working perfectly ;) .. much appreciation from myself and www.theinfernals.org.uk guild!

Omnidragon7

#21
hi there i have tried everything that you have listed but i am still unable to get the Mouse over to ork i also get a debug error on this line
class=\'akznotice\'>Item display is courtesy <a target=\'_new\' href=\'hxxp:wow.allakhazam.com/%5C' [nonactive]>wow.allakhazam.com</a>.</span></div>      </td>   </tr></table>',VAUTO,HAUTO,FULLHTML);" onmouseout="return nd
saying VAUTO was unrecoganised

and DarkCloud14  and chance you could post the work you have done so far?

DarkCloud14

Hmpf I won't release something thats buggy at the moment
but Ok I try to get everything done this week. If not I will release
everything I've done till then but don't worry I'll keep on getting it done then..

Is that Ok for you ?!?

myndcraft

Quote from: DarkCloud14 on December 14, 2005, 05:46:10 PM
Hmpf I won't release something thats buggy at the moment
but Ok I try to get everything done this week. If not I will release
everything I've done till then but don't worry I'll keep on getting it done then..

Is that Ok for you ?!?

YOu would be my personal hero

Omnidragon7

That would be great dude and thnx for teh effort u have put in

DarkCloud14

Ok People pls don't cry I have changed my opinion.
I will release everything on Wednesday 21 December..

I've now more time because I got vacation. That's why I'll use
Monday and Tuesday to test everything and I'll hope I'll find the
worst bugs and make a smf package...

Hope thats OK for you too..


myndcraft

Quote from: DarkCloud14 on December 17, 2005, 10:46:39 PM
Ok People pls don't cry I have changed my opinion.
I will release everything on Wednesday 21 December..

I've now more time because I got vacation. That's why I'll use
Monday and Tuesday to test everything and I'll hope I'll find the
worst bugs and make a smf package...

Hope thats OK for you too..

If it works I'm filling you in for write-in president :D

tattooedpierre

For those that dont want wait...

Instructions

Firstly, go here and get ItemStats addon. If the url doesnt work, google for it or goto curse-gaming to download it.

Next, you'll need to edit two SMF files. In index.template.php of your chosen theme find:


<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

(it basically just after the meta data listings in the file).. before this line, add:


   <link rel="stylesheet" href="http://yourpathhere/smf/itemstats/templates/itemstats.css" type="text/css">
<script type="text/javascript" src="http://yourpathhere/smf/itemstats/overlib/overlib.js">
<!-- overLIB © Erik Bosrup --></script>


... obviously amend the paths so they are pointed to the correct file locations. Next, in smf/sources/display.php, find:


if (!defined('SMF'))
die('Hacking attempt...');


.. after this line add:


include('./itemstats/phpbb_itemstats.php');


Again, ensure this is the correct path. The setup file for itemStats itself contains some data you need to look at too. Looking at my file, I have this:


<?php

// The location and extension type for the Icon store.
define('ICON_STORE_LOCATION''http://www.theinfernals.org.uk/info/dkp/images/icons/');
define('ICON_EXTENSION''.png');

// Database config
define('dbhost''localhost');
define('dbname''theinfe_dkp');
define('dbuser''theinfe_dkp_user');
define('dbpass''xxxxxxxxxx');
define('item_cache_table''item_cache');

?>



The ICON_STORE_LOCATION I have changed simply because I downloaded my own copy of the WoW icons, to spare allakhazam the bandwidth. If you cant do this then dont change it from what it is defaulted to (the allakhazam url).

The other fields are pretty simple. I have eqdkp setup on my site so I've simply told itemstats to add a table into the eqdkp database I already have to store our mouse-over item details. Dead easy. Of course, you'll need to tell itemstats what the table is, the username and password to use it and obviously the database name itself. If you wish you can have a totally seperate database just for itemstats.

Assuming you've done everything all ok, and you've downloaded itemstats fine this should work, all you need to do is post something with [item]Crescent Staff[/item] .. for instance. Make sure the name is EXACT!!! This is very important. As soon as you post it, itemstats will try to pull the data from allakhazam. If you've mis-spelt the item you may have to manually go into your SQL table and delete the entry and try again.

Hope thats helps ;)

DarkCloud14

I hate these site changes...
It seems Allkahazam or the german WoW-Handwerk.de site changed
something in the XML files again cause my code don't work anymore
already working on it damn

tattooedpierre

Quote from: DarkCloud14 on December 22, 2005, 07:58:50 AM
I hate these site changes...
It seems Allkahazam or the german WoW-Handwerk.de site changed
something in the XML files again cause my code don't work anymore
already working on it damn

Seems to be working fine for me.

DarkCloud14

#31
Ok I got everything packaged and uploaded here:
http://mods.simplemachines.org/index.php?mod=247

or if the link doesn't work you can get the packe here:
http://www.darkcloud14.de/itemstats/smf_itemstats_v_1_21.tar.gz

or the zipped version:
http://www.darkcloud14.de/itemstats/smf_itemstats_v_1_21.zip

you can post problems here or better pm me..

have fun..

hugocz

Thanks alot for your work man, going test it out  :)

revgreed

This works perfectly.

If anyone wishes to see a working demo on SMF 1.1 RC 1, then go here:

http://www.sinning.org/forum/index.php?topic=1089.0

hugocz

Also i use standalone itemstats with own mysql databse, for my EQDKP, is  there any way to modify the script so it use the database too like eqdkp  ???

DarkCloud14

#35
Yeah if you wish I can also release a version where you can
set the db etc. I just did that so you can install the package
and start immediately ...

Ah I've an idea how to merge both together

DarkCloud14

#36
Before you install this version please uninstall the old v1.0

Ok you can get the latest version here:
http://mods.simplemachines.org/index.php?mod=247

or here:
http://www.darkcloud14.de/itemstats/smf_itemstats_v_1_21.tar.gz

or the zipped version:
http://www.darkcloud14.de/itemstats/smf_itemstats_v_1_21.zip

----------- Itemstats table -----------
In this version a shared itemstats table is possible again.
To enable it first set $wowshared_itemcache_table to 1 in 'Settings.php'
After that set the needed parameters in <Forum Path>/Sources/itemstats/config.php

You only need this if you want to use a shared itemstats table..


Please make a backup before you do the following steps..

If you already have another itemstats table you must modify it a bit to get it to work.
Add the following fields after the item_name field:
`item_id` varchar(100) default NULL,
`item_source` varchar(5) NOT NULL default '0',
`item_method` varchar(5) NOT NULL default 'find',

and this one after item_html field:
`item_found` varchar(5) NOT NULL default '0',

Then you must set the item_found field to 1 for every found item else you'll delete
every item when using the Delete option in Forum Maintenance

Omnidragon7

hi i have updated to SMF 1.1 RC1 and installed the package and it works fine apart from i get no tooltip and no colouring of the item i can click the tiem and it takes me to the allakhazam webpage at teh right item but still no colour or tooltip ne cahnce of help?


alianos

i tried to install it (the old one, downloaded from the second link) but i get this error

Package Manager - Install Actions
Install Actions for archive smf_itemstats_v_1_1.tar.gz:
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

I use SMF 1.0.5, I have to upgrade?

Happy holidays everyone.

DarkCloud14

#40
Uhm yeah the package is for SMF 1.1 RC1 only cause I don't have SMF 1.0.5
But if you have the time you can extract the files and modify your Forum manually

Or maybe after Christmas I'll do a package for SMF 1.0.5 but just maybe.. Sorry

Omnidragon7

#41
hxxp:www.rexus-terra.e3emu.com [nonactive]
thats teh forum im tryin to get it working on

Ok it has to be something wrong witht the theme as wen i switch back to the original theme it works fine
oh the theme i'm tryign to use if the helios multi theme

DarkCloud14

#42
Ah thats the problem cause I've changed the index.template.php
there I've added the following two lines:

<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/itemstats/overlib/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>


after the following snippet from the original code:
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?rc1"></script>

you've to find the right place in the themes index.template.php and add the first code snippet...

another thing you've to add is the following:

<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/itemstats/templates/itemstats.css" />

I've added it after the following snippet of the original code:

<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc1" media="print" />



If someone knows a better place to add these two pieces of code to get it theme independent please tell me..


tattooedpierre

Quote from: DarkCloud14 on December 24, 2005, 04:47:47 PM
If someone knows a better place to add these two pieces of code to get it theme independent please tell me..

As far as I know there isnt a quicker way :( .. I just had to go through all the themes my site uses and add the line in grr.

Thantos

QuoteIf someone knows a better place to add these two pieces of code to get it theme independent please tell me..
$context['html_headers']

DarkCloud14

#46
Ok I've made it now almost theme independent
please uninstall any previous version and if possible delete the things
you've maybe changed in the other themes index.template.php ....

you can get the latest version here:
http://mods.simplemachines.org/index.php?mod=247

or here:
http://www.darkcloud14.de/itemstats/smf_itemstats_v_1_21.tar.gz

or the zipped version:
http://www.darkcloud14.de/itemstats/smf_itemstats_v_1_21.zip


The only Theme dependent things are the admin options...
You can only use them with the default theme if you don't add
them manually to your other themes...

Is it possible to make them theme independent too ??

DarkCloud14

#47
Ok guys I've installed a smf forum where you can discuss
new features and test the current wowitemstats version...

http://darkcloud14.de/forum/index.php

I'll release an updated version for 1.1 RC2 and maybe a version for 1.0.5 too this week...

myndcraft

Greetings Darkcloud!

First of all let me tell you I LOVE your mod and for the most part its working like a champ!

The problem though is occasionally the function is not working and I can't figure out why.
For example if you look at this thread

http://denovoforums.org/forums/index.php/topic,298.0.html

it worked. However if you look at this thread

http://denovoforums.org/forums/index.php/topic,301.0.html

It did not work. The post still took a while to load as if it was getting the information, but
the rollover links do not work like intended. I even tried changing the links from the item
name to the item number as that had worked in the past, but it did not work this time.

Also as you can see I'm using a non-standard layout. I'm not sure what I need to add to view the
admin options because even if I change to the standard theme I don't see any options anywhere,
but I could just be looking in the wrong place I suppose.

So hopefully you can help me with these two issues.

Regards,

myndcaft

Advertisement: