Version 1.x
Update: March 19th, 2010
SMF v1.x
- Download the latest version from here.
- Upload the wowhead folder to the base directory of your SMF installation.
- Point your browser to http://yoursite.url/wowhead/install/ and complete the installation procedure.
- Open Sources/Display.php, located relative to your SMF installation
- First:
// The central part of the board - topic display. function Display()
Before Add:// Wowhead Tooltips require_once(dirname(__FILE__) . '/../wowhead/parse.php');
- Find:
// Do the censor thang. censorText($message['body']); censorText($message['subject']); // Run BBC interpreter on the message. $message['body'] = parse_bbc($message['body'], $message['smileysEnabled'], $message['ID_MSG']);
After Add:// Wowhead Tooltip Parsing $message['body'] = whp_parse($message['body']);
- Save and close Sources/Display.php and reupload to your website.
- First:
- Open Themes/<your theme>/index.template.php located relative to your SMF installation and where <your theme> is the name of the theme you use.
- Find:
// Show all the relative links, such as help, search, contents, and the like. echo ' <link rel="help" href="', $scripturl, '?action=help" target="_blank" /> <link rel="search" href="' . $scripturl . '?action=search" /> <link rel="contents" href="', $scripturl, '" />';
After Add:echo ' <!-- Wowhead Item Links --> <link href="./wowhead/css/wowhead.css" rel="stylesheet" type="text/css" /> <script src="http://static.wowhead.com/widgets/power.js"></script> <link href="./wowhead/css/armory.css" rel="stylesheet" type="text/css" /> <script src="./wowhead/js/armory.js.php" type="text/javascript"></script>';
- Save and close Themes/<your theme>/index.template.php and reupload it to your website.
- Find:
- Enjoy the hard work you've done!!!
To Enable Parsing in Signatures (via Matt C.)
This has been tested to work in version 1.x and 2.x.- Open ./Sources/Load.php.
- Find:
// Set things up to be used before hand. $gendertxt = $profile['gender'] == 2 ? $txt[239] : ($profile['gender'] == 1 ? $txt[238] : ''); $profile['signature'] = str_replace(array("\n", "\r"), array('
After Add:
', ''), $profile['signature']); $profile['signature'] = parse_bbc($profile['signature'], true, 'sig' . $profile['ID_MEMBER']);if (!function_exists('whp_parse')) require_once(dirname(__FILE__) . '/../wowhead/parse.php'); $profile['signature'] = whp_parse($profile['signature']);
- Save and reupload to your site, making sure to overwrite the original file.
- Find:
NOTE
If you script does not function properly after you followed the installation instructions to the letter, then the problem is because SMF seems to be clearing the $GLOBALS variable, which is where the scripts config variables, from config.php are being stored. To fix this issue then you must do these additional steps.
- Open index.php located in the base directory of your SMF install.
- Find:
// Load the settings... require_once(dirname(__FILE__) . '/Settings.php');
After Add:require_once(dirname(__FILE__) . '/wowhead/config.php');
- Save and reupload index.php, making sure to overwrite the existing file.
- Find:
A note about SMF. I have noticed that if you do a quick edit or reply then the tag will not work until the page is refreshed. Just keep that in mind before you think that the script isn't working.