This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
Add Wowhead tooltips to your forums or CMS.
Return to board index
Post by
Lockslap
All of the information on this script was moved to its new home:
http://wowhead-tooltips.com
.
You can still get support from this thread, though.
Support is now given from the script's support
forum
. I will continue to announce script releases from this page to keep people in the loop. Make sure to register and stop by to say hi.
This software is released under the GNU General Public License, please see LICENSE.txt in the zip file for more information.
Post by
capten
This works great, infact its the only link thingy i got to work proper.
But there is no tooltip when hoovered any ideas how to enable?
Post by
132944
This post was from a user who has deleted their account.
Post by
132522
This post was from a user who has deleted their account.
Post by
Lockslap
@ capten, you have to make that the <script src="
http://www.cuckhead.com/widgets/power.js"></script>
line is added into the "overall_header.html" file of your template. If you want to link the forums its going on I will check to see that the line is there. You can check yourself by right-clicking on the website and going to "View Source", then look in the source code for the line. I forgot to mention that you need to purge the cache by going to your Admin CP and clicking on the appropriate button. It is on the first page that pops up upon entering your ACP.
Any other problems, let me know.
@imso, I also run a phpBB2 forum, so I will attempt to adapt the code. Just make take a couple of lines of code to change.
@Sasheem, no you do not need to add anything to the ACP. The code is handled entirely by the script provided above. If you get any error messages or anything like that, please post them and I will help you get everything running.
Post by
84594
This post was from a user who has deleted their account.
Post by
Miyari
If you dont mind, I'd like it if you re-posting this information in
this thread
(you could even simply edit your existing post linking to this topic).
I would be more than happy to link to those posts from the original post with the rest of the board guides, I just like to keep everything neat and clean and in one place. It's the Wowhead way!
Post by
Lockslap
If you dont mind, I'd like it if you re-posting this information in
this thread
(you could even simply edit your existing post linking to this topic).
I would be more than happy to link to those posts from the original post with the rest of the board guides, I just like to keep everything neat and clean and in one place. It's the Wowhead way!
I have posted a link to this thead in the thread you requested. The problem with having multiple page topics on such a vast subject (vast in that, there are many methods) is that people are less likely to read the entire way through, and thus less likely to see this.
Post by
Miyari
If you dont mind, I'd like it if you re-posting this information in
this thread
(you could even simply edit your existing post linking to this topic).
I would be more than happy to link to those posts from the original post with the rest of the board guides, I just like to keep everything neat and clean and in one place. It's the Wowhead way!
I have posted a link to this thead in the thread you requested. The problem with having multiple page topics on such a vast subject (vast in that, there are many methods) is that people are less likely to read the entire way through, and thus less likely to see this.
However, the thread is vast, thorough and heavily linked, and is pretty much the definitive source on information regarding the script until we decide to change that. People aren't expected to read the entire way through the thread, as there are links from the
first post
in the topic to the posted guides for many different forums. However, if you are not interested in reposting, I can add the link to the post you made in that thread, which links to this guide post, to the original post in that topic. I don't think it's necessary to add another sticky as this information is most properly contained in the existing thread.
Post by
132944
This post was from a user who has deleted their account.
Post by
Lockslap
I followed the instructions step by step. Checked and double checked both files, the lines are there. Purged the cache. The functions_wowhead.php file lies safely in my forum's include folder.
Now what I am using is subsilver2 as style. But that shouldn't make any difference.
now when i write a new post there is no button for the tags (should there be?) but even when i use them just by typing Bracing Earthstorm Diamond (for example) the code doesnt get parsed.
As i can see the script line in the source code of the new post page i can see the script line there, so that seems to be ok. Just the stuff from the bbcode.php seems to get ignored. the changes look like this:
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* WoW Head (cuckhead.com) item links.
**/
include_once("functions_wowhead.php");
/**
* END Wowhead item links
**/
and
// Remove the uid from tags that have not been transformed into HTML
$message = str_replace(':' . $this->bbcode_uid, '', $message);
/**
* Parse links for Wowhead Items
**/
$message = wowhead_parse($message);
/**
* END Wowhead Links
**/
}
There is not going to be a button linked on the "Post Reply" page, as I wanted this to be as unintrusive to the phpBB software as possible. This is both for easy of installation, but also in case something happens it won't cause any problems with functionality. The theme (style) you use shouldn't matter to the script, as it really doesn't interact with it. It seems you have properly setup the script, however, I don't really see what could possibly be going wrong. If you use X-Fire, you can contact me on the username cr4ckp0t, and we can work out what's going on. If not, link your website and ill try to figure it out.
Post by
Lockslap
If you dont mind, I'd like it if you re-posting this information in
this thread
(you could even simply edit your existing post linking to this topic).
I would be more than happy to link to those posts from the original post with the rest of the board guides, I just like to keep everything neat and clean and in one place. It's the Wowhead way!
I have posted a link to this thead in the thread you requested. The problem with having multiple page topics on such a vast subject (vast in that, there are many methods) is that people are less likely to read the entire way through, and thus less likely to see this.
However, the thread is vast, thorough and heavily linked, and is pretty much the definitive source on information regarding the script until we decide to change that. People aren't expected to read the entire way through the thread, as there are links from the
first post
in the topic to the posted guides for many different forums. However, if you are not interested in reposting, I can add the link to the post you made in that thread, which links to this guide post, to the original post in that topic. I don't think it's necessary to add another sticky as this information is most properly contained in the existing thread.
I am helping people with it via this page, so if you would be kind as to link this guide in the sticky already posted that would be greatly appreciated.
Post by
Lockslap
Updates to add some functionality.
I like to have as much control over how things look on my webpages as possible (so I'm a control freak, sue me lol), so I added some new functionality to the script. It still does everything that it did before, but I have added the ability to specify a Cascading Stylesheet (wowhead.css) and you can control how the item looks.
Please note, that in order to change how the links will look, you must have some knowledge of CSS.
If you do decide to edit the style of the links by editing the "wowhead.css" file, please keep the class names in tact. They must remain named as their quality level, ie poor, common, etc.. Otherwise, the script will not function as intended. A tip, if the item link looks like the link style that is used by default for your phpBB theme, then something has been messed up and/or the script isn't working properly. Now then, on to the installation, and how to use it.
There are four methods of displaying the links with the pretty colors.
Display the links using Wowhead's own style (default).
Display
ALL
of the links using your custom theme.
Display only certain item qualities using your custom theme.
Display one item you're linking using the new BBCode tags, more on that later.
Obviously, if you install the script using the instructions on the initial post of this thread, then you're using Wowhead's style, so I won't go over that again. Before I go over each individual method, I will give you the instructions you must do in order to use your own custom theme.
Installation Instructions
Inside of the zip file (wowhead_phpBB3.zip) you downloaded from the link above, there is a file called "wowhead.css". This is the cascading stylesheet for the item links. You can open and edit this file as you please, but make sure to keep the class name intact. Only edit the lines inside of the curly brackets ("{" and "}"). The default theme inside this file looks almost like Wowhead's, except that the font is
bold
.
Place this file into the "./styles/<your theme>/theme/" folder. For example, if you're using the default theme for phpBB3, which is called prosilver, then the file's location will be the following../styles/prosilver/theme/wowhead.css
Next, open the "overall_header.html" file located in the "./styles/<your theme>/template/" directory of your forum's installation. This is the same file that you edited when you initially installed the script. Somewhere inside of the <head></head> tags place the following line.<link href="{T_THEME_PATH}/wowhead.css" rel="stylesheet" type="text/css" /> Generally, I try to put that line just above the </head> tag, just to keep everything nice and neat.
Save and close the file, and reupload to your website as needed.
All this line does is tell the browser that we will be using an additional external CSS file for some customization.
That is it for the general installation, now I will progress into the specific setup depending on which method you choose from the 3 (for our purposes) options I listed above.
If you wish to
ALWAYS
use your custom styles (Option 2 from above):
Open the "functions_wowhead.php" file that was included in the zip file you downloaded from above.
At the top of the file there is a variable known as "$external_css". This tells the script whether or not it is using a custom (external) style for the links. If you wish to always use your custom styles then change it from$external_css = false; to $external_css = true;
Save and close the file and then upload it to the "includes" folder of your forum installation.
If you wish for only certain quality levels to use your custom theme, then do the following:
Open "functions_wowhead.php" in your favorite text editor.
Make sure the variable "$external_css" is set to false $external_css = false;
The next option to configure is the one we need for this. The variable is an array of the quality items that will use your custom theme.
Simply input the worded quality (poor, common, etc.) into the array surrounded by quotation marks (") and separate them with a comma (,). For example, if you wished to have epic and rare items use your custom theme then the line should look like the following. $qualities = array("rare", "epic"); You can input as many of the item qualities in there as you wish, but make sure that the entries are all lower case.
Save the file and reupload to your website as needed. Make sure to place it in the "includes" folder of your phpBB installation.
If you wish to control the theme on an item by item basis then I have added the following:
This functionality is coded directly into the script, so there is no editing required. Simply follow the instructions I posted at the top of this post.
To use this simple use the new bbcode tags <item name> where <quality> is the worded quality of the item. For example, if you wished to display the item
using your custom theme for an epic item then use the following code. Broken I.W.I.N. Button
I think that pretty much sums up some of the changes I have made. Again, if you have any questions or comments, please feel free to post them here. Also, I apologize if this post is a garbled mess, as it is currently 6:30am EST, and I have yet to goto sleep.
By the way, thank you for the positive feedback I have gotten from this script thus far. If you have any ideas for future improvements, please feel free to post those as well.
Thanks,
Crackdizzle aka craCkpot
Post by
Shikengriuber
I followed the instructions step by step. Checked and double checked both files, the lines are there. Purged the cache. The functions_wowhead.php file lies safely in my forum's include folder.
Now what I am using is subsilver2 as style. But that shouldn't make any difference.
now when i write a new post there is no button for the tags (should there be?) but even when i use them just by typing Bracing Earthstorm Diamond (for example) the code doesnt get parsed.
As i can see the script line in the source code of the new post page i can see the script line there, so that seems to be ok. Just the stuff from the bbcode.php seems to get ignored. the changes look like this:
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* WoW Head (cuckhead.com) item links.
**/
include_once("functions_wowhead.php");
/**
* END Wowhead item links
**/
and
// Remove the uid from tags that have not been transformed into HTML
$message = str_replace(':' . $this->bbcode_uid, '', $message);
/**
* Parse links for Wowhead Items
**/
$message = wowhead_parse($message);
/**
* END Wowhead Links
**/
}
I have the same problem :|
P.S. Strange I tryed to click preview and its working in preview, but after posting it does not work
Post by
Illuminii
Im getting the same problem as Shikengriuber with the fact that the link and mouse over works in Preview - but upon clicking Submit the link doesn't work at all
My website is
http://www.fuseguild.co.uk/forum/viewtopic.php?f=1&t=3
Thanks,
Illuminii
Post by
Lockslap
With the help of Illuminii, I was able to get it working on his forums. I will post the instructions here, as well as update them on the initial post above.
Make sure to redownload and install the script I posted above, as I have made some minor changes to account for some minor bugs.
Open bbcode.php and find the following line you added.$message = wowhead_parse($message);Change it to:wowhead_parse($message);
When adding this line initially to bbcode.php, make sure you put it in its correct place. There 2 identical lines inside the file. The place it needs to go is following this chunk of code.
$undid_bbcode_specialchars = false;
foreach ($bbcodes_set as $bbcode_id)
{
if (!empty($this->bbcode_cache))
{
foreach ($this->bbcode_cache as $type => $array)
{
foreach ($array as $search => $replace)
{
${$type}))
{
$message = str_replace($str, $str, $message);
$str = array('search' => array(), 'replace' => array());
}
if (sizeof($preg))
{
// we need to turn the entities back into their original form to allow the
// search patterns to work properly
if (!$undid_bbcode_specialchars)
{
$message = str_replace(array(':', '.'), array(':', '.'), $message);
$undid_bbcode_specialchars = true;
}
$message = preg_replace($preg, $preg, $message);
$preg = array('search' => array(), 'replace' => array());
}
}
}
}
// Remove the uid from tags that have not been transformed into HTML
$message = str_replace(':' . $this->bbcode_uid, '', $message);
Save and close bbcode.php, and reupload to your website as needed.
Open viewtopic.php, which should be located in the base directory of your forums' installation.
Find the following code:
$message = bbcode_nl2br($message);
$message = smiley_text($message);
Immediately after it add:
wowhead_parse($message);
Save and close viewtopic.php, and reupload it to your forums as needed.
Now it should be functioning. If not please feel free to post and we'll get it figured out.
Post by
133622
This post was from a user who has deleted their account.
Post by
Lockslap
Hey, just a heads up. You probably need to change your instructions for phpBB2 to reflect the new syntax for the wowhead_parse. I was thrown until I figured out it was wowhead_parse($text); now.
Thanks for the awesome addon, though!
Thank you for pointing that out. I have adjusted the instructions.
Post by
132522
This post was from a user who has deleted their account.
Post by
Lockslap
Glad to hear it works for ya!!!! =D
Post Reply
This topic is locked. You cannot post a reply.