Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 4 sessions for external use
#1

(This post was last modified: 10-07-2023, 08:07 AM by xsPurX.)

I am trying to intergrate KCfinder into CKeditor, and my session data is'nt accessable from kcfinders end. This used to work in CI2 and CI3. 
For example I am loading this

PHP Code:
$ckeditor_basepath '/assets/js/ckeditor/';
require_once( 
$_SERVER["DOCUMENT_ROOT"] . $ckeditor_basepath'ckeditor.php' );
//if data is an array then extract name else instanceName is $data
$instanceName = ( is_array($data) && isset($data['name'])  ) ? $data['name'] : $data;
$ckeditor = new CKEditor();
$ckeditor->Value html_entity_decode($value);
$initialValue $value;
$ckeditor->basePath $ckeditor_basepath;
    //session_start();
  // $_SESSION['upload_image_file_manager'] = TRUE;
  //session_start();
    $_SESSION['KCFINDER'] = array(); 
    $_SESSION['KCFINDER']['disabled'] = false;

//todo
if( is_array($data) )
{
}
$config['extraPlugins'] = 'youtube,justify,showblocks,div';
$config['toolbar'] = array(
array(
'Format''Styles''Source''Maximize''ShowBlocks''Preview'),
array(
'Cut''Copy''Paste''PasteText''PasteFromWord''-''Undo''Redo'),
array(
'Find''Replace''SelectAll''SpellChecker''Scayt'),
array(
'Bold''Italic''Underline''Strike''RemoveFormat'),
array(
'NumberedList''BulletedList''Blockquote''CreateDiv''JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
array(
'Link''Unlink''Anchor'),
array(
'Image','Flash''Table''HorizontalRule''Smiley''SpecialChar','Iframe','Youtube')
);
    //print_r($_SESSION);
return $ckeditor->editor($instanceName$initialValue$config); 

The value is not being sent over to kcfinder. It seems to create it's own session which doesn't enable kcfinder as I have the config of disabled = true. I am trying to change that to false, but the session information is not passing..
Any ideas?
Thasnks,
\\\\
Reply


Messages In This Thread
Codeigniter 4 sessions for external use - by xsPurX - 10-06-2023, 08:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB