Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Garou on March 28, 2009, 04:31:05 AM

Title: WoW - World of Warcraft Tooltips
Post by: Garou on March 28, 2009, 04:31:05 AM
WoW - World of Warcraft Tooltips v1.4
By Garou (http://custom.simplemachines.org/mods/index.php?action=profile;u=60251)


Support topic (http://www.simplemachines.org/community/index.php?topic=301619.0) | Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1633) | Demo (http://smf.balancegames.net)



Introduction:
This Mod provides several ways to add World of Warcraft tooltips to your site using the Wowhead Power Java script.

Features:
Users can enter any item url from www.Wowhead.com (http://www.wowhead.com) and will see a tooltip with the item's statistics hover over the post.

When clicked on, users will be taken to Wowhead's page for the item.

There are several ways tooltips can be entered using by links from wowhead.com

For instance the Lightbringer Faceguard can be entered in a post as...
http://www.wowhead.com/?item=30987 (http://www.wowhead.com/?item=30987)

Alternatively BBS codes can be used to make links easier to read...
Lightbringer Faceguard (http://www.wowhead.com/?item=30987)
Would be entered like...
[url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url]

A new wow BBC code and button has also been added allowing your users to enter...
[wow]Item Name[/wow]
or
[wow]Item Number[/wow]

The text will display in the post with the text in items quality color and the tool tip.

Note: Quests, Spells, and Achievements are not currently supported using the wow bbc only direct links.

Install:
To install, simply upload the entire zip file to the package manager (Admin -> Package Manager -> Download New Packages).

Your site must have libcurl or fopen in order for this mod to work.

To install the WoW - Tooltips mod on custom themes...

Copy the ./themes/default/images/bbc/wow.gif to the /images/bbc of your theme directory.

Open the themes ./index.template.php
add...
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script></script>

before...
</head>

Open the themes /languages/Modifications.english.php
and add...
$txt['wow'] = 'WoW Tooltip';>
before...
</?>

Note: Some custom themes deviate from the standard index.template.php and may look like...
      // ]]></script>';

   echo '
</head>

replace with...
      // ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

   echo '
</head>


If you are using 1.1.x you will also have to modify your themes ./Post.template.php
add...
'wow' => array('code' => 'wow', 'before' => '[wow]', 'after' => '[/wow]', 'description' => $txt['wow']),
before...
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),


Known Issues:
For some users, if your forum is not in the root directory for your website this mod may not work correctly. Copying the wow folder found in yoursite.com/yourforum/wow to yoursite.com/wow will fix this in many cases.

Some hosts for security reasons will require you to set the file permissions (chmod) for the wow folder and the files within to 644 or rw-r-r.

Having Search Engine Friendly URLs turned on can cause the mod to fail.

Many web-hosts are using a utility known as ModSecurity to help protect the sites they host from hackers. Unfortunately ModSecurity is made overly secure and often can create false positives for many web programs including this one. You have have to contact your host and have them read http://blog.modsecurity.org/2007/02/handling-false.html. It will help them to create a personal rule for ModSecurity that recognizes the files in the wow folder as safe.

Compatibility:
Tested under SMF Versions 1.1.8 - 1.1.10 and 2.0 RC1 - 2.0 RC2

Credits:
Thanks to the team at Wowhead (http://www.wowhead.com) for writing the Powered by Wowhead Script.
Also thanks to Horris (http://mattmayers.com/) for writing the phpBB mod that this mod is based on, as well as the included wowhead scripts in the wow folder.

Change log:
Version: 1.4 April 18, 2010
* Modified to work with changes at Wowhead.

Version: 1.3 January 1, 2010
Added Item ID's to the wow bbc code to make it easier to link to the exact item you are looking for. Thanks to Axodious (http://www.simplemachines.org/community/index.php?action=profile;u=162342) for providing the code.

Version: 1.2 November 09, 2009
* Updated to be compatible with SMF 2.0RC2 as some of the hooks that this code attaches to have been changed.

Version: 1.1 March 28, 2009
  Wowhead support added
  Interface made more simple by using Wowhead wrapper and linker Java Scripts
* Button Changed from a Thottbot specific button to a World of Warcraft button
*! All Thottbot options removed from 2.x due to conflicts with the thottbot power.js and 2.x
> Thottbot support may be re-added at a later date, when conflicts can be resolved

Version: 1.0 February 10, 2009
   Adds the Powered by Thottbot java script to the index.template.php
   Adds the [thott=][/thott] bbc code
   Adds a button for easier usage of the bbc code

Change log:
Legend:
! bug fix
  added feature
* changed
> comment



Most issues can be fixed by referring to this post
Quote from: Garou on February 12, 2011, 01:42:02 PM
I have had it running on my guilds website for several months now, using RC4 and the current version of the mod.

The mod installs using some generic coding that works for most sites but sometimes you get better results by customizing it to run on your site.

Make sure the wow folder is in the root directory of your site, example yoursite.com/wow. Due to the limitations of SMF the mod can not place it there for you, as such it gets installed forums root directory which may not be the root for your site.

Using direct links to the wow folder in your themes ./index.template.php sometimes works better then the defaults. find and change to...
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="http://yoursite.com/wow/jquery-1.3.2.min.js"></script>
<script src="http://yoursite.com/wow/wowhead_linker.js"></script></script>


./Sources/Subs.php also has a line that uses a generic link
'content' => '<b><a style="background-color:#303030" href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

Change to...
'content' => '<b><a style="background-color:#303030" href="http://yoursite.com/wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

After that it comes down to your hosts specifications for file permissions and applying that to the contents of the wow folder, usually 655 or 644 will work.

Customizing the mod to your site as outlined above will fix most possible issues. Checking the error log provided by your host (not the one in SMF) will usually tell you exactly what is wrong.

The one potential issue that there is nothing I can do to fix, depends on if your host is using mod_security along with certain rules sets. Some of the java code used in the mod to find an item by name or number and set the color of the link based on the items quality, triggers false positives as an injection script under certain rules for that program.

The codes used by this mod are completely safe and will not harm your site or their server in anyway. However as some malicious hackers out there sometimes use similar coding, some rule sets for mod_security will block the scripts the mod uses from running. You either have to get your host to white list the scripts in the wow folder as safe (the preferred method). You can also get them to turn off those particular rule sets but that can potentially open up your site to attacks by others.

The mod_security issues and fixes were posted long ago on their official blog. http://blog.modsecurity.org/2007/02/handling-false.html
Title: Re: WoW - World of Warcraft Tooltips
Post by: Riggs on March 28, 2009, 07:49:40 PM
WOOT!  Perfect!  Couldn't be any easier.  :)  Thank you SO MUCH!
Title: Re: WoW - World of Warcraft Tooltips
Post by: KillerZ on March 28, 2009, 08:19:01 PM
I get this an error trying to install

3. Execute Modification ./Themes/default/index.template.php Test failed

I am not going to use the default theme so will this make any difference? Also I am using 1.1.8 and the ironwow theme. Thanks. Looks great and worked perfect on my test site.
Title: Re: WoW - World of Warcraft Tooltips
Post by: dr.wills on March 28, 2009, 08:51:01 PM
 :D would really be useful for a game forum
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on March 28, 2009, 09:53:28 PM
Thank you Riggs.  :)

KillerZ, On every theme you use on your site you will need edit the index.template.php
find...
</head>
Then enter
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script>

just before that.

The install on the mod actually looks for a blank line before the close head tag, I'm pretty sure that's whats causing your error and Ill have to fix that at some point. Just install anyway and manually install the code above.

LOL akaiphan, that's exactly why I ported it over to SMF.

The reason I tracked this down and ported it over to SMF is twofold. Darkcloud hasn't updated the Itemstats mod over to 2.0 yet and one of the guild sites I work on is upgrading. The other is that this mod doesn't require you to store the Item info in your database. It just pulls it directly from Wowhead. I prefer it that way.  :)

Title: Re: WoW - World of Warcraft Tooltips
Post by: Riggs on March 29, 2009, 04:01:06 PM
Quote from: Garou on March 28, 2009, 04:31:05 AM
To install the WoW - Tooltips mod on other themes...
Open the themes /index.template.php
add...
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.2.1.js"></script>
<script src="wow/wowhead_linker.js"></script></script>

before...
</head>

Open the themes /languages/Modifications.english.php
and add...
$txt['wow'] = 'WoW Tooltip';>
before...
</?>

You will also have to copy the ./themes/default/wow folder to your theme directory,
also you will have to copy the ./themes/default/images/bbc/wow.gif to the /images/bbc of your theme

directory.

If you are using 1.1.x you will also have to modify your themes /Post.template.php
add...
'wow' => array('code' => 'wow', 'before' => '[wow]', 'after' => '[/wow]', 'description' => $txt['wow']),
before...
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),


Couple things with this....

The wow folder (at least for me) was found in the root directory.  I couldn't find a wow folder in themes/default.  My theme also doesn't have a languages/Modifications.english.php file.  I also couldn't find the Post.template.php file for my theme.

Here's my site btw....

http://ratemyui.net

I'm trying to get it to work with Dziner's Overview Theme
Title: Re: WoW - World of Warcraft Tooltips
Post by: Degilion on March 30, 2009, 05:35:48 AM
is their a way to use this mod WITHOUT the function fopen() ??
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on March 30, 2009, 08:20:38 AM
Riggs, I forgot that the WoW folder goes to the boarddir, You wont need to copy that over, sorry.

If your theme doesn't have its own language files or Post.template.php then SMF should use the ones in the default theme. Essentially you should just have to put JavaScript includes before the close head tag.

If that doesn't do it then Id say copy your Language files and the Post.template.php from the defult theme to your custom theme.

Degilion, the scripts that make this mod so easy where you just have to add the name and the mod does the rest, changing the color and providing the link to the item on Wowhead, requires either fopen or for curl to be installed on your server. Curl is actually the preferred method according to the guy that wrote the original scripts for the phpbb version of the mod.

Thanks to a tip from the SMF Customization Team the mod will check to see if curl is installed on the server and if not then it will try to use fopen (prior to that admins had to manually edit the scripts to switch to fopen). If neither is installed then the mod won't work as intended. However the standard links to Wowhead should work, they just don't look as nice. :(
Title: Re: WoW - World of Warcraft Tooltips
Post by: KillerZ on March 30, 2009, 03:27:14 PM
I installed and did the edits to the index.template.php but when I make the links they all come up light blue with no mouseover. If I click them I get a page looking like this

<?xml version="1.0" encoding="UTF-8" ?>
- <wowhead>
- <item id="40343">
- <name>
- <![CDATA[ Armageddon
  ]]>
  </name>
  <level>213</level>
  <quality id="4">Epic</quality>
- <class id="2">
- <![CDATA[ Weapons
  ]]>
  </class>
- <subclass id="8">
- <![CDATA[ Two-Handed Swords
  ]]>
  </subclass>
  <icon displayId="54560">INV_Sword_104</icon>
  <inventorySlot id="17">Two-Hand</inventorySlot>
- <htmlTooltip>
- <![CDATA[ <table><tr><td><b class="q4">Armageddon</b><br /><!--bo-->Binds when picked up<table width="100%"><tr><td>Two-Hand</td><th>Sword</th></tr></table><table width="100%"><tr><td>554 - 831 Damage</td><th>Speed 3.40</th></tr></table>(203.7 damage per second)<br />+101 Strength<br />+108 Stamina<!--e--><!--ps--><br />Durability 120 / 120<br />Requires Level 80</td></tr></table><table><tr><td><span class="q2">Equip: Improves critical strike rating by 58&nbsp;<small>(<!--r80:32:58-->1.26%&nbsp;@&nbsp;L80)</small>.</span><br /><span class="q2">Equip: Improves haste rating by 100&nbsp;<small>(<!--r80:36:100-->3.05%&nbsp;@&nbsp;L80)</small>.</span></td></tr></table>
  ]]>
  </htmlTooltip>
- <json>
- <![CDATA[ id:40343,name:'3Armageddon',level:213,reqlevel:80,dps:203.7,speed:3.40,slot:17,source:[2,5],sourcemore:[{t:2,ti:181366,n:'Four Horsemen Chest',z:3456,dd:2},{t:1,ti:26309,n:'Weapons Vendor'}],classs:2,subclass:8
  ]]>
  </json>
- <jsonEquip>
- <![CDATA[ slotbak:17,displayid:54560,reqlevel:80,dmgmin1:554,dmgmax1:831,dmgtype1:0,speed:3.40,critstrkrtng:58,hastertng:100,str:101,sta:108,dura:120,dps:203.7,buyprice:1238412,sellprice:247682,mledps:203.7,mledmgmin:554,mledmgmax:831,mlespeed:3.40
  ]]>
  </jsonEquip>
  <link>http://www.wowhead.com/?item=40343</link>
  </item>
  </wowhead>


Would it be that the required programs are not installed on the server? My test server and this one are not on the same host so I am not sure. Thanks again.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Riggs on March 30, 2009, 08:57:47 PM
Could you take a look at my site?  http://ratemyui.net.  I've done as you say in your directions by adding the script lines before the </head> command.  When I look at the site's source, I'm seeing the code for the scripts, but it's not working on the theme, only the default SMF theme.  When looking at the link for one of the items in my test post, I am getting this:

http://ratemyui.net/wow/wowhead_wrapper.php?item=Sharp-Barbed%20Leather%20Belt

instead of what I should be getting, which is just the link to the item on Wowhead.  Thanks for the help!  I really do appreciate it.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on March 31, 2009, 02:15:07 AM
Ok Riggs and KillerZ, after testing the IronWoW and the Overview themes, both have the exact same issue.

The index.template.php for both looks like this at the end head tag...
// ]]></script>';

echo '
</head>


The fix is...
// ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

echo '
</head>


This code fixed both themes on my test site. If you still have problems let me know.

Title: Re: WoW - World of Warcraft Tooltips
Post by: KillerZ on March 31, 2009, 04:02:37 AM
Garou, I did this and it still seems to do the same thing for the links. All are shown as a light blue color and with no mouseover. Here is my index.template.php just to take a look to make sure it is the same as you have. Thanks for all the help.

<?php
// Version: 1.1.6; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1.6';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings$boardurl;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<!-- WoWHead MouseOver-Tooltip --><script src="http://www.wowhead.com/widgets/power.js" type="text/javascript"></script><!-- /WoWHead MouseOver-Tooltip -->
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// 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'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';


// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> '
;

     echo '

</head>
<body>
  <div id="container">
<div id="header">
 <div id="head-l">
  <div id="head-r">
 <div id="welcome">'
;
if (!empty($context['user']['avatar']))
 echo '<div id="avatar">'.$context['user']['avatar']['image'].'</div>';
if ($context['user']['is_logged'])
{
echo '<b>'$txt['hello_member'], ' '$context['user']['name'], '</b><br />';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt[152], ' <a href="'$scripturl'?action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt[153] : $txt[471], '</a>'$txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
echo '<a href="'$scripturl'?action=unread">'$txt['unread_since_visit'], '</a><br /><a href="'$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
'
$txt['welcome_guest'], '
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>
<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user"  size="10" />
<input type="password" name="passwrd"  size="10" />
<input type="submit" value="'
$txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>'
$txt['smf52'], '<br /><br />';
}
echo '
 </div>'
;
echo '
<a href="'
.$scripturl.'" title=""><span id="logo"> </span></a>';
echo '
</div>
  </div>
 </div>
<div class="catbg">
  '
template_menu(), '
  </div>
 <div id="main-l">
  <div id="main-r">
<div id="mainarea">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt$user_info;

  echo '
</div>
</div>
</div>
 <div id="footer">
  <div id="footer-left">
 <div id="footer-right">
  <div id="footerarea" style="font-size: smaller;">
 '
theme_copyright(), '
 <br />IronWoW by <a href="http://www.jpr62.com/theme/index.php"><b>Crip</b></a><br /><i>All images are proprieties of their respective owners ( <a href="http://www.blizzard.com/us/">Blizzard Entertainment</a></i> )</div>'
;

// Show the load time?
if ($context['show_load_time'])
echo ''$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'];

echo '
  </div>
  </div>
  </div>'
;
echo '
</div> 
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-left: 1ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' &raquo; ';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';

if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>'
;

// Show the [home] button.
echo '
<td class="mainnav"><a href="'
$scripturl'">' $txt[103] , '</a></td>';

// Show the [Forum] button.
echo '
<td class="mainnav"><a href="'
$scripturl'?action=forum"><span>Forum<span></a></td>';

// How about the [Gallery] button?
if ($context['allow_search'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=gallery"><span>Gallery<span></a></td>';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=admin">' $txt[2] , '</a></td>';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=profile">' $txt[79] , '</a></td>';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong><blink>'$context['user']['unread_messages'] . '</blink></strong>]' '' '</a></td>';

// The [calendar]!
if ($context['allow_calendar'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a></td>';

// the [member] list button
if ($context['allow_memberlist'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=mlist">' $txt[331] , '</a></td>';

// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=login">' $txt[34] , '</a></td>';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '
  <td class="mainnav"><a href="'
$scripturl'?action=register">' $txt[97] , '</a></td>';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
  </td>'
;

// The end of tab section.
echo '
</tr>
</table><div style="clear:both;">
 </div>'
;


}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="maintab_back">'
implode(''$button_strip) , '</td>';
}

?>
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on March 31, 2009, 11:54:18 AM
That looks right

I forget does the mod work on the default them for you or not?

Here is the code exactly as it is on my test site.
<?php
// Version: 1.1.6; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1.6';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings$boardurl;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// 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'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';


// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>

 <script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> '
;

echo '
</head>
</head>
<body>
  <div id="container">
<div id="header">
 <div id="head-l">
  <div id="head-r">
 <div id="welcome">'
;
if (!empty($context['user']['avatar']))
 echo '<div id="avatar">'.$context['user']['avatar']['image'].'</div>';
if ($context['user']['is_logged'])
{
echo '<b>'$txt['hello_member'], ' '$context['user']['name'], '</b><br />';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt[152], ' <a href="'$scripturl'?action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt[153] : $txt[471], '</a>'$txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
echo '<a href="'$scripturl'?action=unread">'$txt['unread_since_visit'], '</a><br /><a href="'$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />';

}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
'
$txt['welcome_guest'], '
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>
<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user"  size="10" />
<input type="password" name="passwrd"  size="10" />
<input type="submit" value="'
$txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>'
$txt['smf52'], '<br /><br />';
}
echo '
 </div>'
;
echo '
<a href="'
.$scripturl.'" title=""><span id="logo"> </span></a>';
echo '
</div>
  </div>
 </div>
<div class="catbg">
  '
template_menu(), '
  </div>
 <div id="main-l">
  <div id="main-r">
<div id="mainarea">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt$user_info;

  echo '
</div>
</div>
</div>
 <div id="footer">
  <div id="footer-left">
 <div id="footer-right">
  <div id="footerarea" style="font-size: smaller;">
 '
theme_copyright(), '
 <br />IronWoW by <a href="http://www.jpr62.com/theme/index.php"><b>Crip</b></a><br /><i>All images are proprieties of their respective owners ( <a href="http://www.blizzard.com/us/">Blizzard Entertainment</a></i> )</div>'
;

// Show the load time?
if ($context['show_load_time'])
echo ''$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'];

echo '
  </div>
  </div>
  </div>'
;
echo '
</div> 
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-left: 1ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' &raquo; ';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';

if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}

// Show the start of the tab section.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>'
;

// Show the [home] button.
echo '
<td class="mainnav"><a href="'
$scripturl'">' $txt[103] , '</a></td>';

// Show the [help] button.
echo '
<td class="mainnav"><a href="'
$scripturl'?action=help">' $txt[119] , '</a></td>';

// How about the [search] button?
if ($context['allow_search'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=search">' $txt[182] , '</a></td>';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=admin">' $txt[2] , '</a></td>';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=profile">' $txt[79] , '</a></td>';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong><blink>'$context['user']['unread_messages'] . '</blink></strong>]' '' '</a></td>';

// The [calendar]!
if ($context['allow_calendar'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a></td>';

// the [member] list button
if ($context['allow_memberlist'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=mlist">' $txt[331] , '</a></td>';

// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=login">' $txt[34] , '</a></td>';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '
  <td class="mainnav"><a href="'
$scripturl'?action=register">' $txt[97] , '</a></td>';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '
<td class="mainnav"><a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
  </td>'
;

// The end of tab section.
echo '
</tr>
</table><div style="clear:both;">
 </div>'
;


}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="maintab_back">'
implode(''$button_strip) , '</td>';
}

?>


And a SS of it working is attached.

Note that I am using fopen on my test site but it was also tested on a site that does use libcurl without any problems.

If this code doesn't work and the mod doesn't work on the default theme then my next guess is that your host doesn't have fopen on or libcurl on the server. I know many hosts have reservations about fopen but most of them at least trust curl and libcurl. Contact them and ask about it and point them to http://curl.haxx.se/
Title: Re: WoW - World of Warcraft Tooltips
Post by: KillerZ on March 31, 2009, 03:29:54 PM
Quote from: Garou on March 31, 2009, 11:54:18 AM
I forget does the mod work on the default them for you or not?

No, when I installed it there was an error with the install into the default/index.template.php. I checked the file and the code had not been put in there. I would assume this would mean it wouldn't work on there. actually there is a code in the place where this should be for the wow character profiles mod. Should I try adding the tooltips lines after that just to see if it will work on the default theme? Thanks again for all the help. I am starting to think though that the server just doesn't have the necessary stuff on it to run it. Hopefully the host will cooperate with getting it going if it isn't.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 01, 2009, 03:27:50 PM
Yeah that's exactly where they would go, you could even put them just before and it should be fine.

If the mod doesn't work on the default theme after that, then its definite that your host doesn't have fopen or libcurl on the server. I'm pretty sure at this point they do not. I'm not sure who your host is or what type of server your on but they should be willing to work with you.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Daehoidar on April 01, 2009, 04:59:09 PM
Hi

First sorry for my english.

Is there anyway to use this mod with items in spanish?

Title: Re: WoW - World of Warcraft Tooltips
Post by: Nana23 on April 15, 2009, 05:07:27 AM
the wow BBS dont work fine at my page

Click here (http://inrage-guild.com/index.php?topic=5.msg5#msg5)

Color dont work right and no tool tip shown
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 15, 2009, 08:01:53 AM
Daehoidar, I haven't tested any other languages but it should work.

In wowhead_wrapper.php find...
header("Content-type: text/xml");
$url = "http://www.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";


And replace with...
header("Content-type: text/xml");
$url = "http://es.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";


This should also work for other languages Wowhead (http://static.wowhead.com/widgets/power/demo.html?) supports as well. However they say
QuoteLocalized links (requires your site to use UTF-8 encoding)

Nana23, from what I can see form the outside everything looks like it's set up correctly, so I'm going to guess that your web host does not support either fopen or curl. You'll have to contact them about that. Sorry  :(
Title: Re: WoW - World of Warcraft Tooltips
Post by: tattooedpierre on April 15, 2009, 03:18:36 PM
I'm having a strange problem whereby item links are coloured but not popping up on mouseover, and they also do not link back to wowhead when clicked on. It installed no issues via package manager; I also checked via phpinfo() and both libcurl and fopen are enabled.

Any ideas? I dont believe it should affect it, but my board is also running SimplePortal.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 16, 2009, 07:21:06 PM
I tested with and with out SP and it works fine.

The mod runs on my test server, which has fopen enabled but not libcurl. I've instaled on another server that has libcurl but not fopen and it runs fine.  It also ran the SMF tested it on before they approved it.

That said I'm currently working on another server that also has libcurl and fopen enabled but the mod isn't working. I'm looking into it and I'm convinced that there are other server settings required that I have on my test server that some servers do not. Once I figure it out ill include the instructions here and in the mod.

In the meantime all I can say is that this mod may not work on all servers. I wish I had a better answer but I haven't found it yet.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Daehoidar on April 17, 2009, 11:47:42 AM
Quote from: Garou on April 15, 2009, 08:01:53 AM
Daehoidar, I haven't tested any other languages but it should work.

In wowhead_wrapper.php find...
header("Content-type: text/xml");
$url = "http://www.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";


And replace with...
header("Content-type: text/xml");
$url = "http://es.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";


This should also work for other languages Wowhead (http://static.wowhead.com/widgets/power/demo.html?) supports as well. However they say
QuoteLocalized links (requires your site to use UTF-8 encoding)

My site use UTF-8 and it doesn't work your mod changing the line to put into spanish.

Do you know why?

Thanks.
Title: Re: WoW - World of Warcraft Tooltips
Post by: tattooedpierre on April 17, 2009, 01:09:52 PM
Quote from: Garou on April 16, 2009, 07:21:06 PM
I tested with and with out SP and it works fine.

The mod runs on my test server, which has fopen enabled but not libcurl. I've instaled on another server that has libcurl but not fopen and it runs fine.  It also ran the SMF tested it on before they approved it.

That said I'm currently working on another server that also has libcurl and fopen enabled but the mod isn't working. I'm looking into it and I'm convinced that there are other server settings required that I have on my test server that some servers do not. Once I figure it out ill include the instructions here and in the mod.

In the meantime all I can say is that this mod may not work on all servers. I wish I had a better answer but I haven't found it yet.

Thanks for checking this out. I think it might be a PHP setting too, as I've really nothing I can think of installed that could interfere. Thanks for your perseverance ;)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 19, 2009, 08:00:33 AM
Daehoidar, from reading the message boards at Wowhead (http://www.wowhead.com/?forums&topic=3464) many people are having issues with alternate languages and Wowhead tooltips even without this type of script.

tattooedpierre, What I'm learning is that some of the web hosts out there don't like this kind of script. As far as they are concerned its an injection script, their security software is seeing this and effectively shutting it down. Even though this script is not harmful to your site, allowing this type of script will open the doors for other ones that are. That is what one host told me anyway.

Now I'm really frustrated and confused on how to proceed with this mod because re-writing it to account for this type of security software will remove most of the functionality of it and essentially you wouldn't really need a mod anyway, You would just need to add the power.js to index template to get tooltips using regular links.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 20, 2009, 10:32:17 PM
Thanks to Bluto of Bluto's Hosting (http://www.kwicktrim.com/) a fix has been found. :)

Sites using ModSecurity (http://www.modsecurity.org/) Version 2.1 and higher will need to make sure that the wow folder in SMF's Root directory and the files inside are set with permissions 644. That should solve the issues where libcurl and/or fopen is enabled and the mod still isnt working.

Thanks again Bluto you rock man.   :D

I should also point out that if you are still having problems talk to your web host about false positives with System Command Injection. Apparently this rule as updated in 2.1 of mod_security causes many issues with scripts for SMF, WordPress, and others. There are a couple different workarounds for this, just let your host know they should know what to do as its a common issue.
Title: Re: WoW - World of Warcraft Tooltips
Post by: GreenX on April 21, 2009, 03:12:50 PM
Installed everything as stated.

fopen and clib both open for my host.

when I make a item link example:

"Blackguard"

I get no tooltip and the link is my theme default color instead of purple. I click the link and get the following error:

Quote
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at mysite.com Port 80
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 22, 2009, 07:22:38 AM
This is exactly what I posted about in the post above yours. Your host is using ModSecurity and it gives the wowhead_wrapper.php a false positive as an injection script.

First make sure that the files in the wow folder have permissions set to 644. If that doesn't fix it contact your web host about bypassing the System Command Injection rule.

Since its been brought to my attention I have found several ways your host can get around this on the net but it up to them to decide which will work best for their particular set up. One that I have found is at http://blog.modsecurity.org/2007/02/handling-false.html
Title: Re: WoW - World of Warcraft Tooltips
Post by: ltdeta on April 23, 2009, 10:44:01 AM
feature request:
- multilanguage support for wowhead. (user can deside the language)

german: http://de.wowhead.com/?item=34432
englisch: http://www.wowhead.com/?item=34432]
france: http://fr.wowhead.com/?item=34432]
......



Title: Re: WoW - World of Warcraft Tooltips
Post by: tattooedpierre on April 23, 2009, 01:55:05 PM
Thanks for all your efforts Garou. I run my own server on a dedicated ubunutu server box. I dont have SELinux or mod_security installed (I actually thought it was installed on the stock apache2 ubuntu, shame on me). The only glimmer of hope I can see is that in my logs, I see an Access is Denied error for the wow/ directory. I tried chmod 644 and chown the files but nothing for the minute is working out. I'll look into it further but if you have any other thoughts let me know ;)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 23, 2009, 10:31:22 PM
Interesting. I installed ubunutu in VM on my windows machine for a time and while I think its great for people that are new to computers or converting from windows, I still prefer to do it all old school with fedora.

With the latest headaches I'm seeing with mod_security I'm beginning to think its over kill. Being safe is one thing but when it comes to the point that its hampering productivity, I just cant see using it, especially on a small private server.  It may be useful for on a larger server where your hosting a bunch of other people but I haven't gotten into that end of it yet.

Currently I'm building a demo site for my mods over at Bluto's hosting and we went through hell tracking down why it wouldn't work. In the end Bluto found the fix for it after I pretty much snapped and gave up. I even was ready to take the mod off SMF, I was so frustrated.

It could be something with .htaccess or your httpd.conf file that is blocking it.

It could also be something as simple as dropping an index.html or php in the folder. I planned on doing this in an update anyway to prevent people from getting into the directory from the outside easily.

The only other thing I can think of is that I changed part of the wowhead_wrapper.php on a suggestion from The SMF Customize Team when they were checking out the mod for approval...
$wowhead_use_fopen = !function_exists('curl_init');
You can try to change that to...
$wowhead_use_fopen = 1;
To force the mod to use fopen or
$wowhead_use_fopen = 0;
Will force it to use curl.

That's the way Matt Mayers originally coded the script but the way I have it now should actually look to see if libcurl is installed and if not then try to use fopen functions instead.

ltdeta, to change to a different language you can edit the wowhead_wrapper.php.
Find...
$url = "http://www.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";
and change the "www.wowhead.com/?item=" to your preferred language.

Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on April 25, 2009, 01:46:27 AM
Here's what I found out with my server settings.
First:
Internal server error usually means the following:

1. invalid permissions (anything higher than 755 will show internal server error)
2. invalid .htaccess or php.ini file
3. corrupted file archive

Second:
Server would not allow to open / execute scripts outside user directory (phpsuexec).

Third. You cannot disable any mod_security rules via .htaccess with version 2.1 of mod_security.

@Tatoo. I would suggest first to make sure all your directories are chmod to 755 or 644.
Also, instead of using .htaccess to try and change php.ini settings in the root, try installing another instance of php.ini in your public_html directory with fopen and libcurl rues. Although it shouldn't matter if you don't have mod_security installed. There must be something else blocking it.
Title: Re: WoW - World of Warcraft Tooltips
Post by: nckswt on April 30, 2009, 07:03:02 AM
I've been having problems with the [wow] BBCode with my theme, but when I switch to my default theme, the [wow] BBCode works perfectly. Every other part of this addon works, but the [wow] BBCode doesn't seem to have been installed properly into my custom theme.

There's no Modifications.english.php file in my custom theme's /languages folder, so I tried adding one in (with the $txt['wow'] = 'WoW Tooltip'; string), but that didn't work.

I'm running SMF 2.0 RC1 and WoW Tooltips 1.1. Please help me fix this!
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 30, 2009, 11:14:31 AM
If there isn't a Modifications.english.php file then typically SMF should read the one from your default theme. Really all that part of the mod does is display the text "WoW Tooltip" when you hover over the button that inserts the [wow][/wow] code into the post.

If that is important to you, rather then creating a new Modifications.english.php you will want to copy the one from your default theme to your custom theme as you will need the codes that your other mods have entered in there as well. If not you could break your other mods.

That said I don't thing that's where your problem lies. Due to the way some custom themes are written they will re-arrange things in the index.template.php and you may have to put that code someplace else.

For instance in the IronWoW and the Overview themes we found that you have to change the code to look like...

// ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

echo '
</head>


What theme are you using and if you could attach your index.template.php Ill take a look at it.
Title: Re: WoW - World of Warcraft Tooltips
Post by: nckswt on April 30, 2009, 05:40:05 PM
Quote from: Garou on April 30, 2009, 11:14:31 AM
If there isn't a Modifications.english.php file then typically SMF should read the one from your default theme. Really all that part of the mod does is display the text "WoW Tooltip" when you hover over the button that inserts the [wow][/wow] code into the post.

If that is important to you, rather then creating a new Modifications.english.php you will want to copy the one from your default theme to your custom theme as you will need the codes that your other mods have entered in there as well. If not you could break your other mods.

That said I don't thing that's where your problem lies. Due to the way some custom themes are written they will re-arrange things in the index.template.php and you may have to put that code someplace else.

For instance in the IronWoW and the Overview themes we found that you have to change the code to look like...

// ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

echo '
</head>


What theme are you using and if you could attach your index.template.php Ill take a look at it.

Ah, that's not where the problem lies, then. I'm using the EDSO theme (http://edso%20theme), and I've attached my index.template.php, but I'm not sure that's where the issue lies, either. I can see the tooltips perfectly if I use a direct link like http://www.wowhead.com/?item=46017 but not if I put the [wow]Val'anyr, Hammer of Ancient Kings[/wow] BBcode.

I've attatched my subs.php and subs-editor.php in case the problem lies in either one, but I don't think that's the problem as they're not theme-specific, and my problem is theme-specific. Let me know if you want any other files, and thanks for the quick response!
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on May 01, 2009, 10:29:34 AM
Nope you have everything in there right. There has to be a setting on your server someplace. Its discussed several posts back, there seems to be a variety of server settings that can be causing the mod to foul up.

The original code was written for phpBB a couple years ago by a guy that goes by Horis/Matt Mayers on the Wowhead forums. I'm beginning to wonder if this isn't why he dropped all support for it and ripped down the Download.

All the mod requires to work is libcurl or fopen however many professional hosting services have implemented some security settings that will treat this as an injection script. Which in a way it is but its not malicious nor is it exploitable, short of someone hacking into Wowhead and messing with their codes.

That said all I can really offer is that you try chmodding the wow folder and the files within, differently. If that doesn't work you'll have to check with your host. They should be getting a warning in their logs every time there is a hit on the wowhead_wrapper.php and should be able to figure out what the conflict is there.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Springer on May 01, 2009, 01:17:58 PM
Quote from: Nana23 on April 15, 2009, 05:07:27 AM
the wow BBS dont work fine at my page

Click here (http://inrage-guild.com/index.php?topic=5.msg5#msg5)

Color dont work right and no tool tip shown

I am getting the same problem.  SMF 2.0 rc1

Using:
[url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url]
It works properly. 


Quote
Your site must have libcurl or fopen in order for this mod to work.

How can we check this and would it effect the bbc code but not the other?
Title: Re: WoW - World of Warcraft Tooltips
Post by: GreenX on May 01, 2009, 06:23:52 PM
Same problem as above, url /url works fine and I can hover but using wow /wow its doesnt work at all.
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on May 01, 2009, 07:20:20 PM
Upload the attached file to your site, in the public_html folder or similar.
Browse to it in your browser. Now you can see all your php info.
Rename or delete the file at some point so no-one else can see your server config.
If all is ok with your php.ini settings,(fopen and libcurl) then ask your host if they have  mod_security version 2.1 or higher installed. If they do, send me or Garou a pm, and I'll tell you what rule they need to disable for it to work. Or just tell them the problem, and the exact error that shows when you click the link. They should know what to do, I won't post it publicly. They may or may not do it for you.
Thanks,
B-Lute
Title: Re: WoW - World of Warcraft Tooltips
Post by: Springer on May 08, 2009, 05:18:54 PM
server has libcurl
fopen is disabled


I have not heard back yet about mod security
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on May 08, 2009, 09:49:27 PM
Yeah it can be frustrating. I had used this code for a while on a couple other servers where it worked fine. I was shocked when reports first started coming in about the mod not working. Then I switched hosts and happened to get one where I had issues like yours.

I was literally ripping the hair out of my head trying to figure this out till Bluto explained what was happening and what he did to fix it. Apparently mod security, if not configured correctly can mess up several mods for SMF.
Title: Re: WoW - World of Warcraft Tooltips
Post by: antwigan on May 21, 2009, 07:06:41 AM
My site is www.chaosinmotion.team.pro

If i put a link to a quest or achievement it seems fine.

But if i try [wow]item[/wow] i just get a link which then gives this error:

XML Parsing Error: junk after document element
Location: http://chosenones.comli.com/wow/wowhead_wrapper.php?item=Titansteel%20Destroyer
Line Number 3, Column 1:<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
^


This is my index.template.php

<?php

// Version: 1.1.5; index



/* This template is, perhaps, the most important template in the theme. It

contains the main template layer that displays the header and footer of

the forum, namely with main_above and main_below. It also contains the

menu sub template, which appropriately displays the menu; the init sub

template, which is there to set the theme up; (init can be missing.) and

the linktree sub template, which sorts out the link tree.



The init sub template should load any data and set any hardcoded options.



The main_above sub template is what is shown above the main content, and

should contain anything that should be shown up there.



The main_below sub template, conversely, is shown after the main content.

It should probably contain the copyright statement and some other things.



The linktree sub template should display the link tree, using the data

in the $context['linktree'] variable.



The menu sub template should display all the relevant buttons the user

wants and or needs.



For more information on the templating system, please see the site at:

http://www.simplemachines.org/

*/



// Initialize the template... mainly little settings.

function template_init()

{

global $context$settings$options$txt;



/* Use images from default theme when using templates from the default theme?

if this is 'always', images from the default theme will be used.

if this is 'defaults', images from the default theme will only be used with default templates.

if this is 'never' or isn't set at all, images from the default theme will not be used. */

$settings['use_default_images'] = 'default';



  
$settings['tp_images_url'] = 'Themes/The_Risen_WOTLK/images/tinyportal/';



/* What document type definition is being used? (for font size and other issues.)

'xhtml' for an XHTML 1.0 document type definition.

'html' for an HTML 4.01 document type definition. */

$settings['doctype'] = 'xhtml';



/* The version this template/theme is for.

This should probably be the version of SMF it was created for. */

$settings['theme_version'] = '1.1';



/* Set a setting that tells the theme that it can render the tabs. */

$settings['use_tabs'] = true;



/* Use plain buttons - as oppossed to text buttons? */

$settings['use_buttons'] = true;



/* Show sticky and lock status seperate from topic icons? */

$settings['seperate_sticky_lock'] = true;

}



// The main sub template above the content.

function template_main_above()

{

global $context$settings$options$scripturl$txt$modSettings;



// Show right to left and the character set for ease of translating.

echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>

<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />

<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '

<meta name="robots" content="noindex" />'
'

<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />

<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>

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

var smf_theme_url = "'
$settings['theme_url'], '";

var smf_images_url = "'
$settings['images_url'], '";

var smf_scripturl = "'
$scripturl'";

var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';

var smf_charset = "'
$context['character_set'], '";

// ]]></script>

<title>'
$context['page_title'], '</title>';



// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.

echo '

<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />

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



/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)

Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.

Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.

Standards compliance mode happens when you use xhtml... */

if ($context['browser']['needs_size_fix'])

echo '

<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';



// 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'" />';



// If RSS feeds are enabled, advertise the presence of one.

if (!empty($modSettings['xmlnews_enable']))

echo '

<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';



// If we're viewing a topic, these should be the previous and next topics, respectively.

if (!empty($context['current_topic']))

echo '

<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />

<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';



// If we're in a board, or a topic for that matter, the index will be the board's index.

if (!empty($context['current_board']))

echo '

<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';



// We'll have to use the cookie to remember the header...

if ($context['user']['is_guest'])

{

$options['collapse_header'] = !empty($_COOKIE['upshrink']);

$options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);

}



// Output any remaining HTML headers. (from mods, maybe?)

echo $context['html_headers'], '



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

var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';



function shrinkHeader(mode)

{'
;



// Guests don't have theme options!!

if ($context['user']['is_guest'])

echo '

document.cookie = "upshrink=" + (mode ? 1 : 0);'
;

else

echo '

smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';



echo '

document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");



document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";

document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";



current_header = mode;

}

// ]]></script>'
;



// the routine for the info center upshrink

echo '

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

var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';



function shrinkHeaderIC(mode)

{'
;



if ($context['user']['is_guest'])

echo '

document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;

else

echo '

smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';



echo '

document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");



document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";



current_header_ic = mode;

}

      // ]]></script>

 <script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> '
;

   echo 
'
</head>
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script>
<body topmargin="0">



<table width="90%" cellpadding="0" cellspacing="0" border="0" align="center"><tr><td class="tr_topleft"></td><td class="tr_top"></td><td class="tr_topright"></td></tr>





<tr><td class="tr_left"></td><td>'
;

echo
'

<table width="100%" cellpadding="0" cellspacing="0" border="0">'
;



 
// Top Box BEING ******************************************************



echo'

<tr>

<td>'
;

echo '

<table width="100%" cellpadding="0" cellspacing="0" border="0" >

<tr>'
;



if($context['user']['is_logged'])

echo '

<td class="toptitle1" height="24">

<span style="font-size: 130%;"> '
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b></span>

</td>'
;



if ($context['user']['is_guest'])

echo '

<td class="toptitle1" height="24">

<span style="font-size: 100%;"> '
$txt['welcome_guest'] , '</b></span>

</td>'
;



// display the time

echo '

<td class="toptitle1" height="24" align="right">

<span class="smalltext">' 
$context['current_time'], '</span>';



// this is the upshrink button for the user info section

echo '

<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>

</td>

</tr>

<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>

<td valign="top" colspan="2">

<table width="100%" class="bordercolor" cellpadding="5" cellspacing="0" border="0" style="margin-top: 0px;">

<tr width="100%"><td class="toptitle2"></td></tr>

<tr>'
;



echo '

<td colspan="2" width="100%" valign="top" class="toptitlebg1"><span class="middletext">'
;





// Now, onto our second set of info, are they logged in again?

if ($context['user']['is_logged'])

{

// Is the forum in maintenance mode?

if ($context['in_maintenance'] && $context['user']['is_admin'])

echo '

<b>'
$txt[616], '</b><br />';



// Are there any members waiting for approval?

if (!empty($context['unapproved_members']))

echo '

'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';



// Show the total time logged in?

if (!empty($context['user']['total_time_logged_in']))

{

echo '

'
$txt['totalTimeLogged1'];



// If days is just zero, don't bother to show it.

if ($context['user']['total_time_logged_in']['days'] > 0)

echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];



// Same with hours - only show it if it's above zero.

if ($context['user']['total_time_logged_in']['hours'] > 0)

echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];



// But, let's always show minutes - Time wasted here: 0 minutes ;).

echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'];

}



if ($context['allow_pm'])

echo '&nbsp; &nbsp; &nbsp; [<a href="'$scripturl'?action=pm">'$context['user']['messages'], '/<strong>'$context['user']['unread_messages'] , '</strong></a> PM]



---- [ <a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> ]



---- [ <a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a> ] '

;



echo ' </span>';

}

// Otherwise they're a guest - this time ask them to either register or login - lazy bums...

else

{

echo ' </span>

<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>



<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>

<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />

<select name="cookielength">

<option value="60">'
$txt['smf53'], '</option>

<option value="1440">'
$txt['smf47'], '</option>

<option value="10080">'
$txt['smf48'], '</option>

<option value="43200">'
$txt['smf49'], '</option>

<option value="-1" selected="selected">'
$txt['smf50'], '</option>

</select>

<input type="submit" value="'
$txt[34], '" /><br />

<span class="middletext">'
$txt['smf52'], '</span>

<input type="hidden" name="hash_passwrd" value="" />

</form>'
;

}



echo '

</td>

<td class="toptitlebg1" align="right" valign="top">

             </td>

</tr>

<tr><td class="toptitle2"></td></tr>

</table>

</td>

</tr>

 

</table>'
;





echo '

<table id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"'' width="100%" cellpadding="0" cellspacing="0" border="0">

<tr><td></td>

</tr>

</table>'
;



echo 
'

</td>

</tr>

<tr><td id="toplogo" valign="center">

<img src="'
$settings['images_url'], '/wrathlogo.png" align="center"><img src="'$settings['images_url'], '/toplogo.png" align="center"></td></tr></table>';

echo'

<table width="100%" height="24" cellspacing="0" cellpadding="0">

<tr height="24">

<td height="24">'
;



template_menu();



 

 echo 
'</td></tr></table>';

 

 

 
//do not remove this section at all, breaks upshrink

 












// The main content should go here.

echo '</center></center>

<table width="100%" cellpadding="0" cellspading="0" bgcolor="#1a1a1a"><tr><td id="mainarea">

<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">'
;

}



function 
template_main_below()

{

global $context$settings$options$scripturl$txt;



echo '

</div></td></tr></table>'
;



// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!

echo '



<div id="footer" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">

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

function smfFooterHighlight(element, value)

{

element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";

}

// ]]></script>

<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">

<tr>

<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">

<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>

<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>

</td>

<td valign="middle" align="center" style="white-space: nowrap;">

'
theme_copyright(), '

</td>

<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">

<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>

<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>

</td>

</tr>

<tr>

  <td colspan="3" align="center">

    This site was designed by <a href="mailto:[email protected]">Dread/Exphryl</a> for <a href="http://www.therisenguild.net">The Risen Guild</a>. Images are proprieties of their respective owners (EA-Mythic/ Blizzart Entertainment).<BR>

    For any questions or concerns regarding this theme The_Risen_WOTLK please email. <BR><BR>

    <i>CSS Dropdown Menu Coding Modified from Blocs Rhino Theme. </i>

    </td>

 </tr>

</table>'
;



// Show the load time?

if ($context['show_load_time'])

echo '

<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';



// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.

if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])

{

// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.

echo '

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



// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...

if ($context['browser']['is_safari'])

echo '

window.addEventListener("load", smf_codeFix, false);



function smf_codeFix()

{

var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");



for (var i = 0; i < codeFix.length; i++)

{

if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)

codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";

}

}'
;

elseif ($context['browser']['is_firefox'])

echo '

window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()

{

var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");



for (var i = 0; i < codeFix.length; i++)

{

if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))

codeFix[i].style.overflow = "scroll";

}

}'
;

else

echo '

var window_oldOnload = window.onload;

window.onload = smf_codeFix;



function smf_codeFix()

{

var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");



for (var i = codeFix.length - 1; i > 0; i--)

{

if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))

codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";

}



if (window_oldOnload)

{

window_oldOnload();

window_oldOnload = null;

}

}'
;



echo '

// ]]></script>'
;

}



echo '

</div>'
;



// The following will be used to let the user know that some AJAX process is running

echo '

<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>







</td><td class="tr_right"></td></tr>



<tr><td class="tr_bottomleft"></td><td class="tr_bottom"></td><td class="tr_bottomright"></td></tr></table>







</td></tr></table>



</body></html>'
;

}



// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..

function theme_linktree()

{

global $context$settings$options;



echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';



// Each tree item has a URL and name. Some may have extra_before and extra_after.

foreach ($context['linktree'] as $link_num => $tree)

{

// Show something before the link?

if (isset($tree['extra_before']))

echo $tree['extra_before'];



// Show the link, including a URL if it should have one.

echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';



// Show something after the link...?

if (isset($tree['extra_after']))

echo $tree['extra_after'];



// Don't show a separator for the last one.

if ($link_num != count($context['linktree']) - 1)

echo '&nbsp;>&nbsp;';

}



echo '</div>';

}



// Show the menu up top. Something like [home] [help] [profile] [logout]...

function template_menu()

{

global $context$settings$options$scripturl$txt;



// Work out where we currently are.

$current_action 'home';

if (in_array($context['current_action'], array('admin''managegames''arcadesettings''arcadecategory''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))

$current_action 'admin';

if (in_array($context['current_action'], array('gallery','search''arcade''admin''calendar''profile''mlist''register''login''help''pm''forum''tpadmin')))

$current_action $context['current_action'];

if ($context['current_action'] == 'globalAnnouncementsAdmin')

$current_action 'admin';



if ($context['current_action'] == 'search2')

$current_action 'search';

if ($context['current_action'] == 'theme')

$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';



if (isset($_GET['dl']))

$current_action 'dlmanager';



if ((isset($_GET['board']) || isset($_GET['topic'])) && empty($settings['use_tp']))

$current_action 'home';

elseif ((isset($_GET['board']) || isset($_GET['topic'])) && !empty($settings['use_tp']))

$current_action 'forum';



if ($context['current_action'] == 'theme')

$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';



// Begin SMFShop code

if ($context['current_action'] == 'shop')

$current_action 'shop';

if (in_array($context['current_action'], array('shop_general''shop_items_add''shop_items_edit''shop_cat''shop_inventory''shop_restock''shop_usergroup')))

$current_action 'admin';

// End SMFShop code





// Show the start of the tab section.

echo '

<div id="menudiv">

<div id="menuinner">'
;



// the main menu

echo '

<ul class="menubox" id="menuboxie6">

<li' 
$current_action=='home' ' class="chosen"' '' '><a href="'$scripturl'"><span>' $txt[103] , '</span></a></li>

<li' 
$current_action=='forum' ' class="chosen"' '' '><a href="'$scripturl'?action=forum"><span>' $txt['tp-forum'] , '</span></a>';



echo ' <ul>

<li' 
$current_action=='help' ' class="chosen"' '' '><a href="'$scripturl'?action=help"><span>' $txt[119] , '</span></a></li>';

if ($context['allow_search'])

echo '

<li' 
$current_action=='search' ' class="chosen"' '' '><a href="'$scripturl'?action=search"><span>Search</span></a></li>';

if ($context['allow_calendar'])

echo '

<li' 
$current_action=='calendar' ' class="chosen"' '' '><a href="'$scripturl'?action=calendar"><span>' $txt['calendar24'] , '</span></a></li>';

if ($context['allow_admin'])

echo '

<li' 
$current_action=='admin' ' class="chosen"' '' '><a href="'$scripturl'?action=admin"><span>' $txt[2] , '</span></a></li>';

if ($context['allow_edit_profile'])

echo '

<li' 
$current_action=='profile' ' class="chosen"' '' '><a href="'$scripturl'?action=profile"><span>' $txt[79] , '</span></a></li>';



if ($context['user']['is_logged'] && $context['allow_pm'])

echo '

<li' 
$current_action=='pm' ' class="chosen"' '' '><a href="'$scripturl'?action=pm"><span>' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</span></a></li>';

echo ' </ul>

</li>'
;





// SMF Arcade

if (!empty($settings['use_arcade']))

echo '

<li' 
$current_action=='arcade' ' class="chosen"' '' '><a href="'$scripturl'?action=arcade"><span>' $txt['arcade'] , '</span></a></li>';



// SMF Gallery

if (!empty($settings['use_smfgallery']))

echo '

<li' 
$current_action=='gallery' ' class="chosen"' '' '><a href="'$scripturl'?action=gallery"><span>' $txt['smfgallery_menu'] , '</span></a></li>';

// SMFshop 

if (!empty($settings['use_shop']))

echo '

<li' 
$current_action=='shop' ' class="chosen"' '' '><a href="'$scripturl'?action=shop"><span>Shop</span></a></li>';





if ($context['user']['is_logged'])

echo '

<li class="last"><a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '"><span>' $txt[108] , '</span></a></li>';

if ($context['user']['is_guest'])

{

echo '

<li' 
$current_action=='login' ' class="chosen"' '' '><a href="'$scripturl'?action=login"><span>' $txt[34] , '</span></a>';

echo '

<ul>

<li' 
$current_action=='register' ' class="chosen"' '' '><a href="'$scripturl'?action=register"><span>' $txt[97] , '</span></a></li>

</ul>

</li>'
;



}

// any extra buttons then?

if(!empty($settings['but1_name']) || !empty($settings['but2_name']) || !empty($settings['but3_name']) || !empty($settings['but4_name']) || !empty($settings['but5_name']))

{

echo '<li><a href="#">Extra</a>

<ul>'
;

// extra button 1

if(!empty($settings['but1_name']))

echo '

<li><a href="'
$settings['but1_link'] , '"><span>' $settings['but1_name'] , '</span></a></li>';

// extra button 2

if(!empty($settings['but2_name']))

echo '

<li><a href="'
$settings['but2_link'] , '"><span>' $settings['but2_name'] , '</span></a></li>';

// extra button 3

if(!empty($settings['but3_name']))

echo '

<li><a href="'
$settings['but3_link'] , '"><span>' $settings['but3_name'] , '</span></a></li>';

// extra button 4

if(!empty($settings['but4_name']))

echo '

<li><a href="'
$settings['but4_link'] , '"><span>' $settings['but4_name'] , '</span></a></li>';

// extra button 5

if(!empty($settings['but5_name']))

echo '

<li><a href="'
$settings['but5_link'] , '"><span>' $settings['but5_name'] , '</span></a></li>';

echo '

</ul>

</li>'
;

}

echo '

</ul>

</div>

</div>'
;

}

// Show the menu up top. Something like [home] [help] [profile] [logout]...

function template_menu_old()

{

global $context$settings$options$scripturl$txt;



// Work out where we currently are.

$current_action 'home';

if (in_array($context['current_action'], array('admin''managegames''arcadesettings''arcadecategory''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))

$current_action 'admin';

if (in_array($context['current_action'], array('gallery','search''arcade''admin''calendar''profile''mlist''register''login''help''pm''forum''tpadmin')))

$current_action $context['current_action'];

if ($context['current_action'] == 'globalAnnouncementsAdmin')

$current_action 'admin';



if ($context['current_action'] == 'search2')

$current_action 'search';

if ($context['current_action'] == 'theme')

$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';



if (isset($_GET['dl']))

$current_action 'dlmanager';



if ((isset($_GET['board']) || isset($_GET['topic'])) && empty($settings['use_tp']))

$current_action 'home';

elseif ((isset($_GET['board']) || isset($_GET['topic'])) && !empty($settings['use_tp']))

$current_action 'forum';



if ($context['current_action'] == 'theme')

$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';



// Begin SMFShop code

if ($context['current_action'] == 'shop')

$current_action 'shop';

if (in_array($context['current_action'], array('shop_general''shop_items_add''shop_items_edit''shop_cat''shop_inventory''shop_restock''shop_usergroup')))

$current_action 'admin';

// End SMFShop code





// Show the start of the tab section.

echo '

<div id="menudiv">

<div id="menuinner">'
;



echo '

<div id="myuser">'
;

if($context['user']['is_logged'])

{

echo $txt['hello_member_ndt'] , ' <strong>' $context['user']['name'] , '</strong>';



// Only tell them about their messages if they can read their messages!

if ($context['allow_pm'])

echo '<br />[<a href="'$scripturl'?action=pm">'$context['user']['messages'], '/<strong>'$context['user']['unread_messages'] , '</strong></a> PM]';



// Is the forum in maintenance mode?

if ($context['in_maintenance'] && $context['user']['is_admin'])

echo '[<strong>Maintenace</strong>]';



// Are there any members waiting for approval?

if (!empty($context['unapproved_members']))

echo '

[<a href="'
$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] , ' APPROVE</a> ]';



echo '

<a href="'
$scripturl'?action=unread">Unread</a> /

<a href="'
$scripturl'?action=unreadreplies">Replies</a>';



}

else

echo $txt['welcome_guest'];



echo '</div>';



// the main menu

echo '

<ul class="menubox" id="menuboxie6">

<li' 
$current_action=='home' ' class="chosen"' '' '><a href="'$scripturl'"><span>' $txt[103] , '</span></a></li>';

// TP

if (!empty($settings['use_tp']))

echo '

<li' 
$current_action=='forum' ' class="chosen"' '' '><a href="'$scripturl'?action=forum"><span>' $txt['tp-forum'] , '</span></a></li>';



echo '

<li' 
$current_action=='help' ' class="chosen"' '' '><a href="'$scripturl'?action=help"><span>' $txt[119] , '</span></a></li>';

if ($context['allow_search'])

echo '

<li' 
$current_action=='search' ' class="chosen"' '' '><a href="'$scripturl'?action=search"><span>Search</span></a></li>';

if ($context['allow_calendar'])

echo '

<li' 
$current_action=='calendar' ' class="chosen"' '' '><a href="'$scripturl'?action=calendar"><span>' $txt['calendar24'] , '</span></a></li>';

if ($context['allow_admin'])

echo '

<li' 
$current_action=='admin' ' class="chosen"' '' '><a href="'$scripturl'?action=admin"><span>' $txt[2] , '</span></a></li>';

if ($context['allow_edit_profile'])

echo '

<li' 
$current_action=='profile' ' class="chosen"' '' '><a href="'$scripturl'?action=profile"><span>' $txt[79] , '</span></a></li>';



if ($context['user']['is_logged'] && $context['allow_pm'])

echo '

<li' 
$current_action=='pm' ' class="chosen"' '' '><a href="'$scripturl'?action=pm"><span>' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</span></a></li>';



// SMF Arcade

if (!empty($settings['use_arcade']))

echo '

<li' 
$current_action=='arcade' ' class="chosen"' '' '><a href="'$scripturl'?action=arcade"><span>' $txt['arcade'] , '</span></a></li>';

// SMF Gallery

if (!empty($settings['use_smfgallery']))

echo '

<li' 
$current_action=='gallery' ' class="chosen"' '' '><a href="'$scripturl'?action=gallery"><span>' $txt['smfgallery_menu'] , '</span></a></li>';

// SMFshop 

if (!empty($settings['use_shop']))

echo '

<li' 
$current_action=='shop' ' class="chosen"' '' '><a href="'$scripturl'?action=shop"><span>Shop</span></a></li>';



if ($context['user']['is_logged'])

echo '

<li class="last"><a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '"><span>' $txt[108] , '</span></a></li>';

if ($context['user']['is_guest'])

{

echo '

<li' 
$current_action=='login' ' class="chosen"' '' '><a href="'$scripturl'?action=login"><span>' $txt[34] , '</span></a></li>';

echo '

<li' 
$current_action=='register' ' class="chosen"' '' '><a href="'$scripturl'?action=register"><span>' $txt[97] , '</span></a></li>';

}

// extra button 1

if(!empty($settings['but1_name']))

echo '

<li><a href="'
$settings['but1_link'] , '"><span>' $settings['but1_name'] , '</span></a></li>';

// extra button 2

if(!empty($settings['but2_name']))

echo '

<li><a href="'
$settings['but2_link'] , '"><span>' $settings['but2_name'] , '</span></a></li>';

// extra button 3

if(!empty($settings['but3_name']))

echo '

<li><a href="'
$settings['but3_link'] , '"><span>' $settings['but3_name'] , '</span></a></li>';

// extra button 4

if(!empty($settings['but4_name']))

echo '

<li><a href="'
$settings['but4_link'] , '"><span>' $settings['but4_name'] , '</span></a></li>';

// extra button 5

if(!empty($settings['but5_name']))

echo '

<li><a href="'
$settings['but5_link'] , '"><span>' $settings['but5_name'] , '</span></a></li>';



echo '

</ul>

</div>

</div>'
;

}

// Generate a strip of buttons.

function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td ''$newstrip false)

{

global $settings$buttons$context$txt$scripturl;



if($newstrip)

echo '<table><tr>';



// Create the buttons...

foreach ($button_strip as $key => $value)

{

if (isset($value['test']) && empty($context[$value['test']]))

{

unset($button_strip[$key]);

continue;

}

elseif (!isset($buttons[$key]) || $force_reset)

$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';



$button_strip[$key] = $buttons[$key];

}



if (empty($button_strip))

return '<td>&nbsp;</td>';



echo '

<td class="maintab_back">'
implode('</td><td class="maintab_back">'$button_strip) , '</td>';



if($newstrip)

echo '</tr></table>';

}

// Generate a strip of buttons.

function template_button_strip2($button_strip$direction 'top'$force_reset false$custom_td ''$header_href '#'$header_title 'Tools menu')

{

global $settings$buttons$context$txt$scripturl;



// if ie6, turn around right here!!

if($context['browser']['is_ie6'])

{

template_button_strip($button_strip$direction$force_reset$custom_tdtrue);

return;

}



echo '<ul class="menubox" id="menubox_' $direction '">

<li><a style="width: 10em;" href="' 
$header_href '">' .$header_title '</a>

<ul>'
;

// Create the buttons...

foreach ($button_strip as $key => $value)

{

if (isset($value['test']) && empty($context[$value['test']]))

{

unset($button_strip[$key]);

continue;

}

elseif (!isset($buttons[$key]) || $force_reset)

$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';



$button_strip[$key] = $buttons[$key];

}



if (empty($button_strip))

echo ' <li></li>';

else

echo '

<li>'
implode('</li><li>'$button_strip) , '</li>';

echo '

</ul>

</li>

</ul>'
;



}


Thx  :D
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on May 21, 2009, 06:51:08 PM
Well for starters you've the java script calls in there twice.

Change...
      // ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

   echo '
</head>
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script>
<body topmargin="0">


To...
      // ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

   echo '
</head>
<body topmargin="0">


Make sure the file permissions for the wow folder is set to 644 or 755. If that doesn't work ( I have a feeling it wont) you'll have to talk to your host and find out if they are using ModSecurity or some similar program.  There is a problem with some server security software that is causing a false positive with the System Command Injection and this script.
Title: Re: WoW - World of Warcraft Tooltips
Post by: tanyril on May 28, 2009, 12:55:12 PM
Yo Garou, do you know how we can get rid of the font size and background color change made when the text is parsed and just use the size in the post with no background color?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on May 28, 2009, 05:05:35 PM
Its in the wowhead php file in the wow folder. Ill have to look it up when I get home.

If you are using a white background for your theme you will want to change it to a different color other then white otherwise you wont be able to see anything that wowhead uses white text for, like common quality items.

Ill dig through the code in a few hours when I can get to a real computer. :D
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on May 28, 2009, 10:33:33 PM
Ouch was I wrong LOL

Its in ./Sources/Subs.php

Find...
'content' => '<b><a style="background-color:#303030" href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

To change the background to another color replace #303030 with a different color code.

To remove the background all together replace with...
'content' => '<b><a href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

Again I don't recommend this and any color you change the background to shouldn't be similar to the other quality colors as you wont be able to see the text.

As for the font and font size there isn't anything in the mod that effects those. Its actually imports the font styles that Wowhead is using on their site.

Your other option be to use something like...
[url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url]
instead of the "wow" tag.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Carya on June 01, 2009, 08:39:08 AM
Alrighty. First off hi hi, and thanks much for taking on this mod and getting it working in SMF. :) That having been said, wish I could say I got it working!

Here's where I am:
- Using 1.9 -- does this matter? Just upgraded tonight before trying to install this mod.
- 100% sure I installed it right.
- 100% sure fopen and libcurl are installed. (I used the attachment stfox provided, thanks much).
- mod_security is NOT an issue
- Fiddled up and down with permissions and left them at 755. Tried 777, 755, and the behavior is the same.
- The [url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url] works fine.
- Added the code $wowhead_use_fopen = 0; to force use of libcurl, that didn't change anything.
- Tried $wowhead_use_fopen = 1; and that didn't work either.
- Nothing looks amiss in the suexec log or error_log
- when I click on the link that is the output of the [wow][/wow] command I end up at the forum home page.

So... I'm at a loss...

1) When I mouse over the output of [wow]Lightbringer Faceguard[/wow] am I supposed to see a URL that looks like
blahblahblah/forum/index.php/wow/wowhead_wrapper.php?item=Lightbringer%20Faceguard
and if not what should it look like. I am no php expert (other languages, not php) but you'd think from the xml call, it'd grab the item id and embed the link with the other ones right and use the javascript that is working? That is the idea?

2) Is there a forum where this is working where I can go take a look?

3) Erm. I want there to be a three so I can figure this out.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 01, 2009, 09:23:55 AM
When I modified Horis' original code on my test server at home it worked fine right out of the box. It worked fine for the SMF approval team or the mod would never have been approved.

My test server is Xampp (http://www.apachefriends.org) and I didn't have to tweak a thing in it to make this work. I'm just using their default settings in the install.

*sigh* If your host isn't using mod security or a similar type program I don't know what what else the issue could be.

Ive got a site under construction for the mods Ive been working on be they mine or someone else's.
The demo thread for the mod is http://smf.balancegames.net/index.php?topic=2.msg3#msg3 at least it will give you an idea of what its supposed to do.

Right now it looks like the wowhead_wrapper.php isn't getting interpreted correctly on your site as the link to the wrapper should actually be pointing to the item on Wowhead.

The way the mod works is that the WoW tag links to the wrapper then the wrapper, along with the java script,s look for the item on Wowhead finds the quality of the item then changes the link in the forum to the proper color for the items quality and provides a link to the item on Wowhead.

The fact that so many servers are having problems with this is extremely frustrating and I honestly believe that's why Horis quit development on his original mod for phpbb and wordpress.  :(
Title: Re: WoW - World of Warcraft Tooltips
Post by: Carya on June 01, 2009, 10:24:41 AM
Thanks for the response...

- Yep no mod_security here's what's compiled in the server:

Compiled in modules:
  core.c
  mod_authn_file.c
  mod_authn_default.c
  mod_authz_host.c
  mod_authz_groupfile.c
  mod_authz_user.c
  mod_authz_default.c
  mod_auth_basic.c
  mod_include.c
  mod_filter.c
  mod_log_config.c
  mod_env.c
  mod_setenvif.c
  mod_ssl.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_suexec.c
  mod_cgi.c
  mod_negotiation.c
  mod_dir.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_so.c

- Yes, the frustrating thing is seeing the wrapper.php not executing at all OR producing an error page. Obviously it's translating the [wow][/wow] call correctly, so THAT part works. Because I'm seeing it translate that to the call to the wrapper right?

- So the call to the wrapper isn't being executed. I do have other mods installed -- I noted earlier that others with tinyportal installed couldn't get it to work -- I can't recall if you said you could get it to work with TP. But I do have other mods installed in their own top level directories (eg, in the forum/ directory) and they 'work.'

- The fact that clicking the link just runs me back to the forum home page -- any insight into the whys of this behavior?

- Is there a way that I can invoke this from the shell, wowhead_wrapper.php? To try to call it from a simple Php page without going through SMF... meh. I know perl, tcl, a bit of java, just you know, not php (only to hack at it). I suppose I can start trying to figure this out.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 01, 2009, 10:51:33 AM
If you are using a shared or virtual server, mod security may not show up as its all setup in the hosts area of the server. I'm not sure if they can use it to effect dedicated servers. Unless you are running your own server from your business or house you may want to check with your host anyway.

Ive had never run into the issue till I switched hosts and even then my host had to get his host to do the work around as its a virtual server.

If you are using your own private server, attach your php.ini and Ill compare your settings to mine.

It shouldn't be an issue with TP as the site I originally complied this for was running TP and SMF1.1.7. Since then the guild fell apart and I havent tested on a TP site since. As you can tell from the link I put up earlier it does work with Simple Portal though.
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on June 01, 2009, 12:09:00 PM
One other note. If you have the files set to something other than 644, it won't execute the script with the new mod security.
All files inside the WOW folder should be 644.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 01, 2009, 02:27:31 PM
ok I thought you said 755. Doesnt 644 remove the rights of the owner to delete as well? That would mean that you have to have the host remove them for you, unless Im mistaken.
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on June 01, 2009, 03:34:26 PM
644 gives the owner permission to execute, not group or public.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 01, 2009, 10:13:57 PM
I was at work at the time and did the math wrong. LOL
Title: Re: WoW - World of Warcraft Tooltips
Post by: Carya on June 01, 2009, 10:26:20 PM
Hi guys -- thanks much for the responses, Garou and Fox --

Here are a few answers.

- I'm root. It's run under a virtual hosted domain on a web server.

- Mod_Security: I asked with the folks who I rent the server from before I submitted first post to be -sure- and they confirmed mod_security is not supported nor part of a vanilla install of what I'm using. I never installed it. So that's why I said it's a non-issue.

- Permissions: I'm confused a bit... Are you talking umasks while I'm talking chmods? 755 would be xwrx-rx-r and 644 would be -wr--r--r and since the wrapper is php I thought it would have to be executable and readable. I know a lot of things in SMF are fussy about also being writable so I experimented between 755 and 777 on the directory. Here's what it looks like at server level.

# ls -al wow
total 72
drwxrwxrwx   2 www  www    512 Jun  1 03:38 ./
drwxrwxrwx  16 www  www   1024 Jun  1 06:07 ../
-rwxrwxrwx   1 www  www  57254 Jun  1 03:38 jquery-1.3.2.min.js*
-rwxrwxrwx   1 www  www    364 Jun  1 03:38 wowhead_linker.js*
-rwxrwxrwx   1 www  www    596 Jun  1 12:07 wowhead_wrapper.php*
# ls -al wow
total 72
drwxr-xr-x   2 www  www    512 Jun  1 03:38 ./
drwxrwxrwx  16 www  www   1024 Jun  1 06:07 ../
-rwxr-xr-x   1 www  www  57254 Jun  1 03:38 jquery-1.3.2.min.js*
-rwxr-xr-x   1 www  www    364 Jun  1 03:38 wowhead_linker.js*
-rwxr-xr-x   1 www  www    596 Jun  1 12:07 wowhead_wrapper.php*


- Ini File. I removed some things that folks might take advantage of, cookies etc. and posted it as you asked.

- Other options? Were there other options for trying to play with the wrapper xml call as a shell script or php call from the master web server (eg, not a virtual server) I suppose I could temporarily move the forum up to the web root and see what happened. Not sure what config stuff that would break. What about copy & paste the wrapper file contents into a file somewhere so that it's not having to inject into that file and essentially make it more a hack instead of an addon (meh I know) but make it a function call or something...

Title: Re: WoW - World of Warcraft Tooltips
Post by: Carya on June 01, 2009, 10:54:30 PM
Oops saw you just said php.ini and not info.php. Stupid dyslexia.

Where's the php.ini file live?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 02, 2009, 09:16:59 PM
Carya, the php.ini file could be anywhere depending on the server setup, there is no standard for this. If its a Linux server and you have shell access, type "locate php.ini" if its a Win server try the search function.

By file permissions we mean chmod.  :D

The wrapper creates a "virtual file" based on information it scrapes off of Wowheads site. For instance
yoursite.com/forum/wow/wowhead_wrapper.php?item=Lightbringer Faceguard should pull up an xml file like...
<wowhead>

<item id="30987">
<name>Lightbringer Faceguard</name>
<level>146</level>
<quality id="4">Epic</quality>
<class id="4">Armor</class>
<subclass id="4">Plate Armor</subclass>
<icon displayId="45684">INV_Helmet_96</icon>
<inventorySlot id="1">Head</inventorySlot>

<htmlTooltip>
<table><tr><td><b class="q4">Lightbringer Faceguard</b><br /><!--bo-->Binds when picked up<table width="100%"><tr><td>Head</td><th>Plate</th></tr></table>1483 Armor<br />+50 Strength<br />+67 Stamina<!--e--><br /><span class="socket-yellow q0">Yellow Socket</span><br /><span class="socket-meta q0">Meta Socket</span><!--ps--><br /><!--sb--><span class="q0">Socket Bonus: +4 Dodge Rating</span><br />Durability 100 / 100<br />Classes: Paladin<br />Requires Level 70</td></tr></table><table><tr><td><span class="q2">Equip: Increases defense rating by 28&nbsp;<small>(<!--r70:12:28-->11.84&nbsp;@&nbsp;L70)</small>.</span><br /><span class="q2">Equip: Increases your dodge rating by 37&nbsp;<small>(<!--r70:13:37-->1.96%&nbsp;@&nbsp;L70)</small>.</span><br /><br /><span class="q">Lightbringer Armor (0/8)</span><div class="q0 indent"><span><!--si30991-->Lightbringer Chestguard</span><br /><span><!--si30987-->Lightbringer Faceguard</span><br /><span><!--si30985-->Lightbringer Handguards</span><br /><span><!--si30995-->Lightbringer Legguards</span><br /><span><!--si30998-->Lightbringer Shoulderguards</span><br /><span><!--si34488-->Lightbringer Waistguard</span><br /><span><!--si34433-->Lightbringer Wristguards</span><br /><span><!--si34560-->Lightbringer Stompers</span></div><br /><span class="q0"><span>(2) Set: Increases the mana gained from your Spiritual Attunement ability by 10%.</span><br /><span>(4) Set: Increases the damage dealt by your Consecration ability by 10%.</span></span></td></tr></table>
</htmlTooltip>

<json>
id:30987,name:'3Lightbringer Faceguard',level:146,reqlevel:70,armor:1483,slot:1,source:[5],sourcemore:[{t:1,ti:23381,n:'Tydormu',z:3606}],classs:4,subclass:4
</json>

<jsonEquip>
slotbak:1,displayid:45684,reqlevel:70,classes:2,armor:1483,itemset:679,socket1:4,socket2:1,socketbonus:2871,defrtng:28,dodgertng:37,str:50,sta:67,dura:100,nsockets:2
</jsonEquip>
<link>http://www.wowhead.com/?item=30987</link>
</item>
</wowhead>


Then it looks in that for the items quality to color the text and replaces the link to itself with the link in the code. I don't think moving the forum would help nor would finding a way to internalize the code into SMF.

Title: Re: WoW - World of Warcraft Tooltips
Post by: Carya on June 02, 2009, 10:28:53 PM
Alrighty thanks -- that helps. So I looked at the site you listed where it was working, and yep you have it working and I sure do not...

Here is the ini file. Thanks for the tip on locate. :-) Some day I need a formal sysop class.

I skimmed it and saw nothing from my meager understanding, maybe you will find something.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 03, 2009, 08:03:56 AM
Got it. Ill take a look at it tonight as I leave for work in 5 minutes.  :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: trip001 on June 04, 2009, 08:05:36 AM
Hi,

I installed the mod the other day as the support of Itemstats has now ended. Currently have the same issue as in the quoted link below. Basically it is just a link to xml and no script appears to have run.
Quote from: Nana23 on April 15, 2009, 05:07:27 AM

Click here (http://inrage-guild.com/index.php?topic=5.msg5#msg5)

Color dont work right and no tool tip shown

i run smf 1.1.9 with a separate theme. The mod doesn't work in either the default or theme, even though both have index.templates modified for this mod.

my host supports libcurl and fopen and i have changed permissions to 644 in the wow folder supplied with the mod.

Any other ideas on things i could try?

Site is hosted on fasthosts.co.uk
Title: Re: WoW - World of Warcraft Tooltips
Post by: Carya on June 04, 2009, 10:54:52 AM
Trip --

Can tell you now, they may want some info Re: mod_security and whether it is installed on the server and such. Check out the posts in this topic regarding mod_security.

Garou --

Thanks much :-)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 04, 2009, 09:01:49 PM
Carya, I Dont know for sure that these will help for sure but I still recommend them...
magic_quotes_gpc = ON
variables_order = EGPCS

I also suggest you increase these a bit...
max_execution_time
max_input_time
memory_limit
It will help to prevent your site from timing out and preform a little better.

Nothing in that strikes me that it would actually effect the mod though but if this doesn't work I really don't know what else to tell you.  :-[

trip001, Carya is correct. mod security is the first major issue Ive come across with this mod. Then there's whatever is causing Carya's problems. The funny thing is, its acting just like the mod security issue but his host says its not running.
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on June 04, 2009, 10:31:44 PM
Here's the actual problem many will encounter with their hosts:
Quotefsock = open - won't work due to PHP suexec and main PHP restrictions. You cannot access other files / urls outside user directory /home/user/public_html
You will have to ask them if they will around the problem for you.
And I do not believe any host would not have some version of mod_security, be it an old version or new.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Carya on June 05, 2009, 09:20:27 AM
Quote from: stfox100 on June 04, 2009, 10:31:44 PM
Here's the actual problem many will encounter with their hosts:
Quotefsock = open - won't work due to PHP suexec and main PHP restrictions. You cannot access other files / urls outside user directory /home/user/public_html
You will have to ask them if they will around the problem for you.
And I do not believe any host would not have some version of mod_security, be it an old version or new.

Fox --

This having been said, what other forms of security can be imposed on php that are equivalent (I've put up my ini and build info) that I could ask the hosting provider about the server info.

Again, I've got root access and can pretty much do anything I want/need to the server. I would just prefer to run the "vanilla install" for the box because I'm not a sysadmin, I'm a developer who knows just enough admin stuff to get done what I eventually need to get done :-)

Garou --

Thanks for various suggestions. I will do research/learning on the magic_quotes_gpc and variables_order just so I know more about what I'm doing and make the changes you suggest :) (While I still stand by what I said above, I also try to be a more learned developer, or sysop friendly one hehe), and then for the three below -- how high do you suggest I go with those. I -was- surprised on max_execution_time -- that seemed pretty low. I've done a number of commercial portal builds in the past and have seen rather large numbers for things like this to keep timeouts and errors from occurring.

Since this is my only experience with SMF, what sorts of numbers are more typical for 'moderately' robust sites?

Thanks again all.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 05, 2009, 10:56:59 AM
I rarely suggest vanilla installs. For the most part they will work but all to often they are too restrictive or worse yet not restrictive enough opening you to a broad range of attacks.

memory_limit is the important on and it really depends on traffic on your server and you available memory. Id say between 100 and 500 is safe. Much more then that and your site can get bogged down when multiple apps are running and you have low memory. Less can really slow a site down as its having to pass too much info back and forth.

With all the high speed internet available now these times can safely be a little low somewhere between 90 and 120. If something doesn't pass in that amount of time there really is something wrong with it. Sites that deal primarily with dial up users may want to set it a lot higher in the 300-500 range.
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on June 05, 2009, 12:20:40 PM
Try changing:
allow_call_time_pass_reference to on in your php.ini
I've looked at your php html, and although a bit basic, but easier config, it looks ok. Unless I missed something in the miles of config lines...LOL.
If that doesn't work, I may have to study a little more on that file.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on June 12, 2009, 11:17:16 PM
Found a "bug" of sorts, when you do [wow]ItemID[/wow] it links the item fine with color and everything however the name is the number you linked instead of the actual item name. An example of a problem where you need to use ItemID is the following 2 items with the same name http://www.wowhead.com/?item=46038 http://www.wowhead.com/?item=44434 .

Would there be a way to convert the ItemID to the actual item name?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 13, 2009, 09:41:56 PM
You can enter the number ie  [wow]46038[/wow] but it will display the number not the text. The color will still match the items quality and tool tip to the proper item.

DarkCloud14's WoW Itemstats (http://www.simplemachines.org/community/index.php?topic=62358.0) works like that so I suppose its possible. Ill keep it in mind for a future update. I never really intended to compete with his mod I just needed something that would work in 2.0 and this was easy to port over from Horis' phpBB mod and it doesn't take up space in the DB like item stats does.

None the less I give credit for this issue to Blizzard though, they shouldn never give a quest item and a real item the same name.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Ferrin on June 16, 2009, 05:41:46 AM
Nice mod!

But have a suggestion for improvement. The script "power.js" should inside the local folder "wow".

Prevents a slowdown in the loading of the Forum. If the page "wowhead" for example is not fully accessible or similar.

Title: Re: WoW - World of Warcraft Tooltips
Post by: Pascoa on June 24, 2009, 02:22:27 PM
Hi garou,

First, grats for your mod.

But, im having the same problem as Carya...

- Im running 2.0 RC1-1
- The mod works FINE at default theme (both link and [wow] tag)

But at the other theme (popularFX (http://custom.simplemachines.org/themes/index.php?lemma=1257)), its not working properly.

The link goes fine and the tooltip appear,s but the [wow] tag is returning:

blahblahblah/forum/index.php/wow/wowhead_wrapper.php?item=Lightbringer%20Faceguard

I also made the chances at index.template.php and Modifications.english.php. But it´s still broken...

Any help?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 25, 2009, 02:36:39 PM
Make sure the header in the index.template.phpis set up correctly,

By default that particular theme should look like...
// ]]></script>';

echo '
</head>


and change to...
// ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

echo '
</head>


That should fix you up.

Just tested and it works on my test server.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Pascoa on June 25, 2009, 03:01:05 PM
the '; at the end just the theme down... i had to remove it to make it work again.

But i dont know why, after i removed it, the tag just started to work fine!

Thanks for your help. Really  :D :D :D
Title: Re: WoW - World of Warcraft Tooltips
Post by: bluelime on July 03, 2009, 07:15:00 AM
I get XML-code right up my face if I click on a link with [wow]-tags around it. Also the item doesn't get colorized even though both libcurl and fopen ist useable.
Is there someway around that?

Example:

<wowhead>

<item id="45142">
<name>Remorse</name>
<level>232</level>
<quality id="4">Epic</quality>
<class id="2">Weapons</class>
<subclass id="7">One-Handed Swords</subclass>
<icon displayId="58939">INV_Sword_135</icon>
<inventorySlot id="13">One-Hand</inventorySlot>

<htmlTooltip>
<table><tr><td><b class="q4">Remorse</b><br /><!--bo-->Binds when picked up<table width="100%"><tr><td>One-Hand</td><th>Sword</th></tr></table><table width="100%"><tr><td>187 - 349 Damage</td><th>Speed 1.50</th></tr></table>(178.7 damage per second)<br />+52 Agility<br />+51 Stamina<!--e--><!--ps--><br />Durability 105 / 105<br />Requires Level 80</td></tr></table><table><tr><td><span class="q2">Equip: Improves haste rating by 34&nbsp;<small>(<!--r80:36:34-->1.04%&nbsp;@&nbsp;L80)</small>.</span><br /><span class="q2">Equip: Increases your expertise rating by 29&nbsp;<small>(<!--r80:37:29-->3.54&nbsp;@&nbsp;L80)</small>.</span><br /><span class="q2">Equip: Increases attack power by 74.</span></td></tr></table>
</htmlTooltip>

<json>
id:45142,name:'3Remorse',level:232,reqlevel:80,dps:178.7,speed:1.50,slot:13,source:[2],sourcemore:[{t:1,ti:33186,n:'Razorscale',z:4273,dd:2}],classs:2,subclass:7
</json>

<jsonEquip>
slotbak:13,displayid:58939,reqlevel:80,dmgmin1:187,dmgmax1:349,dmgtype1:0,speed:1.50,atkpwr:74,hastertng:34,exprtng:29,agi:52,sta:51,dura:105,dps:178.7,sellprice:214979,mledps:178.7,mledmgmin:187,mledmgmax:349,mlespeed:1.50
</jsonEquip>
<link>http://www.wowhead.com/?item=45142</link>
</item>
</wowhead>


There is also one snippet of text there with the XML-code that says there isn't any style-information associated with this XML-file.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on July 03, 2009, 09:12:54 AM
That code is somewhat irrelevant its just the data the mod gets from Wowhead, the rest of the mod will change the style info once its in your forum. Now we just need to find out why the mod isn't translating it correctly.

The first thing I have to ask are you using a custom theme, which one, and does the mod work in the default theme if you are using a custom theme?

Title: Re: WoW - World of Warcraft Tooltips
Post by: bluelime on July 03, 2009, 05:48:28 PM
I'm running SMF 1.1.9 with PS Black theme by Fussilet. I'm sorry to say I can't test it with the default theme as it does no longer exist on my server (I really have no idea where it went).

I'll have to say you do a really good work here so far btw. Keep it up!
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on July 03, 2009, 11:39:47 PM
Wow no default theme? I'm surprised that you can get any mods to install, I bet its hiding in there someplace.

That said you have a pretty common problem I'm finding with this mod with custom themes.
Find...
// ]]></script>';

echo '
</head>


and replace with...
// ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

echo '
</head>


A lot of custom themes are popping that echo statement before the head ends. By the rules of HTML that's technically incorrect but most modern browsers let it pass anyway. I guess I need to talk to a theme designer and find out why they are doing it that way. *shrug*

Thanks for the complement, though the real credit goes to Horis, the guy that originally wrote the code for another message board system. 90% of the work is his I just formally ported it to SMF and made a couple minor changes.  :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: [unplugged] on July 07, 2009, 11:08:36 PM
Hello. I was helping someone install this mod on their site and was getting some of the same errors being asked about here. I managed to get the mod working and just figured I would share what I did.

He was having the problem with the link being /forum/index.php/wow/wowhead_wrapper.php?item=Lightbringer%20Faceguard. I removed this by going into Subs.php and finding href="wow/wowhead_wrapper.php?item=$1" and changing it to href="../wow/wowhead_wrapper.php?item=$1".

To get the .js files to be found I had to go into the index.template.php and change       // ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

   echo '
</head>
to       // ]]></script>';

global $boardurl;
  echo'<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="'.$boardurl.'/wow/jquery-1.3.2.min.js"></script>
<script src="'.$boardurl.'/wow/wowhead_linker.js"></script>';

   echo '
</head>


This seemed to do the trick, at least on his site. Everything works as desired now. The direct link, the [ url ], and the [ wow ] all work flawlessly now.
Hope this helps someone else and prevents them from spending two and a half hours editing, breaking, undoing, editing again....etc  :P  Enjoy.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on July 08, 2009, 06:29:45 AM
Thanks for posting your fix SunKing. Ill test this with the server setups I work with and if it works on all of them Ill make this a permanent change to the mod.  :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: ltdeta on July 12, 2009, 05:01:17 AM
QuoteNote: Quests, Spells, and Achievements are not currently supported.

than we can expect the other modes?  ;)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on July 12, 2009, 10:47:56 AM
The way the java script works no. I'm currently learning more about java script to see if I can make this happen however quests, spells, and achievements aren't distinguished by quality color the way  items are. I assume that's why the original author didn't include them in the script. You can still grab them via direct link such as...
[url=http://www.wowhead.com/?spell=1126]Mark of the Wild Rank 1[/url]
or
[url=http://www.wowhead.com/?spell=48469]Mark of the Wild Rank 9[/url]
and the tooltip will show. Technically that's the way Wowhead intended their powered script to work anyway.

The problems is with most forums and CMS, you can not easily enter a piece of HTML code like say...
<a href="http://www.wowhead.com/?item=30987" class="q4">Lightbringer Faceguard</a>
The additional scripts in the mod makes it much easier. :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: mangloide on July 16, 2009, 01:21:00 AM
I ran 1.1.9 and Could not get it originally working with Default Theme or Custom.

After Changing the items in wow folder to 644 - default theme worked but no custom theme would.

Use the code posted by SunKing and it now works for with with custom theme. My custom theme I only had index.template to edit - appeared everything else it pulled from default.

Thanks for all the work guys.
Title: Re: WoW - World of Warcraft Tooltips
Post by: gatek33per on July 30, 2009, 12:34:17 AM
I've gotten The Tool tips to work on Default Theme and
"Iron Wow" Theme

With the Iron Wow Template it only works using

[url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url]


For some reason I can't get it to work via
[wow]Titansteel Spellblade
[/wow]


My theme does not have a post.template.php or modifications.english.php
so i copied them over to  the "Iron Wow" themes folder..

Still not working .. and pulling my hair out :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on July 30, 2009, 09:53:59 AM
Did you check this post?
http://www.simplemachines.org/community/index.php?topic=301619.msg1997892#msg1997892

I have this running on my test server now just making that one change, I didn't even have to copy the other files over.
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on July 30, 2009, 11:43:15 AM
It could be the same problem with mod_security, version 5 or higher. The host must disable a rule to allow the call of the outside .js file. Somewhere in here, someone posted how to put that .js file in your directory to make it work.
Title: Re: WoW - World of Warcraft Tooltips
Post by: techbot on August 03, 2009, 09:50:23 PM
Has this mod been tested with SMF 1.1.9 and Tiny Portal?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on August 03, 2009, 11:04:58 PM
It was working on a TP .98 site but I haven tested it with any of the 1.0 betas. In theory it should work though. The only changes it makes to SMF is adding a button and BBC code, everything else is handled with javascript.
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on August 04, 2009, 12:28:04 AM
I had it on a SMF 1.1.8 with TP 1.03 site I believe, and it worked. I don't see any reason it wouldn't.
Title: Re: WoW - World of Warcraft Tooltips
Post by: grammaton on August 07, 2009, 07:06:23 AM
Same problem like many others.

The [wow][/wow] links are not working.
No coloured links, and the links refer to a xml file.

fopen is aktiv! (allow_url_fopen)

I am running smf 1.1.10.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on August 07, 2009, 09:59:17 AM
Have you tried either of these two fixes.

http://www.simplemachines.org/community/index.php?topic=301619.msg2148803#msg2148803

http://www.simplemachines.org/community/index.php?topic=301619.msg1997892#msg1997892

Also is it working on the default but not a custom theme or not at all? If its not working on a custom theme, which one?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on August 10, 2009, 04:35:04 PM
Would you be willing to update the addon to do the following:
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on August 11, 2009, 07:45:53 AM
The majority of this mod comes from an unsupported script written by someone else for another message board system. All I did was create the BBC and button to call the script. So whether or not the current script can be tweaked to work with anything other then Wowhead, I don't really know and haven't had time to play with it to see.

As for converting the mod to use ItemIDs... Well that kinda defeats the purpose of the mod as a user only needs to know the name of the item rather then having to go hunting for the itemID. Even though I don't necessarily agree with it, because several people have asked for it, I planed to add it eventually, I just haven't had the time. If you want to post up your code I can include and credit you for it.

The reason I chose not to use [item] was twofold.

One: I didn't convert this mod to flat out replace DarkCloud's mod, its just an alternative method.

Two: In the event that someone wanted to run both mods it wouldn't cause conflicts.

The only real reason use "item" as the BBC would be if someone stopped using DarkCloud's mod and didn't want to have to convert existing links over. As far as I'm concerned, that's not my problem and if someone really wants to change the BBC code to item, warcraft, grandma, or whatever... its not that hard but I wont be including it in this mod.

To be honest I actually prefer his mod other then the fact that it stores info in the DB on your site rather then just linking to Wowhead. Also he hasn't updated his mod to 2.x yet, which is why I wound up tracking down the code this mod uses in the first place. I just thought Id be nice and share it with everyone else, especially now that I don't play the game anymore and the guild I was working with and maintaining their site, has disbanded.
Title: Re: WoW - World of Warcraft Tooltips
Post by: grammaton on August 11, 2009, 09:33:40 AM
Quote from: GarouHave you tried either of these two fixes.

http://www.simplemachines.org/community/index.php?topic=301619.msg2148803#msg2148803

http://www.simplemachines.org/community/index.php?topic=301619.msg1997892#msg1997892

Also is it working on the default but not a custom theme or not at all? If its not working on a custom theme, which one?
Yes i tried both, and its not working on the default template.

Internet Explorer error message:

Meldung: 'null' ist Null oder kein Objekt
Zeile: 5
Zeichen: 2
Code: 0
URI: http://*zensur*/wow/wowhead_linker.js

\\Grammaton
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on August 11, 2009, 10:19:13 AM
Hmm That's an issue I have never encountered before.

Have you edited wowhead_linker.js?
Is your host using mod_security?
What are your file permissions on the files in the wow folder?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on August 11, 2009, 01:08:50 PM
Quote from: Garou on August 11, 2009, 07:45:53 AM
As for converting the mod to use ItemIDs... Well that kinda defeats the purpose of the mod as a user only needs to know the name of the item rather then having to go hunting for the itemID. Even though I don't necessarily agree with it, because several people have asked for it, I planed to add it eventually, I just haven't had the time. If you want to post up your code I can include and credit you for it.

Specifically the reason for this now, in the latest patch (3.2) there are 4 modes to the latest raid (10 man, 10 man heroic, 25 man and 25 man heroic). In the 10 man a boss drops X Y Z, in 10 man heroic the boss drops W X Y Z but the stats on X Y Z are increased to match the increased difficulty.

http://db.mmo-champion.com/search/item/blade_of_tarasque/

This is an example of 1 item, it drops from 25 man AND 25 man heroic but has different ILvls.
Title: Re: WoW - World of Warcraft Tooltips
Post by: grammaton on August 11, 2009, 03:52:04 PM
Quote from: GarouHave you edited wowhead_linker.js?
Is your host using mod_security?
What are your file permissions on the files in the wow folder?
1. No
2. No
3. testet with full permissions
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on August 12, 2009, 11:42:29 AM
grammaton, try setting permissions to 655 or 755

axodious, does the code you are using display the quality color when using item numbers? I just attempted one on my test server and it does not it just shows a plain text link with tooltip in which case one could just use url=.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on August 13, 2009, 02:25:15 PM
Quote from: Garou on August 12, 2009, 11:42:29 AM
grammaton, try setting permissions to 655 or 755

axodious, does the code you are using display the quality color when using item numbers? I just attempted one on my test server and it does not it just shows a plain text link with tooltip in which case one could just use url=.

I'm not sure I understand, currently I don't have any custom code for item id's. Currently if I do the item id (example: [wow]12345[/wow]) it will show up the same way as a url link would. I'm looking for a way so that when you do [wow]12345[/wow] it will replace the 12345 with the name of the item and have the same formatting as [wow]item name here[/wow].
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on August 13, 2009, 03:13:35 PM
I miss understood I thought you had said you coded something for that for your site. Ill see what I can come up with.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on August 13, 2009, 03:35:05 PM
Quote from: Garou on August 13, 2009, 03:13:35 PM
I miss understood I thought you had said you coded something for that for your site. Ill see what I can come up with.

Just manually added the [item] BBcode for the exact reason you explained :p
Title: Re: WoW - World of Warcraft Tooltips
Post by: krilz on August 14, 2009, 08:56:58 AM
Ok, so I recently installed this mod myself and it works like a charm after a few minutes of tinkering with the default theme. My concern however is that it doesn't work with the custom theme I have (DarkBreak from Dzinerstudio.com). I'm using SMF 1.1.10 and TP 0.9.8.

In the custom theme it makes the links in, for example, [wow]Murder[/wow] to [Murder] but the color doesn't change and when hovering above it creates a link to {forum_url}/wow/wowhead_wrapper.php?item=Murder

When clicking on above link it produces the following XML:
<wowhead>

<item id="40368">
<name>Murder</name>
<level>213</level>
<quality id="4">Epic</quality>
<class id="2">Weapons</class>
<subclass id="15">Daggers</subclass>
<icon displayId="54974">INV_Weapon_Shortblade_84</icon>
<inventorySlot id="13">One-Hand</inventorySlot>

<htmlTooltip>
<table><tr><td><b class="q4">Murder</b><br /><!--bo-->Binds when picked up<table width="100%"><tr><td>One-Hand</td><th>Dagger</th></tr></table><table width="100%"><tr><td>164 - 306 Damage</td><th>Speed 1.50</th></tr></table>(156.7 damage per second)<br /><span class="c11">(1426 feral attack power)</span><br />+25 Agility<br />+46 Stamina<!--e--><!--ps--><br />Durability 75 / 75<br />Requires Level 80<br />Item Level 213</td></tr></table><table><tr><td><span class="q2">Equip: Improves hit rating by 21&nbsp;<small>(<!--r80:31:21-->0.64%&nbsp;@&nbsp;L80)</small>.</span><br /><span class="q2">Equip: Improves haste rating by 33&nbsp;<small>(<!--r80:36:33-->1.01%&nbsp;@&nbsp;L80)</small>.</span><br /><span class="q2">Equip: Increases attack power by 86.</span><br />Sell Price: <span class="moneygold">20</span> <span class="moneysilver">19</span> <span class="moneycopper">34</span></td></tr></table>
</htmlTooltip>

<json>
id:40368,name:'3Murder',level:213,reqlevel:80,dps:156.7,speed:1.50,slot:13,source:[2],sourcemore:[{t:1,ti:15989,n:'Sapphiron',z:3456,dd:2}],classs:2,subclass:15
</json>

<jsonEquip>
slotbak:13,displayid:54974,reqlevel:80,dmgmin1:164,dmgmax1:306,dmgtype1:0,speed:1.50,feratkpwr:1426,atkpwr:86,hitrtng:21,hastertng:33,agi:25,sta:46,dura:75,dps:156.7,sellprice:201934,mledps:156.7,mledmgmin:164,mledmgmax:306,mlespeed:1.50
</jsonEquip>
<link>http://www.wowhead.com/?item=40368</link>
</item>
</wowhead>


I tried setting the wow-folder to both 644 and 755 (which was default) and didn't help. I have both fopen and curl enabled. It has something to do with the theme, I just can't figure out why.

The index.template.php
<?php
// Version: 1.1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1.4';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// 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'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
  <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
 var current_leftbar = '
, empty($options['collapse_leftbar']) ? 'false' 'true'';

 function shrinkHeaderLeftbar(mode)
 {'
;

  // Guests don't have theme options!!
  if ($context['user']['is_guest'])
 echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
  else
 echo '
smf_setThemeOption("collapse_leftbar", mode ? 1 : 0, null, "'
$context['session_id'], '");';
  echo '
document.getElementById("upshrinkLeftbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("leftbarHeader").style.display = mode ? "none" : "";

current_leftbar = mode;
 }
 // ]]></script>
 <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
 var current_rightbar = '
, empty($options['collapse_rightbar']) ? 'false' 'true'';

 function shrinkHeaderRightbar(mode)
 {'
;

  // Guests don't have theme options!!
  if ($context['user']['is_guest'])
 echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
  else
 echo '
smf_setThemeOption("collapse_rightbar", mode ? 1 : 0, null, "'
$context['session_id'], '");';

  echo '
document.getElementById("upshrinkRightbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("rightbarHeader").style.display = mode ? "none" : "";

current_rightbar = mode;
 }
  // ]]></script>

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>


<!-- nCode Image Resizer -->
<script type="text/javascript" src="'
$settings['default_theme_url'], '/ncode_imageresizer.js"></script>
<style type="text/css">
<!--
table.ncode_imageresizer_warning, table.ncode_imageresizer_warning td
{
background-color: #fefee1; /* the bgcolor behind the text and image */
}
table.ncode_imageresizer_warning {
color: #000000; /* the font color */
border: 1px solid #CCCDCD; /* the border around the whole thing */
cursor: pointer;
}
table.ncode_imageresizer_warning td {
font-size: 10px;
vertical-align: middle;
text-decoration: none;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}
-->
</style>'
;

// What is the mode?
if (isset($modSettings['ncode_imageresizer_mode']))
{
if ($modSettings['ncode_imageresizer_mode'] == 1)
$mode 'enlarge';
elseif ($modSettings['ncode_imageresizer_mode'] == 2)
$mode 'samewindow';
elseif ($modSettings['ncode_imageresizer_mode'] == 3)
$mode 'newwindow';
else
$mode 'none';
}
else
$mode 'none';

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
NcodeImageResizer.BBURL = "'
$settings['images_url'], '";
NcodeImageResizer.MODE = "'
$mode'";
NcodeImageResizer.MAXWIDTH = "'
, empty($modSettings['ncode_imageresizer_max_width']) ? : (int) $modSettings['ncode_imageresizer_max_width'], '";
NcodeImageResizer.MAXHEIGHT = "'
, empty($modSettings['ncode_imageresizer_max_height']) ? : (int) $modSettings['ncode_imageresizer_max_height'], '";
vbphrase = new Array();
vbphrase[\'ncode_imageresizer_warning_small\'] = \''
$txt['ncode_imageresizer_warning_small'], '\';
vbphrase[\'ncode_imageresizer_warning_filesize\'] = \''
$txt['ncode_imageresizer_warning_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_no_filesize\'] = \''
$txt['ncode_imageresizer_warning_no_filesize'], '\';
vbphrase[\'ncode_imageresizer_warning_fullsize\'] = \''
$txt['ncode_imageresizer_warning_fullsize'], '\';
// ]]></script>

  <!-- Gives a nice picture next to the adress -->
  <link rel="icon" href="images/nuke.ico" type="image/vnd.microsoft.icon" />

  <!-- Wowhead item links and such -->
  <script src="http://www.wowhead.com/widgets/power.js"></script>
  <script src="wow/jquery-1.2.1.js"></script>
  <script src="wow/wowhead_linker.js"></script></script>

</head>
<body>
 <div class="wrapper">
<div id="hdr-l">
<div id="hdr-r">
<div id="header">
<div id="time">'
$context['current_time'],'</div>
<div id="searcharea">'
;
echo '
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '">
<input type="text" name="search" value="'
$txt[182], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\''$txt[182], '...\';" /> ';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>
</div>
<a href="'
.$scripturl.'" title=""><span id="logo">&nbsp;</span></a>
</div>
<div id="toolbar">
<div id="nav">
<div style="float: right; padding: 2px 15px 0 0">'
;

// TinyPortal
if($context['TPortal']['leftbar'])
echo ' <a href="javascript:void(0);" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="'$settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin: 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="'$settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
if($context['TPortal']['rightbar'])
echo ' <a href="javascript:void(0);" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="'$settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' 'upshrink2.gif''" alt="*" title="'$txt['upshrink_description'], '" style="margin: 0;" border="0" /></a><img id="upshrinkTempRightbar" src="'$settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
// TinyPortal end

echo '
 </div>
'
,template_menu(),'
</div>
</div>
<div id="bnr">
<div id="userarea">'
;
if (!empty($context['user']['avatar']))
echo '<div id="db-avatar">'.$context['user']['avatar']['image'].'</div>';

if ($context['user']['is_logged'])
{
echo '
<ul>
<li><b>'
$txt['hello_member'], ' '$context['user']['name'],'</b></li>';

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo '<li>' ,$txt[152], ' <a href="'$scripturl'?action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt[153] : $txt[471], '</a>'$txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'],'</li>';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<li><b>'$txt[616], '</b></li>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<li>'$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '</li>';

echo '
<li><a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a></li>
<li><a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a></li>
</ul>'
;
}

// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>
<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '"  style="margin: 0px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<b>Username: </b><br />
<input class="loginput" type="text" name="user" size="17" />
<br/>
<b>Password: </b><br />
<input class="loginput" type="password" name="passwrd" size="17" />
<input class="logbutton" type="submit" value="'
$txt[34], '" /><br />
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}
echo '
</div>
</div>
</div>
</div>
<div id="bdy-l">
<div id="bdy-r">
<div id="bdy-tl">
<div id="bdy-tr">
<div id="bodyarea">
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>'
;

// TinyPortal integrated bars
if($context['TPortal']['leftbar'])
{
echo '<td width="' ,$context['TPortal']['leftbar_width'], '" style="padding: ' , isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' 'px; padding-top: 8px;padding-right: 1ex;" valign="top">
<div id="leftbarHeader"'
, empty($options['collapse_leftbar']) ? '' ' style="display: none;"'' style="padding-top: 5px; width: ' ,$context['TPortal']['leftbar_width'], 'px;">';
TPortal_sidebar('left');
echo '</div></td>';

}

echo '<td width="100%" align="left" valign="top" style="padding-top: 12px; padding-bottom: 10px;">';
if($context['TPortal']['centerbar'])
echo '<div>' TPortal_sidebar('center') , '</div>';
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '</td>';

// TinyPortal integrated bars
if($context['TPortal']['rightbar']){
echo '<td style="padding: ' , isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' 'px; padding-top: 8px; padding-left: 1ex;" valign="top" align="right">
<div id="rightbarHeader"'
, empty($options['collapse_rightbar']) ? '' ' style="display: none;"'' style="width: ' ,$context['TPortal']['rightbar_width'], 'px; text-align: left; padding-top: 5px;">';
TPortal_rightbar();
echo '</div></td>';
}
echo '</tr></table>
</div>
</div>
</div>
</div>
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="ftr">
<div id="ftr-l">
<div id="ftr-r">
<div id="footerarea">
  '
theme_copyright(), '<br />'tportal_version(), ' | DarkBreak by <a href="http://www.dzinerstudio.com" target="_blank">DzinerStudio</a><br />';

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>
</div>
</div>
</div>'
;

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: smaller; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '</div>';
}

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context$settings$options$scripturl$txt;

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm''forum''tpadmin')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if (isset($_GET['dl']))
$current_action 'dlmanager';
if (isset($_GET['board']) || isset($_GET['topic']))
$current_action 'forum';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first 'last';
$last 'first';
}
else
{
$first 'first';
$last 'last';
}


// Show the start of the tab section.

echo '
  <ul>'
;
  // Show the [home] button.
echo '<li><a' $current_action=='home' ' class="current"' '' ' href="'$scripturl'"><span>' $txt[103] , '</span></a></li>';

  if($settings['TPortal_front_type']!='boardindex')
  // Show the [forum] button.
echo '<li><a' $current_action=='forum' ' class="current"' '' ' href="'$scripturl'?action=forum"><span>' $txt['tp-forum'] , '</span></a></li>';

  // Show the [help] button.
echo '<li><a' $current_action=='help' ' class="current"' '' ' href="'$scripturl'?action=help"><span>' $txt[119] , '</span></a></li>';

  // How about the [search] button?
if ($context['allow_search'])
echo '<li><a' $current_action=='search' ' class="current"' '' ' href="'$scripturl'?action=search"><span>' $txt[182] , '</span></a></li>';

  // The [calendar]!
if ($context['allow_calendar'])
echo '<li><a' $current_action=='calendar' ' class="current"' '' ' href="'$scripturl'?action=calendar"><span>' $txt['calendar24'] , '</span></a></li>';

  // Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a' $current_action=='admin' ' class="current"' '' ' href="'$scripturl'?action=admin"><span>' $txt[2] , '</span></a></li>';

  // Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a' $current_action=='profile' ' class="current"' '' ' href="'$scripturl'?action=profile"><span>' $txt[79] , '</span></a></li>';

  // Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a' $current_action=='pm' ' class="current"' '' ' href="'$scripturl'?action=pm"><span>' $txt['pm_short'] , '</span></a></li>';

 // the [member] list button
if ($context['allow_memberlist'])
echo '<li><a ' $current_action=='mlist' ' class="current"' '' ' href="'$scripturl'?action=mlist"><span>' $txt[331] , '</span></a></li>';

 // If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li><a ' $current_action=='login' ' class="current"' '' ' href="'$scripturl'?action=login"><span>' $txt[34] , '</span></a></li>';

  // If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li><a ' $current_action=='register' ' class="current"' '' ' href="'$scripturl'?action=register"><span>' $txt[97] , '</span></a></li>';

  // Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a ' $current_action=='logout' ' class="current"' '' 'href="'$scripturl'?action=logout;sesc='$context['session_id'], '"><span>' $txt[108] , '</span></a></li>';

echo '
</ul>'
;


}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'last' 'first' '">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_back">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'mirror''tab_' $context['right_to_left'] ? 'first' 'last' '">&nbsp;</td>';
}

?>


The Settings.english.php
<?php
// Version: 1.1.4; Settings

$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';
$txt['theme_description'] = 'A dark modern looking gaming type theme for SMF.<br /><br />Theme by <a href="www.dzinerstudio.com">DzinerStudio</a>.';

// --- Begin added code - Advanced Visual Verification ---
$txt['ncode_imageresizer_warning_small'] = 'Click this bar to view the full image.';
$txt['ncode_imageresizer_warning_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s and weighs %3$sKB.';
$txt['ncode_imageresizer_warning_no_filesize'] = 'This image has been resized. Click this bar to view the full image. The original image is sized %1$sx%2$s.';
$txt['ncode_imageresizer_warning_fullsize'] = 'Click this bar to view the small image.';
$txt['ncode_imageresizer_mode'] = 'Resize Mode';
$txt['ncode_imageresizer_original'] = 'Keep original size';
$txt['ncode_imageresizer_enlarge_same'] = 'Enlarge in same document';
$txt['ncode_imageresizer_open_same'] = 'Open in same window';
$txt['ncode_imageresizer_open_new'] = 'Open in new window';
$txt['ncode_imageresizer_max_width'] = 'Maximum width';
$txt['ncode_imageresizer_max_height'] = 'Maximum height<br /><span class="smalltext">Leave blank for no max height.</span>';
// --- End added code ---

$txt['wow'] = 'WoW Tooltip';

?>
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on August 15, 2009, 08:41:52 PM
Hmm Looks like Ill have to update the instructions for installing on other themes....
When I wrote that bit I forgot that I had a newer jquery script in the package

In your index.template.php Change where it says...
<script src="wow/jquery-1.2.1.js"></script>
to
<script src="wow/jquery-1.3.2.min.js"></script>
Title: Re: WoW - World of Warcraft Tooltips
Post by: krilz on August 16, 2009, 02:46:54 AM
Thanks for the reply, it now works like a charm! Much appreciated (and sexy) mod.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Fooz on August 31, 2009, 07:39:51 AM
Quote from: grammaton on August 11, 2009, 09:33:40 AM
Quote from: GarouHave you tried either of these two fixes.

http://www.simplemachines.org/community/index.php?topic=301619.msg2148803#msg2148803

http://www.simplemachines.org/community/index.php?topic=301619.msg1997892#msg1997892

Also is it working on the default but not a custom theme or not at all? If its not working on a custom theme, which one?
Yes i tried both, and its not working on the default template.

Internet Explorer error message:

Meldung: 'null' ist Null oder kein Objekt
Zeile: 5
Zeichen: 2
Code: 0
URI: http://*zensur*/wow/wowhead_linker.js

\\Grammaton

I'm actually getting the same error on my page. But here is what I'm experiencing.

wow items mod works fine on my boards.
I have simpleportal 2.2.2 as my front and here the BBC isn't working. Or well it makes the [itemname] tag but links to the wrapper instead.

As I said it works great on the forum boards just not on my front page. I even tried making the changes you suggested for cusom themes.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on September 01, 2009, 10:49:09 AM
You sure you have the right jquery call?

<script src="wow/jquery-1.3.2.min.js"></script>

Until recently I had it listed as jquery-1.2.1.js forgetting that I had dropped the newest version of the script in the mod.

You might also want to enter the full path to the wow folder as well, ie... http://www.yoursite.com/forum/wow/jquery-1.3.2.min.js also for the wow/wowhead_linker.js. Sometimes that helps but it may increase the time it takes for the tooltip to actually pop up.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Fooz on September 03, 2009, 01:33:14 PM
Quote from: Garou on September 01, 2009, 10:49:09 AM
You sure you have the right jquery call?

<script src="wow/jquery-1.3.2.min.js"></script>

Until recently I had it listed as jquery-1.2.1.js forgetting that I had dropped the newest version of the script in the mod.

You might also want to enter the full path to the wow folder as well, ie... http://www.yoursite.com/forum/wow/jquery-1.3.2.min.js also for the wow/wowhead_linker.js. Sometimes that helps but it may increase the time it takes for the tooltip to actually pop up.

As i stated, my wow itooltips are working fine on the forums. So yes i have the right jquery version :)

It's propably something to do with either simpleportal or the maybe jqlightbox version of jquery is messing with me...?

//Edit: disabling JQLightbox makes no diff.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on September 03, 2009, 06:57:07 PM
go to the page in question and tell your browser to view the source. Then look for the </head> and see if and how the js files are listed there.

Ive got a feeling that SP might be using its own headers or its in a different folder which could also be causing the problem.

When I get home tonight I will also have to get the new version of SP because I think there will probably be issues with the new article and pages system they just put in too.
Title: Re: WoW - World of Warcraft Tooltips
Post by: iosys on September 03, 2009, 11:31:18 PM
cool thanks
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on September 04, 2009, 12:48:10 AM
hmm well its all working fine for me on my test site and live site with the default theme. The only thing I haven't tested yet is using the portal in stand alone mode as I'm having issues with that unrelated to the mod.

Are you using a custom theme, do you have a link to the site?

Title: Re: WoW - World of Warcraft Tooltips
Post by: Fooz on September 04, 2009, 01:11:00 AM
Quote from: Garou on September 04, 2009, 12:48:10 AM
hmm well its all working fine for me on my test site and live site with the default theme. The only thing I haven't tested yet is using the portal in stand alone mode as I'm having issues with that unrelated to the mod.

Are you using a custom theme, do you have a link to the site?

The <script> is just above my </head> so I dont really know what the problem should be. But here's the link http://www.enafos.dk/index.php (http://www.enafos.dk/index.php)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on September 04, 2009, 07:29:36 AM
The only links I could find on your site were on the front page in some block at the top, which worked but I'm not sure if you are getting the data some other way for that block.

I still suggest trying to change...
<script src="/wow/jquery-1.3.2.min.js"></script>
<script src="/wow/wowhead_linker.js"></script>

to...
<script src="http://www.enafos.dk/wow/jquery-1.3.2.min.js"></script>
<script src="http://www.enafos.dk/wow/wowhead_linker.js"></script>

Title: Re: WoW - World of Warcraft Tooltips
Post by: Fooz on September 04, 2009, 02:15:50 PM
Quote from: Garou on September 04, 2009, 07:29:36 AM
The only links I could find on your site were on the front page in some block at the top, which worked but I'm not sure if you are getting the data some other way for that block.

I still suggest trying to change...
<script src="/wow/jquery-1.3.2.min.js"></script>
<script src="/wow/wowhead_linker.js"></script>

to...
<script src="http://www.enafos.dk/wow/jquery-1.3.2.min.js"></script>
<script src="http://www.enafos.dk/wow/wowhead_linker.js"></script>


Just checked that out and still no go :/
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on September 08, 2009, 04:11:12 PM
Ok, so I'm running an SMF forum using 1.1.x and using the mod fine. However I just installed a 2.0 RC version of SMF and I am having the same issues all throughout this post where using a url link works but using the custom [wow] doesn't work (colored background and a link that forwards to the index). This is a fresh install (less than an hour old) ran through all the settings roughly copying from my other forum.

I've tried (I think) every attempt to fix it listed in this forum with no luck.

*EDIT*
Turns out the test domain I installed SMF 2.0 on was actually on a different server. Looks like it is a ModSecurity issue, will continue to look into it.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on September 08, 2009, 06:50:29 PM
Have your host look at this http://blog.modsecurity.org/2007/02/handling-false.html

Its the best info I have found yet for getting around the rules for a particular file.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on September 09, 2009, 05:36:43 PM
Quote from: Garou on September 08, 2009, 06:50:29 PM
Have your host look at this http://blog.modsecurity.org/2007/02/handling-false.html

Its the best info I have found yet for getting around the rules for a particular file.


Hmm, so when I turn on "Search Engine Friendly URLs" in SMF it seems to be messing up the [wow] links. Not ModSecurity (which is compiled into the server but not enabled).

*EDIT*
Not directly related to the mod but for a while my test forum was working with "Search Engine Friendly URLs" enabled but not allowing the [wow] links to work. Now it won't let me browse a category of the forum (e.g. main page -> General Discussion), it just sits there endlessly loading.

*EDIT #2*
Ok it seems that the endless loading is a bug with Chrome when switching Search Engine Friendly URLs from off to on (If I open the forum in a new tab after I turn it on it works). However, the bug still exists where if this option is enabled THAT is what is causing [wow] to not work for me.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on September 09, 2009, 08:11:54 PM
Hmmm I just tested this apparently effects 2.x on Apache servers as well.

To be honest I don't have a clue whats causing this. I don't know enough about how SMF converts urls to their SEF format. The only thing I can think of is if SMF is using a Java Script to convert their urls it could be conflicting with one or both of the java scripts in this mod, neither of which were written by me as I don't really understand Java.

More over I never thought to test the mod with SEF turned on.
One because SEF only works on Apache Servers, which not everyone uses.
Two SEF really does nothing to improve Search Engine Optimization anymore. Almost all modern Spiders will search and index an SMF site just fine with or without SEF turned on.

I can get in to all kinds of reasons not to use SEF's but that's not what I am here for. Ill take a look and see if I can come up with something but this going to take a while while I tear apart SMF to see what its doing.



Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on September 09, 2009, 09:13:11 PM
Quote from: Garou on September 09, 2009, 08:11:54 PM
Hmmm I just tested this apparently effects 2.x on Apache servers as well.

To be honest I don't have a clue whats causing this. I don't know enough about how SMF converts urls to their SEF format. The only thing I can think of is if SMF is using a Java Script to convert their urls it could be conflicting with one or both of the java scripts in this mod, neither of which were written by me as I don't really understand Java.

More over I never thought to test the mod with SEF turned on.
One because SEF only works on Apache Servers, which not everyone uses.
Two SEF really does nothing to improve Search Engine Optimization anymore. Almost all modern Spiders will search and index an SMF site just fine with or without SEF turned on.

I can get in to all kinds of reasons not to use SEF's but that's not what I am here for. Ill take a look and see if I can come up with something but this going to take a while while I tear apart SMF to see what its doing.

I just turned it off once I figured out what it was, more or less just letting you know what the problem is; Hope you can get it fixed. ;)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on October 13, 2009, 06:02:33 PM
Found a new bug when creating an index page via SSI.php.

Several of the variables in the code are static and not dynamic, for example in the index.template.php you have <script src="wow/jquery-1.3.2.min.js"></script>. This is fine unless you are using a file that isn't in the forum root. I have a domain and in the domain is /forum where the SMF forum is, also in the root of that domain I have an index.php which is using SSI.php. If I copy the entire wow dir to the domain root it works fine, but there should be a variable you can put to say that it's in the root of the forum dir.

I believe you can change <script src="wow/jquery-1.3.2.min.js"></script> to <script src="' . $boardurl . '"/wow/jquery-1.3.2.min.js"></script>. However there are some settings in the Javascript that are doing the same thing and I don't know how to change them.

*UPDATE*

$boardurl hasn't been globaled at that point and I'm not sure if it's safe to global it.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on October 13, 2009, 09:51:12 PM
I'm in the process of rewriting the mod  for RC2 as there are a couple places that I hook the bbc code to that have moved or changed. Ill see what I can come up with. A similar suggestion (http://www.simplemachines.org/community/index.php?topic=301619.msg2148803#msg2148803) was made by SunKing before I just haven't had the time to look into it as Ive been doing the updates for the Custom Form Mod lately and that alone is eating up most of my spare time.

As far as the java script goes, I'm not sure what to do about that, I have no java experience, I just borrowed the original script and the author abandoned it long before that. He really didn't care for the way it worked himself but unfortunately nobody has come up with anything better yet.

When I put it all together it was a custom job for a friends guild site (which has since disbanded) and I thought it would be nice to share with the rest of the community. The really nice thing about it is that its portable and can be worked into just about any type of forum software, Wordpress and a few other things pretty easily. The only thing I wrote for it was the BBC and the install package both of which were fairly easy. I never would have thought there would be so many odd glitches with it.  :(
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on October 14, 2009, 01:05:46 PM
After doing some digging it isn't part of the Javascript that is also not dynamic, it's the code in the Subs.php.

<add><![CDATA[
array(
'tag' => 'wow',
'type' => 'unparsed_content',
'content' => '<b><a style="background-color:#303030" href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
]]></add>


The href="wow/wowhead_wrapper.php?item=$1" needs to be similar to what I said about the script inclusion. Again $boardurl isn't globaled at that point in Subs.php and I'm not sure how safe it is to global it. However when you do add $boardurl to these 2 places with them globaled it works.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on October 14, 2009, 01:15:22 PM
Quote from: Fooz on August 31, 2009, 07:39:51 AM
Quote from: grammaton on August 11, 2009, 09:33:40 AM
Quote from: GarouHave you tried either of these two fixes.

http://www.simplemachines.org/community/index.php?topic=301619.msg2148803#msg2148803

http://www.simplemachines.org/community/index.php?topic=301619.msg1997892#msg1997892

Also is it working on the default but not a custom theme or not at all? If its not working on a custom theme, which one?
Yes i tried both, and its not working on the default template.

Internet Explorer error message:

Meldung: 'null' ist Null oder kein Objekt
Zeile: 5
Zeichen: 2
Code: 0
URI: http://*zensur*/wow/wowhead_linker.js

\\Grammaton

I'm actually getting the same error on my page. But here is what I'm experiencing.

wow items mod works fine on my boards.
I have simpleportal 2.2.2 as my front and here the BBC isn't working. Or well it makes the [itemname] tag but links to the wrapper instead.

As I said it works great on the forum boards just not on my front page. I even tried making the changes you suggested for cusom themes.

You are most likely having the same issue I am currently talking with Garou about.

He said to change the <script> on your main site to <script src="http://www.enafos.dk/wow/wowhead_linker.js"></script>, he was on the right track but I'm going to assume that your forum isn't in the root of your website but most likely in a sub directory such as http://www.enafos.dk/forum/. If you copy the wow directory from your forum into the root of your website it should work. So if it was in http://www.enafos.dk/forum/wow/ copy it to http://www.enafos.dk/wow/.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on October 14, 2009, 04:36:37 PM
that was going to be my next sugestion. Drop the wow folder in the root directory and adjust the calls in the header to point directly to the folder.
Title: Re: WoW - World of Warcraft Tooltips
Post by: skullmonkey on October 17, 2009, 05:58:53 PM
How do I change that the background gets the forum color? I get some dark gray color.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on October 17, 2009, 06:32:36 PM
Quote from: Garou on May 28, 2009, 10:33:33 PM
Ouch was I wrong LOL

Its in ./Sources/Subs.php

Find...
'content' => '<b><a style="background-color:#303030" href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

To change the background to another color replace #303030 with a different color code.

To remove the background all together replace with...
'content' => '<b><a href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

Again I don't recommend this and any color you change the background to shouldn't be similar to the other quality colors as you wont be able to see the text.

As for the font and font size there isn't anything in the mod that effects those. Its actually imports the font styles that Wowhead is using on their site.

Your other option be to use something like...
[url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url]
instead of the "wow" tag.
Title: Re: WoW - World of Warcraft Tooltips
Post by: skullmonkey on October 17, 2009, 06:57:04 PM
Thanks :D Works like charm!
S@
Title: Re: WoW - World of Warcraft Tooltips
Post by: Smoothbrain on November 04, 2009, 03:10:54 PM
Hello Garou, thanks for making this mod.  I am having a couple issues with it. 
My website is here: http://bighuge38.com
first, I am running the skin wow-dk119v1 and have tried to put the mods in as you suggested.  That led me to the error where when I clicked on the link after using the [wow][/wow] code it led me to a page with code.  So i went back to my index.template.php and looked and put in the modified code with the echo' at the end.  Now when I click on the link I get a 403 Forbidden error and I still don't get the info on mouseover.  Here is an attachment of my current code:
// The main sub template above the content.
function template_main_above()
{
   global $context, $settings, $options, $scripturl, $txt, $forum_version, $language, $modSettings;

   $csect_cookie = 'SMF_user_' . $context['user']['id'] . '_CSect';
   
   if(isset($_COOKIE[$csect_cookie]) && !empty($_COOKIE[$csect_cookie]))
       $settings['collapsed_sects'] = explode("\n", $_COOKIE[$csect_cookie]);
   $settings['csect_cookie'] = $csect_cookie;
   
   if (isset($options['theme_color']))
   $mycolor = $options['theme_color'];
else{
   // Defaults.
   $options['theme_color'] = isset($settings['theme_default_color']) ? $settings['theme_default_color'] : 'default_orc';
   $mycolor=$options['theme_color'];
   }
if(isset($settings['allow_color_change']) && $settings['allow_color_change'] == 'no'){
   // Set user back to default theme if "personal theme option" is disabled
   $options['theme_color'] = isset($settings['theme_default_color']) ? $settings['theme_default_color'] : 'default_orc';
   $mycolor=$options['theme_color'];
}

   // Show right to left and the character set for ease of translating.
   echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', ' xml:lang="', $txt['lang_dictionary'], '" lang="', $txt['lang_dictionary'], '"><head>
   <meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
   <meta http-equiv="Content-Script-Type" content="text/javascript" />
   <meta http-equiv="Content-Style-Type" content="text/css" />
   <meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
   <meta name="robots" content="noindex" />', '
   <meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
   <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
   <script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/collapse.js?fin11"></script>';

if(empty($settings['show_dhtml_menu']))
   echo '
   <script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/menu.js?fin11"></script>';

   echo '
   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var smf_theme_url = "', $settings['theme_url'], '";
      var smf_images_url = "', $settings['images_url'], '";
      var smf_scripturl = "', $scripturl, '";
      var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
      var smf_charset = "', $context['character_set'], '";
   // ]]></script>
   <title>', $context['page_title'], '</title>';

   // The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
   echo '
   <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />
   <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/'.$mycolor.'.css?fin11" />';


if(empty($settings['show_dhtml_menu']))
   echo '
   <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/menu.css?fin11" />';

   echo '
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />
   <!--[if IE 5 ]><link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/ie5.css?fin11"><![endif]-->';
   /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
      Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
      Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
      Standards compliance mode happens when you use xhtml... */
   if ($context['browser']['needs_size_fix'])
      echo '
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';

   // 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, '" />
   <link rel="forum" href="', $scripturl, '?action=forum" target=" _blank" />';

   // If RSS feeds are enabled, advertise the presence of one.
   if (!empty($modSettings['xmlnews_enable']))
      echo '
   <link rel="alternate" type="application/rss+xml" title="', $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';

   // If we're viewing a topic, these should be the previous and next topics, respectively.
   if (!empty($context['current_topic']))
      echo '
   <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
   <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

   // If we're in a board, or a topic for that matter, the index will be the board's index.
   if (!empty($context['current_board']))
      echo '
   <link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';

   // We'll have to use the cookie to remember the header...
   if ($context['user']['is_guest'])
   {
      $options['collapse_header'] = !empty($_COOKIE['upshrink']);
      $options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
   }

   // Output any remaining HTML headers. (from mods, maybe?)
   echo $context['html_headers'], '

   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';

      function shrinkHeader(mode)
      {';

   // Guests don't have theme options!!
   if ($context['user']['is_guest'])
      echo '
         document.cookie = "upshrink=" + (mode ? 1 : 0);';
   else
      echo '
         smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

   echo '
         document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

         document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";

         current_header = mode;
      }
   // ]]></script>
   // ]]></script>
   <script src="http://www.wowhead.com/widgets/power.js"></script>
   <script src="wow/jquery-1.3.2.min.js">
   </script><script src="wow/wowhead_linker.js"></script> ';   
   
   echo '
   </head>
   </head>
<body>
<a name="top_t" id="top_t"></a>';

   // Because of the way width/padding are calculated, we have to tell Internet Explorer 4 and 5 that the content should be 100% wide. (or else it will assume about 108%!)
   echo '
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" >
<tbody>
   <tr><td align="left" width="170"', empty($settings['header_logo_url']) ? ' class="topbg_l"' : ' class="topbg_l2"', ' height="38">&nbsp;</td><td colspan="2" align="left" class="topbg" valign="middle">&nbsp;
      </td><td align="right" width="37" class="topbg_r" valign="top">
      &nbsp;
      </td>
   </tr>  </tbody>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tbody>
    <tr>
      <td width="15" class="area_l"><img src="', $settings['images_url'], '/area_blank.gif" border="0" alt="" /></td><td>
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
            <td class="hd_border_l"><img src="', $settings['images_url'], '/hd_border_l.gif" border="0" alt="" /></td>
            <td id="headerarea" align="center" width="100%" style="position: relative; padding: 0 0 0 0;">';

   // The logo and the three info boxes.
   echo '
      <table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="position: relative;">
         <tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;" ', '>
            <td valign="top">
               <div>
                  <table width="100%"', empty($settings['header_logo_url']) ? ' class="headerbodies"' : ' class="headerbodies3"', ' cellpadding="0" cellspacing="5" border="0">
                  <tr><td width="10%"><!--blank--></td>
   <td width="60%" valign="top" class="headertext" align="left" height="65" >
   <div style="width: 100%; overflow: hidden;">
';

   // This part is the logo and forum name.  You should be able to change this to whatever you want...
               
   if (empty($settings['header_logo_url']))
      echo '
<div style="font-family: Georgia, sans-serif; font-size: 30px; padding: 5px 0 12px 90px; white-space: nowrap; float: left; background-image: url(images/header_bg_r.png;">', $context['forum_name'], '</div>
<div style="float: right; width: 80%;"><!-- blank --></div>';
   else
      echo '
               <img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'], '" border="0" />';

   echo '   
   </div></td>';

   if (!empty($context['user']['avatar']))
   {
   if(empty($settings['top_avatar_resize']))
   {
   $context['user']['avatar']['image'] = strtr($context['user']['avatar']['image'], array("class=\"avatar\"" => "class=\"avatar_t\""));
   }
      echo '<td valign="middle">', $context['user']['avatar']['image'], '</td>';
   }

   echo '
      <td width="30%" class="headertext_r" valign="top" align="left" nowrap="nowrap">';

   // If the user is logged in, display stuff like their name, new messages, etc.
   if ($context['user']['is_logged'])
   {
      echo '
                     ', $txt['hello_member'], ' <b>', $context['user']['name'], '</b>';

      // Only tell them about their messages if they can read their messages!
      if ($context['allow_pm'])
         echo ', ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
      echo '.<br />';

      // Is the forum in maintenance mode?
      if ($context['in_maintenance'] && $context['user']['is_admin'])
         echo '
                     <b>', $txt[616], '</b><br />';

      // Are there any members waiting for approval?
      if (!empty($context['unapproved_members']))
         echo '
                     ', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';

      // Show the total time logged in?
      if (!empty($context['user']['total_time_logged_in']))
      {
         echo '
                     ', $txt['totalTimeLogged1'];

         // If days is just zero, don't bother to show it.
         if ($context['user']['total_time_logged_in']['days'] > 0)
            echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

         // Same with hours - only show it if it's above zero.
         if ($context['user']['total_time_logged_in']['hours'] > 0)
            echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

         // But, let's always show minutes - Time wasted here: 0 minutes ;).
         echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
      }

      echo '
                     <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
                     <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
                     
   }
   // Otherwise they're a guest - so politely ask them to register or login.
   else
   {
      echo '           
                     ', $txt['welcome_guest'], '<br />
                     <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>

                     <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
                        <input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
                        <select name="cookielength">
                           <option value="60">', $txt['smf53'], '</option>
                           <option value="1440">', $txt['smf47'], '</option>
                           <option value="10080">', $txt['smf48'], '</option>
                           <option value="43200">', $txt['smf49'], '</option>
                           <option value="-1" selected="selected">', $txt['smf50'], '</option>
                        </select>
                        <input type="submit" value="', $txt[34], '" /><br />
                        ', $txt['smf52'], '
                        <input type="hidden" name="hash_passwrd" value="" />
                     </form>';
   }
   echo '
                     </td></tr>
               </table>
               </div>
            </td>
           
         </tr>
      </table>';

   echo '
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
            <td class="maintab_bgba" align="left" nowrap="nowrap">
   <div style="width: 100%; overflow: auto;">';
      // Show the menu here, according to the menu sub template.
      template_menu();
      echo '
            </div></td><td class="maintab_bgb" align="right" width="25"><div><a href="#top_t" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 4px 2px 0;" border="0" /></a></div></td>
         </tr>
      </table>
      <table width="100%" class="headerbodies2a" cellpadding="0" cellspacing="0" border="0">
         <tr>
         <td class="headernews" height="24" width="95%" align="left"><!-- News -->';
         
   if (!empty($settings['enable_news']))     
      echo '
      <span style="text-transform: uppercase; font-weight: bold;">', $txt[102], '</span> :  ', $context['random_news_line'] , ' ';

   echo '
   </td>
   <td class="currenttime" width="5%" valign="top" nowrap="nowrap">', $context['current_time'] , '</td>
         </tr>
      </table>
      <table width="100%" class="headerbodies2" cellpadding="0" cellspacing="0" border="0">
         <tr>
      <td valign="middle" align="left" style="padding: 8px 0px 8px 10px;" width="100%">', theme_linktree(), '</td>
      <td valign="middle"><a href="', $scripturl, '?action=search;advanced" class="searchb" title="', $txt['smf298'], '"><img src="', $settings['images_url'], '/search2_f.gif" border="0" alt="', $txt['smf298'], '" /></a></td>
      <td valign="middle" align="right" style="padding: 8px 10px 8px 0px;">
      <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
               <input type="text" name="search" value="', $txt[182], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt[182], '...\';" style="width: 150px;" />';

   // Search within current topic?
   if (!empty($context['current_topic']))
      echo '
                     <input type="hidden" name="topic" value="', $context['current_topic'], '" />';

      // If we're on a certain board, limit it to this board ;).
   elseif (!empty($context['current_board']))
      echo '
                  <input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

   echo '
               </form>
</td>
         </tr>
      </table>
      <table width="100%" class="headerbodies2" cellpadding="0" cellspacing="0" border="0">
         <tr><td class="hd_bottom_l" width="46px"></td><td class="hd_bottom" height="24"></td><td class="hd_bottom_r" width="46px"></td></tr></table>';

   echo '
            </td><td class="hd_border_r"><img src="', $settings['images_url'], '/hd_border_r.gif" border="0" alt="" /></td>
         </tr>
      </table>';

   // The main content should go here.  A table is used because IE 6 just can't handle a div.

   echo '
   <table width="100%" cellpadding="0" cellspacing="0" border="0">
   <tr>
   <td class="hd_border_l" style="width: 8px; background-color: #000;"><!-- blank --></td>
   <td class="main_area_tl" style="width: 16px;"><!-- tl --></td>
   <td class="main_area_tc" height="3"><!-- tc --></td>
   <td class="main_area_tr" style="width: 16px;"><!-- tr --></td>

   <td class="hd_border_r" style="width: 8px; background-color: #000;"><!-- blank --></td></tr>
   <tr>
      <td class="hd_border_l" style="width: 8px;"><img src="', $settings['images_url'], '/hd_border_l.gif" border="0" alt="" /></td>
      <td class="main_area_ml" style="width: 16px;" align="left" valign="top"><div class="main_area_tlf"><img src="', $settings['images_url'], '/main_area_t_blank.gif" border="0" alt="" /></div></td>
      <td id="bodyarea" style="padding: 0px 1px 12px 1px;">';


   if ($context['user']['is_admin'])
{
      if (empty($txt['necessary_to_translate']))
   echo '
      <div style="margin: 2ex; padding: 2ex; border: 2px dashed #cc3344; color: black; background-color: #e7e7f7;">
         <div style="float: left; width: 2ex; font-size: 2em; color: red;">!!</div>
         <b style="text-decoration: underline;">Attention of wow-dk theme:</b><br />
         <div style="padding-left: 6ex;">
            You have to create &quot;<b>Modifications.<span style="color: red;"><acronym title="Name of language that you are using">' , $language , '</acronym></span>.php</b>&quot; in the &quot;<b>languages</b>&quot; directory ( <i>', $settings['theme_url'], '/languages/</i> ) of your wow-dk theme.<br /><br />
            Duplicate the &quot;<i>Modifications.english.php</i>&quot; of the &quot;languages&quot; directory of wow-dk. Next, rename it according to the language for which you use the file.
         </div>
      </div>';
}

}
Title: Re: WoW - World of Warcraft Tooltips
Post by: Smoothbrain on November 04, 2009, 03:42:54 PM
Ok I think I fixed it all now however I seem to have an extra // ]] somehow as it is showing up in the top of my page.  Any suggestions?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on November 04, 2009, 08:01:33 PM
According to your post above your code looks like...

         current_header = mode;
      }
   // ]]></script>
   // ]]></script>
   <script src="http://www.wowhead.com/widgets/power.js"></script>
   <script src="wow/jquery-1.3.2.min.js">
   </script><script src="wow/wowhead_linker.js"></script> ';   
   
   echo '
   </head>
   </head>
<body>


And it should look like...

         current_header = mode;
      }
      // ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

   echo '
   </head>
<body>


The second instance of // ]]></script> is whats causing the problem also you don't need the second </head>
Title: Re: WoW - World of Warcraft Tooltips
Post by: Smoothbrain on November 06, 2009, 12:28:01 PM
thanks so much.  I will try that out.
Title: Re: WoW - World of Warcraft Tooltips
Post by: tattooedpierre on November 09, 2009, 02:56:27 PM
I cant get any hover effect to work so I tried to remove the current version posted today.. and I get wowhead_2_x_b.xml   Modification parse error. Any ideas? Or can you help with a manual removal? Nothing has been added since I installed this mod.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on November 09, 2009, 06:39:57 PM
None of the tooltips work? A straight link to Wowhead like http://www.wowhead.com/?item=30987 should work even if a  BBC like [wow]Lightbringer Faceguard[/wow] doesn't work.

Whats the exact error you are receiving? It will help in trying to get it uninstalled.
Title: Re: WoW - World of Warcraft Tooltips
Post by: tattooedpierre on November 11, 2009, 02:52:57 PM
I manually removed it, but thanks anyways. The text was being coloured but on hover nothing happened.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on November 11, 2009, 11:48:02 PM
Hmmm That's odd, if the text color was being changed then the mod is grabbing the item from Wowhead. Im not sure why the tooltip wouldnt display. Were you getting any other errors?

As for the mod not uninstalling properly, there seems to be some sort of white space issue causing the package manager to remove the code. Im trying to figure it out and fix it now.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on December 13, 2009, 11:43:57 PM
I don't remember if I asked this, is there any way you can make it so we can link the ItemID and it convert it to the name of the item? With 3.2 they brought out 2 of each item 1 being of a higher ILvL and having to do a "hard mode" to gain.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on December 14, 2009, 09:19:20 AM
To enter an item by id you have to do something like
[url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url]
It wont change the color of the text based on item quality but you will get a tooltip.

The Javascript that converts the name to a link was written by someone else and they no longer support the code. I don't know enough about Javascript to make it work differently. Ive since quit playing wow and wasn't aware of they changes made. Ill most likely end up removing the Javascript from the mod all together if that's the case.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on December 14, 2009, 11:44:41 AM
Here (http://www.wowhead.com/?search=reign+of+the+dead) are two examples of what I am talking about, the one that says "Heroic" beside it is a higher ILvl therefor has higher stats on it. Both drop from the same boss however the heroic one only drops from the boss on "hard mode".
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on December 14, 2009, 01:50:18 PM
yes I understand that however the javascript which changes the name to the item number and the color of the text to the item quality color can not handle that and I dont know enough about java to make it do anything else.

That said you can use a direct link to the item and a tooltip will appear but it wont look as pretty when the link is not being hoverd over.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on December 14, 2009, 07:37:30 PM
Yeah that's what I told everyone to do for now, I have a friend who knows some java do you know which file does all those conversions? I could ask him about it.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on December 20, 2009, 11:08:33 AM
Sorry Got behind on this. Read your last message on my cell and forgot about it when I got home that night.

The functions of the mod are done in the wowhead_linker.js and wowhead_wrapper.php. The code in

It also uses the power.js which is created by and copied from Wowhead and jquery which is a standard library. Changing either of them is not recommended.

The code integrated integrated into the forums code calls the wowhead_wrapper.php which grabs an XML file of the items data from wowhead then the linker interprets the xml file to change the link in forum to change the text color and the item number. I believe that that code would need to be changed to also add the item# to item name but every attempt Ive made to do this breaks the mod. Theoretically this could be also modified to acknowledge the difference between spells, achievements, etc. but again I have no clue about how to get at it.

The power.js simply calls Wowhead again and creates the tooltip when the link is hovered over.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Axodious on December 20, 2009, 06:18:34 PM
Thanks to some help from a friend I fixed it so an item that was linked with the ItemID is replaced with the name of the item, I'm not sure how "good" this code is but it seems to be working for me.

Add:
el.text('[' + $('name', data).text() + ']');

After:
el.addClass('q'+$('quality',data).attr('id'))

*EDIT*
Already found a small bug with this, if you search for an item name (i.e. smite) it will pull up the first item in a search (for smite, Smite's Mighty Hammer). Gonna keep working on it see if I can hammer it out to ONLY numbers.

*EDIT 2*
The bug I found does not appear to be a bug, it always has automatically "searched" for an impartial item, so this fix should work.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on December 21, 2009, 10:16:44 AM
Quote from: Axodious on December 20, 2009, 06:18:34 PM
*EDIT 2*
The bug I found does not appear to be a bug, it always has automatically "searched" for an impartial item, so this fix should work.

Yep when searching by name that's the way Wowhead/Thottbot coded things on their end. It worked well for a time but as Blizzard has added so many items with similar and identical names, tooltips based on a name search has become pretty unpredictable. That's quite sad in my opinion because many people cant figure out how to find an items ID number even when its been explained to them, which is also frustrating. LOL

Thanks for the code, after the holidays and I get some real time to start working on coding again, Ill  test and add the code to the mod, giving you and or your friend credit for finding it.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 01, 2010, 10:40:57 PM
Mod updated to 1.3.

Now supports item ID's per the code supplied by Axodious and friend. :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: gmarco on January 07, 2010, 02:54:34 AM
Hi tried to install version 1.3 on a 2.0-RC2 but I got:

QuoteError in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. [...]

1.     Execute Modification     wowhead_2_xb.xml     Modification parse error
2.    Execute Modification    wowhead_2_xb.xml    Modification parse error
3.    Extract File    ./Themes/default/images/bbc/wow.gif    
4.    Extract Tree    ./wow


Others mod installed:

1.     SimplePortal      2.3.1 
2.    Aeva ~ Auto-Embed Video & Audio    7.0    
3.    SMF Gallery Lite    2.0.9
4.    Custom Form Mod    1.6    
5.    Disable Subject Change    1.5

Any idea ? Thanks very much for attention.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 08, 2010, 09:57:58 AM
Sorry about that I had the wrong package-info.xml file in the package.   :o :-[

It should work just fine now.  ;)
Title: Re: WoW - World of Warcraft Tooltips
Post by: gmarco on January 08, 2010, 02:50:08 PM
Hi, thanks for you quick reply ...

The mod install fine but I have a couple of problems...

http://img14.imageshack.us/img14/7367/problem2f.png

1) As you see the "wow" buttons are corrupted or mangled :-)
2) The mod is not able to display the wow tooltip ...

If it can helps I have installed smf in a smf subdir of the default site :

http://www.disturbia-guild.com/

And I leave a test message in a place where you can see if you want :
Disturbia Guild -> Open Space -> Discussioni Generali -> Test WoWItems

So you can check what I mean ...
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 08, 2010, 07:03:35 PM
The first page of this thread, the downloads page for the mod, and the readme.txt file in the package zip all contain many additional instructions for the mod. After looking at the raw source of your site I  see 2 primary issues that have been covered.

QuoteTo install the WoW - Tooltips mod on custom themes...

Copy the ./themes/default/images/bbc/wow.gif to the /images/bbc of your theme directory.

Open the themes ./index.template.php
add...
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script></script>

before...
</head>

Open the themes /languages/Modifications.english.php
and add...
$txt['wow'] = 'WoW Tooltip';>
before...
</?>

I assume you haven't done this since on the custom theme you are using looks like...
// ]]></script>
</head>


It should be
// ]]></script>
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script></script>
</head>


Also there are several issues that are in the section that may apply to your site....
QuoteKnown Issues:
For some users, if your forum is not in the root directory for your website this mod may not work correctly. Copying the wow folder found in yoursite.com/yourforum/wow to yoursite.com/wow will fix this in many cases.

Some hosts for security reasons will require you to set the file permissions (chmod) for the wow folder and the files within to 644 or rw-r-r.

Having Search Engine Friendly URLs turned on can cause the mod to fail.

Many web-hosts are using a utility known as ModSecurity to help protect the sites they host from hackers. Unfortunately ModSecurity is made overly secure and often can create false positives for many web programs including this one. You have have to contact your host and have them read http://blog.modsecurity.org/2007/02/handling-false.html. It will help them to create a personal rule for ModSecurity that recognizes the files in the wow folder as safe.

Since your forum is in www.disturbia-guild.com/smf/ the first issues listed states you may need to copy the wow folder to www.disturbia-guild.com/wow as www.disturbia-guild.com/smf/wow/ may not work especially since you are using Simple portal. Even if you get it to work right in forum its probably not going to work right in other portal functions such as blocks.

If you still cant get the mod to work after checking all of these issues let me know and Ill see if there is some other unknown issue.
Title: Re: WoW - World of Warcraft Tooltips
Post by: gmarco on January 09, 2010, 03:12:15 AM
Sorry my fault I think that if the mod doesn't give any errors back during installation it patched everything by himself :-)

BTW it doesn't work the same but also make a very strange behaviour ... :-)
Text inside wow tag simply disappears ... ( probably after the fetching ? )
Pls check again the link :
http://www.disturbia-guild.com/smf/index.php?topic=148.msg481#msg481


I have added the lines :
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script></script>


in the right place in this way and using a absolute address like:
src="http://www.disturbia-guild.com/smf/wow/jquery-1.3.2.min.js"

I have copied the wow directory in main www folder ...
You can check also this using this link :
http://www.disturbia-guild.com/wow/   (I have renamed the index.php to show files ... )

Any idea pls ? I have missed something ?

P.s
The button WOW is now ok :-))
Title: Re: WoW - World of Warcraft Tooltips
Post by: gmarco on January 09, 2010, 04:18:56 AM
Parsing better the problem the result that wowhead give me back is :
<?xml version="1.0" encoding="UTF-8"?><wowhead><error>Item not found!</error></wowhead>
Title: Re: WoW - World of Warcraft Tooltips
Post by: gmarco on January 09, 2010, 04:23:54 AM
Aaargh ... :-)

I found the problem. For the test I used the first obj I see in the game chat ... the problem is that this item doesn't exists in wowhead database with that name but with :

Aquatic Greatstaff + Random enchant ...

Infact now it works :-)
Title: Re: WoW - World of Warcraft Tooltips
Post by: JBurlison on January 09, 2010, 08:22:35 AM
Hello im having some trouble with this mod there is nothig when i hover over the item, also the item is in grey and when i click on it, it just brings me to an XML:
http:// www. royal-cerastae.com/wow/wowhead_wrapper.php?item=Lightbringer%20Faceguard

any idea? im using forum version SMF 2.0 RC2
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 09, 2010, 09:02:13 AM
gmarco, glad you got it working.  ;D

JBurlison, looking at you site you haven't made the changes to your custom theme. Read the first post of this thread and follow the instructions for installing on a custom theme there and also the known issues. After checking and following those instructions, if the mod still doesn't work let me know and Ill see if there is some other unknown issue.
Title: Re: WoW - World of Warcraft Tooltips
Post by: gmarco on January 09, 2010, 11:54:54 AM
Quote from: Garou on January 09, 2010, 09:02:13 AM
gmarco, glad you got it working.  ;D

Yes thanks very much for your help ... next time I promise I'll read manual and post guideline before ask :-)

Thanks very much again :-)
Title: Re: WoW - World of Warcraft Tooltips
Post by: JBurlison on January 09, 2010, 03:25:03 PM
Im getting this error when i try to reload the page after applying the changes to the template:

Parse error: syntax error, unexpected '<' in .../Themes/raven/index.template.php on line 153

144:       }
145:       addLoadEvent(fPmPopup);' : '', '
146:       var ajax_notification_text = "', $txt['ajax_in_progress'], '";
147:       var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
148:    // ]]></script>';
149:
150:    // Output any remaining HTML headers. (from mods, maybe?)
151:    echo $context['html_headers'];
152:

153: <script src="http://www.wowhead.com/widgets/power.js"></script>

154: <script src="wow/jquery-1.3.2.min.js"></script>
155: <script src="wow/wowhead_linker.js"></script> ';
156:
157:    echo '


I think its my theme "Raven" because your mod works with the defult theme
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 09, 2010, 11:45:13 PM
Try

// ]]></script>';

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'];

echo '

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="http://smf.balancegames.net/wow/jquery-1.3.2.min.js"></script>
<script src="http://smf.balancegames.net/wow/wowhead_linker.js"></script>

</head>


This will work on most Curve/RC2 based themes.

Entering the code the way you had it is generally needed for some custom themes on versions of SMF prior to 2.0 RC2. Most of those were by DzinerStudio and a handful of others, where the code looks like...
      // ]]></script>';

   echo '
</head>

...prior editing for this mod.
Title: Re: WoW - World of Warcraft Tooltips
Post by: JBurlison on January 10, 2010, 12:05:55 AM
ahh worked like a charm thanks boss!
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 10, 2010, 08:47:17 AM
No Problem  :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: immix on January 17, 2010, 09:25:23 AM
Hi,

i installed your mod, but i only get tooltips working in the preview/reply view of an thread or if i am not logged in.
Any ideas?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 17, 2010, 12:03:15 PM
Whats odd is on my test site and on my demo site I have set up tooltips created with the wow bbc dont work in the preview pane at all but they do display properly everywhere else including in the summary of previous post below. I'm curious as to why it is showing for you there.

Other then that it sounds like you might have some other mod conflicting with this one. Are you using one of the mods that show a preview of topics or links when you hover over them?  I never tested them with this mod but I know they did mess up DarkCloud14's WoW Itemstats (http://custom.simplemachines.org/mods/index.php?mod=247) when I was using that mod.

In any case a list of the mods on your site and a link to it might be helpful.
Title: Re: WoW - World of Warcraft Tooltips
Post by: immix on January 17, 2010, 05:18:35 PM
I've got installed WoW Itemstats before, but uninstalled it completely.
List of installed Addons:

WoW Character Profiles    1.9.1 
AJAX Instant Quick Reply    1.0.2 
Separate Sticky and Normal Topic    1.0 
Aeva Media    1.0 Beta 1.1     
WoW - World of Warcraft Tooltips    1.2     
SMF Arcade    2.0.18

thx 4 your assignment
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 17, 2010, 09:30:50 PM
I know its not Aeva or the WoW character profiles as Ive used both on various sites before and Aeva is on the demo site Ive got set up right now.

A link to your site would help too. If its a configuration problem I can usually tell without ever setting an account up on the site. In the meantime Ill start testing the mods you have listed on my test server.
Title: Re: WoW - World of Warcraft Tooltips
Post by: immix on January 18, 2010, 02:43:10 AM
Here the forum link: http://ww.adrenaline.in/forum/index.php/topic,1137.msg14730.html#msg14730

The login is mastered by a drupal cms (http://ww.adrenaline.in/).

thx 4 help ;)


Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 18, 2010, 09:42:47 AM
Well I figured it out, you haven't made the changes for your custom theme, you dont have a copy of the wow folder in your root directory, and it looks like you have some form of search engine friendly urls turned on or maybe drupal is effecting this.

All of which can cause the mod to fail and is covered on the first post of the thread here, the download page for the mod, and the readme.txt in the mod.

First edit your themes index.template.php
if it looks like
// ]]></script>
</head>

Change to
// ]]></script>
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script></script>
</head>


If it looks like...
      // ]]></script>';

   echo '
</head>

Change to
      // ]]></script>
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

   echo '
</head>


If that doesn't fix it copy the wow folder from ww.adrenaline.in/forum/wow to ww.adrenaline.in/wow

If that doesn't fix it then open up ./Sources/Subs.php and change
array(
'tag' => 'wow',
'type' => 'unparsed_content',
'content' => '<b><a style="background-color:#303030" href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),

to
array(
'tag' => 'wow',
'type' => 'unparsed_content',
'content' => '<b><a style="background-color:#303030" href="http://ww.adrenaline.in/wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),

This should get you around the SEF problem

After all of that if it still doesn't work attach your themes index.template.php and ./Sources/Subs.php and Ill see if I cant fix it for you.

Worst case scenario your host is running ModSecurity in which case you will need to contact them to about whitelisting the files in the wow folder.
Title: Re: WoW - World of Warcraft Tooltips
Post by: immix on January 18, 2010, 12:52:22 PM
thx 4 your advice, but didn't work @ all =/

attached 2 files, maybe you can find out whats wrong in my config

my hoster is all-inkl.com (dunno if mod-security is running, but will check it out)

Update: http://ww.adrenaline.in/phpinfo.php (can't find any mod-security informations...so think i don't strike the worst case ;))


Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 18, 2010, 03:34:28 PM
Ok since you used the global fix as suggested by other users in your index template try changing
         array(
            'tag' => 'wow',
            'type' => 'unparsed_content',
            'content' => '<b><a style="background-color:#303030" href="http://ww.adrenaline.in/wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',
            'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
         ),

to
         array(
            'tag' => 'wow',
            'type' => 'unparsed_content',
            'content' => '<b><a style="background-color:#303030" href="http://ww.adrenaline.in/forum/wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',
            'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
         ),

Title: Re: WoW - World of Warcraft Tooltips
Post by: immix on January 18, 2010, 03:49:22 PM
Awesome! works like a charm ;)

1 coin for your piggybank :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Tunga on January 26, 2010, 11:37:38 AM
I just want to throw in an experience I had with this.

I made a test forum, installed this mod, all working great.  When I then updated my live site (2.0 B4->2.0 RC2) and installed the mod again, suddenly this mod wouldn't work.  I knew it wasn't a server issue and I check the relevant files and they all looked the same as on the test install.  I tried all the workarounds here in including setting all of /wow to 644 and 755.  In a last ditch random act I decided to recursively set my entire SMF directory to 755 and suddenly it started working.

So I have no idea what it is but there is a file or files somewhere in SMF for which having the wrong permissions can mess up this mod.  Perhaps this will help someone else in future.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 26, 2010, 02:27:11 PM
That is probably due to a server setting. Certain sever setups prefer files to have certain permissions, it all depends on if or what the host is running for security settings. The way the mod is set up with the folder at 755 and the files at 644 seems to work best for most situations, just not in your case. :-\
Title: Re: WoW - World of Warcraft Tooltips
Post by: Night09 on February 14, 2010, 02:35:24 PM
Garou,

I was just looking on the wow armoury at the new Lich king loot and noticed there is items with identical names but different i lvl's based on heroic or non heroic.Apart from using direct item numbers I am wondering if this is going to be a bit of an issue trying to show the correct version of the item in posts.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on February 14, 2010, 08:51:56 PM
Are they using the same item id's too? The last update of the mod supports id numbers, I was hoping that would solve the issue.

I guess Ill just to hop on the WoW and Wowhead forums and find out whats going on. Either way it looks like the name function is completly borked unless wowhead has found a waay around that.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Night09 on February 14, 2010, 10:11:50 PM
Quote from: Garou on February 14, 2010, 08:51:56 PM
Are they using the same item id's too? The last update of the mod supports id numbers, I was hoping that would solve the issue.

I guess Ill just to hop on the WoW and Wowhead forums and find out whats going on. Either way it looks like the name function is completly borked unless wowhead has found a waay around that.

Heres the link I was looking at on armoury:http://armory.wow-europe.com/search.xml?fl[source]=dungeon&fl[dungeon]=icecrowncitadel10&fl[boss]=36597&fl[difficulty]=all&searchType=items

They have different item numbers but exactly the same names so users are going to have to identify the item by number unless its possible to add a normal/heroic or I lvl tag maybe to make it select the right one.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Andiiieee[: on February 14, 2010, 10:15:35 PM
Quote from: Garou on March 28, 2009, 04:31:05 AM
WoW - World of Warcraft Tooltips v1.3
By Garou (http://custom.simplemachines.org/mods/index.php?action=profile;u=60251)


Support topic (http://www.simplemachines.org/community/index.php?topic=301619.0) | Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1633) | Demo (http://smf.balancegames.net)



Introduction:
This Mod provides several ways to add World of Warcraft tooltips to your site using the Wowhead Power Java script.

Features:
Users can enter any item url from www.Wowhead.com (http://www.wowhead.com) and will see a tooltip with the item's statistics hover over the post.

When clicked on, users will be taken to Wowhead's page for the item.

There are several ways tooltips can be entered using by links from wowhead.com

For instance the Lightbringer Faceguard can be entered in a post as...
http://www.wowhead.com/?item=30987 (http://www.wowhead.com/?item=30987)

Alternatively BBS codes can be used to make links easier to read...
Lightbringer Faceguard (http://www.wowhead.com/?item=30987)
Would be entered like...
[url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url]

A new wow BBC code and button has also been added allowing your users to enter...
[wow]Item Name[/wow]
or
[wow]Item Number[/wow]

The text will display in the post with the text in items quality color and the tool tip.

Note: Quests, Spells, and Achievements are not currently supported using the wow bbc only direct links.

Install:
To install, simply upload the entire zip file to the package manager (Admin -> Package Manager -> Download New Packages).

Your site must have libcurl or fopen in order for this mod to work.

To install the WoW - Tooltips mod on custom themes...

Copy the ./themes/default/images/bbc/wow.gif to the /images/bbc of your theme directory.

Open the themes ./index.template.php
add...
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script></script>

before...
</head>

Open the themes /languages/Modifications.english.php
and add...
$txt['wow'] = 'WoW Tooltip';>
before...
</?>

Note: Some custom themes deviate from the standard index.template.php and may look like...
      // ]]></script>';

   echo '
</head>

replace with...
      // ]]></script>

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script> ';

   echo '
</head>


If you are using 1.1.x you will also have to modify your themes ./Post.template.php
add...
'wow' => array('code' => 'wow', 'before' => '[wow]', 'after' => '[/wow]', 'description' => $txt['wow']),
before...
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),


Known Issues:
For some users, if your forum is not in the root directory for your website this mod may not work correctly. Copying the wow folder found in yoursite.com/yourforum/wow to yoursite.com/wow will fix this in many cases.

Some hosts for security reasons will require you to set the file permissions (chmod) for the wow folder and the files within to 644 or rw-r-r.

Having Search Engine Friendly URLs turned on can cause the mod to fail.

Many web-hosts are using a utility known as ModSecurity to help protect the sites they host from hackers. Unfortunately ModSecurity is made overly secure and often can create false positives for many web programs including this one. You have have to contact your host and have them read http://blog.modsecurity.org/2007/02/handling-false.html. It will help them to create a personal rule for ModSecurity that recognizes the files in the wow folder as safe.

Compatibility:
Tested under SMF Versions 1.1.8 - 1.1.10 and 2.0 RC1 - 2.0 RC2

Credits:
Thanks to the team at Wowhead (http://www.wowhead.com) for writing the Powered by Wowhead Script.
Also thanks to Horris (http://mattmayers.com/) for writing the phpBB mod that this mod is based on, as well as the included wowhead scripts in the wow folder.

Change log:
Version: 1.3 January 1, 2010
Added Item ID's to the wow bbc code to make it easier to link to the exact item you are looking for. Thanks to Axodious (http://www.simplemachines.org/community/index.php?action=profile;u=162342) for providing the code.

Version: 1.2 November 09, 2009
* Updated to be compatible with SMF 2.0RC2 as some of the hooks that this code attaches to have been changed.

Version: 1.1 March 28, 2009
  Wowhead support added
  Interface made more simple by using Wowhead wrapper and linker Java Scripts
* Button Changed from a Thottbot specific button to a World of Warcraft button
*! All Thottbot options removed from 2.x due to conflicts with the thottbot power.js and 2.x
> Thottbot support may be re-added at a later date, when conflicts can be resolved

Version: 1.0 February 10, 2009
   Adds the Powered by Thottbot java script to the index.template.php
   Adds the [thott=][/thott] bbc code
   Adds a button for easier usage of the bbc code

Change log:
Legend:
! bug fix
  added feature
* changed
> comment

awesome mod!

even though I don't have a WOW website, I downloaded this mod on my forum temporarily, just to check it out. It was cool!
Title: Re: WoW - World of Warcraft Tooltips
Post by: Night09 on February 14, 2010, 10:35:25 PM
Quoteawesome mod!

even though I don't have a WOW   website, I downloaded this mod on my forum temporarily, just to check it   out. It was cool!                                                                                                                                                               

Do you play wow at all ? Theres a free trial for 10 days from the offical site if you dont.  ;)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Andiiieee[: on February 14, 2010, 10:37:56 PM
Quote from: nightbre on February 14, 2010, 10:35:25 PM

Do you play wow at all ? Theres a free trial for 10 days from the offical site if you dont.  ;)

No, actually, I don't.
However, my cousin does, I'll be sure to pass that along to him.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on February 14, 2010, 11:46:46 PM
Andiiieee, I'm glad you like the mod and I'm sure you would like the game, you really should take advantage of the free trial . It is quite addicting and can wind up eating up most of your free time. :)

nightbre, it was a similar issue that prompted the need to add id's to the mod and thanks to a little help from a friend of Axodious that knows Java way better then I do. Since the name search is actually handled by the Wowhead site and or maybe the power.js (which is written and maintained by Wowhead), they might have to do something on their end to improve the name search so it returns better results.

As it stands now it lists the first match found in their database which isn't always the right answer, in the meantime I guess it will be up to the end user to track down the proper id number. Of course this wouldn't be an issue if the Blizz staff was creative enough to come up with some unique names. :D
Title: Re: WoW - World of Warcraft Tooltips
Post by: Night09 on February 15, 2010, 12:01:35 AM
QuoteOf course this wouldn't be an issue if the Blizz staff was creative enough to come up with some unique names.

Yeah your right there lol. ;)
Title: Re: WoW - World of Warcraft Tooltips
Post by: bentinma on February 22, 2010, 06:13:08 PM
Hello, I have a problem with this mod and accents (in French wowhead). I went through page wowhead or they talk about this mod and I found a script utf8, but I do not know where I'll post.

QuoteHi everybody !

Like I said few days ago, the script don't work good with website or forum in UTF8 format.

Working on with 2 friends, we have changed the script and add a UTF8 library...

Here you can find the 2 script codes :

http://gondolyn.free.fr/wowhead/UTF8_Wowhead.zip

So you have to write this line BEFORE the new wowhead script for the lib UTF8 :


<script type="text/javascript" src="utf8_lib.js"></script>
<script type="text/javascript" src="power.js" ></script>

May be the wowhead team can change the official script.... ;)

Bye

I have put the files in the right place, but I do not know which file to use the script utf8. Can you help me?

Thank you in advance.

Ben
Title: Re: WoW - World of Warcraft Tooltips
Post by: mekon on February 23, 2010, 05:14:49 AM
Hi wondering if you could help me with this mod, Currently using SMF 1.1.11 and TinyPortal v1.0 beta 4,

I have installed the mod through the packages in the adminCP and it seems to have installed in the correct directory root/wow.

I use a custom theme and so have installed the code just above the </head> tags in index.template.php
there is no /Post.template.php in my theme folder, so I am just guessing it uses the one from the default themes folder, checked to make sure the correct code was entered and it was indeed.
I have also checked subs.php and the correct code seems to be entered there.

My problem is that when I use the bbcode on my side, I just get a grey link and it goes to an Internal Server Error page.
I have read through and it appears someone had similar problem, but I have tried what was suggested for him and it did not work.

any help on this would be greatly appreciated.

Thanks in advance
website is at immortalsguild.co.uk

ps. checked with host and libcurl is installed on the server.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on February 24, 2010, 09:06:27 AM
Ben, I really have no clue as I never really tried this out using other languages as I dont speak anything other then English. Ive DLed the file there and Ill get and try it out in the next couple days. The mod is working otherwise, correct? If not please post a link to  the site.

mekon, try changing

<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script>

to
<script src="http://immortalsguild.co.ukwow/jquery-1.3.2.min.js"></script>
<script src="http://immortalsguild.co.ukwow/wowhead_linker.js"></script>


That usually tends to help with portal issues.

If that doesn't do it on your own maybe edit sourcedir/Subs.php
find...
array(
'tag' => 'wow',
'type' => 'unparsed_content',
'content' => '<b><a style="background-color:#303030" href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),

with a full link to the folder as well.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on February 24, 2010, 10:08:45 AM
Quote from: Garou on April 15, 2009, 08:01:53 AM
In wowhead_wrapper.php find...
Ben, I just thought of a couple other things,

header("Content-type: text/xml");
$url = "http://www.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";


And replace with...
header("Content-type: text/xml");
$url = "http://es.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";


This should also work for other languages Wowhead (http://static.wowhead.com/widgets/power/demo.html?) supports as well. However they say
QuoteLocalized links (requires your site to use UTF-8 encoding)

Have you tried changing www.wowhead.com to fr.wowhead.com?

Also I noticed that the file you mentioned includes its own power.js I dont know if they modified that at all but you might try dropping that into your wow folder and changing the index.template.php
from:
<script src="http://www.wowhead.com/widgets/power.js"></script>
to:
<script src="http://yoursite.url/wow/power.js"></script>
Title: Re: WoW - World of Warcraft Tooltips
Post by: mekon on February 24, 2010, 02:51:19 PM
Quote from: Garou on February 24, 2010, 09:06:27 AM
mekon, try changing

<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script>

to
<script src="http://immortalsguild.co.ukwow/jquery-1.3.2.min.js"></script>
<script src="http://immortalsguild.co.ukwow/wowhead_linker.js"></script>


That usually tends to help with portal issues.

If that doesn't do it on your own maybe edit sourcedir/Subs.php
find...
array(
'tag' => 'wow',
'type' => 'unparsed_content',
'content' => '<b><a style="background-color:#303030" href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),

with a full link to the folder as well.

Thanks for the suggestions, tried both and still the same :(
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on February 24, 2010, 10:24:01 PM
mekon, Ive created an account on your site so I can get a better look at whats going on, just waiting your approval. At the very least Ill need you to make a public post containing...


[wow]Lightbringer Faceguard[/wow]

[wow]30987[/wow]

http://www.wowhead.com/?item=30987

[url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url]


I might be able to tell from how that displays.

I have a feeling that it might be a host issue with mod_security in which case you'll probably have to contact your host and have them whitelist the files in the wow folder. a link to instructions to give to your host is in the first post of this thread.
Title: Re: WoW - World of Warcraft Tooltips
Post by: mekon on February 25, 2010, 04:26:24 AM
Thanks Garou, I have sent you a pm regarding the account. once logged in you should have access to the website and forums thread.

I have also contacted my host and told them about the modsecurity issue, asked them to have a look at the link, just waiting for a reply.


Thanks again for the help :)

Update: ok apparently the host has checked the link out /wow/wowhead_wrapper.php and this is what they have told me.

QuoteThis isnt a mod_security issue. The 403 is being generated because your script is trying to read an htaccess file that doesnt exist...

[Thu Feb 25 11:50:53 2010] [crit] (13)Permission denied: /public_html/wow/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
Title: Re: WoW - World of Warcraft Tooltips
Post by: mekon on February 25, 2010, 07:07:33 AM
scratch everything, got it working :D

After reading the first post, I had set my wow folder and files as requested to 644, this did not work and changed the output page to a different error.

I then changed the wow folder to 755 and all of a sudden, its working :)

thanks for all the help and thanks for a great mod :)

Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on February 25, 2010, 11:18:21 AM
I think further back in this post, that this is mentioned, but it is a long post to absorb everything.
Many hosts now make it mandatory to have folders, ( or directories ),  set to 755, not 777, it will create an error. Same goes for files. Files must be set to 644, ( there are some exceptions), but this is the norm.
Title: Re: WoW - World of Warcraft Tooltips
Post by: bentinma on February 26, 2010, 05:48:37 PM
hi,
thank you very much Garou I tested what you said, but nothing changes, I'll take my chances with the wowhead site. I'll keep you informed.
Title: Re: WoW - World of Warcraft Tooltips
Post by: rfirevtre on April 02, 2010, 10:50:32 AM
Is there any way of changing the font color when using [wow]Lightbringer Faceguard[/wow]

[url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url]
I know that this does the trick, but I don't like having to find the url myself ;)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 02, 2010, 09:44:25 PM
Not really as the quality color is a huge part of what this mod is about.

The one way I can think of to get around it would be to remove a bit of code from /wow/wowhead_linker.js

el.addClass('q'+$('quality',data).attr('id'))

That would remove the quality color from all item links though. Also I haven't tested it but looking at the code it should work.
Title: Re: WoW - World of Warcraft Tooltips
Post by: rfirevtre on April 03, 2010, 09:11:50 AM
That worked like a charm, thank you very much :D
Title: Re: WoW - World of Warcraft Tooltips
Post by: c23_Mike on April 05, 2010, 03:07:54 PM
Hi there !

Will it be updated for RC3?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 05, 2010, 08:01:36 PM
It works just fine on RC3 with the same potential issues and fixes in the first post of this thread. I just never got around to updating the status
Title: Re: WoW - World of Warcraft Tooltips
Post by: rfirevtre on April 06, 2010, 07:04:32 AM
The [wow]Runed Cardinal Ruby[/wow] suddenly stopped working on my forums, I haven't changed anything in a couple of days and it worked just fine then. Linking an item still works and creates a tooltip. Are anyone else having this problem?
Title: Re: WoW - World of Warcraft Tooltips
Post by: dreadk on April 06, 2010, 10:18:59 AM
Hi,

I recently upgraded my forum to RC3 and installed the latest version of this mod (Previous version worked perfectly). However, with RC3 and the new version it wasn't linking correctly. I figured it'd been a few years since I cleaned out my database so I reinstalled a fresh RC3 and tried the mod. I get the same results though

Demo To Issue: http://www.therisenguild.net/index.php?topic=13286.0

I installed the alternate directory on the host server, I also chmod'd correctly (Again, this worked BEFORE the RC3 Update).

If any assistance can be given it would be much appreciated.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 06, 2010, 07:48:17 PM
dreadk, I'm pretty sure that its a server setting someplace, probably in the php.ini. Ive got it working on several servers but on one of my test servers (running xampp lite on a USB stick on a vista machine), it works just like it is on your server. I'm trying to track it down.

rfirevtre, are other items working? It would be odd that one item wouldn't work properly unless its a typo. Have you tried have you tried [wow]30987[/wow]? either way It is working fine for me.
Title: Re: WoW - World of Warcraft Tooltips
Post by: rfirevtre on April 06, 2010, 08:39:57 PM
No, other items aren't working either. I have tried:
[wow]Lightbringer Faceguard[/wow]
[wow]30987[/wow]
http://www.wowhead.com/?item=30987
[url=http://www.wowhead.com/?item=30987]Lightbringer Faceguard[/url]

Only the two last ones worked and created a tooltip. I'm not sure if the permissions have been messed up or something, seems weird it suddenly stopped working without me changing anything on the forums. You can see what happens on my forum here: *link deleted*
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 07, 2010, 09:38:14 AM
Yep that is the same issue dreadk is having and Ive been able to confirm on one of my servers. As I said in the other post if it works on some servers and not others then its a server setting I just have to track down which one.
Title: Re: WoW - World of Warcraft Tooltips
Post by: tanyril on April 08, 2010, 11:26:27 AM
Hey Garou- I thought i'd jump on here and tell you that mine has also stopped working unless it's linked using the wowhead method. Is it possible that wowhead changed the layout/format of their XML? The problem seems to coincide with when they posted the noblegarden blurb...
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 09, 2010, 12:53:38 PM
I think I have found a partial answer. On the one test server I was having  problems with the script I had to turn curl off. I dont know if there is a flawed version out there someplace or some other extension is conflicting with curl or what. It does work fine with fopen on and curl off. Ill do more research to see if I can find out why there is an issue with curl on some servers.

Find your php.ini file (if you dont have direct access to it you may need to contact your host)

Find...
allow_url_fopen

Make sure it says...
allow_url_fopen = On

Then find...
extension=php_curl.dll

and change to...
;extension=php_curl.dll
Title: Re: WoW - World of Warcraft Tooltips
Post by: rfirevtre on April 11, 2010, 12:15:00 PM
Unfortunately my host won't allow me access to php.ini nor will they change anything in there. Was kind of hoping for another solution if one exists.
Title: Re: WoW - World of Warcraft Tooltips
Post by: dreadk on April 12, 2010, 08:36:31 PM
Just want to throw it out there the wowhead issue has been showing up in other types of forums as well. Clearly they changed something on their end :(
Title: Re: WoW - World of Warcraft Tooltips
Post by: c4za69 on April 14, 2010, 01:23:37 PM
Hello, I have been having some of the problems on here related to parsing. The item was showing, and was semi formatted (square brackets and bold on the forum) however did not have the tooltip and when clicked gave a parse error. I looked around and found another mod that noted that the link system on wowhead had changed, after looking around for the right file I managed to fix it for me at least. I am by no means an expert in programming, hell, I don't even understand half the stuff in the script, I just looked for the little bits that made sense. Anyway, for those that it *may* help.

wow/wowhead_wrapper.php
$url = "http://www.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";

replace with
$url = "http://www.wowhead.com/item=".urlencode(addslashes($_GET['item']))."&xml";

Was just the removal of the "?" that was hindering my installation, as I said before, I am not clued up in this stuff, nor am I 100% sure that it is what is wrong with anyone else reporting parse issues. Just thought I would drop this off as it's been annoying me for the last few hours ^^

Edit: If this was posted earlier and I missed it, sorry. Been up for a while.

Title: Re: WoW - World of Warcraft Tooltips
Post by: dreadk on April 14, 2010, 05:04:58 PM
Removing the ? worked for my forum as well. Good pick up :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: rfirevtre on April 14, 2010, 09:01:35 PM
That worked on both of my forums as well, thanks :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 18, 2010, 03:42:06 AM
Yep that's the change I made in the mod and should take care of it. Ive updated the mod here and posted the same thing at the Wowhead forums (http://www.wowhead.com/forums&topic=3464.24#p1993448)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on April 18, 2010, 07:25:35 AM
Love the addon, Garou. Just a slight problem when trying to use the [wow][/wow] tag - no tooltip shows and i get [an error occurred while processing this directive] when I click on the link.  entering the url with either

http://www.wowhead.com/?item=30987

or

Lightbringer Faceguard (http://www.wowhead.com/?item=30987)

works fine.

any ideas?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 18, 2010, 11:27:32 AM
The update this morning was supposed to fix that. You enter either
[wow]Lightbringer Faceguard[/wow]
or
[wow]30987[/wow]

The result should be a tool tip with the name of the item using the items quality color (purple in this case) linking to
http://www.wowhead.com/item=30987

Note that due to a change Wowhead has made, it should say item= and not ?item= now.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on April 18, 2010, 11:51:26 AM
Quote from: Garou on April 18, 2010, 11:27:32 AM
The update this morning was supposed to fix that. You enter either
[wow]Lightbringer Faceguard[/wow]
or
[wow]30987[/wow]

The result should be a tool tip with the name of the item using the items quality color (purple in this case) linking to
http://www.wowhead.com/item=30987

Note that due to a change Wowhead has made, it should say item= and not ?item= now.


neither of these work while the other methods posted do. i have the latest version and there is no ? in the code in wowhead_wrapper.php.  note that the tooltips work as I posted them and both have the ? in it.  go figure.  maybe i need to add the ? back to the wowhead_wrapper.php line?


EDIT:  nope, that didn't work either.

Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 18, 2010, 03:32:49 PM
Did you have this mod working before todays update? There are other know possible issues that are dependant on server settings some of which you may need to contact your host about. These are listed on ther front page of this thread, the download page for the mod, and the readme file in the mod package.

Also a link to the site would help as there are few things I might be able to spot by looking at the site.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on April 18, 2010, 03:57:56 PM
Quote from: Garou on April 18, 2010, 03:32:49 PM
Did you have this mod working before todays update? There are other know possible issues that are dependant on server settings some of which you may need to contact your host about. These are listed on ther front page of this thread, the download page for the mod, and the readme file in the mod package.

Also a link to the site would help as there are few things I might be able to spot by looking at the site.

i just installed it today. i'll take a look again at what you have as possible causes. and our forums are at http://www.divinealliance.org/forums if you want to take a look.

again, the tooltips work as they should when written like this:

http://www.wowhead.com/?item=30987

and like this

Lightbringer Faceguard (http://www.wowhead.com/?item=30987)

but not with the BBC [wow]item number[/wow] or [wow]item name[/wow]

i'm using the default theme in 2.0 RC3

if the BBC doesn't work, it's no big deal because the other methods do - just a little more time consuming

thanks for your help with this!

Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 19, 2010, 10:01:43 AM
Try putting a copy of the wow folder in the root directory of the site. The script calls for the wow folder to be at yoursite/wow instead of yoursite/forums/wow however SMF lacks a way for me to add the folder outside of the forum directory. Sometimes changing the index.template.php

<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script>

to the full path your site uses helps as well. ie...

http://yoursite/wow...

Try alternate file permission settings for the files in the wow folder. Make sure your site is capable of using fopen and or curl, you may have to contact your host to take care of that. If your host is using mod_security then you'll have to have them whitelist the files in the wow folder.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on April 19, 2010, 01:46:46 PM
ok, I tried everything you suggested and still doesn't work. Since the other two methods work as intended, I'm not going to worry about it any more.

Thanks for your time and help!

;D

Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on April 19, 2010, 03:01:26 PM
Just for kicks I changed the permissions settings in all the files in the wow folder to 0755.

This is what I get when I click on the link that is created using [wow]item number[/wow] or [wow]item name[/wow]:

QuoteThis XML file does not appear to have any style information associated with it. The document tree is shown below.
     

<wowhead>

<item id="30987">
<name>Lightbringer Faceguard</name>
<level>146</level>
<gearScore>105.667</gearScore>
<quality id="4">Epic</quality>
<class id="4">Armor</class>
<subclass id="4">Plate Armor</subclass>
<icon displayId="45684">INV_Helmet_96</icon>
<inventorySlot id="1">Head</inventorySlot>

<htmlTooltip>
<table><tr><td><b class="q4">Lightbringer Faceguard</b><br /><!--bo-->Binds when picked up<table width="100%"><tr><td>Head</td><th>Plate</th></tr></table><span>1483 Armor</span><br />+50 Strength<br />+67 Stamina<!--e--><br /><a href="http://www.wowhead.com/?items&amp;filter=cr=81;crs=3;crv=0" class="socket-yellow q0">Yellow Socket</a><br /><a href="http://www.wowhead.com/?items&amp;filter=cr=81;crs=1;crv=0" class="socket-meta q0">Meta Socket</a><!--ps--><br /><!--sb--><span class="q0">Socket Bonus: +4 Dodge Rating</span><br />Durability 100 / 100<br />Classes: <span class="c2">Paladin</span><br />Requires Level 70<br />Item Level 146</td></tr></table><table><tr><td><span class="q2">Equip: Increases defense rating by <!--rtg12-->28&nbsp;<small>(<!--rtg%12-->11.84&nbsp;@&nbsp;L<!--lvl-->70)</small>.</span><br /><span class="q2">Equip: Increases your dodge rating by <!--rtg13-->37&nbsp;<small>(<!--rtg%13-->1.96%&nbsp;@&nbsp;L<!--lvl-->70)</small>.</span><br /><br /><span class="q"><a href="http://www.wowhead.com/?itemset=679" class="q">Lightbringer Armor</a> (0/8)</span><div class="q0 indent"><span><!--si30991--><a href="http://www.wowhead.com/?item=30991">Lightbringer Chestguard</a></span><br /><span><!--si30987--><a href="http://www.wowhead.com/?item=30987">Lightbringer Faceguard</a></span><br /><span><!--si30985--><a href="http://www.wowhead.com/?item=30985">Lightbringer Handguards</a></span><br /><span><!--si30995--><a href="http://www.wowhead.com/?item=30995">Lightbringer Legguards</a></span><br /><span><!--si30998--><a href="http://www.wowhead.com/?item=30998">Lightbringer Shoulderguards</a></span><br /><span><!--si34488--><a href="http://www.wowhead.com/?item=34488">Lightbringer Waistguard</a></span><br /><span><!--si34433--><a href="http://www.wowhead.com/?item=34433">Lightbringer Wristguards</a></span><br /><span><!--si34560--><a href="http://www.wowhead.com/?item=34560">Lightbringer Stompers</a></span></div><br /><span class="q0"><span>(2) Set: <a href="http://www.wowhead.com/?spell=38421">Increases the mana gained from your Spiritual Attunement ability by 10%.</a></span><br /><span>(4) Set: <a href="http://www.wowhead.com/?spell=38422">Increases the damage dealt by your Consecration ability by 10%.</a></span></span></td></tr></table><!--?30987:1:80:70-->
</htmlTooltip>

<json>
"armor":1483,"classs":4,"displayid":45684,"id":30987,"level":146,"name":"3Lightbringer Faceguard","reqclass":2,"reqlevel":70,"slot":1,"slotbak":1,"source":[5],"sourcemore":[{"n":"Tydormu","t":1,"ti":23381,"z":3606}],"subclass":4
</json>

<jsonEquip>
"armor":1483,"classes":2,"defrtng":28,"displayid":45684,"dodgertng":37,"dura":100,"itemset":679,"nsockets":2,"reqlevel":70,"slotbak":1,"socket1":4,"socket2":1,"socketbonus":2871,"sta":67,"str":50
</jsonEquip>
<link>http://www.wowhead.com/item=30987</link>
</item>
</wowhead>






Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 20, 2010, 06:23:27 AM
Ok that is the raw xml data for the item in question, it could be a further problem with permissions but traditionally when you get that far its a mod_security issue and your host will need to take care of that. They will need to whitelist the files in the wow folder and the info on how to do that can be found here... http://blog.modsecurity.org/2007/02/handling-false.html
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on April 20, 2010, 09:16:47 AM
Quote from: Garou on April 20, 2010, 06:23:27 AM
Ok that is the raw xml data for the item in question, it could be a further problem with permissions but traditionally when you get that far its a mod_security issue and your host will need to take care of that. They will need to whitelist the files in the wow folder and the info on how to do that can be found here... http://blog.modsecurity.org/2007/02/handling-false.html


My webhost said if I need a specific port to be opened, they can open the port but I have to get a dedicated IP address. I said no, just need the files whitelisted IF they are using ModSecurity. Waiting for a reply....


UPDATE: Webhost said 'no, we won't whitelist anything.'  So end of story.


Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on April 22, 2010, 08:16:43 PM
Time to find a new host. They are sopposed to work for you and if they wont then its time to dump them.

I recomend www.blutoshosting.com The Little Bluto is perfect for a guild site and only costs $4.50 a month.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on April 23, 2010, 11:46:47 AM
Quote from: Garou on April 22, 2010, 08:16:43 PM
Time to find a new host. They are sopposed to work for you and if they wont then its time to dump them.

I recomend www.blutoshosting.com The Little Bluto is perfect for a guild site and only costs $4.50 a month.

Oh that will not be happening. I have several domains hosted there, along with the associated websites, and I've been with them for almost 10 years. I won't dump them over one relatively small issue like this. The tooltips work for the most part, just the WoW button doesn't. I can live with that and so can the members of the forums.

Thanks for your help.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Arantor on April 23, 2010, 11:48:06 AM
mod_security actually causes a large number of issues and over time you may find other random things get broken by it. Any host that thinks mod_security actually helps with security without understanding its consequences is probably best to be avoided on general lack of competence grounds.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Wolfchylde on April 29, 2010, 10:20:00 PM
God, I really really REALLY wish I wasn't having the same problem as everyone else.

Anyhow, here it goes: 
We're in the middle of a website swap and moving over to SMF2 RC3 currently.

Godaddy's the host, already asked and they aren't running any security software that would block a php script, so I have no bloody idea what I'm doing wrong here.

I can get a link to you for my site to check for yourself, we're using a theme, but even on the default theme it behaves the same way.

I BELIEVE the test post is available to a public user, if not feel free to make an account and (hopefully nothing breaks *crosses fingers*) be able to see.

anytime I wrap an item using the BBCode the link comes up like this: http://www.orderoftheclaw.com.previewdns.com/forum/wow/wowhead_wrapper.php?item=The%20Unstoppable%20Force

However, a link formatted like this: http://www.wowhead.com/?item=30987 brings up the popup (even though the link color remains normal).

trying to wrap or use a wowhead link will change the formatting of the text to some degree, but there's no link.

Suggestions?  I really appreciate all the (probably hair-tearingly frustrating) help you've been offering!

(I'm also in the middle of packing to move, as my other half and I just bought a house, NORMALLY I'd just keep hacking away at it until my brain melted out my ears, but I just figured I'd cry 'uncle' and ask for help :D)

we're using PHP 5.2.5, I can attach whatever files are needed if you want to inspect them.  I've been at this all day with limited success.

Edit - NVM, I dunno WHAT I did but it's working now *shrug* YAY?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Bassline on May 03, 2010, 06:09:47 PM
Hey, Thanks for taking your time on this mod. I am having some problems tho.

When using the [wow][/wow] tag the link doesnt work, I get the incorrect item color and no tooltip, How ever the text is clickable so when i click i get this on a new page.

This XML file does not appear to have any style information associated with it. The document tree is shown below.
     


And then i get this
<wowhead>

<item id="50379">
<name>Battered Hilt</name>
<level>1</level>
<gearScore>0</gearScore>
<quality id="4">Epic</quality>
<class id="12">Quest</class>
<subclass id="0"></subclass>
<icon displayId="63120">inv_qiraj_hiltornate</icon>
<inventorySlot id="0"/>

<htmlTooltip>
<table><tr><td><b class="q4">Battered Hilt</b><br /><a href="http://www.wowhead.com/?quest=14443" class="q1">This Item Begins a Quest</a><br />Races: <a href="http://www.wowhead.com/race=1" class="q1">Human</a>, <a href="http://www.wowhead.com/race=3" class="q1">Dwarf</a>, <a href="http://www.wowhead.com/race=4" class="q1">Night Elf</a>, <a href="http://www.wowhead.com/race=7" class="q1">Gnome</a>, <a href="http://www.wowhead.com/race=11" class="q1">Draenei</a><br />Requires Level 80<br />Item Level 1</td></tr></table><table><tr><td><span class="q">&quot;This scratched and dented hilt once belonged to an ancient sword.&quot;</span></td></tr></table>
</htmlTooltip>

<json>
"classs":12,"id":50379,"level":1,"name":"3Battered Hilt","reqlevel":80,"reqrace":2098253,"side":1,"slot":0,"source":[2],"subclass":0
</json>

<jsonEquip>
"avgbuyout":100000000,"races":2098253,"reqlevel":80
</jsonEquip>
<link>http://www.wowhead.com/item=50379</link>
</item>
</wowhead>


underneath, I have done everything needed to install or atleast im hoping i have, i have tried installing cURL on my site which says installed correctly however im un sure if it has.

i am using SMF 1.1.11 and the wow-dk theme.

Any help appreciated thank you :D
Title: Re: WoW - World of Warcraft Tooltips
Post by: tanyril on June 02, 2010, 03:46:16 PM
Hey Garou, Just FYI I'm getting the
"This XML file does not appear to have any style information associated with it. The document tree is shown below." error as well. Nothing has changed on my server as far as configuration goes. When I link things using the wowhead power.js method it works perfectly.
     
Title: Re: WoW - World of Warcraft Tooltips
Post by: mursalat on June 20, 2010, 11:29:20 AM
hi,
i just set up the system on wow-freaks.com and i get a "[an error occurred while processing this directive] "
if you want to see it, u can go to:
http://www.wow-freaks.com/general-discussion/welcome-to-smf!/

and on clicking the link i get it:
http://www.wow-freaks.com/wow/wowhead_wrapper.php?item=Lightbringer%20Faceguard

other mods i got are:
Pretty URLs
SA Facebook Connect
And This one..

so wats the prob? any idea?
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on June 20, 2010, 02:59:38 PM
Quote from: Arantor on April 23, 2010, 11:48:06 AM
mod_security actually causes a large number of issues and over time you may find other random things get broken by it. Any host that thinks mod_security actually helps with security without understanding its consequences is probably best to be avoided on general lack of competence grounds.

Nice....Good blanket statement which will cause the general public to believe mod_security is a bad thing.. It happened to be one update in particular that started causing problems. Most hosts use an automatic software update system, instead of checking every server for updates. mod_security actually saved many hosts the headache of security holes left in their configuration, and software with security holes in it. Hosts who recognize that certain rules can be changed to fit certain needs have no issue.
You just scared off anyone who may have wanted to host with someone who uses it. It has been clearly outlined in this thread how the issue with this mod can be fixed.
The hole that the mod_security fixed was closed with the update, and it was and is a possible security nightmare. I won't say what it is exactly, but the hackers know already.
I have servers that use it, and servers that don't, and both work fine and have their uses. I suggest that clients check with their current, or possible future host to see if it will effect them. There is no way for the average user to know what any host is using for security measures.
Throwing out a statement like that is just reckless in my opinion. And has the possibility of turning clients away from a host, when this mod would work fine on their servers with mod_security.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on August 18, 2010, 01:40:55 PM
 :o

I posted my issues here previously.

Yesterday a new guildie posted and included some items with the [wow] tags and the mouseovers worked for me. And then I replied to her post and the mouseovers quit working again.  So this has me a bit confused now (more so than usual).

On a whim I tried the mouseovers in Firefox 4.0 beta, and they still didn't work.  So I tried the mouseovers in IE and guess what?  They worked. Until I posted a reply again and they quit working in IE too.

So anybody have any ideas?



Title: Re: WoW - World of Warcraft Tooltips
Post by: bigguy_132 on September 13, 2010, 04:29:13 PM
Having a few problems that I have not been able to solve once upgrading to 1.4. The first issue I am having is that the [wow][/wow] tags working in only certain cases. When inserting the code as shown [wow]Quel'Delar, Cunning of the Shadows[/wow] The link that is show when hovering over it is http://thecursedmalygos.com/forum/wow/wowhead_wrapper.php?item=Quel%27Delar,%20Cunning%20of%20the%20Shadows with no tool tip. But when I have [wow]http://www.wowhead.com/item=50046[/wow] the tool tip shows just fine and I am able to see it. I am using a custom theme but have made all the changes as reported in the first topic. I had no problems in 1.1 but once upgraded to 1.4 the problems stated. I have the wow folder in my main SMF folder it is located at www.thecursedmalygos.com/forum/wow with permissions 644.

Second problem. Although the [wow]http://www.wowhead.com/item=50046[/wow] works the link does not take me to wowhead instead has the url of my forum in there as well. Example: http://thecursedmalygos.com/forum/wow/wowhead_wrapper.php?item=http://www.wowhead.com/item=50046 I am not sure what is causing the issue but it is frustrating me. Any advice is welcome. Thanks in advance.

Example: http://thecursedmalygos.com/forum/index.php?topic=10.msg13#msg13
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on September 13, 2010, 06:03:05 PM
This may have nothing at all to do with it but, my servers recently updated to PHP3. At which time some of my clients mods quit working. So I rolled back a version. Might be worth a try. But I can't keep running the older version for too long.
Title: Re: WoW - World of Warcraft Tooltips
Post by: bigguy_132 on September 13, 2010, 06:37:45 PM
Managed to get everything working. It took some fighting uninstalling, reinstalling, modifying but by God it works. Please ignore my post! Thanks!
Title: Re: WoW - World of Warcraft Tooltips
Post by: Night09 on September 15, 2010, 07:48:46 PM
Quote from: stfox100 on September 13, 2010, 06:03:05 PM
This may have nothing at all to do with it but, my servers recently updated to PHP3. At which time some of my clients mods quit working. So I rolled back a version. Might be worth a try. But I can't keep running the older version for too long.

PHP3 ? Please tell me thats a typo lol.

Its not the software old its your PHP if its not a typo,PHP is at version 5.3.3 now iirc.
Title: Re: WoW - World of Warcraft Tooltips
Post by: AllanD on October 17, 2010, 03:00:34 PM
need some help here and please understand i'm not good with codes lol

I installed this mod and put everything where it says to put and the text doesn't change color to match the item level. the only hover that works is
[wow]http://www.wowhead.com/?item=30987[/wow]

it i just add an item number or the name of item all it does is make a link that goes to an error message.

here is a link to the site so you can check out the error message   Link (http://acfew.net/forum/index.php?topic=66.msg124#msg124)

the only thing i think could be wrong is where i added the code in the /index.template.php  i'll post where i put it at for ya.


thanks for the all the help
oh using a custom theme Darkbreak
// The main sub template above the content.
function template_html_above()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;

   // Show right to left and the character set for ease of translating.
   echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
   <meta name="description" content="', $context['page_title_html_safe'], '" />', !empty($context['meta_keywords']) ? '
   <meta name="keywords" content="' . $context['meta_keywords'] . '" />' : '', '
   <title>', $context['page_title_html_safe'], '</title>';

   // Please don't index these Mr Robot.
   if (!empty($context['robot_no_index']))
      echo '
   <meta name="robots" content="noindex" />';

   // Present a canonical url for search engines to prevent duplicate content in their indices.
   if (!empty($context['canonical_url']))
      echo '
   <link rel="canonical" href="', $context['canonical_url'], '" />';

   // The ?rc3 part of this link is just here to make sure browsers don't cache it wrongly.
   echo '
   <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?rc3" />
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/print.css?rc3" media="print" />';

   // Show all the relative links, such as help, search, contents, and the like.
   echo '
   <link rel="help" href="', $scripturl, '?action=help" />
   <link rel="search" href="', $scripturl, '?action=search" />
   <link rel="contents" href="', $scripturl, '" />';

   // If RSS feeds are enabled, advertise the presence of one.
   if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']))
      echo '
   <link rel="alternate" type="application/rss+xml" title="', $context['forum_name_html_safe'], ' - ', $txt['rss'], '" href="', $scripturl, '?type=rss;action=.xml" />';

   // If we're viewing a topic, these should be the previous and next topics, respectively.
   if (!empty($context['current_topic']))
      echo '
   <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
   <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

   // If we're in a board, or a topic for that matter, the index will be the board's index.
   if (!empty($context['current_board']))
      echo '
   <link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0" />';

   // Some browsers need an extra stylesheet due to bugs/compatibility issues.
   foreach (array('ie7', 'ie6', 'webkit') as $cssfix)
      if ($context['browser']['is_' . $cssfix])
         echo '
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/', $cssfix, '.css" />';

   // RTL languages require an additional stylesheet.
   if ($context['right_to_left'])
      echo '
   <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/rtl.css" />';

   echo '
   <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?rc3"></script>
   <script type="text/javascript" src="', $settings['theme_url'], '/scripts/theme.js?rc3"></script>
   <script type="text/javascript"><!-- // --><![CDATA[
      var smf_theme_url = "', $settings['theme_url'], '";
      var smf_default_theme_url = "', $settings['default_theme_url'], '";
      var smf_images_url = "', $settings['images_url'], '";
      var smf_scripturl = "', $scripturl, '";
      var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
      var smf_charset = "', $context['character_set'], '";', $context['show_pm_popup'] ? '
      var fPmPopup = function ()
      {
         if (confirm("' . $txt['show_personal_messages'] . '"))
            window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");
      }
      addLoadEvent(fPmPopup);' : '', '
      var ajax_notification_text = "', $txt['ajax_in_progress'], '";
      var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
   // ]]></script>';

   // Output any remaining HTML headers. (from mods, maybe?)
   echo $context['html_headers'];

<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.3.2.min.js"></script>
<script src="wow/wowhead_linker.js"></script></script>

   echo '
</head>
<body>';
}



Title: Re: WoW - World of Warcraft Tooltips
Post by: AllanD on October 19, 2010, 11:45:28 AM
just wondering if anyone could help with this
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on October 19, 2010, 12:49:15 PM
Quote from: nightbre on September 15, 2010, 07:48:46 PM
Quote from: stfox100 on September 13, 2010, 06:03:05 PM
This may have nothing at all to do with it but, my servers recently updated to PHP3. At which time some of my clients mods quit working. So I rolled back a version. Might be worth a try. But I can't keep running the older version for too long.
Yes, that is what I meant, 5.3.3. I just shortened it assuming everyone would know it was the 5.x.x series.
PHP3 ? Please tell me thats a typo lol.

Its not the software old its your PHP if its not a typo,PHP is at version 5.3.3 now iirc.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Night09 on October 24, 2010, 05:35:28 PM
QuoteYes, that is what I meant, 5.3.3. I just shortened it assuming everyone would know it was the 5.x.x series.
PHP3 ? Please tell me thats a typo lol.

Sorry for not realising you shorened it, It just seemed like you said it was 3.0.0 ish. ;)
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on October 24, 2010, 05:40:59 PM
Quote from: nightbre on October 24, 2010, 05:35:28 PM
QuoteYes, that is what I meant, 5.3.3. I just shortened it assuming everyone would know it was the 5.x.x series.
PHP3 ? Please tell me thats a typo lol.

Sorry for not realising you shorened it, It just seemed like you said it was 3.0.0 ish. ;)
I don't even know how long ago that was .... LOL   ;D
Title: Re: WoW - World of Warcraft Tooltips
Post by: AllanD on October 30, 2010, 11:57:34 AM
is anyone able to help out with my problem.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on October 30, 2010, 12:24:45 PM
Quote from: CrazieGrafix on October 30, 2010, 11:57:34 AM
is anyone able to help out with my problem.

I'm not sure if I can help or not, but it sounds like you're having the same issue we were having on our forums (http://www.divinealliance.org/forums). I spent several hours trying different things to get the dang mouseovers to work. I ended up putting the wow folder in every directory that could possibly be referenced:  root directory for the main domain, root directory for the specific domain, and then the forum and relevant subdirectories of the forum.  I also went to WoWHead and made sure the scripts were all up-to-date and put all relevant scripts in the Themes/..../scripts  folders.

I hope this helps you somehow.





Title: Re: WoW - World of Warcraft Tooltips
Post by: AllanD on October 30, 2010, 12:58:22 PM
thank you very much i will try this
Title: Re: WoW - World of Warcraft Tooltips
Post by: Navox on December 28, 2010, 04:13:09 PM
Using SMF 1.1.12

I was looking for an alternative to wowitemstats since its no longer supported.

I installed World of Warcraft Tooltips and I ran into an issue.

Here is a link to the website's dev site where I am trying to troubleshoot the issue before I push it out to the live site.

http://www.controlthechaos.net/dev/

Notice how the link inside the [wow] [/wow] shows the item but when you hover over it nothing happens. When you click on it you receive an error.

The regular html link works fine.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on December 28, 2010, 09:56:28 PM
Quote from: Garou on March 28, 2009, 04:31:05 AM
Known Issues:
For some users, if your forum is not in the root directory for your website this mod may not work correctly. Copying the wow folder found in yoursite.com/yourforum/wow to yoursite.com/wow will fix this in many cases.

Some hosts for security reasons will require you to set the file permissions (chmod) for the wow folder and the files within to 644 or rw-r-r.

Having Search Engine Friendly URLs turned on can cause the mod to fail.

Many web-hosts are using a utility known as ModSecurity to help protect the sites they host from hackers. Unfortunately ModSecurity is made overly secure and often can create false positives for many web programs including this one. You have have to contact your host and have them read http://blog.modsecurity.org/2007/02/handling-false.html. It will help them to create a personal rule for ModSecurity that recognizes the files in the wow folder as safe.

Looking at your site it is most likely either a permissions problem or mod_security. Try playing around with your permissions on the wow folder and the files within. Some host require them to be either 644 or 655. If that doesn't work its probably an issue with mod_security, you'll have to talk to your host on that as I cant find a way around a couple of the custom rules that some hosts choose to use for that.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Navox on December 30, 2010, 11:33:21 AM
Tried the above troubleshooting step with changing the permissions on the website and still no go.  Anybody else successfully get this working with 1.1.12?
Title: Re: WoW - World of Warcraft Tooltips
Post by: stfox100 on December 30, 2010, 11:39:17 AM
Check the last option, that Garou suggested. It's most likely an issue with mod-security, in which case you'll have to convince your host to disable a certain rule for your account.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Navox on January 03, 2011, 10:03:11 AM
Thanks do 10001110101 for the suggestion on editing the Subs.php and finding href="wow/wowhead_wrapper.php?item=$1" and changing it to href="../wow/wowhead_wrapper.php?item=$1". That fixed it for me.

now. maybe an easier question, anyway to change the background color of the wowhead links?

<a class="wowhead q3" href="http://www.wowhead.com/item=52204" style="background-color: rgb(48, 48, 48);">[Adept Ember Topaz]</a>

Again.. from my website. you can see the links and the background color is 48 48 48. Id like to make it transparent or just black.

Thanks!


found the solution in this thread... thanks gang

Title: Re: WoW - World of Warcraft Tooltips
Post by: Snuffsis on January 11, 2011, 10:12:59 PM
I'm having the problem everyone else seems to have, the links won't work.
When i click the wow button or [wow]Elementium Deathplate[/wow] it only shows as gray and there is no tooltip and the url is weird. if i however open the link in a new tab it looks like this:
359359Epicinv_chest_plate_raidwarrior_i_01Chesthttp://www.wowhead.com/item=55060
And alot of other ******, basically the tooltip information with all the coding and the stats of the items appears like code on a blank tab.

It does however work with the normal way of linking just the wowhead link and naming it.
But how do i fix the easy way?
libcurl is installed on the server so it should work.
might this have something with me running 2.0 RC4 on the site, since it says it's not supported?
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 13, 2011, 11:08:42 AM
The mod works fine on the current versions of SMF and should work with all future versions of SMF provided that they don't do anything weird.  I haven't bothered to change it on the downloads page or update the content of the mod because I haven't had to change any code in the mod.

There is never an easy fix for this mod as not all websites work the same. It depends on what software the host is running. Read the first post as most the most common issues people have with the mod are listed there.

SunKing posted a fix he found at http://www.simplemachines.org/community/index.php?topic=301619.msg2148803#msg2148803. However that doesn't work for all sites either.

Through trial and error this mod can be made to work provided you dont have a host that is using mod_security.
Title: Re: WoW - World of Warcraft Tooltips
Post by: HellSpawnCometh on January 16, 2011, 12:48:56 AM
Ok... so I am trying to get your MOD working on the WoW-DK custom Theme in SMF 1.1.12...

I'm not sure if libcurl is available, but from what I see in the php config for my host, fopen should work fine if it's not.

Quote
Open the themes /languages/Modifications.english.php
and add...
$txt['wow'] = 'WoW Tooltip';>
before...
</?>

In the Modifications.english.php file for WoW-DK, I could not find </?> anywhere in the file... I saw in one of your other posts that all this does is give the tool-tip when you mouse-over the BBCode button, which I'm not really all that worried about... But if you get around to taking a look at this particular theme if you could figure out where I should put this code I would appreciate it... I tried putting it in right before the "?>? at the end of the file, but that actually broke the theme. I had to replace the file with an original copy to get it working again.

The bigger problem I am having is that when I use the BBCode links, The item name shows up in green regardless of item rarity, the tooltip does not show up, and clicking the linked item brings me to an error page that says the following (Note: I changed the URL)

XML Parsing Error: junk after document element
Location: http://web.address.net/wow/wowhead_wrapper.php?item=Healing%20Potion
Line Number 3, Column 1:<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
^


The tooltips work fine if I simply use a direct link to wowhead such as:
http://www.wowhead.com/spell=76464 or [url=http://www.wowhead.com/spell=76464]Item[/url]

I've tried reading through the myriad posts in this thread, but have not found anything that is helping me to find a solution for this.

Any ideas on how I can figure out if mod_security is enabled on my host? I didn't see anything about it in the php info I was able to look at... Would that even be the problem?

Anyway, any help would be greatly appreciated...
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 17, 2011, 07:56:08 AM
Typos on my part and looks like one in your file as well. Every php document should end with  ?> it designates that its the end of the php code. Just before that add $txt['wow'] = 'WoW Tooltip';

However that is not your problem. The bit about analytics shouldn't be there, did you add it into the scripts someplace?

Title: Re: WoW - World of Warcraft Tooltips
Post by: HellSpawnCometh on January 17, 2011, 06:12:59 PM
QuoteThe bit about analytics shouldn't be there, did you add it into the scripts someplace?

I did not... and I opened the wowhead_wrapper.php looking for it... it wasn't there...

The only thing I can think of is that my host may have a built in redirect of some sort... I am using http://www.000webhost.com/ which is a free hosting service... so it's quite possible they have something like that built in...

I'll try the fix for the tooltip when I get home, as I can't access the files here at work.
Title: Re: WoW - World of Warcraft Tooltips
Post by: HellSpawnCometh on January 17, 2011, 09:45:30 PM
That did indeed fix the problem with the mouseover tooltip on the BBCode icon...

Now, any ideas on the other problem? lol
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 18, 2011, 12:51:52 AM
If the host is doing something odd with it there isn't anything I can do. I have to be able to reproduce it on one of my test servers and without knowing what they have in place, I have no clue where even to begin.

You'll have to try and contact them and see if there's anything they can do. With it being free hosting I dont know that you'll get much help. On the upside you can get good quality hosting services for less then $5 a month. I highly recommend blutoshosting.com  I know the owner as hes helped me troubleshoot some of  the issues with this mod and he's got a package for $4.50 a month that's perfect for your average guild site.
Title: Re: WoW - World of Warcraft Tooltips
Post by: kumineko on January 29, 2011, 02:04:26 AM
Hi I have been trying to get this mod to work. When I click on the item linked thru the wow tag it sends me to a page where the whole information is parsed in text. So i really dont know what i should tell my hosting so they can fix this or maybe i could do something to fix it client side. Please help.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on January 29, 2011, 11:35:15 AM
Read through this thread. The first post lists the most common issues and possible fixes. Problems are usually permissions, placement of the wow folder, or the host using mod security.
Title: Re: WoW - World of Warcraft Tooltips
Post by: kumineko on January 31, 2011, 05:28:01 AM
I did change the chmod on the wow folder and it still doing the same thing, no mouseover and clicking on the link sends me to a text page with all the data written.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on February 01, 2011, 07:08:47 AM
Using your host's error log, usually found in cpanel or whatever back end software they use, will give you a good idea of whats happening. Especially if there is a problem with the file location or permissions.

Outside of that it sounds like you have everything set up correctly. Its most likely something your host is doing. You'll have to contact them.
Title: Re: WoW - World of Warcraft Tooltips
Post by: theiceman on February 12, 2011, 10:34:00 AM
anyone tested it with rc5?

btw worked fine for me with rc3/rc4 since modpages shows just until rc3 and the text on the first page is just mentioned that it was tested upto rc2.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on February 12, 2011, 11:24:58 AM
Unless they did something goofy with the posting system it should work just fine.

Since I wasn't even aware RC5 was out till this moment, I haven't tested it yet.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on February 12, 2011, 11:45:22 AM
All the trials and tribulations I've had with this mod, I did get the mouseover tooltips to work last summer, finally. And it quit working again when Cata was launched and WoWHead updated their website. (I had installed RC4 prior to those 2 events but don't recall now whether the tooltips were working after that or not.)

In any case, the mouseovers aren't working on our site when I use the [wow][/wow] but are working with the [url][/url] tags.  sigh.  i haven't had time to try to figure out where the glitch is - I'll dig into it when i upgrade the site to RC5.....

Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on February 12, 2011, 01:42:02 PM
I have had it running on my guilds website for several months now, using RC4 and the current version of the mod.

The mod installs using some generic coding that works for most sites but sometimes you get better results by customizing it to run on your site.

Make sure the wow folder is in the root directory of your site, example yoursite.com/wow. Due to the limitations of SMF the mod can not place it there for you, as such it gets installed forums root directory which may not be the root for your site.

Using direct links to the wow folder in your themes ./index.template.php sometimes works better then the defaults. find and change to...
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="http://yoursite.com/wow/jquery-1.3.2.min.js"></script>
<script src="http://yoursite.com/wow/wowhead_linker.js"></script></script>


./Sources/Subs.php also has a line that uses a generic link
'content' => '<b><a style="background-color:#303030" href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

Change to...
'content' => '<b><a style="background-color:#303030" href="http://yoursite.com/wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

After that it comes down to your hosts specifications for file permissions and applying that to the contents of the wow folder, usually 655 or 644 will work.

Customizing the mod to your site as outlined above will fix most possible issues. Checking the error log provided by your host (not the one in SMF) will usually tell you exactly what is wrong.

The one potential issue that there is nothing I can do to fix, depends on if your host is using mod_security along with certain rules sets. Some of the java code used in the mod to find an item by name or number and set the color of the link based on the items quality, triggers false positives as an injection script under certain rules for that program.

The codes used by this mod are completely safe and will not harm your site or their server in anyway. However as some malicious hackers out there sometimes use similar coding, some rule sets for mod_security will block the scripts the mod uses from running. You either have to get your host to white list the scripts in the wow folder as safe (the preferred method). You can also get them to turn off those particular rule sets but that can potentially open up your site to attacks by others.

The mod_security issues and fixes were posted long ago on their official blog. http://blog.modsecurity.org/2007/02/handling-false.html
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on February 12, 2011, 01:53:51 PM
i'll have to check and see if i'm using the direct links or not. i think i've done everything else you mention. but i'll double-check everything to be sure.

:D

UPDATE: I changed the links as you suggested and now the tooltips are working again!  woohoo! thank you!

;D

Title: Re: WoW - World of Warcraft Tooltips
Post by: Texl on February 23, 2011, 04:07:26 PM
Hi, liking your mod. :)

My only issue is that you're using jQuery, which conflicts with some themes that use other libraries like MooTools. I'd love it if you could rewrite the mod with jQuery's noConflict() active - doing so would ensure compatibility with all themes.
Title: Re: WoW - World of Warcraft Tooltips
Post by: RustyBarnacle on February 23, 2011, 04:35:38 PM
I just noticed this mod and would be interested in using it as well, but my themes also use MooTools I think.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Texl on February 24, 2011, 01:54:16 PM
I made the necessary modifications in my own environment to allow this mod and MooTools to coexist, wasn't too much trouble.

Essentially, you need to add this after the jQuery library inclusion and before any usage of the $ function:
<script type="text/javascript">jQuery.noConflict()</script>
Also, you have to replace every instance of the "$" symbol with "jQuery" in wow_linker.js. (I think that's the filename, don't have the file list in front of me.)

I'm pretty sure there's a way of closing on a local $ function to prevent having to do all those replacements (there's 10 or so uses of $ to replace), but JS isn't my primary language and it's at least working for me now.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on February 25, 2011, 08:45:15 AM
You guys want to let me know what themes you are using. I need something to test this against before I just update the mod. :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: RustyBarnacle on February 25, 2011, 12:00:32 PM
I use Bloc's paid themes which is unfortunate.  On the other hand my forum isn't a gaming forum so I asked the half dozen or so gamerz if they were interested and they said it would be cool on their gaming sites but not necessary on mine.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Texl on February 27, 2011, 01:46:25 AM
Quote from: Garou on February 25, 2011, 08:45:15 AM
You guys want to let me know what themes you are using. I need something to test this against before I just update the mod. :)
Sorry :)

I'm using this with Bloc's Gamerz theme. I'm unsure if he uses MooTools with free themes, if you don't currently have any paid themes.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on February 27, 2011, 10:32:44 AM
Even though Bloc is a great guy and does make some cool looking themes, I make it a personal rule never to pay for themes or mods. If it isn't available freely or I cant make it myself, I dont need it.

Ill have to see if I cant figure something else out.

Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on March 13, 2011, 08:38:33 AM
I just did a mouseover of a tooltip in our forums and got a 'no response from server.' This happened last night and I just dismissed it. But since it's happening again this morning, thought I'd report it. As I recall, WoWhead was having some server issues recently, but don't know what they were exactly.

thanks for any insight....


Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on March 13, 2011, 07:03:46 PM
I know that it has been taking a while to connect to the power.js if you are using the one from Wowhead in your header. This can slow down the page loading times on your site when Wowhead is running slow or getting a lot of traffic.

You can sometimes speed things up by using the power.js included in the wow folder.

Go to your ./index.template.php and change...
<script src="http://www.wowhead.com/widgets/power.js"></script>

to...
<script src="http://your forum/wow/power.js"></script>

By default I use the one directly from Wowhead because you never know if or when they will revise the script. If they ever do it could break the mod on your site. They don't make that information public as they would prefer you to use the one on their site. The only reason it is included in the mod is because several people asked for it, to speed up the load times on their site.

Outside of that I rarely check the forums at Wowhead, I just dont have the time for it and it was always rare I found anything useful in their forums. Generally the tools they provide are awesome though, especially now that they work directly with Blizzard.

In any case I have no clue if or what problems they may be having, in the past they have had server issues due to poorly scripted advertisements slowing down their whole site. None the less the best place to look would be http://www.wowhead.com/forums
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on March 13, 2011, 10:53:11 PM
must have been a glitch in their server because I checked it again a little while ago and the tooltips are working again.  o well....
Title: Re: WoW - World of Warcraft Tooltips
Post by: Thrandil on June 30, 2011, 12:58:07 PM
Hellas,

I´ve a problem with the World of Warcraft Tooltips mod for SMF. When writing an itemname between [wow][/wow]
the mouseover effect does work, but the Item Name is not shown in the correct way.

You just see for example [Lightbringer Faceguard].

Does anybody know if I have to config something bevor this work correcty or can help to get this mod work?

sorry for my bad english

so long


Thrandil
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 30, 2011, 01:19:43 PM
Quote from: Garou on February 12, 2011, 01:42:02 PM
I have had it running on my guilds website for several months now, using RC4 and the current version of the mod.

The mod installs using some generic coding that works for most sites but sometimes you get better results by customizing it to run on your site.

Make sure the wow folder is in the root directory of your site, example yoursite.com/wow. Due to the limitations of SMF the mod can not place it there for you, as such it gets installed forums root directory which may not be the root for your site.

Using direct links to the wow folder in your themes ./index.template.php sometimes works better then the defaults. find and change to...
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="http://yoursite.com/wow/jquery-1.3.2.min.js"></script>
<script src="http://yoursite.com/wow/wowhead_linker.js"></script></script>


./Sources/Subs.php also has a line that uses a generic link
'content' => '<b><a style="background-color:#303030" href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

Change to...
'content' => '<b><a style="background-color:#303030" href="http://yoursite.com/wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

After that it comes down to your hosts specifications for file permissions and applying that to the contents of the wow folder, usually 655 or 644 will work.

Customizing the mod to your site as outlined above will fix most possible issues. Checking the error log provided by your host (not the one in SMF) will usually tell you exactly what is wrong.

The one potential issue that there is nothing I can do to fix, depends on if your host is using mod_security along with certain rules sets. Some of the java code used in the mod to find an item by name or number and set the color of the link based on the items quality, triggers false positives as an injection script under certain rules for that program.

The codes used by this mod are completely safe and will not harm your site or their server in anyway. However as some malicious hackers out there sometimes use similar coding, some rule sets for mod_security will block the scripts the mod uses from running. You either have to get your host to white list the scripts in the wow folder as safe (the preferred method). You can also get them to turn off those particular rule sets but that can potentially open up your site to attacks by others.

The mod_security issues and fixes were posted long ago on their official blog. http://blog.modsecurity.org/2007/02/handling-false.html
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on June 30, 2011, 01:33:00 PM
Quote from: Thrandil on June 30, 2011, 12:58:07 PM
Hellas,

I´ve a problem with the World of Warcraft Tooltips mod for SMF. When writing an itemname between [wow][/wow]
the mouseover effect does work, but the Item Name is not shown in the correct way.

You just see for example [Lightbringer Faceguard].

Does anybody know if I have to config something bevor this work correcty or can help to get this mod work?

sorry for my bad english

so long


Thrandil

I noticed this too when I was posting items that were in the PTR and WoWHead's PTR database and not in the main WoWHead.com database yet. I ignored it at the time and just posted the items using the correct item number. I don't know what needs to be done to fix the issue, if it's on Garou's side or on WoWHead's side. Essentially, I think what's happening is that the query on an item name is returning the incorrect item number which then displays the incorrect item name and tooltip.

Don't know if that helps you Thrandil, but it is something I've recently encountered myself. Hopefully Garou will get back to us on this soon.

:)


Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on June 30, 2011, 01:54:06 PM
The Java Script in the mod isnt set up to use the PTR data and only searches the official site. If script cant find the item by name or number entered it tries to find something that is close.

This is the same problem that caused the mod to be updated to use item IDs as well as names because blizzard starting giving different items the same name. You may have wanted to post a rouges version of the item but the Warriors version was first on the list therefore in order to keep the mod working I had to add the code to search by item, which was provided by another user. Java Script just isnt my forte.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Aoife on June 30, 2011, 02:06:02 PM
Quote from: Garou on June 30, 2011, 01:54:06 PM
The Java Script in the mod isnt set up to use the PTR data and only searches the official site. If script cant find the item by name or number entered it tries to find something that is close.

That's kinda what I figured was happening. Thanks for the quick reply!    :D
Title: Re: WoW - World of Warcraft Tooltips
Post by: Spovik on July 21, 2011, 01:06:05 PM
I'm having the same issue as Thrandil's post above (http://www.simplemachines.org/community/index.php?topic=301619.msg3094533#msg3094533).  When I attempt to use the [wow] tags, either by name or item number, nothing works.  The Wowhead script is working fine since mouseover direct links works, but if I use [wow]45868[/wow], i get a link to the wrapper, and it wont work.  The URL it links to is:

http://www.mysite.org/forum/wow/wowhead_wrapper.php?item=45868

Any thoughts.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on July 21, 2011, 10:20:11 PM
Like Ive said before the two biggest problems with this mod is mod_security and the inability of the package manager to put the wow folder in the sites root directory rather then the forum directory, is the hardest part to making this mod work out of the box. All I can do is refer to this post again.

Quote from: Garou on February 12, 2011, 01:42:02 PM
I have had it running on my guilds website for several months now, using RC4 and the current version of the mod.

The mod installs using some generic coding that works for most sites but sometimes you get better results by customizing it to run on your site.

Make sure the wow folder is in the root directory of your site, example yoursite.com/wow. Due to the limitations of SMF the mod can not place it there for you, as such it gets installed forums root directory which may not be the root for your site.

Using direct links to the wow folder in your themes ./index.template.php sometimes works better then the defaults. find and change to...
<script src="http://www.wowhead.com/widgets/power.js"></script>
<script src="http://yoursite.com/wow/jquery-1.3.2.min.js"></script>
<script src="http://yoursite.com/wow/wowhead_linker.js"></script></script>


./Sources/Subs.php also has a line that uses a generic link
'content' => '<b><a style="background-color:#303030" href="wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

Change to...
'content' => '<b><a style="background-color:#303030" href="http://yoursite.com/wow/wowhead_wrapper.php?item=$1" class="wowhead">[$1]</a></b>',

After that it comes down to your hosts specifications for file permissions and applying that to the contents of the wow folder, usually 655 or 644 will work.

Customizing the mod to your site as outlined above will fix most possible issues. Checking the error log provided by your host (not the one in SMF) will usually tell you exactly what is wrong.

The one potential issue that there is nothing I can do to fix, depends on if your host is using mod_security along with certain rules sets. Some of the java code used in the mod to find an item by name or number and set the color of the link based on the items quality, triggers false positives as an injection script under certain rules for that program.

The codes used by this mod are completely safe and will not harm your site or their server in anyway. However as some malicious hackers out there sometimes use similar coding, some rule sets for mod_security will block the scripts the mod uses from running. You either have to get your host to white list the scripts in the wow folder as safe (the preferred method). You can also get them to turn off those particular rule sets but that can potentially open up your site to attacks by others.

The mod_security issues and fixes were posted long ago on their official blog. http://blog.modsecurity.org/2007/02/handling-false.html

If putting the wow folder in the root directory, changing the code to use direct links, oh and adjusting folder permissions doesn't work, then its a mod security issue and there isnt anything I can do to fix it. Sorry.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Spovik on July 22, 2011, 08:26:39 AM
I missed the direct link post and totally forgot about mod security.  I so hate it ><

Thanks for taking the time to respond though, it helped me rule out my own ineptitude, or at least the majority of it.  :)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on July 22, 2011, 09:09:21 AM
LOL
Title: Re: WoW - World of Warcraft Tooltips
Post by: Spovik on July 22, 2011, 11:15:10 AM
Thanks for the help.  After a quick response from my hosting company all is working great.  Were you ever able to find out how to get the links to work in the previews?

I saw the thread where you had someone who surprisingly had it working in their previews, though it didn't work on your test site.  I didn't know if you happened to figure it out.  Thanks a ton for maintaining this mod by the way.

http://www.simplemachines.org/community/index.php?topic=301619.msg2459473#msg2459473
Title: Re: WoW - World of Warcraft Tooltips
Post by: Garou on July 22, 2011, 01:46:13 PM
No problem. The funny thing is I dont even play the game anymore and I'm not currently active in running any SMF site. :)

When I first started with this, the other mod hadn't been converted for 2.x (still hasn't and I dont think it ever will be, not even sure if it works for 1.x). I found a post on Wowhead about the scripts for this, which was originally written for VB and WP, there was also a tutorial on how to make the scripts work with the custom BBC mod.

The worst part was that Matt (aka Horus) had already taken everything off his site. I'm assuming it was due to all the complaints about it not working but in hindsight that was probably due to mod_security. I tracked down about a dozen websites that had the scripts running and contacted the admins about getting the scripts before I found one kind enough to share.

After that I figured it was better to just make a real mod out of it instead of having to go through the hassle of configuring it to work with the custom BBC mod. Besides making a BBC command for SMF is quite simple without the mod.

As for the previews, I never got around to fixing it. IIRC its only a 2.x issue and my guess is that there is a separate display template for them, I just never tracked it down. If Wowhead or SMF winds up changing something to where I have to update the mod again, I will probably track it down and include it.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Spovik on July 22, 2011, 03:08:58 PM
Thanks.  I was seeing if anyone happened to know off hand.  I'll do some digging over the weekend and if I find anything, I'll be sure to post back.  Thanks again for the help.
Title: Re: WoW - World of Warcraft Tooltips
Post by: Zirc on November 25, 2011, 01:09:52 PM
Can anybody tell me if it would be difficult to adjust this mod to work with the new Torhead?  It's the wowhead equivilant for the new Star Wars MMO.
Title: Re: WoW - World of Warcraft Tooltips
Post by: commonmind on January 09, 2012, 11:36:32 AM
I'm not sure if this will work for anyone else, but I thought I'd give it a shot.

I had the same issue as so many above; I followed the fix instructions and had no luck. After banging my head against this wall for a while, I decided to edit the URL's for my site links to include the www.

This fixed the issue for me.
Title: Re: WoW - World of Warcraft Tooltips
Post by: 0Connors on November 12, 2012, 01:30:06 PM
Hi,

After trying all your techniques I still can not display the item was on my forum using the [wow] [/ wow] tag tooltip does not appear and the links me to a page XML .. .

http://www.pafteam.com/wow/wowhead_wrapper.php?item=Claws% 20of% 20Shek'zeer

I do not understand why ...

Yet a simple link like this: http://fr.wowhead.com/item=86864/griffes-de-shek-zeer

Works perfectly.

An example of the two links:

http://pafteam.com/forum/index.php?topic=1580.0

Thanking you
Title: Re: WoW - World of Warcraft Tooltips
Post by: Warhaven on November 12, 2012, 02:36:59 PM
Does the javascript break for anyone else during the preview?  I've run into this problem:

http://www.simplemachines.org/community/index.php?topic=490504.msg3437102#msg3437102

The class name is getting cut off for the link inside the preview div and breaking the javascript.


Nevermind.  I guess it's a known issue.  It happens with my own mod as well.  I made a mod that uses a jquery lightbox effect to display Pathfinder spells/magic items/feats/etc., and the forum is cutting off the css in preview for that as well.

[edit]

I'll keep working with my lightbox mod, and if I figure out where the forum is messing up the CSS, I'll let you know.
Title: Re: WoW - World of Warcraft Tooltips
Post by: mroller on November 08, 2016, 04:36:58 PM
Hello WoW Tool Tips. I'm having a problem getting WoW Tooltips to install, it is giving me an error in this screen cap. It happens when I try to add this line of code.
Open the themes /languages/Modifications.english.php
and add...
Code: [Select]
$txt['wow'] = 'WoW Tooltip';>

(http://defendmyfort.com/screenshots/technical-support-wow.JPG)
Title: Re: WoW - World of Warcraft Tooltips
Post by: Shambles on November 08, 2016, 05:43:13 PM
Well, open that file and remove the ">" character. Simple.