beber pushed a commit to branch master. http://git.enlightenment.org/website/www.git/commit/?id=2a83f951ec3d16f640b3128a2257f0951646d241
commit 2a83f951ec3d16f640b3128a2257f0951646d241 Author: Bertrand Jacquin <[email protected]> Date: Sun Oct 15 04:52:26 2017 +0100 MEDIUM: Update plugin anewssystem to v2016-06-02 --- public_html/lib/plugins/anewssystem/INFO | 2 +- public_html/lib/plugins/anewssystem/VERSION | 2 +- public_html/lib/plugins/anewssystem/action.php | 13 +- .../lib/plugins/anewssystem/conf/default.php | 3 +- .../lib/plugins/anewssystem/conf/metadata.php | 1 + .../lib/plugins/anewssystem/lang/de/lang.php | 39 ++ .../lib/plugins/anewssystem/lang/de/settings.php | 3 +- .../lib/plugins/anewssystem/lang/en/lang.php | 39 ++ .../lib/plugins/anewssystem/lang/en/settings.php | 3 +- .../lib/plugins/anewssystem/lang/it/settings.php | 8 +- .../lib/plugins/anewssystem/plugin.info.txt | 2 +- public_html/lib/plugins/anewssystem/style.css | 87 +++- public_html/lib/plugins/anewssystem/syntax.php | 487 ++++++++++++++++++--- public_html/lib/plugins/anewssystem/tpl/fonts.txt | 30 ++ 14 files changed, 645 insertions(+), 74 deletions(-) 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 [email protected] -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' => '[email protected]', - '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 = '<a href="javascript:history.back(-1)">'.$this->getLang('lnk_back').'</a>'; $backlink .= '<span class="anss_sep"> | </span> <a href="'.DOKU_URL.'doku.php?id='.$this->getConf('news_output').'">'.$this->getLang('allnews').' »</a>'; - $output = '<script type="text/javascript" src="backlink.js"></script>'.NL. - '<SCRIPT TYPE="text/javascript"> - <!-- - var gb = new backlink(); - gb.write(); - //--> - </SCRIPT> - <div class="backlinkDiv" style="font-size:.85em;">'.$backlink.'</div><br />'.NL. + $output = '<div class="backlinkDiv" style="font-size:.85em;">'.$backlink.'</div><br />'.NL. '<div class="archive_section" id="news_archive_head" style="'.$archive_options['style'].'"> <div id="news_items"> '.$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 <[email protected]> + * 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 [email protected] -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 <[email protected]> */ - 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 .= '<span><script type="text/javascript"> - function count_chars(obj, max) { - var data = obj.value; - var extract = data.split(" "); - var bextract = data.split("\n"); - var cextract = extract.length + bextract.length -1; - if(cextract>max) output = \'<span style="color:red;">\' + cextract + \'</span>\'; - else output = cextract; - document.getElementById("nws_charcount").innerHTML = "'.$this->getLang('wordcount').'" - } - - function resizeBoxId(obj,size) { - var arows = document.getElementById(obj).rows; - document.getElementById(obj).rows = arows + size; - } - </script></span>'; - + if($this->getConf('wysiwyg')==true) { $myFunc = 'onsubmit="myFunction()"'; } $output .= '<div class="news_form_div"> - <form class="news_input_form" id="'.$prefix.'" - method="POST" - >'.NL; + <form class="news_input_form" id="'.$prefix.'" name="'.$prefix.'" method="POST" '.$myFunc.'>'.NL; $output .= '<input type="hidden" name="xs-'.$prefix.'" value="check" />'.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 .= '<label class="nws_charcount" id="nws_charcount" name="nws_charcount">'.$this->getLang('wordcount2').$this->getConf('prev_length').' )</label><br />'; + if($this->getConf('wysiwyg')==false) { + $output .= $this->news_edit_toolbar('news_input_'.trim($fields[0])); + $imgBASE = DOKU_BASE."lib/plugins/anewssystem/images/toolbar/"; + $output .= '<textarea class="news_input_textarea"'. + ' id="news_input_'.trim($fields[0]).'"'. + ' name="news_input_'.trim($fields[0]).'"'. + ' title="'.trim($this->getLang(trim($fields[5]))).'" '.trim($fields[2]).'"'. + ' onkeyup="count_chars(this,'.$this->getConf('prev_length').')" >'. + '</textarea> + <span class="reply_close_link"> + <a href="javascript:resizeBoxId(\'news_input_'.trim($fields[0]).'\', -20)"><img src="'.$imgBASE.'reduce.png" title="reduce textarea" style="float:right;" /></a> + <a href="javascript:resizeBoxId(\'news_input_'.trim($fields[0]).'\', +20)"><img src="'.$imgBASE.'enlarge.png" title="enlarge textarea" style="float:right;" /></a> + </span></p>'.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 .= '<option style="font-family:'.$Font[0].';" value="'.$Font[1].'" title="'.$Font[1].'" onclick="formatDoc(\'fontName\',\''.$Font[1].'\')">'.$Font[1].'</option>'.NL; + } + + $output .= '<input type="hidden" name="news_input_wysiwyg" value="1" />'.NL; + $output .= '<input type="hidden" id="news_input_text" name="news_input_text"> + + <div style="border: 1px dotted grey;padding-left:10px;border-radius:3px 3px 0px 0px;padding-top:4px;padding-bottom:2px;"> + + <div id="toolBar2" style="margin-top:3px;"> + <img class="anss_intLink" title="'.$this->getLang("Undo").'" onclick="formatDoc(\'undo\');" src="data:image/gif;base64,R0lGODlhFgAWAOMKADljwliE33mOrpGjuYKl8aezxqPD+7/I19DV3NHa7P///////////////////////yH5BAEKAA8ALAAAAAAWABYAAARR8MlJq7046807TkaYeJJBnES4EeUJvIGapWYAC0CsocQ7SDlWJkAkCA6ToMYWIARGQF3mRQVIEjkkSVLIbSfEwhdRIH4fh/DZMICe3/C4nBQBADs=" /> + <img class="anss_intLink" title="'.$this->getLang("Redo").'" onclick="formatDoc(\'redo\');" src="data:image/gif;base64,R0lGODlhFgAWAMIHAB1ChDljwl9vj1iE34Kl8aPD+7/I1////yH5BAEKAAcALAAAAAAWABYAAANKeLrc/jDKSesyphi7SiEgsVXZEATDICqBVJjpqWZt9NaEDNbQK1wCQsxlYnxMAImhyDoFAElJasRRvAZVRqqQXUy7Cgx4TC6bswkAOw==" /> + <img class="anss_intLink" title="'.$this->getLang("Clean").'" onclick="oDoc.innerHTML=sDefTxt;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC41ZYUyZQAAAjxJREFUSEu1k9tvEkEYxfv/mhgTEx9MGrVa9cE0plotEEIUxeCDFJuaiijXLpQ7hJBFIIRwk9tyJxgvx/mWYJmdTXkQH37Z7NlzTna+mdkC8F/QFTeBrriOfjiFwu4zFO4dQAklmSR6BGEdVPSVFf46PcfvjxHIO0/QkxLsE+/jXtahsAIq+nkiofv [...] + <img class="anss_intLink" title="'.$this->getLang("Remove_formatting").'" onclick="formatDoc(\'removeFormat\')" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9oECQMCKPI8CIIAAAAIdEVYdENvbW1lbnQA9syWvwAAAuhJREFUOMtjYBgFxAB501ZWBvVaL2nHnlmk6mXCJbF69zU+Hz/9fB5O1lx+bg45qhl8/fYr5it3XrP/YWTUvvvk3VeqGXz70TvbJy8+Wv39+2/Hz19/mGwjZzuTYjALuoBv9jImaXHeyD3 [...] + + <img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC41ZYUyZQAAAFVJREFUSEvtzDEKAEEIQ9G5/8UUwcITuamsfrFTTGfxCCSQ092/uLuCN4IlMTMFbwRL8uw4IhS8ESzJHo89Hns89nhkpoI3giWpKgVvBEuyx+PuuM8HbRKvOi5p1GMAAAAASUVORK5CYII=" /> + <img class="anss_intLink" title="'.$this->getLang("Bold").'" onclick="formatDoc(\'bold\');" src="data:image/gif;base64,R0lGODlhFgAWAID/AMDAwAAAACH5BAEAAAAALAAAAAAWABYAQAInhI+pa+H9mJy0LhdgtrxzDG5WGFVk6aXqyk6Y9kXvKKNuLbb6zgMFADs=" /> + <img class="anss_intLink" title="'.$this->getLang("Italic").'" onclick="formatDoc(\'italic\');" src="data:image/gif;base64,R0lGODlhFgAWAKEDAAAAAF9vj5WIbf///yH5BAEAAAMALAAAAAAWABYAAAIjnI+py+0Po5x0gXvruEKHrF2BB1YiCWgbMFIYpsbyTNd2UwAAOw==" /> + <img class="anss_intLink" title="'.$this->getLang("Underline").'" onclick="formatDoc(\'underline\');" src="data:image/gif;base64,R0lGODlhFgAWAKECAAAAAF9vj////////yH5BAEAAAIALAAAAAAWABYAAAIrlI+py+0Po5zUgAsEzvEeL4Ea15EiJJ5PSqJmuwKBEKgxVuXWtun+DwxCCgA7" /> + + <img title="'.$this->getLang("Font_color").'" id="hoveritem1" onMouseOver="ShowPopup(\'hoveritem1\', \'hoverpopup1\');" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC41ZYUyZQAAAlxJREFUSEu1kktIVFEchyWwiKSnUQgZgT0WURJlBGELy0WEQRFhi0gJctNCCxIjrMmIgh4DGfYyiBRSkkIaIwNfleAjjagUk0lzNF/Z4MxEZvfrf+fOXO/N06pp8Z3Hd37nf8493Cjgv6CUkUAp/0qHdDqqtT9Qyml [...] + <div id="hoverpopup1" style="visibility:hidden; position:absolute;" > + <table> + <tr><td> + <img usemap="#fcolor_pallete" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAABLCAYAAACx+i/GAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAKKSURBVHhe7drBitNQGMXxZOgriGVWZXwGBVcJunEvUt/ApR1059rdQOty3sAi7gVRblaCPoNDV1LxFcrEfuUiHtP75UI2wfn/IJBLwpkGDtPm8pXL5Yu2AKJDIRaLi7jETbZavSxO4jlwQCEgKATE0d8QTdPEszxVVcUz9b/mmDFmDc2x3xCFFeJfIYR41s+7167t/07W0Zezvynr6M1p9/dlHF6Osevl/r6cIyfryKMcPbysw7XiY9ZxLMe6wFcGBIWAoBAQFAKCQkBQCAgKAUEhI [...] + </td></tr></table></div> + + <img title="'.$this->getLang("Background_color").'" id="hoveritem2" onMouseOver="ShowPopup(\'hoveritem2\', \'hoverpopup2\');" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC41ZYUyZQAAAihJREFUSEu1lE9Ik3EYx0eXLh2iW5fAQ6cOHio6F0EdokNihARRStCgXTosLPvDIoIaSB6yDq4FJTIrsz9rasNqIgUrXqdr6XSbbXOzOTdL59zYp5/vsvm217+tw+d5n+f7fL/P7fdqgP+CqlgKVMW14veFx [...] + <div id="hoverpopup2" style="visibility:hidden; position:absolute;" > + <table> + <tr><td> + <img usemap="#bgcolor_pallete" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAABLCAYAAACx+i/GAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAKKSURBVHhe7drBitNQGMXxZOgriGVWZXwGBVcJunEvUt/ApR1059rdQOty3sAi7gVRblaCPoNDV1LxFcrEfuUiHtP75UI2wfn/IJBLwpkGDtPm8pXL5Yu2AKJDIRaLi7jETbZavSxO4jlwQCEgKATE0d8QTdPEszxVVcUz9b/mmDFmDc2x3xCFFeJfIYR41s+7167t/07W0Zezvynr6M1p9/dlHF6Osevl/r6cIyfryKMcPbysw7XiY9ZxLMe6wFcGBIWAoBAQFAKCQkBQCAgKAUEh [...] + </td></tr></table></div> + + <img class="anss_intLink" title="'.$this->getLang("Strikethrough").'" onclick="formatDoc(\'strikethrough\');" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAQCAYAAAAMJL+VAAAABGdBTUEAAK/INwWK6QAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAA30lEQVQ4T2P4//8/Ay0xTQ0HOXxwWBAbGysYGBg409HRMU1PT69cXl5+Jicn525igpYoH3h5eb2zs7MrhxnIxsZWzgD2POH4I2iBu7t7mqGh4X8NDY0OZAOBFlDHByYmJi7AIPnPz88PjDGGmUBsDI48BgYXqvgAZAgovEFBg [...] + <img class="anss_intLink" title="'.$this->getLang("Superscript").'" onclick="formatDoc(\'superscript\');" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAQCAYAAAAMJL+VAAAABGdBTUEAAK/INwWK6QAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAA9UlEQVQ4T7WTLQ7CQBCFV6ARtfUIBA5LQCA4QxEILBK7Z8BwgZ4FgW44AYoj1G3fbGbIiG67y9ImL/1J+72ZeVPjnDNTKgu+Nc8CekEOuvYVmmtwBPgGlWSSZGCMqSEHtdCcPsaxVs8WAgR8DzWpBiXDiXxmgwcb+HsSwEuohXZJB [...] + <img class="anss_intLink" title="'.$this->getLang("Subscript").'" onclick="formatDoc(\'subscript\');" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAQCAYAAAAMJL+VAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAA9UlEQVQ4T8WTIQ7CQBBFR6AR2HoEAoclQSA4QxEILBLbcAQMF+hZOEHDCVAcoW75s/kLK9rubEKD+Gm7bf6b+TMV55yMqVHNtfD/AUSkhlCCtNDUVyOyis7mlmh7O4BRQXN1PhJwJ8A/WzT4EcwONHzhWvK+thiHb1KACUxD1drJE5r9D [...] + + <img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC41ZYUyZQAAAFVJREFUSEvtzDEKAEEIQ9G5/8UUwcITuamsfrFTTGfxCCSQ092/uLuCN4IlMTMFbwRL8uw4IhS8ESzJHo89Hns89nhkpoI3giWpKgVvBEuyx+PuuM8HbRKvOi5p1GMAAAAASUVORK5CYII=" /> + + <img class="anss_intLink" title="'.$this->getLang("Left_align").'" onclick="formatDoc(\'justifyleft\');" src="data:image/gif;base64,R0lGODlhFgAWAID/AMDAwAAAACH5BAEAAAAALAAAAAAWABYAQAIghI+py+0Po5y02ouz3jL4D4JMGELkGYxo+qzl4nKyXAAAOw==" /> + <img class="anss_intLink" title="'.$this->getLang("Center_align").'" onclick="formatDoc(\'justifycenter\');" src="data:image/gif;base64,R0lGODlhFgAWAID/AMDAwAAAACH5BAEAAAAALAAAAAAWABYAQAIfhI+py+0Po5y02ouz3jL4D4JOGI7kaZ5Bqn4sycVbAQA7" /> + <img class="anss_intLink" title="'.$this->getLang("Right_align").'" onclick="formatDoc(\'justifyright\');" src="data:image/gif;base64,R0lGODlhFgAWAID/AMDAwAAAACH5BAEAAAAALAAAAAAWABYAQAIghI+py+0Po5y02ouz3jL4D4JQGDLkGYxouqzl43JyVgAAOw==" /> + <img class="anss_intLink" title="'.$this->getLang("Full_align").'" onclick="formatDoc(\'justifyfull\');" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAQCAYAAAAMJL+VAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC41ZYUyZQAAAFlJREFUOE+1ziEOADEQQtHe/9LTxU0Aw4aKZ74gnJl5ysYmG5t8/PIfvAMS2nxcrxK8AxLafFyvErwDEtp8XK8SvAMS2nxcrxK8AxLafFyvErwDEtps7JlzAcY81FZTtdiRAAAAAElFTkSuQmCC"> + + <br /> + + <img class="anss_intLink" title="'.$this->getLang("Add_indentation").'" onclick="formatDoc(\'indent\');" src="data:image/gif;base64,R0lGODlhFgAWAOMIAAAAADljwl9vj1iE35GjuaezxtDV3NHa7P///////////////////////////////yH5BAEAAAgALAAAAAAWABYAAAQ7EMlJq704650B/x8gemMpgugwHJNZXodKsO5oqUOgo5KhBwWESyMQsCRDHu9VOyk5TM9zSpFSr9gsJwIAOw==" /> + <img class="anss_intLink" title="'.$this->getLang("Delete_indentation").'" onclick="formatDoc(\'outdent\');" src="data:image/gif;base64,R0lGODlhFgAWAMIHAAAAADljwliE35GjuaezxtDV3NHa7P///yH5BAEAAAcALAAAAAAWABYAAAM2eLrc/jDKCQG9F2i7u8agQgyK1z2EIBil+TWqEMxhMczsYVJ3e4ahk+sFnAgtxSQDqWw6n5cEADs=" /> + <img class="anss_intLink" title="'.$this->getLang("Numbered_list").'" onclick="formatDoc(\'insertorderedlist\');" src="data:image/gif;base64,R0lGODlhFgAWAMIGAAAAADljwliE35GjuaezxtHa7P///////yH5BAEAAAcALAAAAAAWABYAAAM2eLrc/jDKSespwjoRFvggCBUBoTFBeq6QIAysQnRHaEOzyaZ07Lu9lUBnC0UGQU1K52s6n5oEADs=" /> + <img class="anss_intLink" title="'.$this->getLang("Dotted_list").'" onclick="formatDoc(\'insertunorderedlist\');" src="data:image/gif;base64,R0lGODlhFgAWAMIGAAAAAB1ChF9vj1iE33mOrqezxv///////yH5BAEAAAcALAAAAAAWABYAAAMyeLrc/jDKSesppNhGRlBAKIZRERBbqm6YtnbfMY7lud64UwiuKnigGQliQuWOyKQykgAAOw==" /> + + <img class="anss_intLink" title="'.$this->getLang("H-Ruler").'" onclick="formatDoc(\'inserthorizontalrule\');" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAQCAYAAAAMJL+VAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAPNJREFUOE9j+P//PwMtMU0NBzkcpwXl5eX/YbikpOR/Xl7e/7S0tP8xMTH/g4KC/ru7u/+3sbH5b2Bg8F9VVRVoFvaQGDgfEONqaWnp/4KCgv85OTkHoQ9whTXU1X+Arj5KTOobmDho2/By76LD7/5j [...] + <img class="anss_intLink" title="'.$this->getLang("Quote").'" onclick="makeCite();" src="data:image/gif;base64,R0lGODlhFgAWAIQXAC1NqjFRjkBgmT9nqUJnsk9xrFJ7u2R9qmKBt1iGzHmOrm6Sz4OXw3Odz4Cl2ZSnw6KxyqO306K63bG70bTB0rDI3bvI4P///////////////////////////////////yH5BAEKAB8ALAAAAAAWABYAAAVP4CeOZGmeaKqubEs2CekkErvEI1zZuOgYFlakECEZFi0GgTGKEBATFmJAVXweVOoKEQgABB9IQDCmrLpjETrQQlhHjINrTq/b7/i8fp8PAQA7" /> + <img class="anss_intLink" title="'.$this->getLang("Code").'" onclick="makeCode();" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC41ZYUyZQAAARBJREFUSEu1kqGRhTAQhpFIJGVQAoICKAFBAUgcJSAogEIQCCQCgUAgkEgEBezt5s3eS16WmTdze+IL8P3JboAEAPAviFIDUWogSg1EqYEoNRAls20bXny/ritefG8jymVZIM9zTAM4jgOVm5dlCXEcQ9u2XsY4D3bBMAyBCtg5M00TJEli5j01MAPtigtGUQR1XcN5 [...] + <img class="anss_intLink" title="'.$this->getLang("Hyperlink").'" onclick="var sLnk=prompt(\'Write the URL here\',\'http:\/\/\');if(sLnk&&sLnk!=\'\'&&sLnk!=\'http://\'){formatDoc(\'createlink\',sLnk)}" src="data:image/gif;base64,R0lGODlhFgAWAOMKAB1ChDRLY19vj3mOrpGjuaezxrCztb/I19Ha7Pv8/f///////////////////////yH5BAEKAA8ALAAAAAAWABYAAARY8MlJq7046827/2BYIQVhHg9pEgVGIklyDEUBy/RlE4FQF4dCj2AQXAiJQDCWQCAEBwIioEMQBgSAFhDAGghGi9XgHAhMNoSZgJkJei33UESv2+/4vD4TAQA7" /> + <img class="anss_intLink" title="'.$this->getLang("Unlink").'" onclick="formatDoc(\'unlink\');" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC41ZYUyZQAAAk5JREFUSEu1k19IU1EcxwUfEyF80JJoFGShLLWpID5Ioi+xh+wlX+ohYg2EwEDRCGdF0sOcKRTYQ1rRfHDD0qnVw15sxITUp0p8Cv/QSCdTCqrx6Z5zd7ddPQuk9fC5597v+Z3v73fO+d0c4L+gFLOBUswGSjEbKMWM7Oxog0JXkHxZXPqGdyLEg2e [...] + + <select style="margin: 0 12pt 0 12pt;" size="1"> + '.$fontOptions.' + </select> + <img class="anss_intLink" title="'.$this->getLang("Smaller").'" onclick="addTags(\'small\');" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuNWWFMmUAAAD0SURBVDhPpdChbgJBEMbxeYAKQggC1WeorgCFQWGLpK6iD1DXJ8CAQCBxICsQCPoCeBIkSRG0qqLi+p9lLzc3LAmESX7J7sx9u3cnWZbdJNm0Yg2xgzbUD5Zh7gNerDY+kR+wwVOY+4AXq4oBvvCNGeph7gOeqS6WWONZG2HuA [...] + <img class="anss_intLink" title="'.$this->getLang("Bigger").'" onclick="addTags(\'big\');" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuNWWFMmUAAAEJSURBVDhPldI7TsNAEIBhlxQ0SIgCpcgRnCOkojUtcpkDUFC6ywGiFDmBSxTlAEi4CH2UOki0CBpQCgqKzT/2LjseVoKs9FmzOw87jjPn3J/MGmHchaxUg2bWJSosMJSDZJNm1jUescVEDlINJ5DpAzPgDHO84QNLXKQG1JBAlGr [...] + </div> + </div> + <div id="anss_textBox_'.trim($fields[0]).'" + class="anss_textBox" + contenteditable="true" + name="anss_textBox_'.trim($fields[0]).'" + title="'.trim($this->getLang(trim($fields[5]))).'" '.trim($fields[2]).'" + onkeyup="count_chars(this,'.$this->getConf("prev_length").')" + onMouseOver="HidePopup(\'hoverpopup1\', \'hoverpopup2\', \'hoverpopup3\')" ></div> + + <map name="fcolor_pallete" id="fcolor_pallete"> + <area shape="rect" coords=" 5, 5,16,16" href="#FFFFFF" onclick="getfColor(this);" /> + <area shape="rect" coords=" 5,23,16,34" href="#E0E0E0" onclick="getfColor(this);" /> + <area shape="rect" coords=" 5,41,16,52" href="#C1C1C1" onclick="getfColor(this);" /> + <area shape="rect" coords=" 5,59,16,70" href="#A8A8A8" onclick="getfColor(this);" /> + + <area shape="rect" coords="23, 5,34,16" href="#000000" onclick="getfColor(this);" /> + <area shape="rect" coords="23,23,34,34" href="#696969" onclick="getfColor(this);" /> + <area shape="rect" coords="23,41,34,52" href="#A0A0A0" onclick="getfColor(this);" /> + <area shape="rect" coords="23,59,34,70" href="#C4C4C4" onclick="getfColor(this);" /> + + <area shape="rect" coords="41, 5,52,16" href="#FF0000" onclick="getfColor(this);" /> + <area shape="rect" coords="41,23,52,34" href="#FFA600" onclick="getfColor(this);" /> + <area shape="rect" coords="41,41,52,52" href="#FF7800" onclick="getfColor(this);" /> + <area shape="rect" coords="41,59,52,70" href="#800000" onclick="getfColor(this);" /> + + <area shape="rect" coords="59, 5,70,16" href="#FFFF00" onclick="getfColor(this);" /> + <area shape="rect" coords="59,23,70,34" href="#FFFF9E" onclick="getfColor(this);" /> + <area shape="rect" coords="59,41,70,52" href="#FFD700" onclick="getfColor(this);" /> + <area shape="rect" coords="59,59,70,70" href="#8B4513" onclick="getfColor(this);" /> + + <area shape="rect" coords="78, 5,89,16" href="#00FF00" onclick="getfColor(this);" /> + <area shape="rect" coords="78,23,89,34" href="#C2F9C2" onclick="getfColor(this);" /> + <area shape="rect" coords="78,41,89,52" href="#008000" onclick="getfColor(this);" /> + <area shape="rect" coords="78,59,89,70" href="#2F4F4F" onclick="getfColor(this);" /> + + <area shape="rect" coords="97, 5,108,16" href="#0000FF" onclick="getfColor(this);" /> + <area shape="rect" coords="97,23,108,34" href="#C1E3FF" onclick="getfColor(this);" /> + <area shape="rect" coords="97,41,108,52" href="#277DC4" onclick="getfColor(this);" /> + <area shape="rect" coords="97,59,108,70" href="#000068" onclick="getfColor(this);" /> + + <area shape="rect" coords="115, 5,126,16" href="#FF00BB" onclick="getfColor(this);" /> + <area shape="rect" coords="115,23,126,34" href="#FF9ED5" onclick="getfColor(this);" /> + <area shape="rect" coords="115,41,126,52" href="#BC008A" onclick="getfColor(this);" /> + <area shape="rect" coords="115,59,126,70" href="#6B0050" onclick="getfColor(this);" /> + </map> + + <map name="bgcolor_pallete" id="bgcolor_pallete"> + <area shape="rect" coords=" 5, 5,16,16" href="#FFFFFF" onclick="getbColor(this);" /> + <area shape="rect" coords=" 5,23,16,34" href="#E0E0E0" onclick="getbColor(this);" /> + <area shape="rect" coords=" 5,41,16,52" href="#C1C1C1" onclick="getbColor(this);" /> + <area shape="rect" coords=" 5,59,16,70" href="#A8A8A8" onclick="getbColor(this);" /> + + <area shape="rect" coords="23, 5,34,16" href="#000000" onclick="getbColor(this);" /> + <area shape="rect" coords="23,23,34,34" href="#696969" onclick="getbColor(this);" /> + <area shape="rect" coords="23,41,34,52" href="#A0A0A0" onclick="getbColor(this);" /> + <area shape="rect" coords="23,59,34,70" href="#C4C4C4" onclick="getbColor(this);" /> + + <area shape="rect" coords="41, 5,52,16" href="#FF0000" onclick="getbColor(this);" /> + <area shape="rect" coords="41,23,52,34" href="#FFA600" onclick="getbColor(this);" /> + <area shape="rect" coords="41,41,52,52" href="#FF7800" onclick="getbColor(this);" /> + <area shape="rect" coords="41,59,52,70" href="#800000" onclick="getbColor(this);" /> + + <area shape="rect" coords="59, 5,70,16" href="#FFFF00" onclick="getbColor(this);" /> + <area shape="rect" coords="59,23,70,34" href="#FFFF9E" onclick="getbColor(this);" /> + <area shape="rect" coords="59,41,70,52" href="#FFD700" onclick="getbColor(this);" /> + <area shape="rect" coords="59,59,70,70" href="#8B4513" onclick="getbColor(this);" /> + + <area shape="rect" coords="78, 5,89,16" href="#00FF00" onclick="getbColor(this);" /> + <area shape="rect" coords="78,23,89,34" href="#C2F9C2" onclick="getbColor(this);" /> + <area shape="rect" coords="78,41,89,52" href="#008000" onclick="getbColor(this);" /> + <area shape="rect" coords="78,59,89,70" href="#2F4F4F" onclick="getbColor(this);" /> + + <area shape="rect" coords="97, 5,108,16" href="#0000FF" onclick="getbColor(this);" /> + <area shape="rect" coords="97,23,108,34" href="#C1E3FF" onclick="getbColor(this);" /> + <area shape="rect" coords="97,41,108,52" href="#277DC4" onclick="getbColor(this);" /> + <area shape="rect" coords="97,59,108,70" href="#000068" onclick="getbColor(this);" /> + + <area shape="rect" coords="115, 5,126,16" href="#FF00BB" onclick="getbColor(this);" /> + <area shape="rect" coords="115,23,126,34" href="#FF9ED5" onclick="getbColor(this);" /> + <area shape="rect" coords="115,41,126,52" href="#BC008A" onclick="getbColor(this);" /> + <area shape="rect" coords="115,59,126,70" href="#6B0050" onclick="getbColor(this);" /> + </map> + + <p id="editMode"><input type="hidden" name="switchMode" id="switchBox" onchange="setDocMode(this.checked);" /> </p> + + <br /> '.NL; } + + - $output .= $this->news_edit_toolbar('news_input_'.trim($fields[0])); - - $imgBASE = DOKU_BASE."lib/plugins/anewssystem/images/toolbar/"; - $output .= '<textarea class="news_input_textarea"'. - ' id="news_input_'.trim($fields[0]).'"'. - ' name="news_input_'.trim($fields[0]).'"'. - ' title="'.trim($this->getLang(trim($fields[5]))).'" '.trim($fields[2]).'"'. - ' onkeyup="count_chars(this,'.$this->getConf('prev_length').')" >'. - '</textarea> - <span class="reply_close_link"> - <a href="javascript:resizeBoxId(\'news_input_'.trim($fields[0]).'\', -20)"><img src="'.$imgBASE.'reduce.png" title="reduce textarea" style="float:right;" /></a> - <a href="javascript:resizeBoxId(\'news_input_'.trim($fields[0]).'\', +20)"><img src="'.$imgBASE.'enlarge.png" title="enlarge textarea" style="float:right;" /></a> - </span></p>'.NL; } else if (trim($fields[0]) == "anchor") { @@ -296,9 +441,204 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { $output .= '<input class="anss_input_btn_save" type="submit" - name="submit" + name="submit" + id ="submit" value="'.$this->getLang('anss_input_btn_save').'" title="'.$this->getLang('anss_input_btn_save_descr').'" />'.NL; + + if($this->getConf('wysiwyg')==true) { + $output .= '<script type="text/javascript"> + var oDoc, sDefTxt; + + function validateMode() { + oDoc = document.getElementById("'.$ansTBox_ID.'"); + if (document.'.$prefix.'.switchMode.checked !== true) { return true ; } + alert("Uncheck \"Show HTML\"."); + oDoc.focus(); + return false; + } + + function formatDoc(sCmd, sValue) { + + oDoc = document.getElementById("'.$ansTBox_ID.'"); + sDefTxt = oDoc.innerHTML; + if (validateMode()) { document.execCommand(sCmd, false, sValue); oDoc.focus(); } + } + + function makeCite() + { + var html = ""; + var sel, range; + oDoc = document.getElementById("'.$ansTBox_ID.'"); + sDefTxt = oDoc.innerHTML; + if (typeof window.getSelection != "undefined") { + var sel = window.getSelection(); + if (sel.rangeCount) { + var container = document.createElement("blockquote"); + container.setAttribute("class", "ans_cite"); + for (var i = 0, len = sel.rangeCount; i < len; ++i) { + container.appendChild(sel.getRangeAt(i).cloneContents()); + } + html = container.innerHTML; + + } + } else if (typeof document.selection != "undefined") { + if (document.selection.type == "Text") { + html = document.selection.createRange().htmlText; + } + } + range = sel.getRangeAt(0); + range.deleteContents(); + var post_p = document.createElement("p") + range.insertNode(post_p); + var post_br = document.createElement("br") + range.insertNode(post_br); + range.insertNode(container); + + } + + function addTags(sCmd) + { var html = ""; + var sel, range; + oDoc = document.getElementById("'.$ansTBox_ID.'"); + sDefTxt = oDoc.innerHTML; + if (typeof window.getSelection != "undefined") { + var sel = window.getSelection(); + if (sel.rangeCount) { + var container = document.createElement(sCmd); + for (var i = 0, len = sel.rangeCount; i < len; ++i) { + container.appendChild(sel.getRangeAt(i).cloneContents()); + } + html = container.innerHTML; + } + } else if (typeof document.selection != "undefined") { + if (document.selection.type == "Text") { + html = document.selection.createRange().htmlText; + } + } + range = sel.getRangeAt(0); + range.deleteContents(); + var post_p = document.createElement("p") + range.insertNode(post_p); + var post_br = document.createElement("br") + range.insertNode(post_br); + var p_container = document.createElement("p"); + p_container.appendChild(container); + range.insertNode(p_container); + } + + function makeCode() + { var html = ""; + var sel, range; + oDoc = document.getElementById("'.$ansTBox_ID.'"); + sDefTxt = oDoc.innerHTML; + if (typeof window.getSelection != "undefined") { + var sel = window.getSelection(); + if (sel.rangeCount) { + var container = document.createElement("code"); + for (var i = 0, len = sel.rangeCount; i < len; ++i) { + container.appendChild(sel.getRangeAt(i).cloneContents()); + } + html = "<p>"+container.innerHTML+"</p>"; + } + } else if (typeof document.selection != "undefined") { + if (document.selection.type == "Text") { + html = document.selection.createRange().htmlText; + } + } + range = sel.getRangeAt(0); + range.deleteContents(); + var post_p = document.createElement("p") + range.insertNode(post_p); + var post_br = document.createElement("br") + range.insertNode(post_br); + var p_container = document.createElement("p"); + p_container.appendChild(container); + range.insertNode(p_container); + } + + function setDocMode(bToSource) { + var oContent; + oDoc = document.getElementById("'.$ansTBox_ID.'"); + sDefTxt = oDoc.innerHTML; + if (bToSource) { + oContent = document.createTextNode(oDoc.innerHTML); + oDoc.innerHTML = ""; + var oPre = document.createElement("pre"); + oDoc.contentEditable = false; + oPre.id = "sourceText"; + oPre.contentEditable = true; + oPre.appendChild(oContent); + oDoc.appendChild(oPre); + } else { + if (document.all) { + oDoc.innerHTML = oDoc.innerText; + } else { + oContent = document.createRange(); + oContent.selectNodeContents(oDoc.firstChild); + oDoc.innerHTML = oContent.toString(); + } + oDoc.contentEditable = true; + } + oDoc.focus(); + } + + function getfColor(block) + { + hp = document.getElementById("hoverpopup1"); + hp.style.visibility = "Hidden"; + var s_url=block.href; + var pColor=s_url.substr(s_url.indexOf("#")); + document.execCommand(\'forecolor\', false, pColor); + } + + function getbColor(block) + { + hp = document.getElementById("hoverpopup2"); + hp.style.visibility = "Hidden"; + var s_url=block.href; + var pColor=s_url.substr(s_url.indexOf("#")); + document.execCommand(\'backcolor\', false, pColor); + + } + + function ShowPopup(hoveritem, hoverpopup) + { + HidePopup("hoverpopup1", "hoverpopup2"); + hp = document.getElementById(hoverpopup); + // Set position of hover popup + hp.style.top = (document.getElementById(hoveritem).offsetTop+15) + \'px\'; + hp.style.left = (document.getElementById(hoveritem).offsetLeft ) + \'px\'; + // Set popup to visible + hp.style.visibility = "Visible"; + } + + function HidePopup(hoverpopup1, hoverpopup2) + { + document.getElementById("hoverpopup1").style.visibility = "Hidden"; + document.getElementById("hoverpopup2").style.visibility = "Hidden"; + } + 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 = \'<span style="color:red;">\' + cextract + \'</span>\'; + else output = cextract; + document.getElementById("nws_charcount").innerHTML = "'.$this->getLang('wordcount').'" + } + + function resizeBoxId(obj,size) { + var arows = document.getElementById(obj).rows; + document.getElementById(obj).rows = arows + size; + } + + function myFunction() { + document.getElementById("news_input_text").value = document.getElementById("anss_textBox_text").innerHTML; + } + + </script>'.NL; + } $output .= '</form></div>'; // 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 = '<span class="news_preview">' . $prvw_string .'</span>'. 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 = '<span class="news_preview">' . $prvw_string .'</span>'. NL; } // head has to be before the link in the template ! @@ -795,14 +1144,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin { $backlink = '<a href="javascript:history.back(-1)">'.$this->getLang('lnk_back').'</a>'; $backlink .= '<span class="anss_sep"> | </span> <a href="'.DOKU_URL.'doku.php?id='.$this->getConf('news_output').'">'.$this->getLang('allnews').'</a>'; - $output = '<script type="text/javascript" src="backlink.js"></script> - <script type="text/javascript"> - <!-- - var gb = new backlink(); - gb.write(); - //--> - </SCRIPT> - <div style="font-size:.85em;">'.$backlink.NL. + $output = '<div style="font-size:.85em;">'.$backlink.NL. '<span class="anss_sep"> | </span><a class"wikilink" href="'.wl($ID).$this->getConf('act_delim').'archive=archive">'.$archive_lnkTitle.'</a></div><br />'.NL. '<div class="archive_section" id="news_archive_head" style="'.$archive_options['style'].'">'. $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 = '<a href="'.$value.'" id="'.$value.'" name="'.$value.'">'. trim($news_head) .'</a>'.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 .= '<br />'; - if(($archive_options['tag']!==false) && ($archive_options['tag']!=='off') && ($archive_options['class']=='page')) $output .= '<div class="archive_item">'.trim($news_date).$news_head.$news_subtitle.'</div>'.NL; - else $output .= '<ul><li class="level3"><div class="li">'.trim($news_date).$news_head.'</div></li></ul>'.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, '<br>'); + elseif ((int)$archive_options['cws'] <2 && ($archive_options['cws'] !== false)) $news_content = strip_tags($news_content, '<br><font><strong><a><u><ul><b><i>'); + + $news_content = "<br>".'<span class="news_preview">' . trim(substr($news_content,0,(int)$archive_options['p_signs'])).' ...</span>'.NL; + } + else $news_content=""; + + if(($archive_options['tag']!==false) && ($archive_options['tag']!=='off') && ($archive_options['class']=='page')) $output .= '<div class="archive_item">'.trim($news_date).$news_head.$news_subtitle.$news_content.'</div>'.NL; + else $output .= '<ul><li class="level3"><div class="li">'.trim($news_date).$news_head.$news_content.'</div></li></ul>'.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 { </div>'.NL.NL; } elseif($archive_options['class']=='box') { - $output = '<div class="archive_box" id="archive__box" style="'.$archive_options['style'].'"> + + $output = '<div class="archive_box" id="archive__box" style="'.$archive_options['style'].'"> <div id="news_items"> <ul class="n_box">'.$output.'</ul> </div> @@ -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 = \'<span style="color:red;">\' + cextract + \'</span>\'; + else output = cextract; + document.getElementById("nws_charcount").innerHTML = "'.$this->getLang('wordcount').'" + } + </script>'; $news_edit_tb .= '<div class="news_edittoolbar">'.NL; $news_edit_tb .= "<img class=\"newsedit_button\" src=\"".$imgBASE."bold.png\" name=\"btnBold\" title=\"Bold [b]\" accesskey=\"b\" onClick=\"doAddTags('**','**','$type')\">".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 --
