﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5908	Docs Enhancement: Plugins with dynamic URLs	Rodney Rehm		"Hi there,

haven't been able to upgrade to 3.1, yet. So this is in regard to FCKEditor 2.6.x:

The docs don't offer any way to deal with dynamic URLs of dialogs. I had to  load some data depending on the value of a <select> outside of FCKEditor.

since FCKDialogCommand( command, title, url, width, height ) won't accept a function(){} as url, I built this little wrapper. The charme's with toValue and toString:

{{{
var _theDynamicURL = new (function(){
  function getURL()
  {
    return FCKPlugins.Items['thingie'].Path + 'script.php?external=' +  
top.document.getElementById( 'selectThingie' ).value;
  }
  this.toValue = this.toString = getURL;
});

FCKCommands.RegisterCommand( 'thingie', new FCKDialogCommand( 'thingie', 'My Thingie', _theDynamicURL, 440, 440 ) ) ;
}}}

Might be worth mentioning on the plugins help page?

Keep up the really great work!"	New Feature	closed	Normal		Project : MediaWiki+FCKeditor	FCKeditor 2.6.4	invalid		
