This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
11.0.2
PTR
11.0.5
Beta
Powered Tooltips Guide
Post Reply
Return to board index
Post by
Horris
Has anyone managed to get the SMF BBCode to carry through the colour correctly? Ive added the class="q5" but that just makes everything Lengendary, which is obviously what q5 equals.
Any idea how to automate this?
My mod (posted earlier in this thread) automates this for you. It's not too hard to set up. I've only tested with phpBB, but if SMF uses BBCode it should work just as well on there.
Post by
105224
This post was from a user who has deleted their account.
Post by
Horris
@Benneh: Thanks for testing this for me.
The only occasion where my code might have problems is if you are already using Prototype or some other JS library that isn't JQuery. My code relies on JQuery and there are going to be conflicts between it and Prototype.
Post by
89097
This post was from a user who has deleted their account.
Post by
Horris
@Pythagorus: Thank you so much for posting this.
I'm primarily a Ruby guy and haven't written PHP in a while. I didn't even think to test in PHP 4.x, but I appreciate you pointing this out. I'll have to modify my code and give you credit for helping. If you have a website/blog/etc I'd be happy to post the URL in the code along with your name.
To everyone who needs this functionality in Wordpress: I believe I have found a solution and I'll try to get it posted later this evening. I'm also planning on integrating it with Drupal and building a Ruby on Rails plugin.
Post by
nipoez
If you would like to also
optionally
allow users to include item quality information in phpBB 2.x.x.x, I strongly recommend setting up an additional BBcode translation. This will allow posters both options; if they don't remember to include the quality number, the item tag will still work just fine.
Follow Kalroth's excellent instructions above to capture item tags without quality information. Then include the following snippets to allow users to place a comma and the number 0-5 after the number, indicating item quality.
STEP TWO
Open /forum/templates/YourOwnTemplate/bbcode.tpl
Add this in the bottom of the file:
<!-- BEGIN item --><a href="
http://www.cuckhead.com/?item=
{NUMBER}">{DESCRIPTION}</a><!-- END item -->
Add this snippet immediately after the above code.
<!-- BEGIN itemQ --><a class="q{ITEMQUALITY}" href="
http://www.cuckhead.com/?item=
{NUMBER}">{DESCRIPTION}</a><!-- END itemQ -->
Open /forum/includes/bbcode.php
* Find this line:
$bbcode_tpl = str_replace('{EMAIL}', '\\1', $bbcode_tpl);
and insert these lines after it:
$bbcode_tpl = str_replace('{NUMBER}', '\\1', $bbcode_tpl);
$bbcode_tpl = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl);
Include the following code after that snippet:
$bbcode_tpl = str_replace('{NUMBER}', '\\1', $bbcode_tpl);
$bbcode_tpl = str_replace('{ITEMQUALITY}', '\\2', $bbcode_tpl);
$bbcode_tpl = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl);
* Find this line:
$replacements;
and insert these lines after it:
// text
$patterns+)\](.*?)\#is";
$replacements;
Include the following code after that snippet:
// description (quality must be 0-5)
$patterns+),()\](.*?)\#is";
$replacements;
Post by
Horris
I've fixed the php file for my mod per Pythagorus' suggestion and also replaced the included JQuery file with the packed version effectively bringing the size of that down to 28K from 80K. I've re-uploaded the zip file and you should be able to download it from the same link I gave before.
But, here's the link again:
http://mattmayers.com/download/phpBB_wowhead_mod.zip
Thanks.
Post by
Psyker7
Thanks to OP and to Horris, this is excellent. Now to get it going on EQDKP.
http://www.cuckhead.com/?forums&topic=3464.2#p39846
Post by
Horris
I just got a plugin working for WordPress. There are some rough edges, but it works. I'm going to stay on top of this and see if I can't improve it.
Download:
http://mattmayers.com/download/wp_wowhead.zip
Unzip and copy the wp_wowhead directory to wp-content/plugins/. After you activate the plugin in the admin area (Click the plugins tab, find the wp_wowhead plugin and click Activate), you should get a new button on your toolbar when you edit your entry in "Code" mode that says "wow."
Most importantly: DO NOT change the generated <a> tag in any way or it will not work as intended
Have fun!
I've only tested this on Wordpress 2.3.1. If someone has a different version they'd like to test it on, please do and let me know how it goes. Thanks.
Post by
105401
This post was from a user who has deleted their account.
Post by
marcimi
the links are showing up, the color quality shows up fine, but the window does not appear when you hover over the links.
Maybe you've disabled javascript in your browser?
<a class="q4" href="
http://www.cuckhead.com/?item=28525"><b>Signet
of Unshakable Faith</b></a>
Try this instead of the code above:
<a class="q4" href="
http://www.cuckhead.com/?item=28525"
style="font-weight: bold;">Signet of Unshakable Faith</a>
Post by
105504
This post was from a user who has deleted their account.
Post by
Horris
@opiespank
My best guess is that the wowhead_wrapper.php file is locking up when it tries to fopen() a URL at cuckhead.com. Your host might have some crazy security restraints on PHP or your server might be having trouble making a connection to the cloud. Who is your web host? Can you provide a link to the site where you are using it so I can troubleshoot a little better?
Thanks
Post by
105504
This post was from a user who has deleted their account.
Post by
thebadmf
Hi there. This looks like a great tool but, how would I modify it to work with e107? I'd like it to work site wide using the normal itemstats style if possible. If it was an e107 plugin it would be even better!!
Thanks
Post by
Horris
@opiespank
Just as I though, Dreamhost disables the php fopen() function. I'll have to create a new wowhead_wrapper.php file which I will link here for you to replace the one currently on your server.
UPDATE: Download
wowhead_wrapper_nofopen.zip
, unzip the file, and overwrite the old wowhead_wrapper.php file.
UPDATE 2: This has also been fixed in the wowhead_wrapper.php included in the zip. It now uses libcurl by default, but you can change a setting in the file if you need it to use fopen() instead.
Post by
101226
This post was from a user who has deleted their account.
Post by
Jamo
Drupal's modules/system/system.css tosses out a:
tbody {
border-top: 1px solid #ccc;
}
which is not overridden by power.css. The fix is adding:
.wowhead-tooltip tbody { border-top: 0; } somewhere.
If this could be added to power.css, it'd be greatly appreciated. Hopefully this doesn't cause any other problems.
* I also had to add .wowhead-tooltip table { margin-top: 0; } to remove an annoying margin. But I was unable to determine where the margin-top was originating.
Post by
105544
This post was from a user who has deleted their account.
Post by
105504
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.