PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Gremmie
Former Moderator in Good Standing


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

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

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:
Only registered users can see links on this board!
Get registered or login to the forums!


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>

View user's profile Send private message
Gremmie
Former Moderator in Good Standing


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

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

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.
View user's profile Send private message
montego
Site Admin


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

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

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.
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


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

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

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.
View user's profile Send private message
wiz
Client


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

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

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 to the forums!
.

Cheers
WIZ
View user's profile Send private message Visit poster's website AIM Address
Gremmie
Former Moderator in Good Standing


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

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

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.
View user's profile Send private message
wiz
Client


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

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

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
View user's profile Send private message Visit poster's website AIM Address
Gremmie
Former Moderator in Good Standing


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

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

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.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15210
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
wiz
Client


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

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

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
View user's profile Send private message Visit poster's website AIM Address
Gremmie
Former Moderator in Good Standing


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

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

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".
View user's profile Send private message
wiz
Client


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

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

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?
View user's profile Send private message Visit poster's website AIM Address
Gremmie
Former Moderator in Good Standing


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

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

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.
View user's profile Send private message
wiz
Client


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

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

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
View user's profile Send private message Visit poster's website AIM Address
Gremmie
Former Moderator in Good Standing


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

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

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


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

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

Fair play Gremmie

Any chance you could mail me your shoutbox.js?

pwetty pwease Crying or Very sad
View user's profile Send private message Visit poster's website AIM Address
Gremmie
Former Moderator in Good Standing


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

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

PM me your email address.
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


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

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

Oh yeah, always clear your browser's cache after you make a change to an externally loaded script like this.
View user's profile Send private message
wiz
Client


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

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

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
View user's profile Send private message Visit poster's website AIM Address
Gremmie
Former Moderator in Good Standing


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

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

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.
View user's profile Send private message
slick_303
Hangin' Around


Joined: Feb 28, 2007
Posts: 31

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

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
PHP-Portal Project


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

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

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
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 Back to top

Thanks for the fix
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing


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

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

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...
View user's profile Send private message
FireATST
Involved
Involved


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

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

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:       
Post new topic   Reply to topic

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