Questo sito fa un ampio uso di JavaScript.
Per favore, abilitare JavaScript nel tuo browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Add Wowhead tooltips to your forums or CMS.
Ritorna all'indice del forum
Messaggio di
239015
This post was from a user who has deleted their account.
Messaggio di
239504
This post was from a user who has deleted their account.
Messaggio di
Lockslap
Hi really like this mod. THX a lot.
But got one problem, yesterday wowhead was offline for an hour or so and during this time my forum took like 5 min to load.
I am not quite sure but I think it is because of this line:
<script src="
http://www.wowhead.com/widgets/power.js"></script>
It tried to load it, but the site was down.
Is there a way, so that if wowhead goes down again it would not affect my forum?
THX
If that is actually what's causing it, then no, there's not really anything I can do. However, in version 2.5.2 I am going to add code that will check to see if Wowhead is up, if not the script will exit (die), therefore hopefully reducing load times while the script works.
Messaggio di
239504
This post was from a user who has deleted their account.
Messaggio di
Lockslap
Version 2.5.2 Released!
In this release is a bug fix that I found by accident while browsing the code in the class. Achievements linked via their ID in a language other than English would not have worked; this has been fixed. Also included in this release is something that will check to make sure Wowhead is online before the script does its thing. If it is found to be down, it will not continue to parse and will report an error at the beginning of the post. This may cause longer than normal page load times, but if its a feature you guys want then there's no real way around it. One note though, if your host has 'allow_url_fopen' disabled in PHP's configuration, then the check will not work and it will assume that Wowhead is working.
Now back to working on the craftable extension.
Let me know how it does...
craCkpot
Messaggio di
54125
This post was from a user who has deleted their account.
Messaggio di
Lockslap
Hello,
I installed Wowhead tooltips this morning and it works fine, Just one problem after the install everything i click on at the forum will open in a new window.
Is there something i can do to solve this problem?
Forum can be found at:
http://www.thefbi.eu
or at
http://www.thefbi.eu/forum
thanks in advance
Myka
That problem doesn't have anything to do with my script, it does not mess with any links besides the ones that it adds after parsing.
However, to fix that problem you can remove the 'target="_blank"' tags from any <a> tags.
Messaggio di
54125
This post was from a user who has deleted their account.
Messaggio di
RUBiK
Has anyone had success making this work on something-other-than-phpBB?
I've read the whole thread and I know craCkpot mentioned that he was wondering whether others had tried other CMS/forums, etc. but I didn't see anyone post anything.
I've finally decided to replace itemstats on my guild's SMF forum yesterday so I downloaded the latest version (2.5.1 since 2.5.2 wasn't out yet) and only briefly messed with it... and it seemed to work with only very minor modification to craCkpot's (parse.php) code.
The pre-existing tags worked great but I was getting a ton of errors in the SMF admin panel error log (I forgot the phpBB equivalent.. been a while since I administered a phpBB forum).
I've temporarily disabled calling the whp_parse() function from the SMF file which parses post texts (equivalent of $text in phpBB) so that I can figure out what's causing the errors but in the meantime I was wondering if anyone else had tried other CMS/forums and what your experiences were?
As far as changes made to parse.php, I had to add (mysql) database connection parameters and had to re-write the couple query/rowcount commands to properly access my SMF forum database and the cache table seemed to be populated with wowhead items with no issues.
I'll post what kind of errors I was getting a bit later if anyone is interested... I believe most had to do with some of the wowhead class functions were called in parse.php... but again, I didn't have much time to fully troubleshoot yet. More in a bit.
EDIT: Fixed typos.
EDIT2: I've had some time to check out all the errors reported by SMF. I'm on PHP 5.2.6/mysql 5.0.51a, in a shared hosting environment, and I noticed that it all had to do with what the PHP error_reporting was set to.. and it was set to ignore E_NOTICE errors by default but it just doesn't... sooo, all the stuff it found were warnings/notices of uninitialized variables and array indexes and incorrect calls to wowhead class functions. craCkpot, do you want me to post all the "bad" variables and the line numbers where they occurred in both parse.php and wowhead.php files or do you not care to clean up the code? (would be understandable although the fixes would be quick and easy and I think I figured them all out already)
EDIT3: I've posted my findings here (too much text to spam the forums with):
http://nullisecund.us/whp_errors.htm
Messaggio di
Lockslap
Has anyone had success making this work on something-other-than-phpBB?
I've read the whole thread and I know craCkpot mentioned that he was wondering whether others had tried other CMS/forums, etc. but I didn't see anyone post anything.
I've finally decided to replace itemstats on my guild's SMF forum yesterday so I downloaded the latest version (2.5.1 since 2.5.2 wasn't out yet) and only briefly messed with it... and it seemed to work with only very minor modification to craCkpot's (parse.php) code.
The pre-existing tags worked great but I was getting a ton of errors in the SMF admin panel error log (I forgot the phpBB equivalent.. been a while since I administered a phpBB forum).
I've temporarily disabled calling the whp_parse() function from the SMF file which parses post texts (equivalent of $text in phpBB) so that I can figure out what's causing the errors but in the meantime I was wondering if anyone else had tried other CMS/forums and what your experiences were?
As far as changes made to parse.php, I had to add (mysql) database connection parameters and had to re-write the couple query/rowcount commands to properly access my SMF forum database and the cache table seemed to be populated with wowhead items with no issues.
I'll post what kind of errors I was getting a bit later if anyone is interested... I believe most had to do with some of the wowhead class functions were called in parse.php... but again, I didn't have much time to fully troubleshoot yet. More in a bit.
EDIT: Fixed typos.
EDIT2: I've had some time to check out all the errors reported by SMF. I'm on PHP 5.2.6/mysql 5.0.51a, in a shared hosting environment, and I noticed that it all had to do with what the PHP error_reporting was set to.. and it was set to ignore E_NOTICE errors by default but it just doesn't... sooo, all the stuff it found were warnings/notices of uninitialized variables and array indexes and incorrect calls to wowhead class functions. craCkpot, do you want me to post all the "bad" variables and the line numbers where they occurred in both parse.php and wowhead.php files or do you not care to clean up the code? (would be understandable although the fixes would be quick and easy and I think I figured them all out already)
EDIT3: I've posted my findings here (too much text to spam the forums with):
http://nullisecund.us/whp_errors.htm
I really appreciate you posting the warnings. I am always trying to make the code as clean and efficient as possible. I will take care of these problems asap and get the update rolled out. I hope you were able to get the script to function on your forums/CMS.
craCkpot
By the way, you can supress all errors/warnings/notices by adding error_reporting(0); to the beginning of a file. This will prevent any notice spam from messing up your CMS' layout.
Messaggio di
RUBiK
I really appreciate you posting the warnings. I am always trying to make the code as clean and efficient as possible. I will take care of these problems asap and get the update rolled out. I hope you were able to get the script to function on your forums/CMS.
You're welcome and yeah, I was able to take care of all the warnings and everything seems to be working out nicely now (on a SMF 1.1.6 forum). I'll try to write a quick how-to (re: which SMF scripts to edit and what to change) when I get a chance... if I do, I will be sure to post here.
By the way, you can supress all errors/warnings/notices by adding error_reporting(0); to the beginning of a file. This will prevent any notice spam from messing up your CMS' layout.
Yeah, I tried that at the top of the parse.php and wowhead.php scripts but it kept getting ignored by SMF (it must have been overriding it somewhere in the forum PHP scripts) because I kept seeing the notices in the admin panel.
I ended up wrapping the call to whp_parse() like this:
// 20081104: wowhead mod
$wh_errorlevel = error_reporting();
error_reporting($wh_errorlevel & ~E_NOTICE);
$message = whp_parse($message);
error_reporting($wh_errorlevel);
// ===============================
and that seemed to work although I think some notices were still sneaking through, which is really weird...
Messaggio di
Lockslap
I really appreciate you posting the warnings. I am always trying to make the code as clean and efficient as possible. I will take care of these problems asap and get the update rolled out. I hope you were able to get the script to function on your forums/CMS.
You're welcome and yeah, I was able to take care of all the warnings and everything seems to be working out nicely now (on a SMF 1.1.6 forum). I'll try to write a quick how-to (re: which SMF scripts to edit and what to change) when I get a chance... if I do, I will be sure to post here.
By the way, you can supress all errors/warnings/notices by adding error_reporting(0); to the beginning of a file. This will prevent any notice spam from messing up your CMS' layout.
Yeah, I tried that at the top of the parse.php and wowhead.php scripts but it kept getting ignored by SMF (it must have been overriding it somewhere in the forum PHP scripts) because I kept seeing the notices in the admin panel.
I ended up wrapping the call to whp_parse() like this:
// 20081104: wowhead mod
$wh_errorlevel = error_reporting();
error_reporting($wh_errorlevel & ~E_NOTICE);
$message = whp_parse($message);
error_reporting($wh_errorlevel);
// ===============================
and that seemed to work although I think some notices were still sneaking through, which is really weird...
SMF most likely hooks PHP errors much like phpBB does.
Messaggio di
239504
This post was from a user who has deleted their account.
Messaggio di
Lockslap
Hi
one question, is there a html replacement for the bbcode?
The tooltip works perfect in my phpbb3 forum, but not on my portal page.
And yes the following code is also included on the portal-page:
<!-- Wowhead Item Links -->
<link href="{T_THEME_PATH}/wowhead.css" rel="stylesheet" type="text/css" />
<script src="
http://www.wowhead.com/widgets/power.js"></script>
The script doesn't work on the portal because it is not technically running until you goto view a post on your forums (that is when its function is called). You must tell the script to execute when someone visits your portal page. Assuming you're using phpBB3Portal you can follow
these instructions
that I posted on the script's Google Code. I will be moving these instructions over to the script's permanent home (on my site), just haven't had the time to do so lately. Hope this helps.
Messaggio di
239504
This post was from a user who has deleted their account.
Messaggio di
75022
This post was from a user who has deleted their account.
Messaggio di
7258
This post was from a user who has deleted their account.
Messaggio di
Lockslap
Finally got my board converted and fixed up. This works perfectly under php 4.4.49 and MySQL 4.1.22
Before you shudder reading that unless it's too late, going to be upgrading to php5 but compiling and stuff always scares me :o
I'm glad it works for you. Upgrading to PHP 5.x is the only way to go. I believe 4.4.x was the final release for PHP 4.x.
craCkpot, first, thank you for creating this mod for phpBB3, unfortunately I've been unable to get it up and running on my website. I downloaded your 2.5.2 release and reviewed the instructions implicitly but for whatever reason, I can't seem to get any functionality.
If you or another Wowhead user has a moment to head over to
http://www.progressionguild.org/forums/
and perhaps poke around a bit to help me figure out what's causing problems, I'd greatly appreciate it.
After checking out your forums, it seems that you have not properly edited functions_content.php, because the script is not even getting the content of your posts.
Messaggio di
Lockslap
It's not this version of phpbbPortal that I am using.
I use this one
http://www.board3.de
.
It's nearly the same portal but at some point the programers split up and decided to go their own way.
The point is, I can't find the second part:
// Parse the message and subject
$message = censor_text($row);
$message = str_replace("\n", '<br />', $message);
The ony part that looks a bit like the other one is:
if (($text_length != 0) && (strlen($len_check) > $text_length))
{
$message = censor_text(get_sub_taged_string(str_replace("\n", '<br/> ', $row), $row, $maxlen));
$posts = true;
}
else
{
$message = censor_text( str_replace("\n", '<br/> ', $row) );
}
I tried to put
$message = whp_parse($message);
at different positions in there, but nothing worked.
My best advice is that you need to look in the code to find a place where all text that you want parsed by my script has to pass through before being displayed. There are various functions that the text pases through before it is finally displayed (censoring text, BBCode, etc.).
Later on tonight I will install the portal you posted about above and see if I can get the script working.
EDIT
I have installed the portal and was able to get the script working properly on it. The only difference is that I put the call to my script's parse function immediately after the "}" in:
if (($text_length != 0) && (strlen($len_check) > $text_length))
{
$message = censor_text(get_sub_taged_string(str_replace("\n", '<br/> ', $row), $row, $maxlen));
$posts = true;
}
else
{
$message = censor_text( str_replace("\n", '<br/> ', $row) );
}
so that it looks like:
if (($text_length != 0) && (strlen($len_check) > $text_length))
{
$message = censor_text(get_sub_taged_string(str_replace("\n", '<br/> ', $row), $row, $maxlen));
$posts = true;
}
else
{
$message = censor_text( str_replace("\n", '<br/> ', $row) );
}
$message = whp_parse($message);
Messaggio di
7258
This post was from a user who has deleted their account.
Invia risposta
Questa discussione è chiusa. Non puoi inviare una risposta.