1
0
Fork 0

initial recode to use plugin with pluginmanager

Dieser Commit ist enthalten in:
o.pinke 2021-05-06 14:52:11 +02:00
Ursprung 2475baa7e9
Commit 9fab054929
11 geänderte Dateien mit 129 neuen und 49 gelöschten Zeilen

Datei anzeigen

@ -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

36
cl_plugin.xml Normale Datei
Datei anzeigen

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<plugin>
<general active="1">
<plugin_name>ConLite Conten-Allocation</plugin_name>
<plugin_foldername>cl-content-allocation</plugin_foldername>
<uuid>D02CBEF1-45A5-5144-821F-015F6F81EEE0</uuid>
<description>ConLite Content Allocation</description>
<author>ConLite Team</author>
<copyright>ConLite Team</copyright>
<mail>cl-content-allocation@conlite.org</mail>
<website>https://conlite.org</website>
<version>1.0.0</version>
</general>
<requirements php="7.0">
<conlite minversion="2.1.0" />
</requirements>
<conlite>
<areas>
<area menuless="1">content_allocation</area>
<area parent="con" menuless="0">con_contentallocation</area>
</areas>
<actions>
<action area="con_contentallocation">storeallocation</action>
</actions>
<frames>
<frame area="content_allocation" filetype="main" name="cl-content-allocation/includes/include.left_top.php" frameId="1" />
<frame area="content_allocation" filetype="main" name="cl-content-allocation/includes/include.left_bottom.php" frameId="2" />
<frame area="content_allocation" filetype="main" name="cl-content-allocation/includes/include.right_bottom.php" frameId="4" />
<frame area="con_contentallocation" filetype="main" name="cl-content-allocation/includes/include.contentallocation_article.php" frameId="4" />
</frames>
<nav_sub>
<nav area="content_allocation" level="0" navm="extra">cl-content-allocation/xml/;navigation/extra/content_allocation/main</nav>
<nav area="con_contentallocation" level="1" navm="extra">cl-content-allocation/xml/;navigation/contenido/article/content_allocation</nav>
</nav_sub>
</conlite>
</plugin>

Datei anzeigen

@ -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',

Datei anzeigen

@ -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");

Datei anzeigen

@ -58,7 +58,7 @@ function pica_RenderArticleAction ($idcat, $idart, $idartlang, $actionkey)
if ($actionkey == "con_contentallocation")
{
return '<a title="'.i18n("Content Allocation", "cl-content-allocation").'" alt="'. i18n("Content Allocation", "cl-content-allocation").'" href="'.$sess->url('main.php?area=con_contentallocation&action=con_edit&idart='.$idart.'&idartlang='.$idartlang.'&idcat='.$idcat.'&frame=4').'"><img src="plugins/content_allocation/images/call_contentallocation.gif"></a>';
return '<a title="'.i18n("Content Allocation", "cl-content-allocation").'" alt="'. i18n("Content Allocation", "cl-content-allocation").'" href="'.$sess->url('main.php?area=con_contentallocation&action=con_edit&idart='.$idart.'&idartlang='.$idartlang.'&idcat='.$idcat.'&frame=4').'"><img src="plugins/cl-content-allocation/images/call_contentallocation.gif"></a>';
} else {
return "";

30
plugin_install.sql Normale Datei
Datei anzeigen

@ -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`)
);

13
plugin_uninstall.sql Normale Datei
Datei anzeigen

@ -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;

Datei anzeigen

@ -1,12 +0,0 @@
<xml version="1.0" encoding="UTF-8">
<plugin>
<main>Content Allocation</main>
<content_allocation></content_allocation>
<contenido>
<article>
<content_allocation>Content Allocation</content_allocation>
</article>
</contenido>
</plugin>

Datei anzeigen

@ -1,11 +1,15 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Contenido XML language file -->
<language>
<navigation>
<extra>
<content_allocation>
<main>Content Allocation</main>
</content_allocation>
</extra>
</navigation>
<navigation>
<extra>
<content_allocation>
<main>Tagging</main>
</content_allocation>
</extra>
<contenido>
<article>
<content_allocation>Tagging</content_allocation>
</article>
</contenido>
</language>

Datei anzeigen

@ -1,11 +1,16 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Contenido XML language file -->
<language>
<navigation>
<extra>
<content_allocation>
<main>Content Allocation</main>
</content_allocation>
</extra>
</navigation>
<navigation>
<extra>
<content_allocation>
<main>Tagging</main>
</content_allocation>
</extra>
<contenido>
<article>
<content_allocation>Tagging</content_allocation>
</article>
</contenido>
</navigation>
</language>

Datei anzeigen

@ -1,11 +1,16 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Contenido XML language file -->
<language>
<navigation>
<extra>
<content_allocation>
<main>Content Allocation</main>
</content_allocation>
</extra>
</navigation>
<navigation>
<extra>
<content_allocation>
<main>Tagging</main>
</content_allocation>
</extra>
<contenido>
<article>
<content_allocation>Tagging</content_allocation>
</article>
</contenido>
</navigation>
</language>