Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Installer/Setup Issues
Author Message
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Wed Mar 14, 2007 7:08 am Reply with quote

Raven, I'm sitting on a big bag of cash now, thanks. However the core RavenNuke does generate some Javascript (includes/javascript.php) that will probably need this treatment also...? And maybe some themes spit out javascript too.

I tried fixing just the shout box inline javascript and it didn't work, but then I noticed there was other inline javascript on the page. I will look into this some more.

After doing some more reading, I take what I said back about inline style attributes in tags. It is discouraged in XHTML, but it won't cause problems like inline javascript.

Here is a good article about the issues:

http://developer.mozilla.org/en/docs/Properly_Using_CSS_and_JavaScript_in_XHTML_Documents

It seems you cannot use the <!-- comments like you have above Raven. Instead of <!-- comments you have to do this:

Code:


<s~cript type="text/javascript">
 //<![CDATA[
  var i = 0;

  while  (++i < 10)
  {
    // ...
  }
 //]]>
</s~cript>


_________________
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 
View user's profile Send private message
Gremmie







PostPosted: Wed Mar 14, 2007 7:15 am Reply with quote

It looks like I have some more work to do with GCalendar now....Montego had suggested I make it XHTML compliant and I had put it on the to-do list, but I did not know my Javascript was going to completely break under the new RavenNuke.
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Mar 14, 2007 7:20 am Reply with quote

Well, it is not all javascript that will "break", only where there is a violation of the XML rules. This is why the RavenNuke core functions, I believe, are not breaking.

There is also definitely a difference between "breaking" and being "not compliant". It can be a fine line at times it is sounding like. So, I guess the CDATA approach is the best all around methodology to adopt... Its now on my To Do list as well!!! LOL.

_________________
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! 
View user's profile Send private message Visit poster's website
Gremmie







PostPosted: Wed Mar 14, 2007 7:29 am Reply with quote

I did try wrapping the shout box inline javascript with CDATA and it still didn't work. There might be something else going on here. I will bang on this some more later (d*** my real job).

I haven't tried installing GCalendar on RavenNuke 2.10 yet....so I don't know for sure if it completely breaks.
 
wiz
Involved
Involved



Joined: Oct 09, 2006
Posts: 413
Location: UK

PostPosted: Wed Mar 14, 2007 7:55 am Reply with quote

Sorry but i cannot find the lines that you posted Raven.
I have uploaded my Shoutbox.js as a text file Only registered users can see links on this board! Get registered or login!.

Cheers
WIZ
 
View user's profile Send private message Visit poster's website AIM Address
Gremmie







PostPosted: Wed Mar 14, 2007 7:59 am Reply with quote

wiz,

The code in the block will need to be modified, not the shoutbox.js file. I tried to do that last night but it still didn't work for me. I will need some more time to play with it, but if you or anyone else wants to try wrapping the inline javascript in CDATA sections, go ahead.
 
wiz







PostPosted: Wed Mar 14, 2007 8:02 am Reply with quote

It wont be me, my friend. All this went well over my head ages ago. But please go ahead, however long it takes, i dont care. It Seems that this problem is bar far limited to just me, and it is a very popular chat module. Therefore all attention is good attention.

Appreciated

WIZ
 
Gremmie







PostPosted: Wed Mar 14, 2007 10:14 am Reply with quote

technocrat wrote:
Just an FYI all windows.onload functions should be changed to be inline with the code I provided so they are more compatible.


Thanks I will try this too.
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Mar 14, 2007 11:43 am Reply with quote

Gremmie wrote:
It seems you cannot use the <!-- comments like you have above Raven. Instead of <!-- comments you have to do this: ....


I knew that Bang Head ! Thanks for pointing it out. I have corrected my post.
 
View user's profile Send private message
wiz







PostPosted: Wed Mar 14, 2007 11:47 am Reply with quote

Gremmie wrote:
I did try wrapping the shout box inline javascript with CDATA and it still didn't work. There might be something else going on here. I will bang on this some more later (d*** my real job).

I haven't tried installing GCalendar on RavenNuke 2.10 yet....so I don't know for sure if it completely breaks.


On a plus note..my Gcalendar seems to be fine with 2.1
 
Gremmie







PostPosted: Wed Mar 14, 2007 2:23 pm Reply with quote

wiz wrote:

On a plus note..my Gcalendar seems to be fine with 2.1


Well that is somewhat surprising, but thanks for the data point. Perhaps it is what Montego said: there is line between XHTML compliance and still being functional. I know some of my inline Javascript does have "illegal" characters (<, --) that should be wrapped in CDATA sections (for XHMTL). But perhaps the browser carries on. I have some learning to do. Hopefully we will get this Shout Box / Javascript thing figured out quickly and it won't be a big deal to convert 3rd party modules over to RavenNuke once we have the "recipe".
 
wiz







PostPosted: Wed Mar 14, 2007 2:44 pm Reply with quote

Yes i was thinking along the same lines. Shoutbox appears to be the only real 3rd party software so far 'touch wood' that is having a major issue.

Have any of the guys here ever considered designing there own little chat project?
 
Gremmie







PostPosted: Wed Mar 14, 2007 6:04 pm Reply with quote

Bang Head

Ok, here is all you have to do to fix this for RavenNuke 2.10.

Open up shoutbox.js and find this line:

(Please ignore the ~ characters I introduced in the event handlers to avoid triggering Sentinel on this message)

Code:


