Hi,
I need to be able to pass my active PHP Session to a custom Plugin I have created.
In my fckeditor_php5.php file I'm passing the SID like so:
$Link = "{$this->BasePath}editor/{$File}?" . SID . "&InstanceName={$this->InstanceName}" ;
This gets passed into the main iframe, but I still need to pass into the custom Plugin. The custom plugin configuration is a JS file and the file that needs to get the SID passed to it is declared like so. How can I pass the SID to placeholder.php ? As it's a javascript file the php will not parse.
------------ In the custom plugin folder -> fckplugin.js ---------------
FCKCommands.RegisterCommand( 'Placeholder', new FCKDialogCommand( 'Placeholder', FCKLang.PlaceholderDlgTitle, FCKPlugins.Items['placeholder'].Path + 'fck_placeholder.php', 700, 570 ) ) ;
Any suggestions?
I need to be able to pass my active PHP Session to a custom Plugin I have created.
In my fckeditor_php5.php file I'm passing the SID like so:
$Link = "{$this->BasePath}editor/{$File}?" . SID . "&InstanceName={$this->InstanceName}" ;
This gets passed into the main iframe, but I still need to pass into the custom Plugin. The custom plugin configuration is a JS file and the file that needs to get the SID passed to it is declared like so. How can I pass the SID to placeholder.php ? As it's a javascript file the php will not parse.
------------ In the custom plugin folder -> fckplugin.js ---------------
FCKCommands.RegisterCommand( 'Placeholder', new FCKDialogCommand( 'Placeholder', FCKLang.PlaceholderDlgTitle, FCKPlugins.Items['placeholder'].Path + 'fck_placeholder.php', 700, 570 ) ) ;
Any suggestions?
Re: How to Pass PHP Session to Plugin
$oFCKeditor->Config["SID"] = SID;
Then since I've changed the plugin display file to php, all I need to do is pass the SID when it gets registered in fckplugin.js
FCKCommands.RegisterCommand( 'Placeholder', new FCKDialogCommand( 'Placeholder', FCKLang.PlaceholderDlgTitle, FCKPlugins.Items['placeholder'].Path + 'fck_placeholder.php?' + FCKConfig.SID, 700, 570 ) ) ;
Now I can bring in the applications $_SESSION.
Any drawbacks or issues with this method?