News:

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

Main Menu

[TIP/TRICK] World of Warcraft itemstats + SMF 1.1.8

Started by harisk, March 23, 2009, 08:32:07 AM

Previous topic - Next topic

harisk

First of all what is itemstats?
This is based on:
Darcos Itemstats: http://forums.eqdkp.com/index.php?showtopic=1768 [nofollow]
Yahourt Itemstats: http://itemstats.free.fr/news.php [nofollow]
Featuring wowhead support: http://forums.eqdkp.com/index.php?showtopic=9342 [nofollow]

I spent much time getting a working itemstats package to work but the current versions are either not compatible with 1.1.8 or did not have the right results i wanted so i managed to install it myself (partially manually).

I want to share it with you all, since i bet atleats some would be interested.

Here are 15 simple steps to get it installed!

1.) Download itemstats.zip [nofollow]
2.) Download ItemStats1.5_smf.zip
3.) Unzip the itemstats.zip [nofollow] folder and open config.php.
4.) Change the database username, password and database name to match your MYSQL information and save & exit
5.) Upload the unzipped itemstats folder to your root SMF directory (do not only upload the contents of the itemstats folder but the folder itself otherwise this wont work).
6.) Go to your board -> admin -> packages -> Download Packages and upload the ItemStats1.5_smf.zip file you downloaded earlier
7.) Apply the mod after uploading & install (if you get errors at apply STOP the installtion).

If all went well continue to the next step

8.) Login with an FTP client to your SMF root/Sources
9.) Download Subs.php to your desktop
10.) Rename the Subs.php on your webserver to Subs.php-org
11.) Open the downloaded Subs.php on your desktop with an editor such as dreamweaver
12.)
Search for:
if (!defined('SMF'))
die('Hacking attempt...');


Before add:
// MODIFICATION, ItemStat http://itemstats.free.fr === by Yahourt / Thorkal == EU Elune / Horde =========
include_once($boarddir . '/smf_config_itemstat.php');
include_once($boarddir . '/' . path_itemstats . 'smf_itemstats.php');
//===========================================================================


13.)
Search for:
array(
'tag' => 'white',
'before' => '<span style="color: white;">',
'after' => '</span>',
),


Before add:
// MODIFICATION, ItemStat http://itemstats.free.fr === by Yahourt / Thorkal == EU Elune / Horde =========   
array(
'tag' => 'item',
'type' => 'unparsed_content',
'content' => '$1',
'validate' => create_function('&$tag, &$data, $disabled', '
                                                if (function_exists(\'itemstats_parse\'))
                                                    $data = itemstats_parse("[item]" . $data . "[/item]");'),
),
array(
'tag' => 'itemico',
'type' => 'unparsed_content',
'content' => '$1',
'validate' => create_function('&$tag, &$data, $disabled', '
                                                if (function_exists(\'itemstats_parse\'))
                                                    $data = itemstats_parse("[itemico]" . $data . "[/itemico]");'),
),
//========================================================================================================


14.)
Search for:
$context['common_stats'] = array(
'total_posts' => comma_format($modSettings['totalMessages']),
'total_topics' => comma_format($modSettings['totalTopics']),
'total_members' => comma_format($modSettings['totalMembers']),
'latest_member' => $context['common_stats']['latest_member'],


Before add:
// MODIFICATION, ItemStat http://itemstats.free.fr === by Yahourt / Thorkal == EU Elune / Horde =========
global $boardurl;
$context['html_headers'] .= "<link rel=\"stylesheet\" href=\"" . $boardurl . "/" . path_itemstats . getStrCssStyle() . "\" type=\"text/css\">\n
<script type=\"text/javascript\" src=\"" . $boardurl . "/" . path_itemstats . getStrTooltipStyle() . "\"><!-- overLIB (c) Erik Bosrup --></script>";
//========================================================================================================


Save & Exit
15.) Upload the edited Subs.php file to your  SMF/Sources directory

Done!

You can test it by posting a message with the BCC code [item]item name here[/item].

How to uninstall?

Uninstall in Admin -> Packages

Login with an FTP client
Delete /Sources/Subs.php
Rename /Sources/Subs.php-org to Subs.php
Delete /itemstats directory

That's it!

Good luck!

Harisk

HR


I can explain this as simply as possible.. If I do it & implement I guarantee it.
If I do it and you implement it its a crap shoot.

harisk


HR

Kewl, so exactly if I might ask what functionality does this add? I mean I dont think you can trade items.. so its just for displaying an items stats?

I can explain this as simply as possible.. If I do it & implement I guarantee it.
If I do it and you implement it its a crap shoot.

Adish - (F.L.A.M.E.R)

I think it is like a knowledge base. It helps understand what Item it is. Isnt it ?

harisk

#5
It makes it possible to link items from the game in form of tooltips on the forum itself.

It is just a cosmetical addon which makes it easier for people to understand what kind of statistics items have.

The link is displayed as normal (coloured) text and shows a tooltip when hoover over it.

Riggs

Question though.  I have a clean install of SMF 1.1.8, and I installed the WOW Itemstats package through the package manager, and it works just fine with Wowhead.  It was just updated today, so maybe this is why.  I did not have to do anything manually to get it working with Wowhead.  I just changed the option to Wowhead in the admin control panel.

harisk

Hey Riggs,

Aye its because of the update :).

Though, this way you have to do some changes yourself, but its only to 1 file while the package modifies several forum files.

It works both ways, package being the easiest and fastest :).

I just like to mess around with it and make it work manually :D.

Holyfrey

what about Inscription's glypfs how can I link that ? the normal way dont work.

Advertisement: