First commit
This commit is contained in:
60
cms/plugins/co_authors/admin.php
Normal file
60
cms/plugins/co_authors/admin.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/*
|
||||
============================================================
|
||||
CMSimple Plugin CoAuthors
|
||||
============================================================
|
||||
Version: CoAuthors 3.0
|
||||
Released: 10/2023
|
||||
Copyright: Gert Ebersbach
|
||||
Internet: www.ge-webdesign.de/cmsimple/
|
||||
============================================================
|
||||
utf-8 check: äöü
|
||||
*/
|
||||
|
||||
initvar('co_authors');
|
||||
if ($co_authors)
|
||||
{
|
||||
if(!defined('CMSIMPLE_VERSION'))
|
||||
{
|
||||
$o.= '<p>This plugin requires <b>CMSimple 4.2</b> or higher.</p><p><a href="http://www.cmsimple.org/">CMSimple Download & Updates »</a></p>';
|
||||
return;
|
||||
}
|
||||
|
||||
// Make CMSimple variables accessible
|
||||
global $sn,$sv,$sl,$pth,$plugin;
|
||||
|
||||
// Detect the foldername of the plugin.
|
||||
$plugin=basename(dirname(__FILE__),"/");
|
||||
|
||||
$admin = isset($_GET['admin']) ? $_GET['admin'] : '';
|
||||
$admin .= isset($_POST['admin']) ? $_POST['admin'] : '';
|
||||
|
||||
// Parameter "ON" shows the Plugin Main Tab.
|
||||
// Blank "" or "OFF" does not show the Plugin Main Tab.
|
||||
$o.=print_plugin_admin('off');
|
||||
|
||||
// First page when loading the plugin.
|
||||
if ($admin == '' || $admin == 'plugin_main')
|
||||
{
|
||||
$o.='
|
||||
<h4>Plugin CoAuthors</h4>
|
||||
<hr>
|
||||
<ul>
|
||||
<li>Version: CoAuthors 3.0</li>
|
||||
<li>Released: 2023-10</li>
|
||||
<li>Copyright: Gert Ebersbach</li>
|
||||
<li>Internet: <a href="http://www.ge-webdesign.de/cmsimpleplugins/?Eigene_Plugins">www.ge-webdesign.de</a></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<p><b>No admin options</b></p>
|
||||
';
|
||||
}
|
||||
|
||||
if ($admin <> 'plugin_main')
|
||||
{
|
||||
$hint=array();
|
||||
$hint['mode_donotshowvarnames'] = false;
|
||||
$o.=plugin_admin_common($action, $admin, $plugin, $hint);
|
||||
}
|
||||
}
|
||||
?>
|
106
cms/plugins/co_authors/help/help.htm
Normal file
106
cms/plugins/co_authors/help/help.htm
Normal file
@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<title>CoAuthors Kurzdoku</title>
|
||||
<meta name="content-language" content="de">
|
||||
<style type="text/css">
|
||||
body {font-family: arial, sans-serif; line-height: 1.4em;}
|
||||
div#main {Width: 900px; padding: 24px; margin: 0 auto;}
|
||||
h1, h2 {color: #720; margin-top: 90px;}
|
||||
h3, h4 {margin-top: 60px;}
|
||||
p.code {font-family: Courier New; border: 1px solid #999; background: #eed; padding: 8px 12px;}
|
||||
span.code {font-family: Courier New; color: #620;}
|
||||
td {border: 1px solid; padding: 8px 12px;}
|
||||
li {padding-top: 5px; padding-bottom: 5px;}
|
||||
a:link, a:visited {color: #249;}
|
||||
a:hover {color: #c60;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- utf-8 check: äöüß -->
|
||||
|
||||
<div id="main">
|
||||
<p style="font-size: 24px;"><a href="http://translate.google.de/" target="_blank">Google translator »</a></p>
|
||||
<p>(Opens in a new window - öffnet in einem neuen Fenster)</p><hr>
|
||||
<h1>Kurz-Dokumentation Plugin "CoAuthors"</h1>
|
||||
<p><b><i>Version CoAuthors 3.0</i></b> - released 10/2023</p>
|
||||
<p><b>CoAuthors</b> ist ein CMSimple Plugin, mit dem txt-Dateien, die html Quelltext enthalten und die irgendwo in einem Unterverzeichnis einer CMSimple Installation liegen, in eine Seite dieser CMSimple Installation eingebunden werden können.</p>
|
||||
<p style="background: #fc0; color: #000; text-align: center; font-weight: 700; border: 2px solid #000; padding: 10px 16px;">Der Plugin Aufruf für CMSimpleCoAuthors entfernt alle h1 Überschriften aus dem Quelltext.</p>
|
||||
<div style="background: #f3f6f9; border: 3px solid #c60; text-align: center; padding: 0 24px;">
|
||||
<p>Mit einer <a href="http://www.ge-webdesign.de/co_authors/"><b>CoAuthors Subsite »</b></a> können Sie solche txt-Dateien einfach und komfortabel in Ihrer gewohnten Arbeitsumgebung erzeugen.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>1. Systemvoraussetzungen</h2>
|
||||
<p>Voraussetzung ist eine funktionierende Installation von CMSimple 4.0 oder höher.</p>
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>2. Installation</h2>
|
||||
<ol>
|
||||
<li>zip-Datei herunterladen und mit einem geeigneten Programm entpacken</li>
|
||||
<li>Laden Sie den Ordner "co_authors" in das Verzeichnis "plugins" Ihrer CMSimple Installation hoch.</li>
|
||||
</ol>
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>3. Datei- und Ordnerrechte</h2>
|
||||
<p>Die Vergabe von Schreibrechten für Ordner und Dateien ist nicht notwendig.</p>
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>4. Plugin-Aufruf</h2>
|
||||
|
||||
<p style="background: #fc0; color: #000; text-align: center; font-weight: 700; border: 2px solid #000; padding: 10px 16px;">Der Plugin Aufruf für CMSimpleCoAuthors entfernt alle h1 Überschriften aus dem Quelltext.</p>
|
||||
|
||||
|
||||
|
||||
<h3>4.1 Plugin-Aufruf für CMSimpleCoAuthors</h3>
|
||||
|
||||
<p>Fügen Sie folgenden Plugin-Aufruf in Ihre CMSimple Seite ein, an der Stelle, an der die txt-Datei eingebunden werden soll:</p>
|
||||
|
||||
<p class="code">{{{plugin:co_authors('CoAuthorFolder/','Die_Autoren_Seite');}}}</p>
|
||||
|
||||
<p><span style="color: rgb(128, 0, 0); font-weight: 700;">Hinweis: Bitte fügen Sie den Plugin Aufruf immer in der Quelltext Ansicht ein.</span></p>
|
||||
|
||||
<p><b>CoAuthorFolder:</b> Das Verzeichnis, in dem CMSimpleCoAuthors - also die Autoren Installation - installiert ist.</p>
|
||||
<p><span style="color: rgb(128, 0, 0); font-weight: 700;">!!! WICHTIG !!!</span> der Slash ("/") am Ende, ohne den funktioniert's nicht.</p>
|
||||
|
||||
<p><b>Die_Autoren_Seite:</b> Der Name der Seite der Autoren Installation, die eingebunden werden soll, mit "_" für die Leerstellen.</p>
|
||||
<p><span style="color: rgb(128, 0, 0); font-weight: 700;">!!! WICHTIG !!!</span> Bitte bei den Namen der Autorenseiten keine Umlaute oder Sonderzeichen verwenden, da daraus Dateinamen gemacht werden, die an CMSimple übergeben werden.</p>
|
||||
|
||||
|
||||
|
||||
<h3>4.2 Plugin-Aufruf mit vollem URL</h3>
|
||||
|
||||
<p>Fügen Sie folgenden Plugin-Aufruf in Ihre CMSimple Seite ein, an der Stelle, an der die txt-Datei eingebunden werden soll:</p>
|
||||
<p class="code">{{{plugin:co_authorsURL('Datei mit vollem URL');}}}</p>
|
||||
|
||||
<p><span style="color: rgb(128, 0, 0); font-weight: 700;">Hinweis: Bitte fügen Sie den Plugin Aufruf immer in der Quelltext Ansicht ein.</span></p>
|
||||
|
||||
<p><b>Beispiel - Example:</b></p>
|
||||
<p class="code">{{{plugin:co_authorsURL('./userfiles/texte/text01.txt');}}}</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>5. Konfiguration</h2>
|
||||
<p>Für <b>CoAuthors</b> gibt es keine Konfigurations Optionen.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
61
cms/plugins/co_authors/index.php
Normal file
61
cms/plugins/co_authors/index.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/*
|
||||
============================================================
|
||||
CMSimple Plugin CoAuthors
|
||||
============================================================
|
||||
Version: CoAuthors 3.0
|
||||
Released: 10/2023
|
||||
Copyright: Gert Ebersbach
|
||||
Internet: www.ge-webdesign.de/cmsimple/
|
||||
============================================================
|
||||
utf-8 check: äöü
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function co_authors($co_author_folder, $co_author_page)
|
||||
{
|
||||
global $pth;
|
||||
|
||||
if(!defined('CMSIMPLE_VERSION'))
|
||||
{
|
||||
return '<p>This plugin requires <b>CMSimple 4.2</b> or higher.</p><p><a href="http://www.cmsimple.org/">CMSimple Download & Updates »</a></p>';
|
||||
}
|
||||
|
||||
$GLOBALS['co_author_folder'] = $co_author_folder; global $co_author_folder;
|
||||
// echo 'von co_author: ' . $co_author_folder . $co_author_page . '<br>'; // for development only
|
||||
|
||||
$co_author_doc = '';
|
||||
// $co_author_doc.= '<p class="cmsimplecore_warning" style="clear: both; font-family: arial, sans-serif; font-size: 12px; text-align: center;">Die folgenden Inhalte wurden extern mit CMSimpleCoAutors erstellt und mit dem Plugin CoAuthors in diese Website eingebunden:</p>';
|
||||
$co_author_doc.= file_get_contents($pth['folder']['base'].$co_author_folder.'userfiles/co_author/' . $co_author_page . '.txt');
|
||||
$co_author_doc = preg_replace('~<h1(.*)</h1>~', '', $co_author_doc);
|
||||
|
||||
$co_author_doc = evaluate_scripting($co_author_doc);
|
||||
|
||||
return($co_author_doc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function co_authorsURL($fileURL)
|
||||
{
|
||||
global $pth;
|
||||
|
||||
if(!defined('CMSIMPLE_VERSION'))
|
||||
{
|
||||
return '<p>This plugin requires <b>CMSimple 4.2</b> or higher.</p><p><a href="http://www.cmsimple.org/">CMSimple Download & Updates »</a></p>';
|
||||
}
|
||||
|
||||
$co_author_doc = '';
|
||||
// $co_author_doc.= '<p class="cmsimplecore_warning" style="clear: both; font-family: arial, sans-serif; font-size: 12px; text-align: center;">Die folgenden Inhalte wurden extern mit CMSimpleCoAutors erstellt und mit dem Plugin CoAuthors in diese Website eingebunden:</p>';
|
||||
$co_author_doc.= file_get_contents($fileURL);
|
||||
$co_author_doc = evaluate_scripting($co_author_doc);
|
||||
|
||||
return($co_author_doc);
|
||||
}
|
||||
|
||||
?>
|
1
cms/plugins/co_authors/version.nfo
Normal file
1
cms/plugins/co_authors/version.nfo
Normal file
@ -0,0 +1 @@
|
||||
CoAuthors,2023100701,3.0,,,http://www.ge-webdesign.de/cmsimpleplugins/?Eigene_Plugins___CoAuthors,http://www.ge-webdesign.de/downloads/versioninfo/coauthors/version.nfo
|
Reference in New Issue
Block a user