[EventCalendar] Conflict with ChenPress plugin

Mark Blankestijn m.a.blankestijn at gmail.com
Mon Dec 11 22:04:39 UTC 2006


Hi,

I'm not used to this mailing list thing so I hope I do it right =).

The first message I sent to Alex Tingle was:

When using ChenPress, the '+' button in the new page/message window is not
working. When I disable the ChenPress plugin, the button is working. My
scripting knowledge is not that good, so I can't investigate the problem
myself :).

Alex told me ChenPress plug-in is almost certainly overriding the
window.onload event and gave me a link to
http://blog.firetree.net/2005/07/17/javascript-onload/

I tried to fix the problem using that page:

I checked the chenpress plugin file and indeed found an 'window.onload'
entry:
  window.onload = function(){
   var oFCKeditor = new FCKeditor( 'content' ) ;
      oFCKeditor.BasePath = "<?php echo $fckeditor_path; ?>" ;
   oFCKeditor.Height = "<?php echo $fckeditor_size; ?>" ;
         oFCKeditor.ToolbarSet = "WordPressTool" ;
   oFCKeditor.ReplaceTextarea() ;
  }

I changed it to match the fix described on the site you provided:

  function WindowOnload(f) {
    var prev=window.onload;
    window.onload=function(){ if(prev)prev(); f(); }
  }
  function kaas(){
   var oFCKeditor = new FCKeditor( 'content' ) ;
      oFCKeditor.BasePath = "<?php echo $fckeditor_path; ?>" ;
   oFCKeditor.Height = "<?php echo $fckeditor_size; ?>" ;
         oFCKeditor.ToolbarSet = "WordPressTool" ;
   oFCKeditor.ReplaceTextarea() ;
  }

 WindowOnload( kaas );

'Kaas' is just a random (Dutch) word I used to name the function ;).

Now the + and - buttons are working fine, but when I press the [...] button,
the calendar thingy is placed INSTEAD of the chenpress textarea.
(see http://img294.imageshack.us/img294/1219/1nu5.jpg for what I mean)

Got any ideas how to fix?

Regards,

Mark Blankestijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.firetree.net/pipermail/eventcalendar/attachments/20061211/1ceb79e3/attachment.html


More information about the EventCalendar mailing list