Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
2 Registered (auduntvedt, Ian), 30 Guests and 21 Spiders online.
Key: Admin, Global Mod, Mod
Top Posters
Gizmo 11702
Rick 7567
Ian 4107
Mark S 3983
ntdoc 3110
Sirdude 2041
jgeoff 1882
David Dreezer 1759
driv 1568
AllenAyres 1529
Latest Photos
Carrie - So Very
Testing
Test Photo
4TH of July at the river!
Test shots from D300 part 3
Topic Options
Rate This Topic
#213947 - 06/04/08 01:40 AM Mootools Javascript Conflict
Flaming Carrot Offline
stranger

Registered: 10/07/05
Posts: 20
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: 2041
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.
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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

Registered: 10/07/05
Posts: 20
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: 2041
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?
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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

Registered: 10/07/05
Posts: 20
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: 2041
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
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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

Registered: 10/07/05
Posts: 20
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: 2041
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

_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

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

Registered: 10/07/05
Posts: 20
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: 2041
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..
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

Top


Shout Box

Recent Topics
Changing title of forum
by Baby Boomer
Today at 07:38 AM
Disable PM's for one group
by Musky
Today at 07:10 AM
SQL Error: Got error 28 from storage engine ?
by jgeoff
Yesterday at 05:03 PM
Stop All E-mail
by Mark S
Yesterday at 11:16 AM
Ability to Truncate a thread from any point at any time.
by Naz
Yesterday at 07:37 AM
Forum Stats
4025 Members
33 Forums
30880 Topics
156803 Posts

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