Author |
Message |
technocrat
Life Cycles Becoming CPU Cycles

Joined: Jul 07, 2005
Posts: 511
|
Posted:
Tue Mar 13, 2007 11:48 am |
|
Can you turn the block on for anon users so I can see it |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! / Only registered users can see links on this board! Get registered or login! |
|
|
 |
wiz
Involved


Joined: Oct 09, 2006
Posts: 413
Location: UK
|
Posted:
Tue Mar 13, 2007 1:49 pm |
|
So CodyG You are experiencing this too? |
|
|
|
 |
wiz

|
Posted:
Tue Mar 13, 2007 1:54 pm |
|
Gremmie wrote: | I just checked my site. I have a file called shoutbox.js in the same directory as index.php (my root directory) --- not in the modules/Shout_Box directory. This file has the definition for SBtxt. Do you have this file?
(BTW - I don't know why they did that, it is very easy to generate the HTML for the s~cript tag to point into the modules/Shout_Box directory) |
Yes the shoutbox.js is there in root, as i said it was there and working on 2.02, its just since i upgraded to 2.1, which is why i didnt post this in the blocks/modules or javascript forums |
|
|
|
 |
CodyG
Life Cycles Becoming CPU Cycles

Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island
|
Posted:
Tue Mar 13, 2007 6:45 pm |
|
yes, same problem ... but it was a problem for me when i upgraded one site from 6.9 to 2.02. And I fixed it for that site, that's the missing neuron. But another site I upgraded to 2.1 last week and shoutblock is stuck.... everything else in app works fine, just the darn shouts won't scroll and I can't remember how I fixed it a few months ago in the 2.02. |
_________________ "We want to see if life is ubiquitous." D.Goldin |
|
|
 |
wiz

|
Posted:
Tue Mar 13, 2007 6:49 pm |
|
hehehe
Ahh well i added Shoutbox to a site already running 2.02. It worked fine upon install.
Now i go to 2.1 and it is just as you say. |
|
|
|
 |
Gremmie
Former Moderator in Good Standing

Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Tue Mar 13, 2007 6:56 pm |
|
Have you tried Technocrats fix? It is likely another piece of Javascript is hogging the windows onload handler.
In shoutbox.js, the last line is this:
Code:
window.onload=allonloads;
|
Change it to what Technocrat said:
Code:
if(window.addEventListener)
window.addEventListener("load",allonloads,false);
else if (window.attachEvent)
window.attachEvent("onload", allonloads);
|
To be extra sure, make sure there is no other Javascript block/module/nav bar/whatever active on your page. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
 |
wiz

|
Posted:
Tue Mar 13, 2007 7:00 pm |
|
yes i have tried that, and no i dont have any Javascripts running on my homepage, not even for admins only.
Sorry Technocrat, no cigar for you either my friend. |
|
|
|
 |
CodyG

|
Posted:
Tue Mar 13, 2007 7:25 pm |
|
wiz ... do you have this in your shoutblock.js?
Code:function expand(listID){
if(listID.style.display == "none") {
listID.style.display = "";
}else{
listID.style.display = "none";
}
window.event.cancelBubble = true;
}
function contract(listID){
if(listID.style.display == "show") {
listID.style.display = "";
}else{
listID.style.display = "none";
}
window.event.cancelBubble = true;
}
//end Drop-Down smilies
|
|
|
|
|
 |
Gremmie

|
Posted:
Tue Mar 13, 2007 7:27 pm |
|
Okay I took a look at this. It is because of the new DOCTYPE in RavenNuke 2.10. If I change it back to HTML 4.01 Transitional the shout box scrolls as before.
Either the DOCTYPE has to be changed, or the shoutbox needs to be recoded to hide the inline Javascript in CDATA sections as described here:
http://www.codehouse.com/javascript/tips/xhtml/ |
Last edited by Gremmie on Tue Mar 13, 2007 7:34 pm; edited 1 time in total |
|
|
 |
Gremmie

|
Posted:
Tue Mar 13, 2007 7:33 pm |
|
The real solution, IMHO, is to fix the shout box.
However, for a quick and dirty fix, you could go into header.php and find this:
Code:
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"'."\n".' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n";
// echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
// echo "<html>\n";
|
Change it to this:
Code:
// echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"'."\n".' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
// echo '<html xmlns="http://www.w3.org/1999/xhtml">'."\n";
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo "<html>\n";
|
In other words, comment out the first 2 echo's, and uncomment the last two echo's. |
|
|
|
 |
wiz

|
Posted:
Tue Mar 13, 2007 7:39 pm |
|
No, mine looks a little differant, just tried to post it but...good old senti |
|
|
|
 |
Gremmie

|
Posted:
Tue Mar 13, 2007 7:48 pm |
|
Well I tried to wrap the shout boxes inline javascript in CDATA sections, but that did not help. There are other inline javascript sections on the page coming from javascript.php also...I wonder if you have to do all of them before any of the javascript will work. |
|
|
|
 |
wiz

|
Posted:
Tue Mar 13, 2007 7:51 pm |
|
Something is really messed up here.
Yes Gremmie I tried your comment idea. No Cigar.
However i notice my smilies wont open up either now. |
|
|
|
 |
wiz

|
Posted:
Tue Mar 13, 2007 7:52 pm |
|
of course, it would be helpfull if the Ourscripts site was maintained, and then they would know that their support forums do not work. |
|
|
|
 |
Gremmie

|
Posted:
Tue Mar 13, 2007 7:55 pm |
|
Well the "comment" idea in header.php worked for me, in both Firefox and IE7.
If you do a view source on your page from within your browser, make sure the doctype at the top of the listing says HTML 4.01 transitional. If not, you messed up the edit.
In other words, the first two lines of your pages source should be:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
|
|
|
|
|
 |
Gremmie

|
Posted:
Tue Mar 13, 2007 8:04 pm |
|
wiz, keep in mind that the forums are wrapping the code in the code boxes. There really should be 4 echo statements on 4 long lines. Comment the first two out, and uncomment the next two. |
|
|
|
 |
CodyG

|
Posted:
Tue Mar 13, 2007 8:15 pm |
|
That fixed it for me Gremmie ....
From what I understand SuperCat ... the owner at ourscripts.net is in iraq. He might not be back for a long time.
How could the shoutblock be fixed to make editing RN core code not required. |
|
|
|
 |
Gremmie

|
Posted:
Tue Mar 13, 2007 8:26 pm |
|
CodyG wrote: | How could the shoutblock be fixed to make editing RN core code not required. |
I can look into that Cody. But I don't have any more time tonight. I'll try some things out tomorrow and see if I can modify only the shout box code. However, my fear is that all inline Javascript will need to be modified a bit, and some of that is coming from the core code. I hope I am wrong about that. |
|
|
|
 |
CodyG

|
Posted:
Tue Mar 13, 2007 8:29 pm |
|
Interesting ...
The changes I made to the header.php file also fixed a problem I was having with a modified fisubice theme. The text in my blocks and news etc was all centered, only in IE. In Firefox it was correctly aligned left. Now it is correctly aligned in IE.
Weird. |
|
|
|
 |
Gremmie

|
Posted:
Tue Mar 13, 2007 8:33 pm |
|
That is interesting. I was having some problems with a theme I made and the CSS wasn't working the same as in Nuke 7.9. I'll go back and check that with the different doctype. That doctype triggers different behavior in browsers, and as we all know each browser does things slightly differently due to bugs, quirks, etc. In an ideal world each browser would support the standards 100% without any bugs. LOL. |
|
|
|
 |
Gremmie

|
Posted:
Tue Mar 13, 2007 8:48 pm |
|
The shout box is also using embedded style="" attributes in the tags it is generating. This is also a XHTML no-no. So maybe this is the problem. Firefox generates a lot of warnings on those tags. I'll look into this tomorrow. I really gotta go this time......  |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Tue Mar 13, 2007 9:22 pm |
|
CodyG wrote: | How could the shoutblock be fixed to make editing RN core code not required. |
RN should not be changed. You will just compound your future upgrading process. We will all need to do some surgery.
Change all script tags as in the following example. Note that I have intentionally misspelled script as scr!pt to avoid NukeSentinel(tm).
From
Code:
<scr!pt type="text/javascript">
<!--
function FrameBuster(){
if (top !=self)
top.location=self.location;
}
// -->
</scr!pt>
|
To
Code:<scr!pt type="text/javascript">
//<![CDATA[
function FrameBuster(){
if (top !=self)
top.location=self.location;
}
//]]>
</scr!pt>
|
And Gremmie, great work in identifying this issue. I knew there was a reason I was paying you the big bucks
This will also, I'm sure, fix Misha's problem with my Collapsing Forums block. |
Last edited by Raven on Wed Mar 14, 2007 11:41 am; edited 1 time in total |
|
|
 |
wiz

|
Posted:
Tue Mar 13, 2007 10:23 pm |
|
Sorry Raven, but where do i change this? |
|
|
|
 |
Raven

|
Posted:
Tue Mar 13, 2007 10:27 pm |
|
Raven wrote: | Change all script tags as in the following example. Note that I have intentionally misspelled script as scr!pt to avoid NukeSentinel(tm). |
You will need to change all SCRIPT blocks. |
|
|
|
 |
technocrat

|
Posted:
Wed Mar 14, 2007 7:04 am |
|
Just an FYI all windows.onload functions should be changed to be inline with the code I provided so they are more compatible. |
|
|
|
 |
|