Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
3 registered (ScriptKeeper, WebMagic, 1 invisible), 13 Guests and 22 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/04/06
Posts: 579
Top Posters (30 Days)
Ruben Rocha 165
Rick 116
Gizmo 105
Thelockman 61
driv 50
AllenAyres 35
ScriptKeeper 34
Mark S 30
Ian 30
phoebe 25
Latest Photos
My Home System
test photo gallery
Bernese Mountain Dogs
My Daimler
Dorado and shark
Topic Options
Rate This Topic
#213947 - 06/04/08 01:40 AM Mootools Javascript Conflict
Flaming Carrot Offline
stranger

Registered: 10/07/05
Posts: 22
Loc: United Kingdom
Hello,

I use the mootools javascript framework on my site...
http://www.mootools.net/

It is included as a link in the header-insert of my html includes on my forum, however this seems to stop the ubbcode buttons (on new post and reply pages) from functioning. If I remove the link to mootools it works fine, but I do want to use mootools if I can as it does some nifty stuff on my site.

Any ideas on a workaround?

Thanks,
Phil

Top
#213961 - 06/04/08 09:35 AM Re: Mootools Javascript Conflict [Re: Flaming Carrot]
Sirdude Offline

*****

Registered: 04/19/07
Posts: 2066
Loc: SoCal, USA
if you have firebug installed on Firefox, you'd possibly notice the actual errors?

most likely a javascript one.. there could be a conflict with one of the functions in mootools being named the same as one in ubb_js or even a shared variable name?

i use a similar js framework (prototype and scriptaculous) and there are no conflicts..

if you can possibly report what specific errors you are getting, it might be as simple as renaming somethings and changing a .tpl file.
_________________________


Top
#213963 - 06/04/08 10:11 AM Re: Mootools Javascript Conflict [Re: Sirdude]
Flaming Carrot Offline
stranger

Registered: 10/07/05
Posts: 22
Loc: United Kingdom
OK, never used that plugin before, seems pretty handy though.
Anyway, firebug reports the following javascript error:

Code:
get_object(menus[i] has no properties
get_object(menus[i]).style.display = 'none';


That seems to be causing the problem, but as my javascript skills are inept at best can you help me out?

Cheers,
Phil

Top
#213965 - 06/04/08 10:50 AM Re: Mootools Javascript Conflict [Re: Flaming Carrot]
Sirdude Offline

*****

Registered: 04/19/07
Posts: 2066
Loc: SoCal, USA
well, i guess i'd need to register at your site and be able to try to post a new reply ? or new topic ?

that error looks like an error in the popup menus and nothing to do with the 'reply' button for each post..

did i misread your original description of the problem?
_________________________


Top
#213968 - 06/04/08 12:48 PM Re: Mootools Javascript Conflict [Re: Sirdude]
Flaming Carrot Offline
stranger

Registered: 10/07/05
Posts: 22
Loc: United Kingdom
Yes, it is the popups and also the inserting of code into the message textbox that is not working. However if I remove my link to the external mootools javascript from my header-insert it does work.

If you want to take a look it is at the following link...

http://www.lovethegarden.com/forums/

Cheers,
Phil

Top
#213970 - 06/04/08 01:13 PM Re: Mootools Javascript Conflict [Re: Flaming Carrot]
Sirdude Offline

*****

Registered: 04/19/07
Posts: 2066
Loc: SoCal, USA
registered at your forum as Sirdude (surprise).. but my user group isn't allowed to post replies ...

so can't really help frown
_________________________


Top
#213991 - 06/04/08 02:16 PM Re: Mootools Javascript Conflict [Re: Sirdude]
Flaming Carrot Offline
stranger

Registered: 10/07/05
Posts: 22
Loc: United Kingdom
Hi SirDude, sorry, seemed to be that new users were not being assgned user status, I have corrected it now. Can you log in again and you should see the reply/post buttons now.

Top
#213994 - 06/04/08 02:42 PM Re: Mootools Javascript Conflict [Re: Flaming Carrot]
Sirdude Offline

*****

Registered: 04/19/07
Posts: 2066
Loc: SoCal, USA
seems to be an error when it initializes the pull-downs for your text editor.. they all throw errors, when clicked on..

it's prolly fixable, but it would require time to look into it that i don't have at the moment..

you may just be able to get by with a non compressed version of mootools.js instead. i notice you compacted your .js file for that.

ideally, i'd really take all those .js files and make a .gz out of it and serve it up as one big gzipped thingie..

Linky Poo™ i do that for my sites and it makes a difference smile

_________________________


Top
#214015 - 06/05/08 04:56 AM Re: Mootools Javascript Conflict [Re: Sirdude]
Flaming Carrot Offline
stranger

Registered: 10/07/05
Posts: 22
Loc: United Kingdom
Using the uncompacted mootools script did not make a difference unfortunately. However as a workaround, if I remove the following from both instances in the standard_text_editor.js ...

Code:
for (var i in menus) {
if (menus[i] != html) {
get_object(menus[i]).style.display = 'none';
}
}


Then I can get it to work satisfactorily, the drawback is that popups do not close if you click outside or if you click on another popup. But as I don't have any real need for users to post code, media, or change the font/type size/colour I have just removed those elements from the template, leaving just the smiley table and general text styling such as emboldening etc. And if I just limit to images to 1 option (non-floating element) then that popup can be removed too.

I can live with that.
Thanks for your suggestions,
Phil

Top
#214019 - 06/05/08 08:03 AM Re: Mootools Javascript Conflict [Re: Flaming Carrot]
Sirdude Offline

*****

Registered: 04/19/07
Posts: 2066
Loc: SoCal, USA
you could also just put a check for the get_object returning null

Code:
for (var i in menus) {
if (menus[i] != html) {
  var oMnu = get_object(menus[i]);
  if (oMnu != null) oMnu.style.display = 'none';
}
}


shoulda had null check anyways..
_________________________


Top


Shout Box

Today's Birthdays
Eric Flyxe, mark_l_88@yahoo.com
Recent Topics
restricting a media tag to a single forum...
by bakerzdosen
Yesterday at 12:52 PM
Recover topics??
by femistyle
Yesterday at 12:22 PM
duplicate entries in viewmessage.php lang file (7.4.1)
by alnadabi
Yesterday at 05:54 AM
Order of variables in language files should be permanent
by alnadabi
Yesterday at 05:12 AM
How do I set Moderation Queue for an individual user?
by luket
11/20/08 11:28 AM
Forum Stats
4249 Members
33 Forums
30488 Topics
154661 Posts

Max Online: 978 @ 06/24/07 08:19 PM