Previous Thread
Next Thread
Print Thread
Hop To
#213947 06/04/2008 4:40 AM
Joined: Oct 2005
Posts: 50
F
journeyman
OP Offline
journeyman
F
Joined: Oct 2005
Posts: 50
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

Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
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.

Joined: Oct 2005
Posts: 50
F
journeyman
OP Offline
journeyman
F
Joined: Oct 2005
Posts: 50
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

Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
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?

Joined: Oct 2005
Posts: 50
F
journeyman
OP Offline
journeyman
F
Joined: Oct 2005
Posts: 50
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

Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
registered at your forum as Sirdude (surprise).. but my user group isn't allowed to post replies ...

so can't really help frown

Joined: Oct 2005
Posts: 50
F
journeyman
OP Offline
journeyman
F
Joined: Oct 2005
Posts: 50
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.

Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
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


Joined: Oct 2005
Posts: 50
F
journeyman
OP Offline
journeyman
F
Joined: Oct 2005
Posts: 50
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

Joined: Apr 2007
Posts: 3,940
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,940
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..


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Scroll Up Button
by JAISP - 04/28/2021 7:39 AM
[Cannot Replicate] Unapprove Post Bug
by Larry Miller - 04/26/2021 10:07 AM
Just popping in
by Harold - 04/25/2021 9:05 PM
Moving Forum/Category location
by ECNet - 04/25/2021 12:11 PM
7.7.5 become member issue
by Ruben - 04/15/2021 10:06 AM
Who's Online Now
1 members (Ruben), 74 guests, and 55 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
gallery test
gallery test
by Mors, September 23
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 7.7.5