From 48ce697727d66323a51146e825512de53501d9fc Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sun, 1 Mar 2020 09:16:11 +0100 Subject: [PATCH] remove anewsystem its old and not used, lets remove it. --- public_html/lib/plugins/anewssystem/INFO | 8 - public_html/lib/plugins/anewssystem/README | 28 - public_html/lib/plugins/anewssystem/VERSION | 1 - .../lib/plugins/anewssystem/action.php | 234 --- .../lib/plugins/anewssystem/backlink.js | 42 - .../lib/plugins/anewssystem/conf/default.php | 24 - .../lib/plugins/anewssystem/conf/metadata.php | 22 - .../plugins/anewssystem/dropdowncontent.js | 137 -- .../lib/plugins/anewssystem/lang/de/lang.php | 72 - .../plugins/anewssystem/lang/de/settings.php | 22 - .../lib/plugins/anewssystem/lang/en/lang.php | 72 - .../plugins/anewssystem/lang/en/settings.php | 22 - .../lib/plugins/anewssystem/lang/it/lang.php | 35 - .../plugins/anewssystem/lang/it/settings.php | 23 - .../lib/plugins/anewssystem/plugin.info.txt | 9 - public_html/lib/plugins/anewssystem/style.css | 438 ----- .../lib/plugins/anewssystem/syntax.php | 1562 ----------------- .../lib/plugins/anewssystem/tpl/fonts.txt | 30 - .../plugins/anewssystem/tpl/newstemplate.txt | 10 - .../anewssystem/tpl/newstemplate_de.txt | 10 - .../anewssystem/tpl/newstemplate_en.txt | 10 - .../anewssystem/tpl/newstemplate_it.txt | 10 - 22 files changed, 2821 deletions(-) delete mode 100644 public_html/lib/plugins/anewssystem/INFO delete mode 100644 public_html/lib/plugins/anewssystem/README delete mode 100644 public_html/lib/plugins/anewssystem/VERSION delete mode 100644 public_html/lib/plugins/anewssystem/action.php delete mode 100644 public_html/lib/plugins/anewssystem/backlink.js delete mode 100644 public_html/lib/plugins/anewssystem/conf/default.php delete mode 100644 public_html/lib/plugins/anewssystem/conf/metadata.php delete mode 100644 public_html/lib/plugins/anewssystem/dropdowncontent.js delete mode 100644 public_html/lib/plugins/anewssystem/lang/de/lang.php delete mode 100644 public_html/lib/plugins/anewssystem/lang/de/settings.php delete mode 100644 public_html/lib/plugins/anewssystem/lang/en/lang.php delete mode 100644 public_html/lib/plugins/anewssystem/lang/en/settings.php delete mode 100644 public_html/lib/plugins/anewssystem/lang/it/lang.php delete mode 100644 public_html/lib/plugins/anewssystem/lang/it/settings.php delete mode 100644 public_html/lib/plugins/anewssystem/plugin.info.txt delete mode 100644 public_html/lib/plugins/anewssystem/style.css delete mode 100644 public_html/lib/plugins/anewssystem/syntax.php delete mode 100644 public_html/lib/plugins/anewssystem/tpl/fonts.txt delete mode 100644 public_html/lib/plugins/anewssystem/tpl/newstemplate.txt delete mode 100644 public_html/lib/plugins/anewssystem/tpl/newstemplate_de.txt delete mode 100644 public_html/lib/plugins/anewssystem/tpl/newstemplate_en.txt delete mode 100644 public_html/lib/plugins/anewssystem/tpl/newstemplate_it.txt diff --git a/public_html/lib/plugins/anewssystem/INFO b/public_html/lib/plugins/anewssystem/INFO deleted file mode 100644 index a958054a..00000000 --- a/public_html/lib/plugins/anewssystem/INFO +++ /dev/null @@ -1,8 +0,0 @@ -# PLUGIN INFO - DO NOT EDIT! - -author Taggic -email taggic@t-online.de -date 2016-06-02 -name anewssystem -desc provides an easy to handle, page based news system -url http://www.dokuwiki.org/plugin:anewssystem diff --git a/public_html/lib/plugins/anewssystem/README b/public_html/lib/plugins/anewssystem/README deleted file mode 100644 index 2efd0b09..00000000 --- a/public_html/lib/plugins/anewssystem/README +++ /dev/null @@ -1,28 +0,0 @@ -/** -* anewssystem Plugin: -* -* @license GPL 2 (http://www.gnu.org/licenses/gpl.html) -* @author Taggic -*/ - -Intro ------- - -Syntax -------- - - -Installation ------------- - Just download and extract it as folder “anewssystem” into your “\lib\plugins” - directory or put the link into the Plugin Manager for automated installation: - https://github.com/Taggic/anewssystem/zipball/master - - -Configuration --------------- - - -Examples/Usage --------------- -for example please refer to: http://www.fristercons.de/fcon/doku.php?id=news:descr&#examples_usage \ No newline at end of file diff --git a/public_html/lib/plugins/anewssystem/VERSION b/public_html/lib/plugins/anewssystem/VERSION deleted file mode 100644 index 366c2347..00000000 --- a/public_html/lib/plugins/anewssystem/VERSION +++ /dev/null @@ -1 +0,0 @@ -2016-06-02 \ No newline at end of file diff --git a/public_html/lib/plugins/anewssystem/action.php b/public_html/lib/plugins/anewssystem/action.php deleted file mode 100644 index e60f54a1..00000000 --- a/public_html/lib/plugins/anewssystem/action.php +++ /dev/null @@ -1,234 +0,0 @@ - 'Taggic', - 'email' => 'Taggic@t-online.de', - 'date' => '2016-06-02', - 'name' => 'News archive page (action plugin component)', - 'desc' => 'to show the News aechive alone on a page.', - 'url' => 'http://www.dokuwiki.org/plugin:anewssystem', - ); - } -/****************************************************************************** -** Register its handlers with the dokuwiki's event controller -*/ - function register(Doku_Event_Handler $controller) { - $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, '_handle_act', array()); - $controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE', $this, 'output', array()); - } - -/****************************************************************************** -** Handle the action -*/ - function _handle_act(&$event, $param) { - if($event->data !== 'shownewsarchive') { return; } - $event->preventDefault(); // https://www.dokuwiki.org/devel:events#event_object - return true; - } -/****************************************************************************** -** Generate output -*/ - function output(&$event, $param) { - if($event->data !== 'shownewsarchive') { return; } - global $ID; - - $target = $this->getConf('news_datafile'); - $targetpage = htmlspecialchars(trim($target)); - $prefix = 'anss'; - $del = 'anss_del'; - $cut_prefx = 'news_input_'; - $allnewsdata1 = $this->getConf('news_output'); - $allnewsdata = wl( (isset($allnewsdata1) ? $allnewsdata1 : 'news:newsdata') ); - $i = strripos($allnewsdata, ":"); - $news_root = substr($allnewsdata, 0, $i); - - // necessary for the back link of a show one article per page (SOAPP) - if(stripos($_GET['archive'],'archive')!== false) $ans_conf['param'] = $_GET['archive']; - $_GET['archive']=""; - - // 1. read template (plugins/anewssystem/template.php) - $template = file_get_contents(DOKU_PLUGIN.'anewssystem/tpl/newstemplate.txt'); - /*------- add news action part -----------------------------------------*/ - $post_prefix = $_POST["xs-".$prefix]; - $delete_record = $_POST["anss_del_record"]; - $delete_anchor = $_POST["anss_del_anchor"]; - - // date ... consider all news of a defined month of a year (mm.yyyy, empty per default) - // qty ... limits the number of news headlines starting with most recent (either integer or all, default:all) - // tag ... consider all news where news article owns the given tag string (empty per default) tag delimiter is "|" - // style ... css style string as used in HTML (except quotation marks) for the outer element div - // class ... css style for usecase toc, page or box - // ho ... headlinesonly will list the news headlines without timestamp and author (on/off, default: off) - - // check if page ID was called with tag filter -// $tmp .= ','.$_GET['tag']; // this will overrule the page syntax setting - if(strlen($tmp)<2) { - // strip parameter to get set of add parameter - $tmp = substr($ans_conf['param'],strlen('allnews')); - } - $split_array = explode(',',$tmp); // one or multiple tag filters: $prefs[1] ... [n] - $archive_options = array(); - - // split parameter into array with key and data - foreach ($split_array as $item) { - list($key, $value) = split("=",trim($item),2); - $archive_options = $archive_options + array($key => $value); - } - - if(($archive_options['qty']=='') || ($archive_options['qty']<1)) $archive_options['qty'] = 'all'; - if(array_key_exists('class',$archive_options) === false) $archive_options['class'] = 'page'; - if(array_key_exists('ho',$archive_options) === false) $archive_options['ho'] = 'off'; - $page = wl( (isset($targetpage) ? $targetpage : 'news:newsdata') ); - - // load raw news file (e.g. news:newsdata.txt) - $av = 0; - $oldrecord = rawWiki($targetpage); - - // split the news articles - $newsitems = explode("======",$oldrecord); - $info = array(); - - // get the headline level from config - $yh_level = $this->getConf('yh_level'); - $mh_level = $this->getConf('mh_level'); - $h_level = $this->getConf('h_level'); - - // 1. read news file (e.g. news:newsdata.txt) - foreach($newsitems as $article) { - // split news block into line items - $article_array = explode("\n * ",$article); - unset($article_array[0]); - - // 2. create output - // split line items into key and data - $aFlag = false; // flag: start date value exists and start is not in future - - foreach ($article_array as $item) { - list($key, $value) = split(":",trim($item),2); - $tag_flag = false; - if($key=='anchor') { - $anchor = trim($value); - } - elseif(($key=='start') && strtotime(trim($value)) < time()) { - $value = date($this->getConf('d_format'), strtotime($value)); - $news_date = ' ('. $value; - // get month and year to compare with $archive_options['date'] - if(isset($archive_options['date']) && ($archive_options['date'] !== date('m.Y',strtotime($value)))) break; - $aFlag = true; - } - // head has to be before the link in the template ! - elseif($key=='head'){ - $news_head = trim($value); - } - elseif($key=='subtitle'){ - $news_subtitle = '
'.trim($value).''.NL; - } - elseif($key=='link'){ - $news_head = ''. trim($news_head) .''.NL; - } - elseif($key=='author'){ - $news_date .= ', '. $value; - } - elseif(($key=='tags') && (isset($archive_options['tag']) !== false)) { -// echo $value.'
'; - $tags = explode(',',$value); - foreach($tags as $tag) { - if(($tag!==false) && (stripos($archive_options['tag'],trim($tag))!==false)){ - $tag_flag = true; - break; - } - } - } - } - - $news_date .= ')
'.NL; - - if((isset($archive_options['tag']) === false) || (strlen($archive_options['tag']) <2)) $tag_flag = true; - - if (($aFlag === true) && ($tag_flag === true)) { - //stop adding older news articles if quantity is reached -// echo intval($archive_options['qty']).' >= '.$qty.'
'; - $qty++; - if(($qty > intval($archive_options['qty'])) && ($archive_options['qty']!=='all')) break; - - // list all news stories as headline linked to the story itself - $elt = explode(",",$news_date); - $elt[0] = trim(strip_tags(str_replace('(','',$elt[0]))); - $elt[0] = date('F,Y',strtotime($elt[0])); - list($new_month,$new_year) = explode(',',$elt[0]); - - // idea is that all stories are created one after the other - // and the order within newsdata is according the start date - // manipulation of Start/Perishing date possible but not expected - // !!! There is no sort algorithm for year and month implemented !!! - // to do such would lead into re-development of the plugin - if(($old_year !== $new_year) && (($archive_options['class']==='page') || ($archive_options['ho']==='off'))) { - if(trim($old_year) !== '') $close_ytag = "".NL; - $output .= $close_ytag.'