SBtxt='<div style="position:relative;width:100%;height:'+SBheight+';overflow:hidden" on~mouseover="SBspeed=0" on~mouseout="SBspeed=1"><div id="SBiemarquee" style="position:absolute;left:0px;top:0px;width:100%;"></div></div>';


Change this to: (again, you don't need the ~ characters)

Code:


SBtxt='<div style="position:relative;width:100%;height:'+SBheight+'px;overflow:hidden" on~mouseover="SBspeed=0" on~mouseout="SBspeed=1"><div id="SBiemarquee" style="position:absolute;left:0px;top:0px;width:100%;"></div></div>';


All I did was to change ;overflow to px;overflow. Rolling Eyes

All that talk about CDATA, etc., was not needed to make it scroll (although it probably should be added for XHTML compliance). But we will save that for another day.

I have some other observations but I'll post those to another thread.
 
wiz







PostPosted: Wed Mar 14, 2007 6:21 pm Reply with quote

didnt work for me dude, maybe ive tried every suggestion available and my shoutbox.js is just a mess now.

If it works, thats really mad that we got 70 ish posts on a respectable forum for 2 alphas and a semi-colon Shocked
 
Gremmie







PostPosted: Wed Mar 14, 2007 6:28 pm Reply with quote

Well I changed about 1000 files too chasing this down. However I did restore ALL of my RavenNuke files (minus config.php) and the Shoutbox files, then made that one edit. It now scrolls dude. Cool
 
wiz







PostPosted: Wed Mar 14, 2007 6:32 pm Reply with quote

Fair play Gremmie

Any chance you could mail me your shoutbox.js?

pwetty pwease Crying or Very sad
 
Gremmie







PostPosted: Wed Mar 14, 2007 6:39 pm Reply with quote

PM me your email address.
 
Gremmie







PostPosted: Wed Mar 14, 2007 6:44 pm Reply with quote

Oh yeah, always clear your browser's cache after you make a change to an externally loaded script like this.
 
wiz







PostPosted: Wed Mar 14, 2007 9:10 pm Reply with quote

Yes

I dont know how it was fixed, but i thank you guys for looking into it. Thankyou Gremmie I installed your .js file and all is gravy.

how it works is not the issue, whether it works is Wink
 
Gremmie







PostPosted: Thu Mar 15, 2007 6:59 am Reply with quote

Glad to hear it works for you. That shoutbox script generates a number of warnings under Firefox and IE7. After giving up on the CDATA thing I just started trying to fix the warnings that showed up in the Firefox error console. For some reason, fixing that one "warning" started making it scroll in both IE and Firefox. I have no idea why. I just noticed that these extra warnings started appearing when the DOCTYPE was switched to XHTML.

Also, I had to actually use Opera's error console to find the offending code. Firefox would just say "invalid value for height in index.php". Big help. But Opera's error console would actually spit out the offending HTML in context, so I was able to find the code fragment in shoutbox.js. It still doesn't scroll under Opera, but I don't think it ever did there anyway.
 
slick_303
Hangin' Around



Joined: Feb 28, 2007
Posts: 34

PostPosted: Thu Mar 15, 2007 2:18 pm Reply with quote

Gremmie wrote:
Bang Head

Ok, here is all you have to do to fix this for RavenNuke 2.10.

Open up shoutbox.js and find this line:

(Please ignore the ~ characters I introduced in the event handlers to avoid triggering Sentinel on this message)

Code:


SBtxt='<div style="position:relative;width:100%;height:'+SBheight+';overflow:hidden" on~mouseover="SBspeed=0" on~mouseout="SBspeed=1"><div id="SBiemarquee" style="position:absolute;left:0px;top:0px;width:100%;"></div></div>';


Change this to: (again, you don't need the ~ characters)

Code:


SBtxt='<div style="position:relative;width:100%;height:'+SBheight+'px;overflow:hidden" on~mouseover="SBspeed=0" on~mouseout="SBspeed=1"><div id="SBiemarquee" style="position:absolute;left:0px;top:0px;width:100%;"></div></div>';


All I did was to change ;overflow to px;overflow. Rolling Eyes

All that talk about CDATA, etc., was not needed to make it scroll (although it probably should be added for XHTML compliance). But we will save that for another day.

I have some other observations but I'll post those to another thread.



Worked for me!!! Thanxs Gremmie
 
View user's profile Send private message
CodyG
Life Cycles Becoming CPU Cycles



Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island

PostPosted: Sun Mar 18, 2007 7:47 am Reply with quote

I just got back to this forum this morning ...
I removed the commenting change I had made to header.php, added the px to shoutbox.js and it works like a charm!



Silly machines would be useless without the great support of nukers who rock.

RavensScripts

_________________
"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
gator
Hangin' Around



Joined: Jul 24, 2003
Posts: 36
Location: Canada

PostPosted: Sun Mar 18, 2007 4:17 pm Reply with quote

Thanks for the fix

_________________
.::.
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Gremmie







PostPosted: Mon Mar 19, 2007 7:14 am Reply with quote

Although it seems that the text is now centered under IE6 and IE7, while left justified under Firefox. Wasn't it left justified prior to RN2.10? Sigh...
 
FireATST
RavenNuke(tm) Development Team



Joined: Jun 12, 2004
Posts: 654
Location: Ohio

PostPosted: Tue Mar 20, 2007 1:59 pm Reply with quote

Yes Gremmie it was left justified before. My one site is 2.02 and it is left justified in IE7. Of course on that site I didn't have to add your "px" in the shoutbox.js. either for the scroll. I am not seeing away to change the justification in the block itself, so hopefully someone much smarter than I will be able to find it..... Smile
 
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Installer/Setup Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©