diff --git a/public_html/lib/plugins/anewssystem/INFO b/public_html/lib/plugins/anewssystem/INFO index 56ee566a..a958054a 100644 --- a/public_html/lib/plugins/anewssystem/INFO +++ b/public_html/lib/plugins/anewssystem/INFO @@ -2,7 +2,7 @@ author Taggic email taggic@t-online.de -date 2015-02-11 +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/VERSION b/public_html/lib/plugins/anewssystem/VERSION index 27766603..366c2347 100644 --- a/public_html/lib/plugins/anewssystem/VERSION +++ b/public_html/lib/plugins/anewssystem/VERSION @@ -1 +1 @@ -2015-02-11 \ No newline at end of file +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 index 14a85378..1137e0a1 100644 --- a/public_html/lib/plugins/anewssystem/action.php +++ b/public_html/lib/plugins/anewssystem/action.php @@ -24,7 +24,7 @@ class action_plugin_anewssystem extends DokuWiki_Action_Plugin { return array( 'author' => 'Taggic', 'email' => 'Taggic@t-online.de', - 'date' => '2013-02-19', + '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', @@ -33,7 +33,7 @@ class action_plugin_anewssystem extends DokuWiki_Action_Plugin { /****************************************************************************** ** Register its handlers with the dokuwiki's event controller */ - function register(&$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()); } @@ -219,14 +219,7 @@ class action_plugin_anewssystem extends DokuWiki_Action_Plugin { $backlink = ''.$this->getLang('lnk_back').''; $backlink .= '  |  '.$this->getLang('allnews').' »'; - $output = ''.NL. - ' -
'.$backlink.'

'.NL. + $output = '
'.$backlink.'

'.NL. '
'.$output.' diff --git a/public_html/lib/plugins/anewssystem/conf/default.php b/public_html/lib/plugins/anewssystem/conf/default.php index dbd14a18..1ed80ac0 100644 --- a/public_html/lib/plugins/anewssystem/conf/default.php +++ b/public_html/lib/plugins/anewssystem/conf/default.php @@ -9,8 +9,9 @@ $conf['news_output'] = 'news:allnewsdata'; $conf['prev_length'] = '500'; $conf['newsflash_link'] = 1; $conf['hide_anchorID'] = 1; +$conf['wysiwyg'] = 0; $conf['soapp'] = 0; // soapp = show one article per page (instead of all news) -$conf['yh_level'] = 2; // headline level for year clusetr of All News articles +$conf['yh_level'] = 2; // headline level for year cluster of All News articles $conf['mh_level'] = 3; // headline level for month clusetr of All News articles $conf['h_level'] = 4; // headline level for All News articles itself $conf['lnk_newsarchive'] = 'News Archive »'; // text for archive link diff --git a/public_html/lib/plugins/anewssystem/conf/metadata.php b/public_html/lib/plugins/anewssystem/conf/metadata.php index ab1daef3..8dc8bbbd 100644 --- a/public_html/lib/plugins/anewssystem/conf/metadata.php +++ b/public_html/lib/plugins/anewssystem/conf/metadata.php @@ -12,6 +12,7 @@ $meta['news_output'] = array('string'); $meta['prev_length'] = array('string'); $meta['newsflash_link'] = array('onoff'); $meta['hide_anchorID'] = array('onoff'); +$meta['wysiwyg'] = array('onoff'); $meta['soapp'] = array('onoff'); // soapp = show one article per page (instead of all news) $meta['yh_level'] = array('string'); // headline level for year clusetr of All News articles $meta['mh_level'] = array('string'); // headline level for month clusetr of All News articles diff --git a/public_html/lib/plugins/anewssystem/lang/de/lang.php b/public_html/lib/plugins/anewssystem/lang/de/lang.php index 0d3709c4..fc76dc88 100644 --- a/public_html/lib/plugins/anewssystem/lang/de/lang.php +++ b/public_html/lib/plugins/anewssystem/lang/de/lang.php @@ -31,3 +31,42 @@ $lang['anss_edit_imgttl']= 'Editieren'; $lang['lnk_back'] = '« zurück'; $lang['allnews'] = 'alle News-Artikel'; $lang['noNews'] = 'Keine aktuellen News-Artikel vorhanden'; +$lang['wordcount'] = '  (Wörter: " + output + " von " + max + " )'; +$lang['wordcount2'] = '  (Wörter: 0 von '; + +/******************************************************************************/ +// WYSIWYG Editor related text +$lang['Undo'] = 'Rückgängig'; +$lang['Redo'] = 'Wiederholen'; +$lang['Clean'] = 'Format löschen'; +$lang['Remove_formatting'] = 'Formatierung löschen'; + +$lang['Bold'] = 'Fett'; +$lang['Italic'] = 'Kursiv'; +$lang['Underline'] = 'Unterstrichen'; + +$lang['Font_color'] = 'Textfarbe'; +$lang['Background_color'] = 'Hintergrundfarbe'; + +$lang['Strikethrough'] = 'Durchgestrichen'; +$lang['Superscript'] = 'Hochgestellt'; +$lang['Subscript'] = 'Tiefgestellt'; + +$lang['Left_align'] = 'Linksbündig'; +$lang['Center_align'] = 'Zentriert'; +$lang['Right_align'] = 'Rechtsbündig'; +$lang['Full_align'] = 'Blocksatz'; + +$lang['Add_indentation'] = 'Einzug vergrößern'; +$lang['Delete_indentation'] = 'Einzug verkleinern'; +$lang['Numbered_list'] = 'Nummerierte Liste'; +$lang['Dotted_list'] = 'Einfache Liste'; + +$lang['H-Ruler'] = 'horizontale Trennlinie einfügen'; +$lang['Quote'] = 'Zitat'; +$lang['Code'] = 'Code'; +$lang['Hyperlink'] = 'Hyperlink einfügen'; +$lang['Unlink'] = 'Hyperlink löschen'; + +$lang['Smaller'] = 'Kleinere Schrift'; +$lang['Bigger'] = 'Größere Schrift'; \ No newline at end of file diff --git a/public_html/lib/plugins/anewssystem/lang/de/settings.php b/public_html/lib/plugins/anewssystem/lang/de/settings.php index 01278f37..0980f863 100644 --- a/public_html/lib/plugins/anewssystem/lang/de/settings.php +++ b/public_html/lib/plugins/anewssystem/lang/de/settings.php @@ -12,10 +12,11 @@ $lang['news_datafile'] = 'Pfad zum Namensraum für die Datei newsdata'; $lang['prev_length'] = 'Anzahl der in der Vorschau pro Artikel angezeigten Wörter im NewsFlash'; $lang['newsflash_link'] = 'stelle Link zum Newsflash zur Verfügung'; $lang['hide_anchorID'] = 'verstecke Anchor-ID'; +$lang['wysiwyg'] = 'WYSIWIG Editor einschalten (nutzt HTML statt DW Syntax !)'; $lang['soapp'] = 'zeige nur einen Artikel pro Seite'; // soapp = show one article per page (instead of all news) $lang['yh_level'] = 'Überschriftsebene für die Gruppierung aller News-Artikel pro Jahr'; $lang['mh_level'] = 'Überschriftsebene für die Gruppierung aller News-Artikel pro Monat'; $lang['h_level'] = 'Überschriftsebene für die News-Artikel selber'; $lang['lnk_newsarchive']= 'Text für den Archiv-Link'; -$meta['act_delim'] = 'einige Templates / DW-Versionen benötigen ein "?" statt des "&" für Action-Links'; +$lang['act_delim'] = 'einige Templates / DW-Versionen benötigen ein "?" statt des "&" für Action-Links'; $lang['convert'] = 'Link zu einem "thumbshots online service"'; \ No newline at end of file diff --git a/public_html/lib/plugins/anewssystem/lang/en/lang.php b/public_html/lib/plugins/anewssystem/lang/en/lang.php index cc40ff1e..72b197b9 100644 --- a/public_html/lib/plugins/anewssystem/lang/en/lang.php +++ b/public_html/lib/plugins/anewssystem/lang/en/lang.php @@ -31,3 +31,42 @@ $lang['anss_edit_imgttl']= 'Edit'; $lang['lnk_back'] = '« back'; $lang['allnews'] = 'all News'; $lang['noNews'] = 'No current news'; +$lang['wordcount'] = '  (word count: " + output + " of " + max + " )'; +$lang['wordcount2'] = '  (word count: 0 of '; + +/******************************************************************************/ +// WYSIWYG Editor related text +$lang['Undo'] = 'Undo'; +$lang['Redo'] = 'Redo'; +$lang['Clean'] = 'Clean'; +$lang['Remove formatting'] = 'Remove formatting'; + +$lang['Bold'] = 'Bold'; +$lang['Italic'] = 'Italic'; +$lang['Underline'] = 'Underline'; + +$lang['Font color'] = 'Font color'; +$lang['Background color'] = 'Background color'; + +$lang['Strikethrough'] = 'Strikethrough'; +$lang['Superscript'] = 'Superscript'; +$lang['Subscript'] = 'Subscript'; + +$lang['Left align'] = 'Left align'; +$lang['Center align'] = 'Center align'; +$lang['Right align'] = 'Right align'; +$lang['Full align'] = 'Full align'; + +$lang['Add indentation'] = 'Add indentation'; +$lang['Delete indentation'] = 'Delete indentation'; +$lang['Numbered list'] = 'Numbered list'; +$lang['Dotted list'] = 'Dotted list'; + +$lang['H-Ruler'] = 'H-Ruler'; +$lang['Quote'] = 'Quote'; +$lang['Code'] = 'Code'; +$lang['Hyperlink'] = 'Hyperlink'; +$lang['Unlink'] = 'Unlink'; + +$lang['Smaller'] = 'Smaller'; +$lang['Bigger'] = 'Bigger'; diff --git a/public_html/lib/plugins/anewssystem/lang/en/settings.php b/public_html/lib/plugins/anewssystem/lang/en/settings.php index 1459bc39..58e32957 100644 --- a/public_html/lib/plugins/anewssystem/lang/en/settings.php +++ b/public_html/lib/plugins/anewssystem/lang/en/settings.php @@ -12,10 +12,11 @@ $lang['news_datafile'] = 'Set the path to the namespace:newsdata file'; $lang['prev_length'] = 'Define the quantity of previewed words per news post in NewsFlash'; $lang['newsflash_link'] = 'provide News flash link'; $lang['hide_anchorID'] = 'hide Anchor ID'; +$lang['wysiwyg'] = 'use WYSIWIG Editor (uses HTML instead of DW Syntax !)'; $lang['soapp'] = 'show only one article per page'; // soapp = show one article per page (instead of all news) $lang['yh_level'] = 'headline level for year cluster of All News articles'; $lang['mh_level'] = 'headline level for month cluster of All News articles'; $lang['h_level'] = 'headline level for All News articles itself'; $lang['lnk_newsarchive']= 'text for archive link'; -$meta['act_delim'] = 'some templates / dw-version use questionmark instead of ampersand at action links'; +$lang['act_delim'] = 'some templates / dw-version use questionmark instead of ampersand at action links'; $lang['convert'] = 'Link a thumbshots online service'; \ No newline at end of file diff --git a/public_html/lib/plugins/anewssystem/lang/it/settings.php b/public_html/lib/plugins/anewssystem/lang/it/settings.php index 3d0d05f3..0d07c3bf 100644 --- a/public_html/lib/plugins/anewssystem/lang/it/settings.php +++ b/public_html/lib/plugins/anewssystem/lang/it/settings.php @@ -4,6 +4,7 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Diego Pierotto + * extensions translated by help of Google translater */ // for the configuration manager @@ -12,6 +13,11 @@ $lang['news_datafile'] = 'Imposta il percorso del file namespace:newsdata'; $lang['prev_length'] = 'Definisci la quantità di parole disponibili per la notizia'; $lang['newsflash_link'] = 'Crea collegamento NOVITA\''; $lang['hide_anchorID'] = 'Nascondi ID collegamento'; -$lang['h_level'] = 'Livello di titolo '; +$lang['wysiwyg'] = 'Utilizzare WYSIWIG Editor (usa HTML invece di DW Syntax!)'; $lang['soapp'] = 'Visualizzare solo un elemento, invece di tutti (-> tutte le news)'; +$lang['yh_level'] = 'Livello del titolo per l´anno insieme di tutti gli articoli'; +$lang['mh_level'] = 'Livello del titolo per il mese insieme di tutti gli articoli'; +$lang['h_level'] = 'Livello di titolo '; +$lang['lnk_newsarchive']= 'testo per il link archivio'; +$lang['act_delim'] = 'alcuni modelli / DW-version utilizzo interrogativo invece di commerciale a collegamenti azione'; $lang['convert'] = 'Collegare un servizio on-line Thumbshots'; \ No newline at end of file diff --git a/public_html/lib/plugins/anewssystem/plugin.info.txt b/public_html/lib/plugins/anewssystem/plugin.info.txt index 2543badf..0e4efa52 100644 --- a/public_html/lib/plugins/anewssystem/plugin.info.txt +++ b/public_html/lib/plugins/anewssystem/plugin.info.txt @@ -3,7 +3,7 @@ base anewssystem author Taggic email taggic@t-online.de -date 2015-02-11 +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/style.css b/public_html/lib/plugins/anewssystem/style.css index 4d5376ac..47ff2885 100644 --- a/public_html/lib/plugins/anewssystem/style.css +++ b/public_html/lib/plugins/anewssystem/style.css @@ -350,4 +350,89 @@ li.newslist { background: #EEEDFF; border-radius: 4px; padding: 0.25em 0 0.25em 1em; - } \ No newline at end of file + } + +.anss_intLink { + cursor: pointer; + } +img.anss_intLink { + border: 0; + margin-bottom: 3px; + margin-left: 1px; + margin-right: 1px; + } + + img.anss_intLink:hover { + background: rgb(255,255,204); + border: 1px dotted rgb(204,0,51); + margin-bottom: 1px; + margin-left: 0px; + margin-right: 0px; + } + +.anss_textBox { + background: rgb(255,255,255); + min-height: 200px; + border: 1px lightgrey solid; + padding: 12px; + overflow: scroll; + font-size:12pt; + font-family:Calibri; +} + +.anss_textBox p, ul, ol, dl, pre, table, hr, blockquote, figure, details, fieldset, address { + margin: 0; +} + +.anss_textBox #sourceText { + padding: 0; + margin: 0; + min-width: 498px; + min-height: 200px; +} + +.anss_textBox blockquote { + margin: 0 0 0 4em; + border: 0; +} + +.anss_textBox blockquote.ans_cite { + background: rgb(255,255,204); + border: 1px dotted rgb(192,192,192); + Border-left: 5px solid rgb(192,192,192); + border-radius: 5px; + margin: 0.5em 10px; + padding: 0.5em 10px; + font-style: italic; + box-shadow: 5px 4px 5px rgba(0, 0, 0, 0.2); + +} +.anss_textBox blockquote.ans_cite:before { + content: '\00BB'; + color: #ccc; + background: rgb(255,255,204,0); + font-size: 2em; + line-height: 0.1em; + margin-right: 0.25em; + margin-left:-8px; + +} + +.anss_textBox blockquote.ans_cite p { + background: rgb(255,255,204); + display: inline; + border-radius: 0px 5px 5px 0px; +} + +.anss_textBox code { + margin: 3px 3px 3px 0 !important; + padding: 3px !important; + border: 1px dotted #b0b0b0; + font-size: inherit; + line-height: inherit; + font-weight: normal !important; + position: relative; + float: none; + border-radius: 4px 4px 4px 4px; + box-shadow: 3px 3px 5px 2px #CCCCCC; +} diff --git a/public_html/lib/plugins/anewssystem/syntax.php b/public_html/lib/plugins/anewssystem/syntax.php index 689125ab..01bcd081 100644 --- a/public_html/lib/plugins/anewssystem/syntax.php +++ b/public_html/lib/plugins/anewssystem/syntax.php @@ -43,7 +43,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { /******************************************************************************/ /* handle the match */ - function handle($match, $state, $pos, &$handler) { + function handle($match, $state, $pos,Doku_Handler &$handler) { global $ID, $conf; $match = substr($match,strlen('{{anss>'),-2); //strip markup from start and end @@ -71,7 +71,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { /* render output * @author Taggic */ - function render($mode, &$renderer, $ans_conf) { + function render($mode,Doku_Renderer &$renderer, $ans_conf) { global $ID, $conf; $xhtml_renderer = new Doku_Renderer_xhtml(); $records = file(DOKU_PLUGIN.'anewssystem/tpl/newstemplate_'.$conf['lang'].'.txt'); @@ -155,30 +155,14 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { // 2. create input form based on template if ($ans_conf['param']==='author') { - $output .= ''; - + if($this->getConf('wysiwyg')==true) { $myFunc = 'onsubmit="myFunction()"'; } $output .= '
-
'.NL; + '.NL; $output .= ''.NL; + + foreach ($records as $record) { $fields = explode('|',$record); if (trim($fields[1]) == "textarea") { @@ -186,20 +170,181 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { $output .= '
'; + if($this->getConf('wysiwyg')==false) { + $output .= $this->news_edit_toolbar('news_input_'.trim($fields[0])); + $imgBASE = DOKU_BASE."lib/plugins/anewssystem/images/toolbar/"; + $output .= ' + + + +

'.NL; + } + else { + $ansTBox_ID ='anss_textBox_'.trim($fields[0]); + $template = file_get_contents(DOKU_PLUGIN.'anewssystem/tpl/newstemplate.txt'); + $FontRecords = file(DOKU_PLUGIN.'anewssystem/tpl/fonts.txt'); + foreach ($FontRecords as $FontDef) { + // $Font = font-family + $Font = explode(',', $FontDef); + $Font[0] = trim($Font[0]); // font-family + $Font[1] = trim($Font[1]); // font + $fontOptions .= ''.NL; + } + + $output .= ''.NL; + $output .= ' + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +
'.NL; } + + - $output .= $this->news_edit_toolbar('news_input_'.trim($fields[0])); - - $imgBASE = DOKU_BASE."lib/plugins/anewssystem/images/toolbar/"; - $output .= ' - - - -

'.NL; } else if (trim($fields[0]) == "anchor") { @@ -296,9 +441,204 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { $output .= ''.NL; + + if($this->getConf('wysiwyg')==true) { + $output .= ''.NL; + } $output .= '
'; // 3. check if path/file exist on save click // 4. add the new post before the existing (e.g. news:newsdata.txt) @@ -350,6 +690,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { // split news block into line items $temp_array = explode("\n * ",$entry); unset($temp_array[0]); + $wysiwyg = false; // 2. create preview output // split line items into key and data @@ -370,6 +711,9 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { elseif(($key=='stop') && strtotime(trim($value)) > time()) { $bFlag = true; } + elseif($key=='wysiwyg'){ + $wysiwyg = 1; + } elseif($key=='text'){ if($bFlag !== true) break; // replace media links @@ -398,7 +742,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { $links = $this->replace_placeholder($links, $prvw_string, 'url'); $linkx = $this->replace_placeholder($linkx, $prvw_string, 'medi'); - $prvw_string = p_render('xhtml',p_get_instructions($prvw_string),$info); + if ($wysiwyg==false) $prvw_string = p_render('xhtml',p_get_instructions($prvw_string),$info); $preview_string = '' . $prvw_string .''. NL; } // head has to be before the link in the template ! @@ -618,6 +962,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { elseif ((strpos($ans_conf['param'], 'allnews')!== false)) { // check if page ID was called with tag filter $tmp = ','.$_GET['tag']; // this will overrule the page syntax setting + $info = array(); if(strlen($tmp)<2) { // strip parameter to get set of add parameter // there exist either 'tag' or 'anchor', never both at the same time @@ -654,6 +999,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { // split news block into line items $temp_array = explode("\n * ",$entry); unset($temp_array[0]); + $wysiwyg = false; // 2. create output // split line items into key and data @@ -677,6 +1023,9 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { elseif(($key=='stop') && strtotime(trim($value)) > time()) { $bFlag = true; } + elseif($key=='wysiwyg'){ + $wysiwyg = 1; + } elseif($key=='text'){ // replace media links $linkx = array(); @@ -708,7 +1057,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { $links = $this->replace_placeholder($links, $prvw_string, 'url'); $linkx = $this->replace_placeholder($linkx, $prvw_string, 'medi'); - $prvw_string = p_render('xhtml',p_get_instructions($prvw_string),$info); + if ($wysiwyg==false) $prvw_string = p_render('xhtml',p_get_instructions($prvw_string),$info); $preview_string = '' . $prvw_string .''. NL; } // head has to be before the link in the template ! @@ -795,14 +1144,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { $backlink = ''.$this->getLang('lnk_back').''; $backlink .= '  |  '.$this->getLang('allnews').''; - $output = ' - -
'.$backlink.NL. + $output = '
'.$backlink.NL. ' | '.$archive_lnkTitle.'

'.NL. '
'. $output. @@ -825,13 +1167,15 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { } /* --- Show archive ----------------------------------------------------------*/ elseif ((strpos($ans_conf['param'], 'archive')!== false)) { - // 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) - + // 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) + // p_signs ... number of previewed signs of the article + // cws ... define if less simple styling to be kept (or none if the parameter is missing) + // check if page ID was called with tag filter // $tmp .= ','.$_GET['tag']; // this will overrule the page syntax setting if(strlen($tmp)<2) { @@ -897,6 +1241,12 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { elseif($key=='link'){ $news_head = ''. trim($news_head) .''.NL; } + elseif($key=='wysiwyg'){ + $news_wysiwyg = $value; + } + elseif($key=='text'){ + $news_content = $value; + } elseif($key=='author'){ $news_date .= ', '. $value; } @@ -946,8 +1296,19 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { if($archive_options['ho']==='on') $news_date=''; else $news_date .= '
'; - if(($archive_options['tag']!==false) && ($archive_options['tag']!=='off') && ($archive_options['class']=='page')) $output .= '
'.trim($news_date).$news_head.$news_subtitle.'
'.NL; - else $output .= '
  • '.trim($news_date).$news_head.'
'.NL; + if (($archive_options['p_signs'] !== false) && ((int)$archive_options['p_signs'] >2)) { + if ((int)$news_wysiwyg==false) $news_content = p_render('xhtml',p_get_instructions($news_content),$info); + // cws ... content with style syntax parameter + // strip all HTML-tags except a few selected + if ($archive_options['cws'] == false) $news_content = strip_tags($news_content, '
'); + elseif ((int)$archive_options['cws'] <2 && ($archive_options['cws'] !== false)) $news_content = strip_tags($news_content, '
    '); + + $news_content = "
    ".'' . trim(substr($news_content,0,(int)$archive_options['p_signs'])).' ...'.NL; + } + else $news_content=""; + + if(($archive_options['tag']!==false) && ($archive_options['tag']!=='off') && ($archive_options['class']=='page')) $output .= '
    '.trim($news_date).$news_head.$news_subtitle.$news_content.'
    '.NL; + else $output .= '
    • '.trim($news_date).$news_head.$news_content.'
    '.NL; $close_ytag = ""; $close_mtag = ""; @@ -955,6 +1316,8 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { $news_date = ""; $news_head = ""; $news_subtitle = ""; + $news_wysiwyg = false; + $news_content = ""; $tags = ""; } } @@ -991,7 +1354,8 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin {
'.NL.NL; } elseif($archive_options['class']=='box') { - $output = '
+ + $output = '
    '.$output.'
@@ -1161,6 +1525,17 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { textarea.scrollLeft = scrollLeft; } } + + function count_chars(obj, max) { + var data = obj.innerHTML; + var extract = data.split(" "); + var bextract = data.split("\n"); + var cextract = extract.length + bextract.length -1; + if(cextract>max) output = \'\' + cextract + \'\'; + else output = cextract; + document.getElementById("nws_charcount").innerHTML = "'.$this->getLang('wordcount').'" + } + '; $news_edit_tb .= '
'.NL; $news_edit_tb .= "".NL; diff --git a/public_html/lib/plugins/anewssystem/tpl/fonts.txt b/public_html/lib/plugins/anewssystem/tpl/fonts.txt new file mode 100644 index 00000000..613d5238 --- /dev/null +++ b/public_html/lib/plugins/anewssystem/tpl/fonts.txt @@ -0,0 +1,30 @@ +Arial,Arial +Arial Black,Arial Black +Arial Narrow,Arial Narrow +Arial Unicode MS,Arial Unicode MS +Bookman Old Style,Bookman Old Style +Calibri,Calibri +Cambria,Cambria +Century,Century +Century Gothic,Century Gothic +Comic Sans,Comic Sans +Consolas,Consolas +Courier,Courier +Courier New,Courier New +Georgia,Georgia +Helvetica,Helvetica +Impact,Impact +Lucida,Lucida +Monotype,Monotype +MS Serif,MS Serif +MS Sans Serif,MS Sans Serif +Terminal,Symbol +Tahoma,Tahoma +Terminal,Terminal +Times New Roman,Times New Roman +Trebuchet,Trebuchet +Verdana,Verdana +Terminal,Webdings +Terminal,Wingdings +Terminal,Wingdings 2 +Terminal,Wingdings 3 \ No newline at end of file