WoW - World of Warcraft Tooltips

Started by Garou, March 28, 2009, 04:31:05 AM

Previous topic - Next topic

Garou

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 />\' => \'\'));'),
         ),


immix

Awesome! works like a charm ;)

1 coin for your piggybank :)

Tunga

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.

Garou

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. :-\

Night09

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.

Garou

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.

Night09

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.

Andiiieee[:

Quote from: Garou on March 28, 2009, 04:31:05 AM
WoW - World of Warcraft Tooltips v1.3





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 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

Alternatively BBS codes can be used to make links easier to read...
Lightbringer Faceguard
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 for writing the Powered by Wowhead Script.
Also thanks to Horris 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 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!
A girl like me would be really happy with a forum like you! ;)

My SMF Forums:

Night09

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.  ;)

Andiiieee[:

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.
A girl like me would be really happy with a forum like you! ;)

My SMF Forums:

Garou

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

Night09

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. ;)

bentinma

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 :

hxxp:gondolyn.free.fr/wowhead/UTF8_Wowhead.zip [nonactive]

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

mekon

#173
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 hxxp:immortalsguild.co.uk [nonactive]

ps. checked with host and libcurl is installed on the server.

Garou

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.

Garou

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 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>

mekon

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 :(

Garou

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.

mekon

#178
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

mekon

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 :)


Advertisement: