diff --git a/README.md b/README.md index b6f5e3b..fc6722e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,9 @@ # cl-content-allocation Content Allocation Plugin for ConLite + +This plugin is f used to ad tags to your articles. + +History + +V 1.0.0 +- initial recode to use with CL pluginmanager diff --git a/cl_plugin.xml b/cl_plugin.xml new file mode 100644 index 0000000..b1eacfa --- /dev/null +++ b/cl_plugin.xml @@ -0,0 +1,36 @@ + + + + ConLite Conten-Allocation + cl-content-allocation + D02CBEF1-45A5-5144-821F-015F6F81EEE0 + ConLite Content Allocation + ConLite Team + ConLite Team + cl-content-allocation@conlite.org + https://conlite.org + 1.0.0 + + + + + + + content_allocation + con_contentallocation + + + storeallocation + + + + + + + + + + + + + \ No newline at end of file diff --git a/includes/config.autoloader.php b/includes/config.autoloader.php index efcd0cf..35e2e67 100644 --- a/includes/config.autoloader.php +++ b/includes/config.autoloader.php @@ -18,7 +18,7 @@ if(!defined('CON_FRAMEWORK')) { die('Illegal call'); } -$sAutoloadClassPath = 'conlite/plugins/content_allocation/classes/'; +$sAutoloadClassPath = 'conlite/plugins/cl-content-allocation/classes/'; return array( 'pApiContentAllocation' => $sAutoloadClassPath.'class.content_allocation.php', 'pApiContentAllocationArticle' => $sAutoloadClassPath.'class.content_allocation_article.php', diff --git a/includes/config.plugin.php b/includes/config.plugin.php index f82b315..5eed995 100644 --- a/includes/config.plugin.php +++ b/includes/config.plugin.php @@ -32,14 +32,6 @@ if(!defined('CON_FRAMEWORK')) { die('Illegal call'); } - -// plugin includes -plugin_include('content_allocation', 'classes/class.content_allocation_tree.php'); -plugin_include('content_allocation', 'classes/class.content_allocation_treeview.php'); -plugin_include('content_allocation', 'classes/class.content_allocation_article.php'); -plugin_include('content_allocation', 'classes/class.content_allocation.php'); -plugin_include('content_allocation', 'classes/class.content_allocation_complexlist.php'); - // plugin_variables $cfg['tab']['pica_alloc'] = $cfg['sql']['sqlprefix'].'_pica_alloc'; $cfg['tab']['pica_alloc_con'] = $cfg['sql']['sqlprefix'].'_pica_alloc_con'; @@ -47,18 +39,18 @@ $cfg['tab']['pica_lang'] = $cfg['sql']['sqlprefix'].'_pica_lang'; $cfg['pica']['logpath'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'repository/log/data/'; $cfg['pica']['loglevel'] = 'warn'; -$cfg['pica']['treetemplate'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'content_allocation/templates/template.tree_structure.html'; -$cfg['pica']['treetemplate_article'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'content_allocation/templates/template.tree_article.html'; -$cfg['pica']['treetemplate_complexlist'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'content_allocation/templates/template.tree_complexlist.html'; +$cfg['pica']['treetemplate'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-content-allocation/templates/template.tree_structure.html'; +$cfg['pica']['treetemplate_article'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-content-allocation/templates/template.tree_article.html'; +$cfg['pica']['treetemplate_complexlist'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-content-allocation/templates/template.tree_complexlist.html'; -$cfg['pica']['style_complexlist'] = $cfg['path']['contenido_fullhtml'] . $cfg['path']['plugins'] . 'content_allocation/style/complexlist.css'; -$cfg['pica']['script_complexlist'] = $cfg['path']['contenido_fullhtml'] . $cfg['path']['plugins'] . 'content_allocation/scripts/complexlist.js'; +$cfg['pica']['style_complexlist'] = $cfg['path']['contenido_fullhtml'] . $cfg['path']['plugins'] . 'cl-content-allocation/style/complexlist.css'; +$cfg['pica']['script_complexlist'] = $cfg['path']['contenido_fullhtml'] . $cfg['path']['plugins'] . 'cl-content-allocation/scripts/complexlist.js'; // administration > users > area translations global $lngAct, $_cecRegistry; $lngAct['con_contentallocation']['storeallocation'] = i18n("Store content allocations", "cl-content-allocation"); -plugin_include('content_allocation', 'includes/functions.chains.php'); +plugin_include('cl-content-allocation', 'includes/functions.chains.php'); $_cecRegistry->addChainFunction("Contenido.Article.RegisterCustomTab", "pica_RegisterCustomTab"); $_cecRegistry->addChainFunction("Contenido.Article.GetCustomTabProperties", "pica_GetCustomTabProperties"); diff --git a/includes/functions.chains.php b/includes/functions.chains.php index 33bbfcc..93bbd11 100644 --- a/includes/functions.chains.php +++ b/includes/functions.chains.php @@ -58,7 +58,7 @@ function pica_RenderArticleAction ($idcat, $idart, $idartlang, $actionkey) if ($actionkey == "con_contentallocation") { - return ''; + return ''; } else { return ""; diff --git a/plugin_install.sql b/plugin_install.sql new file mode 100644 index 0000000..2a38c3e --- /dev/null +++ b/plugin_install.sql @@ -0,0 +1,30 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +/** + * Author: oldperl + * Created: 06.05.2021 + */ + +CREATE TABLE `!PREFIX!ca_alloc` ( + `idpica_alloc` int(10) NOT NULL DEFAULT 0, + `parentid` int(10) DEFAULT NULL, + `sortorder` int(10) NOT NULL DEFAULT 0, +PRIMARY KEY (`idpica_alloc`) +); + +CREATE TABLE `!PREFIX!ca_alloc_con` ( + `idpica_alloc` int(10) NOT NULL DEFAULT 0, + `idartlang` int(10) NOT NULL DEFAULT 0, +PRIMARY KEY (`idpica_alloc`) +); + +CREATE TABLE `!PREFIX!ca_lang` ( + `idpica_alloc` int(10) NOT NULL DEFAULT 0, + `idlang` int(10) NOT NULL DEFAULT 0, + `name` varchar(255) DEFAULT NULL, + `online` tinyint(1) NOT NULL DEFAULT 0, +PRIMARY KEY (`idpica_alloc`) +); \ No newline at end of file diff --git a/plugin_uninstall.sql b/plugin_uninstall.sql new file mode 100644 index 0000000..321da65 --- /dev/null +++ b/plugin_uninstall.sql @@ -0,0 +1,13 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +/** + * Author: oldperl + * Created: 06.05.2021 + */ + +DROP TABLE IF EXISTS !PREFIX!ca_alloc; +DROP TABLE IF EXISTS !PREFIX!ca_alloc_con; +DROP TABLE IF EXISTS !PREFIX!ca_lang; \ No newline at end of file diff --git a/xml/content_allocation.xml b/xml/content_allocation.xml deleted file mode 100644 index 59f1e3b..0000000 --- a/xml/content_allocation.xml +++ /dev/null @@ -1,12 +0,0 @@ - - -
Content Allocation
- - - - -
- Content Allocation -
-
-
\ No newline at end of file diff --git a/xml/lang_de_DE.xml b/xml/lang_de_DE.xml index eb8c1f2..960aba4 100644 --- a/xml/lang_de_DE.xml +++ b/xml/lang_de_DE.xml @@ -1,11 +1,15 @@ - - - -
Content Allocation
-
-
-
+ + + +
Tagging
+
+
+ +
+ Tagging +
+
\ No newline at end of file diff --git a/xml/lang_en_EN.xml b/xml/lang_en_EN.xml index eb8c1f2..92e89e4 100644 --- a/xml/lang_en_EN.xml +++ b/xml/lang_en_EN.xml @@ -1,11 +1,16 @@ - - - -
Content Allocation
-
-
-
+ + + +
Tagging
+
+
+ +
+ Tagging +
+
+
\ No newline at end of file diff --git a/xml/lang_en_US.xml b/xml/lang_en_US.xml index eb8c1f2..92e89e4 100644 --- a/xml/lang_en_US.xml +++ b/xml/lang_en_US.xml @@ -1,11 +1,16 @@ - - - -
Content Allocation
-
-
-
+ + + +
Tagging
+
+
+ +
+ Tagging +
+
+
\ No newline at end of file