diff --git a/deployed/jckman/administrator/components/com_jckman/access.xml b/deployed/jckman/administrator/components/com_jckman/access.xml
new file mode 100644
index 00000000..14ac97ff
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/access.xml
@@ -0,0 +1,15 @@
+
+
+
+
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/adapters/index.html b/deployed/jckman/administrator/components/com_jckman/adapters/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/adapters/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/adapters/language.php b/deployed/jckman/administrator/components/com_jckman/adapters/language.php
new file mode 100644
index 00000000..bc107836
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/adapters/language.php
@@ -0,0 +1,205 @@
+parent = $parent;
+ }
+
+ /**
+ * Install method
+ *
+ * @access public
+ * @return boolean True on success
+ */
+ public function install()
+ {
+
+
+ // Get the extension manifest object
+ $this->manifest = $this->parent->getManifest();
+
+ $values = array('name', 'version', 'description', 'tag');
+
+ foreach($values as $value)
+ {
+ $this->parent->set($value, $this->manifest->$value);
+ }
+
+ $elements = array('administration', 'editor');
+
+ foreach($elements as $element)
+ {
+ $this->set($element, $this->manifest->$element);
+ }
+
+ // Check language tag - if we didn't, we may be trying to install from an older language package
+ if (!$this->parent->get('tag'))
+ {
+ $this->parent->abort(JText::sprintf('JLIB_INSTALLER_ABORT', JText::_('JLIB_INSTALLER_ERROR_NO_LANGUAGE_TAG')));
+ return false;
+ }
+
+ $folder =(string) $this->parent->get('tag');
+ // Set the installation target paths
+ $this->parent->setPath('extension_administrator', JPATH_COMPONENT . '/language/overrides');
+
+ // Copy admin files
+ if ($this->parent->parseFiles($this->get('administration'), 1) === false)
+ {
+ $this->parent->abort();
+ return false;
+ }
+
+ // Copy editor files
+ $this->parent->setPath('extension_administrator', JPATH_COMPONENT . '/editor/lang');
+
+ if ($this->parent->parseFiles($this->get('editor'),1) === false)
+ {
+ $this->parent->abort();
+ return false;
+ }
+
+
+
+ // Add an entry to the language table
+ $row = JTable::getInstance('language', 'JCKTable');
+ $row->tag = $folder;
+ $file = $this->parent->getPath('manifest');
+ $filename = str_replace($this->parent->getPath('source').DS,'',$file);
+
+ $row->filename = $filename;
+
+ if (!$row->store())
+ {
+ // Install failed, roll back changes
+ $this->parent->abort(JText::sprintf('JLIB_INSTALLER_ABORT', $row->getError()));
+ return false;
+ }
+
+ // Set path back for manifest
+ $this->parent->setPath('extension_administrator', JPATH_COMPONENT . '/language/overrides');
+ // Lastly, we will copy the manifest file to its appropriate place.
+ if (!$this->parent->copyManifest(1))
+ {
+ // Install failed, rollback changes
+ $this->parent->abort(JText::sprintf('JLIB_INSTALLER_ABORT_PLG_INSTALL_COPY_SETUP', JText::_('JLIB_INSTALLER_INSTALL')));
+ return false;
+ }
+
+ return true;
+ }
+
+
+
+ /**
+ * Uninstall method
+ *
+ * @access public
+ * @param string $tag The tag of the language to uninstall
+ * @return mixed Return value for uninstall method in component uninstall file
+ */
+ function uninstall($eid)
+ {
+
+ // Load up the extension details
+ $language = JTable::getInstance('language', 'JCKTable');
+ $language->load($eid);
+
+
+ $tag = $language->tag;
+
+ // Set defaults
+ $this->parent->set('tag', $tag);
+ $this->parent->set('version', '');
+
+ $path = JPATH_COMPONENT . '/language/overrides';
+
+ if (!JFolder::exists($path)) {
+ JError::raiseWarning(100, JText::_('JLIB_INSTALLER_UNINSTALL') . ' : ' . JText::_('JLIB_INSTALLER_ERROR_LANG_UNINSTALL_ELEMENT_EMPTY'));
+ return false;
+ }
+
+
+ $manifestFile = $path.'/'. $language->filename;
+
+
+ if (JFile::exists($manifestFile))
+ {
+
+ $this->manifest = JFactory::getXML($manifestFile);
+
+ if (!$this->manifest) {
+ JError::raiseWarning(100, JText::_('JLIB_INSTALLER_INSTALL') . ' : ' . JText::_('JCK_INSTALLER_MANIFEST_INVALID'));
+ }
+
+ $values = array('name', 'version', 'description');
+
+ foreach($values as $value)
+ {
+ $this->parent->set($value, $this->manifest->$value);
+ }
+
+ $elements = array('administration', 'editor');
+
+ foreach($elements as $element)
+ {
+ $this->set($element, $this->manifest->$element);
+ }
+
+ // Set the installation target paths
+ $this->parent->setPath('extension_administrator', $path );
+
+ if (!$this->parent->removeFiles($this->get('administration'), 1)) {
+ JError::raiseWarning(100, JText::_('JLIB_INSTALLER_INSTALL') . ' : ' . JText::_('JCK_INSTALL_DELETE_FILES_ERROR'));
+ return false;
+ }
+
+ $this->parent->setPath('extension_administrator', JPATH_COMPONENT. '/editor/lang');
+
+ if (!$this->parent->removeFiles($this->get('editor'),1)) {
+ JError::raiseWarning(100, JText::_('JLIB_INSTALLER_INSTALL') . ' : ' . JText::_('JCK_INSTALL_DELETE_FILES_ERROR'));
+ return false;
+ }
+ JFile::delete($manifestFile);
+ }
+ else
+ {
+ JError::raiseWarning(100, JText::_('JLIB_INSTALLER_INSTALL') . ' : ' . JText::_('JCK_INSTALLER_MANIFEST_ERROR'));
+ return false;
+ }
+
+ // Remove the language table entry
+ $language->delete();
+ return true; // return false to stop at this point.
+ }
+
+}
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/adapters/plugin.php b/deployed/jckman/administrator/components/com_jckman/adapters/plugin.php
new file mode 100644
index 00000000..146ce315
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/adapters/plugin.php
@@ -0,0 +1,755 @@
+parent = $parent;
+ }
+
+ /**
+ * Custom install method
+ *
+ * @access public
+ * @return boolean True on success
+ * @since 1.5
+ * Minor alteration - see below
+ */
+ function install()
+ {
+ // Get a database connector object
+ $db =& $this->parent->getDBO();
+ $app = JFactory::getApplication();
+
+ // Get the extension manifest object
+ $manifest =& $this->parent->getManifest();
+ $this->manifest = $manifest;//$manifest->document;
+
+ /**
+ * ---------------------------------------------------------------------------------------------
+ * Manifest Document Setup Section
+ * ---------------------------------------------------------------------------------------------
+ */
+
+ // Set the component name
+ $name = '';
+
+ if($this->manifest->name)
+ {
+ $name = $this->manifest->name;
+ $this->parent->set('name', $name->data());
+ }
+ else
+ $this->parent->set('name','');
+
+ // Get the component description
+ $description = & $this->manifest->description;
+ if (is_a($description, 'JXMLElement')) {
+ $this->parent->set('message', $description->data());
+ } else {
+ $this->parent->set('message', '' );
+ }
+
+ $element =& $this->manifest->files;
+
+ // Plugin name is specified
+ $pname = (string) $this->manifest->attributes()->plugin;
+
+ //Get type
+ $type = $this->manifest->attributes()->group;
+
+ if (!empty ($pname)) {
+ // ^ Use JCK_PLUGINS defined path
+ $this->parent->setPath('extension_root', JCK_PLUGINS .DS. $pname);
+ } else {
+ $this->parent->abort('Extension Install: '.JText::_('COM_JCKMAN_ADAPTER_NO_PLUGIN_SPECIFIED'));
+ return false;
+ }
+
+ if ((string)$manifest->scriptfile)
+ {
+ $manifestScript = (string)$manifest->scriptfile;
+ $manifestScriptFile = $this->parent->getPath('source').DS.$manifestScript;
+ if (is_file($manifestScriptFile))
+ {
+ // load the file
+ include_once $manifestScriptFile;
+ }
+ // Set the class name
+ $classname = 'plgJCK'.$pname.'InstallerScript';
+
+ if (class_exists($classname))
+ {
+ // create a new instance
+ $this->parent->manifestClass = new $classname($this);
+ // and set this so we can copy it later
+ $this->set('manifest_script', $manifestScript);
+ // Note: if we don't find the class, don't bother to copy the file
+ }
+
+ // run preflight if possible
+ ob_start();
+ ob_implicit_flush(false);
+ if ($this->parent->manifestClass && method_exists($this->parent->manifestClass,'preflight'))
+ {
+ if($this->parent->manifestClass->preflight('install', $this) === false)
+ {
+ // Install failed, rollback changes
+ $this->parent->abort(JText::_('COM_JCKMAN_ADAPTER_CUSTOM_ABORT'));
+ return false;
+ }
+ }
+ ob_end_clean();
+ }
+
+ /**
+ * ---------------------------------------------------------------------------------------------
+ * Filesystem Processing Section
+ * ---------------------------------------------------------------------------------------------
+ */
+
+ // If the extension directory does not exist, lets create it
+ $created = false;
+ if (!file_exists($this->parent->getPath('extension_root'))) {
+ if (!$created = JFolder::create($this->parent->getPath('extension_root'))) {
+ $this->parent->abort('Plugin Install: '.JText::_('Failed to create directory').': "'.$this->parent->getPath('extension_root').'"');
+ return false;
+ }
+ }
+
+ /*
+ * If we created the extension directory and will want to remove it if we
+ * have to roll back the installation, lets add it to the installation
+ * step stack
+ */
+ if ($created) {
+ $this->parent->pushStep(array ('type' => 'folder', 'path' => $this->parent->getPath('extension_root')));
+ }
+
+ // Copy all necessary files
+ if ($this->parent->parseFiles($element, -1) === false) {
+ // Install failed, roll back changes
+ $this->parent->abort();
+ return false;
+ }
+
+ if ($this->_parseLanguages( $this->manifest->languages) === false) {
+ // Install failed, roll back changes
+ $this->parent->abort();
+ return false;
+ }
+
+ // If there is an install file, lets copy it.
+ $installScriptElement =& $this->manifest->installfile;
+ if (is_a($installScriptElement, 'JXMLElement')) {
+ // Make sure it hasn't already been copied (this would be an error in the xml install file)
+ if (!file_exists($this->parent->getPath('extension_root').DS.$installScriptElement->data()))
+ {
+ $path['src'] = $this->parent->getPath('source').DS.$installScriptElement->data();
+ $path['dest'] = $this->parent->getPath('extension_root').DS.$installScriptElement->data();
+ if (!$this->parent->copyFiles(array ($path))) {
+ // Install failed, rollback changes
+ $this->parent->abort(JText::_('COM_JCKMAN_ADAPTER_COMPONENT').' '.JText::_('COM_JCKMAN_ADAPTER_INSTALL').': '.JText::_('COM_JCKMAN_ADAPTER_COULD_NOT_COPY_INSTALL_FILE'));
+ return false;
+ }
+ }
+ $this->set('install.script', $installScriptElement->data());
+ }
+
+ // If there is an uninstall file, lets copy it.
+ $uninstallScriptElement =& $this->manifest->uninstallfile;
+ if (is_a($uninstallScriptElement, 'JXMLElement')) {
+ // Make sure it hasn't already been copied (this would be an error in the xml install file)
+ if (!file_exists($this->parent->getPath('extension_root').DS.$uninstallScriptElement->data()))
+ {
+ $path['src'] = $this->parent->getPath('source').DS.$uninstallScriptElpement->data();
+ $path['dest'] = $this->parent->getPath('extension_root').DS.$uninstallScriptElement->data();
+ if (!$this->parent->copyFiles(array ($path))) {
+ // Install failed, rollback changes
+ $this->parent->abort(JText::_('COM_JCKMAN_ADAPTER_COMPONENT').' '.JText::_('COM_JCKMAN_ADAPTER_INSTALL').': '.JText::_('COM_JCKMAN_ADAPTER_COULD_NOT_COPY_INSTALL_FILE'));
+ return false;
+ }
+ }
+ }
+
+ /**
+ * ---------------------------------------------------------------------------------------------
+ * Database Processing Section
+ * ---------------------------------------------------------------------------------------------
+ */
+ $type = (isset($type) ? (string)$type : 'plugin'); //Add group processimg
+
+ // Check to see if a plugin by the same name is already installed
+ // ^ Altered db query for #__JCK_PLUGINS
+ $query = 'SELECT `id`' .
+ ' FROM `#__jckplugins`' .
+ ' WHERE name = '.$db->Quote($pname);
+ $db->setQuery($query);
+ if (!$db->Query()) {
+ // Install failed, roll back changes
+ $this->parent->abort('Plugin Install: '.$db->stderr(true));
+ return false;
+ }
+ $id = $db->loadResult();
+
+ // Was there a module already installed with the same name?
+ if($id)
+ {
+
+ if (!$this->parent->isOverwrite())
+ {
+ // Install failed, roll back changes
+
+ $this->parent->abort(JText::sprintf('COM_JCKMAN_ADAPTER_PLUGIN_ALREADY_EXISTS',$pname));
+ return false;
+ }
+
+ $row =& JTable::getInstance('plugin', 'JCKTable');
+ $row->type = $type;
+ $row->load($id);
+
+ }
+ else
+ {
+ $icon = $this->manifest->icon;
+
+ // ^ Changes to plugin parameters. Use JCK Plugins Table class.
+ $row =& JTable::getInstance('plugin', 'JCKTable');
+ $row->title = $this->parent->get('name');
+ $row->name = $pname;
+ $row->type = $type;
+ $row->row = 4;
+ $row->published = 1;
+ $row->editable = 1;
+ $row->icon = ($icon ? $icon->data() : '');
+ $row->iscore = 0;
+ $row->params = $this->parent->getParams();
+
+ if($this->manifest->attributes()->parent)
+ {
+ $parentName = (string) $this->manifest->attributes()->parent;
+ $row->setParent($parentName);
+ }
+
+ if (!$row->store()) {
+ // Install failed, roll back changes
+ $this->parent->abort(JText::sprintf('COM_JCKMAN_ADAPTER_PLUGIN_INSTALL',$db->stderr(true)));
+ return false;
+ }
+
+ // Since we have created a plugin item, we add it to the installation step stack
+ // so that if we have to rollback the changes we can undo it.
+ $this->parent->pushStep(array ('type' => 'plugin', 'id' => $row->id));
+ }
+
+ /* -------------------------------------------------------------------------------------------
+ * update editor plugin config file AW
+ * -------------------------------------------------------------------------------------------
+ */
+ $config = & JCKHelper::getEditorPluginConfig();
+
+ $config->set($pname,1);
+
+
+ $cfgFile = CKEDITOR_LIBRARY.DS . 'plugins' . DS . 'toolbarplugins.php';
+
+ // Get the config registry in PHP class format and write it to configuation.php
+ if (!JFile::write($cfgFile, $config->toString('PHP',array('class' => 'JCKToolbarPlugins extends JCKPlugins'))))
+ {
+ JCKHelper::error(JText::sprintf('COM_JCKMAN_ADAPTER_FAILED_PUBLISH_PLUGIN',$pname));
+ }
+
+ /**
+ *-------------------------------------------------------------------------------------------
+ * Add plugin to toolbars
+ *-------------------------------------------------------------------------------------------
+ */
+ $CKfolder = CKEDITOR_LIBRARY.DS . 'toolbar';
+
+ $toolbars = JCKHelper::getEditorToolbars();
+ $jform = $app->input->get( 'jform', array(), 'array' );
+
+ switch( $jform['toolbars'] )
+ {
+ default :
+ case 'all' :
+ $toolbarnames = $toolbars;
+ break;
+ case 'none' :
+ $toolbarnames = array();
+ break;
+ case 'select' :
+ $toolbarnames = $jform['selections'];
+ break;
+ }//end switch
+
+ if(!empty( $toolbarnames) && $row->icon)
+ {
+
+ $values = array();
+ foreach($toolbarnames as $toolbarname)
+ {
+
+ $tmpfilename = $CKfolder.DS.$toolbarname.'.php';
+
+ require($tmpfilename);
+
+ $classname = 'JCK'. ucfirst($toolbarname);
+
+ $toolbar = new $classname();
+
+ $pluginTitle = str_replace(' ','',$row->title);
+
+
+ if(isset($toolbar->pluginTitle)) continue;
+
+ //fix toolbar values or they will get wiped out
+ foreach (get_object_vars( $toolbar ) as $k => $v)
+ {
+
+ if(is_null($v))
+ {
+ $toolbar->$k = '';
+ }
+
+ if($k[0] == '_')
+ $toolbar->$k = NULL;
+ }
+
+ $toolbar->$pluginTitle = '';
+
+
+
+ $toolbarConfig = new JRegistry('toolbar');
+ $toolbarConfig->loadObject($toolbar);
+
+ // Get the config registry in PHP class format and write it to configuation.php
+ if (!JFile::write($tmpfilename, $toolbarConfig->toString('PHP', array('class' => $classname . ' extends JCKToolbar'))))
+ {
+ JCKHelper::error(JText::sprintf('COM_JCKMAN_ADAPTER_FAILED_TO_ADD_PLUGIN_TOOLBAR',$pname,$classname));
+ }
+
+ //layout stuff
+ $sql = $db->getQuery( true );
+ $sql->select( 'id' )
+ ->from( '#__jcktoolbars' )
+ ->where( 'name = "'. $toolbarname .'"' );
+ $toolbarid = $db->setQuery( $sql )->loadResult();
+
+ $rowDetail = JCKHelper::getNextLayoutRow($toolbarid);
+
+ $values[] = '('.(int)$toolbarid.','. $row->id.','.$rowDetail->rowid.','.$rowDetail->rowordering.',1)';
+ }
+
+ //insert into layout table
+ if(!empty($values))
+ {
+ //Now delete dependencies
+ $query = 'DELETE FROM #__jcktoolbarplugins'
+ . ' WHERE pluginid ='. $row->id;
+ $db->setQuery( $query );
+ if (!$db->query()) {
+ JCKHelper::error( $db->getErrorMsg() );
+ }
+
+ $query = 'INSERT INTO `#__jcktoolbarplugins` (toolbarid,pluginid,row,ordering,state) VALUES ' . implode(',',$values);
+ $db->setQuery( $query );
+ if(!$db->query())
+ {
+ JCKHelper::error( $db->getErrorMsg() );
+ }
+ }
+ }
+
+ /**
+ * ---------------------------------------------------------------------------------------------
+ * Finalization and Cleanup Section
+ * ---------------------------------------------------------------------------------------------
+ */
+
+ // Lastly, we will copy the manifest file to its appropriate place.
+ if (!$this->parent->copyManifest(-1)) {
+ // Install failed, rollback changes
+ $this->parent->abort('Plugin Install: '.JText::_('Could not copy setup file'));
+ return false;
+ }
+
+ //make a copy of the plugin
+ $src = $this->parent->getPath('extension_root');
+ $dest = JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jckman'.DS.'editor'.DS.'plugins'.DS.$pname;
+
+ if (!JFolder::copy( $src, $dest,null,true)) {
+ // Install failed, roll back changes
+ $this->parent->abort();
+ return false;
+ }
+
+ // And now we run the postflight
+ ob_start();
+ ob_implicit_flush(false);
+
+ if ($this->parent->manifestClass && method_exists($this->parent->manifestClass,'postflight'))
+ {
+ $this->parent->manifestClass->postflight('install', $this);
+ }
+ ob_end_clean();
+
+ return true;
+ }
+
+ function _parseLanguages($element)
+ {
+ // Get the array of file nodes to process; we checked whether this had children above.
+
+ if (!$element || !count($element->children()))
+ {
+ // Either the tag does not exist or has no children (hence no files to process) therefore we return zero files processed.
+ return 0;
+ }
+
+ $copyfiles = array();
+
+ $destination = JPATH_COMPONENT.'/language';
+
+ /*
+ * Here we set the folder we are going to copy the files from.
+ *
+ * Does the element have a folder attribute?
+ *
+ * If so this indicates that the files are in a subdirectory of the source
+ * folder and we should append the folder attribute to the source path when
+ * copying files.
+ */
+
+
+
+ $folder = (string) $element->attributes()->folder;
+
+ if ($folder && file_exists($this->parent->getPath('source') . '/' . $folder))
+ {
+ $source = $this->parent->getPath('source') . '/' . $folder;
+ }
+ else
+ {
+ $source = $this->parent->getPath('source');
+ }
+
+ $path = array();
+
+
+ // Process each file in the $files array (children of $tagName).
+ foreach ($element->children() as $file)
+ {
+ /*
+ * Language files go in a subfolder based on the language code, ie.
+ * en-US.mycomponent.ini
+ * would go in the en-US subdirectory of the language folder.
+ */
+
+ // We will only install language files where a core language pack
+ // already exists.
+
+ if ((string) $file->attributes()->tag != '')
+ {
+ $path['src'] = $source . '/' . $file;
+ $path['dest'] = $destination . '/' . $file->attributes()->tag . '/' . basename((string) $file);
+ }
+ else
+ {
+ $path['src'] = $source . '/' . $file;
+ $path['dest'] = $destination . '/' . $file;
+ }
+
+ /*
+ * Before we can add a file to the copyfiles array we need to ensure
+ * that the folder we are copying our file to exits and if it doesn't,
+ * we need to create it.
+ */
+
+ if (basename($path['dest']) != $path['dest'])
+ {
+ $newdir = dirname($path['dest']);
+
+ if (!JFolder::create($newdir))
+ {
+ JLog::add(JText::sprintf('JLIB_INSTALLER_ERROR_CREATE_DIRECTORY', $newdir), JLog::WARNING, 'jerror');
+
+ return false;
+ }
+ }
+
+ // Add the file to the copyfiles array
+ $copyfiles[] = $path;
+ }
+
+ return $this->parent->copyFiles($copyfiles);
+ }
+
+
+ /**
+ * Custom uninstall method
+ *
+ * @access public
+ * @param int $cid The id of the plugin to uninstall
+ * @param int $clientId The id of the client (unused)
+ * @return boolean True on success
+ * @since 1.5
+ */
+ function uninstall($id)
+ {
+ // Initialize variables
+ $row = null;
+ $retval = true;
+ $db =& $this->parent->getDBO();
+
+ // First order of business will be to load the module object table from the database.
+ // This should give us the necessary information to proceed.
+
+ // ^ Changes to plugin parameters. Use JCK Plugins Table class.
+ $row =& JTable::getInstance('plugin', 'JCKTable');
+ $row->load((int) $id);
+
+ // Is the plugin we are trying to uninstall a core one?
+ // Because that is not a good idea...
+ if ($row->iscore) {
+ JCKHelper::error( 'Plugin Uninstall: '.JText::sprintf('WARNCOREPLUGIN', $row->title)."
".JText::_('WARNCOREPLUGIN2'));
+ return false;
+ }
+
+ // Get the plugin folder so we can properly build the plugin path
+ if (trim($row->name) == '') {
+ JCKHelper::error( JText::_('COM_JCKMAN_ADAPTER_PLUGIN_FIELD_EMPTY'));
+ return false;
+ }
+
+ //Now delete dependencies
+ $sql = $db->getQuery( true );
+ $sql->delete( '#__jcktoolbarplugins' )
+ ->where( 'pluginid ='. $row->id );
+
+ if (!$db->setQuery( $sql )->query())
+ {
+ JCKHelper::error( $db->getErrorMsg() );
+ }
+
+ // Set the plugin root path
+ $this->parent->setPath('extension_root', JCK_PLUGINS . DS . $row->name);
+
+ $manifestFile = $this->parent->getPath('extension_root') . DS . $row->name . '.xml';
+
+ if (file_exists($manifestFile))
+ {
+ // If we cannot load the xml file return null
+ if (!($xml = JFactory::getXML($manifestFile))) {
+ JCKHelper::error(JText::_('COM_JCKMAN_ADAPTER_UNINSTALL_COULD_NOT_LOAD_MANIFEST'));
+ return false;
+ }
+
+ $pname = (string) $xml->attributes()->plugin;
+
+ if ((string)$xml->scriptfile)
+ {
+ $manifestScript = (string)$xml->scriptfile;
+ $manifestScriptFile = $this->parent->getPath('extension_root').DS.$manifestScript;
+ if (is_file($manifestScriptFile))
+ {
+ // load the file
+ include_once $manifestScriptFile;
+ }
+ // Set the class name
+ $classname = 'plgJCK'.$pname.'InstallerScript';
+
+ if (class_exists($classname))
+ {
+ // create a new instance
+ $this->parent->manifestClass = new $classname($this);
+ // and set this so we can copy it later
+ $this->set('manifest_script', $manifestScript);
+ // Note: if we don't find the class, don't bother to copy the file
+ }
+
+ // run preflight if possible
+ ob_start();
+ ob_implicit_flush(false);
+ if ($this->parent->manifestClass && method_exists($this->parent->manifestClass,'preflight'))
+ {
+ if($this->parent->manifestClass->preflight('uninstall', $this) === false)
+ {
+ // Install failed, rollback changes
+ $this->parent->abort(JText::_('COM_JCKMAN_ADAPTER_CUSTOM_ABORT'));
+ return false;
+ }
+ }
+ ob_end_clean();
+
+ ob_start();
+ ob_implicit_flush(false);
+ if ($this->parent->manifestClass && method_exists($this->parent->manifestClass,'uninstall'))
+ {
+ $this->parent->manifestClass->uninstall($this);
+ }
+ $msg = ob_get_contents(); // append messages
+ ob_end_clean();
+ }
+
+ /**
+ *
+ * Remove plugin from toolbars file AW
+ *
+ */
+ $CKfolder = CKEDITOR_LIBRARY.DS . 'toolbar';
+
+ $toolbarnames =& JCKHelper::getEditorToolbars();
+
+ foreach($toolbarnames as $toolbarname)
+ {
+ $tmpfilename = $CKfolder.DS.$toolbarname.'.php';
+
+ require_once($tmpfilename);
+
+ $classname = 'JCK'. ucfirst($toolbarname);
+ $toolbar = new $classname();
+
+ $pluginTitle = str_replace(' ','',$row->title);
+ $pluginTitle = ucfirst($pluginTitle);
+ if(!isset($toolbar->$pluginTitle)) continue;
+ //fix toolbar values or they will get wiped out
+
+ foreach (get_object_vars( $toolbar ) as $k => $v)
+ {
+ if(is_null($v))
+ {
+ $toolbar->$k = '';
+ }
+
+ if($k[0] == '_')
+ $toolbar->$k = NULL;
+ }
+
+ $toolbar->$pluginTitle = NULL;
+
+ $toolbarConfig = new JRegistry('toolbar');
+
+ $toolbarConfig->loadObject($toolbar);
+
+ // Get the config registry in PHP class format and write it to configuation.php
+ if (!JFile::write($tmpfilename, $toolbarConfig->toString('PHP', array('class' => $classname . ' extends JCKToolbar'))))
+ {
+ JCKHelper::error( JText::sprintf('COM_JCKMAN_ADAPTER_FAILED_TO_REMOVE_PLUGIN_TOOLBAR',$row->name,$classname));
+ }
+ }
+
+ /**
+ *
+ * Remove plugin from config file AW
+ *
+ */
+ $config = & JCKHelper::getEditorPluginConfig();
+
+ $config->set($row->name,NULL); // remove value from output
+
+ $cfgFile = CKEDITOR_LIBRARY.DS . 'plugins' . DS . 'toolbarplugins.php';
+
+ // Get the config registry in PHP class format and write it to configuation.php
+ if (!JFile::write($cfgFile, $config->toString('PHP', array('class' => 'JCKToolbarPlugins extends JCKPlugins'))))
+ {
+ JCKHelper::error(JText::sprintf('COM_JCKMAN_ADAPTER_FAILED_TO_REMOVE_PLUGIN_FROM_CONFIG',$pname));
+ }
+
+ $root =& $xml;
+
+ if ($root->getName() != 'extension' && $root->getName() != 'install') {
+ JCKHelper::error( JText::_('COM_JCKMAN_ADAPTER_UNINSTALL_INVALID_MANIFEST'));
+ return false;
+ }
+
+ // Remove the plugin files
+ $this->parent->removeFiles($root->files, -1);
+ JFile::delete($manifestFile);
+
+ // Remove all media and languages as well
+ $this->parent->removeFiles($root->languages, 0);
+
+ } else {
+ JCKHelper::error( Jtext::_('COM_JCKMAN_ADAPTER_UNINSTALL_INVALID_MANIFEST_OR_NOT_FOUND'));
+
+ $row->delete($row->id);
+ unset ($row);
+ $retval = false;
+ }
+
+ if( $row )
+ {
+ // Now we will no longer need the plugin object, so lets delete it
+ $row->delete($row->id);
+ unset ($row);
+ }
+
+ // If the folder is empty, let's delete it
+ $files = JFolder::files($this->parent->getPath('extension_root'));
+ if (!count($files)) {
+ JFolder::delete($this->parent->getPath('extension_root'));
+ }
+
+ //Now delete copy of plugin stored in the component
+ $copyPath = JPATH_ADMINISTRATOR.DS.'components'.DS.'com_jckman'.DS.'editor'.DS.'plugins'.DS.$pname;
+ JFolder::delete($copyPath);
+
+ return $retval;
+ }
+
+ /**
+ * Custom rollback method
+ * - Roll back the plugin item
+ *
+ * @access public
+ * @param array $arg Installation step to rollback
+ * @return boolean True on success
+ * @since 1.5
+ * Minor changes to the db query
+ */
+ function _rollback_plugin($arg)
+ {
+ // Get database connector object
+ $db =& $this->parent->getDBO();
+ $sql = $db->getQuery( true );
+
+ // Remove the entry from the #__JCK_PLUGINS table
+ $sql->delete( '`#__jckplugins`' )
+ ->where( 'id='.(int)$arg['id'] );
+
+ return ($db->setQuery($sql)->query() !== false);
+ }
+}
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/base/controller.php b/deployed/jckman/administrator/components/com_jckman/base/controller.php
new file mode 100644
index 00000000..21f67c28
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/base/controller.php
@@ -0,0 +1,71 @@
+_event_args = null;
+ $name = $app->input->get( 'controller', '');
+
+ if(!$name)
+ $name = $app->input->get( 'view', $this->getName() );
+
+ $eventListenerFile = JPATH_COMPONENT .DS . 'event' . DS . $name . '.php';
+
+ jimport('joomla.filesystem.file');
+
+ if(JFile::exists($eventListenerFile))
+ {
+ require_once($eventListenerFile);
+ $this->editor_obervable = new JCKEditorObservable($name);
+ }
+ else
+ {
+ JCKHelper::error('No Event listener found for '. $name .' controller');
+ }
+
+ //load style sheet
+ $document = JFactory::getDocument();
+ $document->addStyleSheet( JCK_COMPONENT . '/css/header.css', 'text/css' );
+ }
+
+ public function execute( $task )
+ {
+ parent::execute( $task );
+
+ //if error just return
+ //if(JError::getError())
+ // return;
+ //fire event to update editor
+ $this->updateEditor($this->getTask(),$this->event_args);
+ }
+
+ private function updateEditor($event,$args = array())
+ {
+ if(isset($this->editor_obervable))
+ {
+ $this->editor_obervable->update( 'on' . JString::ucfirst($event),$args);
+ }
+ }
+}
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/base/index.html b/deployed/jckman/administrator/components/com_jckman/base/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/base/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/base/loader.php b/deployed/jckman/administrator/components/com_jckman/base/loader.php
new file mode 100644
index 00000000..05533bde
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/base/loader.php
@@ -0,0 +1,154 @@
+
+ com_jckman
+ 6.4.4
+ Jan 2015
+ JoomlaCK Editor Manager v6.4
+ ]]>
+ GNU/GPLv2
+ Andrew Williams
+ andrew@joomlackeditor.com
+ http://www.joomlackeditor.com
+ 2013 - 2015 WebxSolutions Ltd
+ install.php
+
+
+ sql/install.sql
+
+
+
+
+ sql/uninstall.sql
+
+
+
+
+ language/en-GB/en-GB.com_jckman.ini
+ language/en-GB/en-GB.com_jckman.sys.ini
+ language/de-DE/de-DE.com_jckman.ini
+ language/de-DE/de-DE.com_jckman.sys.ini
+ language/es-ES/es-ES.com_jckman.ini
+ language/es-ES/es-ES.com_jckman.sys.ini
+ language/fi-FI/fi-FI.com_jckman.ini
+ language/fi-FI/fi-FI.com_jckman.sys.ini
+ language/it-IT/it-IT.com_jckman.ini
+ language/it-IT/it-IT.com_jckman.sys.ini
+ language/nl-NL/nl-NL.com_jckman.ini
+ language/nl-NL/nl-NL.com_jckman.sys.ini
+ language/fr-FR/fr-FR.com_jckman.ini
+ language/fr-FR/fr-FR.com_jckman.sys.ini
+ language/ru-RU/ru-RU.com_jckman.ini
+ language/ru-RU/ru-RU.com_jckman.sys.ini
+
+
+
+
+
+
+
+
+
+
+
+
+ config.xml
+ controller.php
+ jckman.php
+ helper.php
+ access.xml
+ index.html
+ adapters
+ base
+ config
+ controllers
+ css
+ editor
+ event
+ help
+ helpers
+ html
+ icons
+ js
+ language
+ tables
+ models
+ views
+ modules
+ restorers
+ sql
+
+
+
+ http://www.joomlackeditor.com/upgrade/com_jckman.xml
+
+
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/config.xml b/deployed/jckman/administrator/components/com_jckman/config.xml
new file mode 100644
index 00000000..b5066d70
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/config.xml
@@ -0,0 +1,18 @@
+
+
+
+
diff --git a/deployed/jckman/administrator/components/com_jckman/config/handler.php b/deployed/jckman/administrator/components/com_jckman/config/handler.php
new file mode 100644
index 00000000..09c801a6
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/config/handler.php
@@ -0,0 +1,72 @@
+attributes('is_object');
+ $is_a_array = $node->attributes('is_array');
+ $separator = $node->attributes('separator');
+
+ if(!$separator)
+ $separator = ','; //default to a comma separated list
+
+ $value = implode($separator,$value);
+
+ if($is_a_object)
+ $value = '{'.$value.'}';
+
+ if($is_a_array)
+ $value = '['.$value.']';
+
+ $options .= "\"$key='".$value."'\",";
+ }
+ elseif(is_numeric($value))
+ $options .= "\"$key=$value\",";
+ else
+ $options .= "\"$key='".$value."'\",";
+
+ return $options;
+ }
+}
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/config/handlers/addcolorlist.php b/deployed/jckman/administrator/components/com_jckman/config/handlers/addcolorlist.php
new file mode 100644
index 00000000..bca6b93b
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/config/handlers/addcolorlist.php
@@ -0,0 +1,47 @@
+attributes('is_object');
+ $is_a_array = $node->attributes('is_array');
+ $separator = $node->attributes('separator');
+
+ if(!$separator)
+ $separator = ','; //default to a comma separated list
+
+ if(empty($value))
+ {
+ $value = array();
+ foreach($node->children()as $option)
+ {
+ if($option->name() == 'option')
+ $value[] = $option->attributes('value');
+ }
+ }
+ $value = implode($separator,$value);
+
+ if($is_a_object)
+ $value = '{'.$value.'}';
+
+ if($is_a_array)
+ $value = '['.$value.']';
+
+ $options .= "\"$key='".$value."'\",";
+
+ return $options;
+ }
+}
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/config/handlers/addselectlist.php b/deployed/jckman/administrator/components/com_jckman/config/handlers/addselectlist.php
new file mode 100644
index 00000000..5d12460a
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/config/handlers/addselectlist.php
@@ -0,0 +1,47 @@
+attributes('is_object');
+ $is_a_array = $node->attributes('is_array');
+ $separator = $node->attributes('separator');
+
+ if(!$separator)
+ $separator = ','; //default to a comma separated list
+
+ if(empty($value))
+ {
+ $value = array();
+ foreach($node->children()as $option)
+ {
+ if($option->name() == 'option')
+ $value[] = $option->attributes('value');
+ }
+ }
+ $value = implode($separator,$value);
+
+ if($is_a_object)
+ $value = '{'.$value.'}';
+
+ if($is_a_array)
+ $value = '['.$value.']';
+
+ $options .= "\"$key='".$value."'\",";
+
+ return $options;
+ }
+}
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/config/handlers/documenttypelist.php b/deployed/jckman/administrator/components/com_jckman/config/handlers/documenttypelist.php
new file mode 100644
index 00000000..fa8f074e
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/config/handlers/documenttypelist.php
@@ -0,0 +1,23 @@
+attributes('is_object');
+ $is_a_array = $node->attributes('is_array');
+ $separator = $node->attributes('separator');
+
+ if(!$separator)
+ $separator = ','; //default to a comma separated list
+
+ if(empty($value))
+ {
+ $value = array();
+ foreach($node->children()as $option)
+ {
+ if($option->name() != 'option')
+ continue;
+
+ $tmp = $option->data();
+ $tmp .= '/'. $option->attributes('value');
+ $value[] = $tmp;
+ }
+ }
+ else
+ {
+ $texts = $params->get($key.'_text');
+
+ foreach($value as $k=>$v)
+ {
+ $tmp = $texts[$k];
+ $tmp .= '/'.$v;
+ $value[$k] = $tmp;
+ }
+
+ }
+
+ $value = implode($separator,$value);
+
+ if($is_a_object)
+ $value = '{'.$value.'}';
+
+ if($is_a_array)
+ $value = '['.$value.']';
+
+ $options .= "\"$key='".$value."'\",";
+
+ return $options;
+ }
+}
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/config/handlers/dualaddselectlist.php b/deployed/jckman/administrator/components/com_jckman/config/handlers/dualaddselectlist.php
new file mode 100644
index 00000000..ba50f804
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/config/handlers/dualaddselectlist.php
@@ -0,0 +1,64 @@
+attributes('is_object');
+ $is_a_array = $node->attributes('is_array');
+ $separator = $node->attributes('separator');
+
+ if(!$separator)
+ $separator = ','; //default to a comma separated list
+
+ if(empty($value))
+ {
+ $value = array();
+ foreach($node->children()as $option)
+ {
+ if($option->name() != 'option')
+ continue;
+
+ $tmp = $option->data();
+ $tmp .= '/'. $option->attributes('value');
+ $value[] = $tmp;
+ }
+ }
+ else
+ {
+ $texts = $params->get($key.'_text');
+
+ foreach($value as $k=>$v)
+ {
+ $tmp = $texts[$k];
+ $tmp .= '/'.$v;
+ $value[$k] = $tmp;
+ }
+
+ }
+
+ $value = implode($separator,$value);
+
+ if($is_a_object)
+ $value = '{'.$value.'}';
+
+ if($is_a_array)
+ $value = '['.$value.']';
+
+ $options .= "\"$key='".$value."'\",";
+
+ return $options;
+ }
+}
diff --git a/deployed/jckman/administrator/components/com_jckman/config/handlers/filebrowsers.php b/deployed/jckman/administrator/components/com_jckman/config/handlers/filebrowsers.php
new file mode 100644
index 00000000..95ae2bfb
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/config/handlers/filebrowsers.php
@@ -0,0 +1,92 @@
+browseUrl));
+ $browseUrl = (string) $manifest->browseUrl;
+
+
+
+ if(isset($manifest->imageBrowseUrl))
+ $imageBrowseUrl = $manifest->imageBrowseUrl;
+
+ if(isset($manifest->flashBrowseUrl))
+ $flashBrowseUrl = $manifest->flashBrowseUrl;
+
+
+ if(!$browseUrl && $value == 'jckexplorer')
+ {
+ $browseUrl = 'index.php?editor=ckeditor';
+ $imageBrowseUrl = 'index.php?editor=ckeditor&filter=image';
+ $flashBrowseUrl = 'index.php?editor=ckeditor&filter=flash';
+ }
+
+ if(!$browseUrl)
+ return false;
+
+ $pluginName = ucfirst($pluginName);
+
+ if($pluginName == 'Image' && $imageBrowseUrl)
+ $options .= "\"filebrowserImageBrowseUrl='".JURI::root()."plugins/editors/jckeditor/plugins/".$value."/".$imageBrowseUrl."'\",";
+ elseif(($pluginName == 'Flash' || $pluginName == 'Jflash') && $flashBrowseUrl)
+ $options .= "\"filebrowserFlashBrowseUrl='".JURI::root()."plugins/editors/jckeditor/plugins/".$value."/".$flashBrowseUrl."'\",";
+ else
+ $options .= "\"filebrowser".$pluginName."BrowseUrl='".JURI::root()."plugins/editors/jckeditor/plugins/".$value."/".$browseUrl."'\",";
+
+ return $options;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/deployed/jckman/administrator/components/com_jckman/config/handlers/index.html b/deployed/jckman/administrator/components/com_jckman/config/handlers/index.html
new file mode 100644
index 00000000..fa6d84e8
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/config/handlers/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/config/handlers/resizeradio.php b/deployed/jckman/administrator/components/com_jckman/config/handlers/resizeradio.php
new file mode 100644
index 00000000..25d62711
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/config/handlers/resizeradio.php
@@ -0,0 +1,31 @@
+attributes('is_object');
+ $is_a_array = $node->attributes('is_array');
+ $separator = $node->attributes('separator');
+
+ if(!$separator)
+ $separator = ','; //default to a comma separated list
+
+ if(strpos($value,'|'))
+ str_replace('|',chr(13),$value);
+
+ $value = str_replace(chr(13),$separator,$value);
+
+ if($is_a_object)
+ $value = '{'.$value.'}';
+
+ if($is_a_array)
+ $value = '['.$value.']';
+
+ $options .= "\"$key='".$value."'\",";
+
+ return $options;
+ }
+}
\ No newline at end of file
diff --git a/deployed/jckman/administrator/components/com_jckman/config/handlers/windowfeatureslist.php b/deployed/jckman/administrator/components/com_jckman/config/handlers/windowfeatureslist.php
new file mode 100644
index 00000000..7b29246b
--- /dev/null
+++ b/deployed/jckman/administrator/components/com_jckman/config/handlers/windowfeatureslist.php
@@ -0,0 +1,35 @@
+