This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
Powered Tooltips Guide
Post Reply
Return to board index
Post by
Psyker7
It's worth nothing that your script does not produce correct links into wowhead's site at the moment Arador, producing links until an item has been mouseovered... I guess this is OK, but if someone clicks before it loads it will throw a 404.
I didn't think this would be an issue since you need to mouseover a link to click it, but I didn't think about using keyboard navigation. I'll fix this tomorrow, should be easy.
Ok, my code is fixed, it now converts links on page load instead of mouse over. It also works in IE now. Finally, it uses the vanilla wowhead script to actually load and display the tooltips; my code simply converts the aforementioned tags to links the wowhead script can understand.
Mks now it fails at caps. It's fine if there is only one of an item on a page, but if there are multipe items on a page, where each has different capitalizations it does fail to change the links on some.
My fix was:
replace
var itemName = xmlhttp.responseXML.getElementsByTagName("name").childNodes.nodeValue.replace(/ /g, "%20");
with
var itemNameX = xmlhttp.responseXML.getElementsByTagName("name").childNodes.nodeValue.replace(/ /g, "%20");
and replace
if (linkMap) {
with
if (linkMap) {
Post by
marcimi
So guys, finaly I managed to get access to the IPB message board demo. Here is how you can implement the wowhead mouseover tooltip script to your IPB (Version 2.2).
Have fun!
Part One - Installing the script
Login to you Admin CP
Click
Look & Feel
Select your current theme and click the button on the end of the line
Hit
Edit Board Header & Footer Wrapper
Search for:
<% JAVASCRIPT %>
After that, insert:
<!-- WoWHead MouseOver-Tooltip -->
<script src="
http://www.cuckhead.com/widgets/power.js"
type="text/javascript"></script>
<!-- /WoWHead MouseOver-Tooltip -->
Hit
Save wrapper
Open your forum and test the script with the following line:
My great Item
Part Two - Creating the custom bbcode-tag
Login to you Admin CP
Click
Management
On the left side-menu select
Add new BBCode
in the
Custom BBCode
category
Fill in the form:
Custom BBCode Title
cuckhead.com mouseover tooltip
Custom BBCode Description
This vbCode creates an cuckhead.com-Link which provide sweet item-tooltips of the linked item. Only works if the cuckhead.com script is active.
Custom BBCode Example
Meta Bryanite of Mana
My great Item
Custom BBCode Tag
item
Use Option in tag?
Yes
Switch option around?
No
Custom BBCode Replacement
<a href="
http://www.cuckhead.com/?item=
{option}">{content}</a>
OPTIONAL Insert into the editor's 'Insert Special' menu?
Yes
OPTIONAL Enter 'option' dialogue text
The ItemID of you item you wish to link to.
OPTIONAL Enter 'content' dialogue text
Some text which describes your item. Can be the name of the item or whatever you want.
Hit
Add BBCode
Open your forum and test your new BBCode with the following line:
Choker of Repentance
What a wonderfull item
Enjoy :)
Post by
104528
This post was from a user who has deleted their account.
Post by
sirius
I've played around with this a little, and it seems to work well for text links, but when the link is an image, the tooltip does not appear. Is this by design?
This works:
<a href="
http://www.cuckhead.com/?item=3075">Eye
of Flame</a>
This does not:
<a href="
http://www.cuckhead.com/?item=3075"><img
src="icon.gif"></a>
I have the same problem. Do u find any solution?
Post by
21727
This post was from a user who has deleted their account.
Post by
Arador
Anybody have Arador's script working on Punbb?
EDIT: I can get the base thing to work by inserting the code into viewtopic.php but it doesnt work in the template file (main.tpl).
When trying to add Arador's script, it sorta places the link on the page, but in the bottom right corner, and it doesnt look correct.
I've tested it on my punbb installation and it works fine if you make the following changes:
- Copy my proxy.php and wowhead.js to the root of your punbb installation.
- Edit header.php as follows:
After this line:
<link rel="stylesheet" type="text/css" href="<?php echo PUN_ROOT ?>style/<?php echo $pun_user.'.css' ?>" />
Add the following:
<script src="wowhead.js"></script>
<script src="
http://www.cuckhead.com/widgets/power.js"></script>
If you want to handle tags of this form: then do the following:
Edit include/parser.php and change the following lines:
After this line:
'#\s*\#i',
Add this line:
'#\\s*#i',
After this line:
'',
Add this line:
'',
After this line:
'#\*?)\](.*?)\#',
Add this line:
'#\*?)\]#',
After this line:
'<a href="mailto:$1">$2</a>',
Add this line:
'<a href="
http://www.cuckhead.com/?item=
$1">$1</a>',
Hope that helps.
Post by
marcimi
Any module for this on wordpress? I know that you can tweak itemstats, but this seems rather easier (and doesn't need any database usage).
I'll take a look at it.
Post by
Horris
I created a little JavaScript hack that allows you to put Wowhead links in phpBB posts based only on item name WITH the proper link coloring.
First,
download this file
.
Then, unzip and copy the whole wow/ directory to the root directory of your phpBB install.
Next, for every template you want this to work with you have to edit the overall_header.html file and add the following lines right before the </head> tag...
<script src="
http://www.cuckhead.com/widgets/power.js"></script>
<script src="wow/jquery-1.2.1.js"></script>
<script src="wow/wowhead_linker.js"></script>
Finally, you need to add the following BBCode entry in the admin area:
BBCode: {TEXT}
HTML equivilent: <a href="wow/wowhead_wrapper.php?item={TEXT}" class="wowhead">{TEXT}</a>
I've only tested this with phpBB3, but I don't see why it wouldn't work with version 2 as well. If you come across any problems, I'll be glad to try and work them out.
To see a working demo,
click here
.
Thanks and happy WoWing!
Post by
chrull
About the SMF guide.
You say that we should trim whitespace both inside and outside wich may cause problems. After following your instructions i could link an item and then just press enter to go down a line. Changing to trim whitespace only inside the tag fixed that.
Post by
105072
This post was from a user who has deleted their account.
Post by
marcimi
As requested, the step-by-step guide for wordpress blog systems.
This should work with own-hosted blogs. If you blog is hosted by another service: You need rights to edit your selected theme. Thats all you need. And, of course: You need access to the administration panel.
Let's go:
Please note, that I used the default theme for the front page and the adminstration panel. Some steps can differ if you use a third party theme.
Part One - Installing the script
Log in to your administration panel (wp-admin.php)
Hit
Presentation
, then
Theme Editor
Select you current from the dropdown menu, then click
Select
On the right side , click
Header
Find: <?php wp_head(); ?>
</head>
Modify it:
Hit
Update File
Goto
Write
and write an post to test the script. Your post should contain something like that:
Part Two - Creating the BBCode
WordPress does not support BBCodes. The WYSIWYG-Editor provide excellent features to create HTML-Links.
Have fun with this!
Post by
21727
This post was from a user who has deleted their account.
Post by
Horris
@Gahlok
I'm not too familiar with Wordpress, but I'll see what I can do to adapt my phpBB solution (mentioned above) to WP and get back to you.
Post by
thedaego
(Earlier: Anyone familiar with MYBB forums? Been trying to get this to work with that forum software, but no luck yet.)
Ok Solution for this is
EASY
!!
just modify the template header information found in the admin control panel of MyBB.
goto Templates->(expand the Default Template)->click on headerinclude.
in the "Template" text field:
find <script type="text/javascript" src="{$mybb->settings}/jscripts/popup_menu.js?ver=121"></script>
ADD AFTER the above code,
(the wowhead script) <script src="
http://www.cuckhead.com/widgets/power.js"></script>
then click "update template"
Now, whenever you use the Mycode for a wowhead link, it will show you the pretty wowhead tooltip. Simple, right?!
Post by
marcimi
@Marcimi: That's more or less what I do :P I meant something like a plugin, that would work like .
I'm a bit familar with wordpress and I think, that it is possible to develop a small modification for wordpress to use the \n-Tag. And of course, if you start writing this modification, you can implement \nItemname aswell :)
Shouldn't be that problem. But, as always, I do not have the time to develop such a modifcation. Even my x-mas "holidays" are packed with a lot of university stuff :/
Post by
102479
This post was from a user who has deleted their account.
Post by
89097
This post was from a user who has deleted their account.
Post by
Horris
Finally, you need to add the following BBCode entry in the admin area:
BBCode: {TEXT}
HTML equivilent: <a href="wow/wowhead_wrapper.php?item={TEXT}" class="wowhead">{TEXT}</a>
I've only tested this with phpBB3, but I don't see why it wouldn't work with version 2 as well. If you come across any problems, I'll be glad to try and work them out.
Thanks and happy WoWing!
I'm running BB 2.x and this code is not familiar to me. I don't know if that's a 3.x feature or not but it appears that a higher level lang that gets converted to some regex type code. I'm working on gettting it working but any advice may be helpful (I'm not a PHP pro either more a .NET guy =/ )
In phpBB3 you can add your own BBCode snippets in the admin area. I'm not sure if you can in version 2 or if you're just stuck with the defaults.
Post by
89097
This post was from a user who has deleted their account.
Post by
105224
This post was from a user who has deleted their account.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.