From c69ae5645b266da9c63d6288ad0091b492231858 Mon Sep 17 00:00:00 2001 From: flotsam Date: Fri, 2 Dec 2005 12:00:34 +0000 Subject: [PATCH] added custom extensions for serendipity_event_emoticate --- .../UTF-8/lang_bg.inc.php | 4 +- .../UTF-8/lang_de.inc.php | 3 ++ .../UTF-8/lang_es.inc.php | 3 +- .../UTF-8/lang_fr.inc.php | 3 +- .../UTF-8/lang_is.inc.php | 3 +- .../UTF-8/lang_ja.inc.php | 3 +- .../UTF-8/lang_ko.inc.php | 3 +- .../UTF-8/lang_pt_PT.inc.php | 3 +- .../UTF-8/lang_tn.inc.php | 37 +++++++++--------- .../lang_bg.inc.php | 14 ++++--- .../lang_de.inc.php | 8 ++-- .../lang_en.inc.php | 3 +- .../lang_es.inc.php | 3 +- .../lang_fr.inc.php | 3 +- .../lang_is.inc.php | 3 +- .../lang_ja.inc.php | 3 +- .../lang_ko.inc.php | 3 +- .../lang_pt_PT.inc.php | 3 +- .../lang_tn.inc.php | 37 +++++++++--------- .../serendipity_event_emoticate.php | 39 ++++++++++++------- 20 files changed, 108 insertions(+), 73 deletions(-) diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php index 57903da..702936d 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php @@ -3,4 +3,6 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'Форматиране на текст: Усмивки'); @define('PLUGIN_EVENT_EMOTICATE_DESC', 'Конвертира стандартните знаци за изразяване на емоции в графични изображения'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Стандартните знаци :) и ;) се конвертират в графични изображения'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); +?> diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_de.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_de.inc.php index aab5474..bae39d2 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_de.inc.php @@ -3,3 +3,6 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'Textformatierung: Smilies'); @define('PLUGIN_EVENT_EMOTICATE_DESC', 'Standard Text-Smilies in Grafiken konvertieren'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Standard-Text Smilies wie :-) und ;-) werden zu Bildern konvertiert.'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'Dateinamenerweiterung'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'Die Dateinamenerweiterung der Emoticons. Groß-/Kleinschreibung beachten.'); +?> \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_es.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_es.inc.php index f16a064..bbb8fb8 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_es.inc.php @@ -7,5 +7,6 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'Formato: Smilies'); @define('PLUGIN_EVENT_EMOTICATE_DESC', 'Convertir smilies normales en imágenes'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Smilies normales como :-) y ;-) son convertidos en imágenes.'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); ?> \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_fr.inc.php index 8304e73..393ad32 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_fr.inc.php @@ -16,6 +16,7 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'Balises: Smilies'); @define('PLUGIN_EVENT_EMOTICATE_DESC', 'Convertit les smilies standard en images'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Les smilies standard comme :-) et ;-) sont convertis en images.'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); /* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_is.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_is.inc.php index 96aac2a..010718a 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_is.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_is.inc.php @@ -3,6 +3,7 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'Textabreyting: Tilfinningavæða'); @define('PLUGIN_EVENT_EMOTICATE_DESC', 'Breyta venjulegum textabrosköllum í grafískar myndir'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Venjulegum brosköllum, eins og :-) og ;-), verður breytt í myndir.'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); /* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_ja.inc.php index d6be8cd..366ddda 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_ja.inc.php @@ -9,6 +9,7 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'マークアップ: 感情表現'); @define('PLUGIN_EVENT_EMOTICATE_DESC', '標準的な感情表現を画像に変換します。'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', '標準的な感情表現、 :-) や ;-) といったものは画像に変換します。'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); /* vim: set sts=4 ts=4 expandtab : */ ?> diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_ko.inc.php index 0ed37c9..72c5589 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_ko.inc.php @@ -5,5 +5,6 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', '마크업: 이모티콘'); @define('PLUGIN_EVENT_EMOTICATE_DESC', '표준 이모티콘을 그림으로 바꿈'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', ':-) 이나 ;-) 와 같은 표준 이모티콘은 그림으로 바뀝니다.'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); ?> diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_pt_PT.inc.php index d090301..dd2f820 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_pt_PT.inc.php @@ -8,5 +8,6 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'Formato: Smilies'); @define('PLUGIN_EVENT_EMOTICATE_DESC', 'Converter smilies normais em imagens'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Smilies normais como :-) e ;-) são convertidos em imagens.'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); ?> diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_tn.inc.php index 849e669..04b3d13 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_tn.inc.php @@ -1,19 +1,20 @@ - # -# http://www.jannis.to/programming/serendipity.html # -# # -# Translated by # -# (c) 2004-2005 CapriSkye # -# http://open.38.com # -########################################################################## - - @define('PLUGIN_EVENT_EMOTICATE_NAME', '標記語言: 表情圖案'); - @define('PLUGIN_EVENT_EMOTICATE_DESC', '轉換字串成表情圖案'); - @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', '字串像 :-) 和 ;-) 會轉換成圖案。'); - + # +# http://www.jannis.to/programming/serendipity.html # +# # +# Translated by # +# (c) 2004-2005 CapriSkye # +# http://open.38.com # +########################################################################## + + @define('PLUGIN_EVENT_EMOTICATE_NAME', '標記語言: 表情圖案'); + @define('PLUGIN_EVENT_EMOTICATE_DESC', '轉換字串成表情圖案'); + @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', '字串像 :-) 和 ;-) 會轉換成圖案。'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); ?> \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/lang_bg.inc.php b/plugins/serendipity_event_emoticate/lang_bg.inc.php index 54f06e1..e6ea2b9 100644 --- a/plugins/serendipity_event_emoticate/lang_bg.inc.php +++ b/plugins/serendipity_event_emoticate/lang_bg.inc.php @@ -1,6 +1,8 @@ - \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/lang_de.inc.php b/plugins/serendipity_event_emoticate/lang_de.inc.php index aab5474..cf4dc99 100644 --- a/plugins/serendipity_event_emoticate/lang_de.inc.php +++ b/plugins/serendipity_event_emoticate/lang_de.inc.php @@ -1,5 +1,7 @@ diff --git a/plugins/serendipity_event_emoticate/lang_es.inc.php b/plugins/serendipity_event_emoticate/lang_es.inc.php index 425edd9..cc189f4 100644 --- a/plugins/serendipity_event_emoticate/lang_es.inc.php +++ b/plugins/serendipity_event_emoticate/lang_es.inc.php @@ -7,5 +7,6 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'Formato: Smilies'); @define('PLUGIN_EVENT_EMOTICATE_DESC', 'Convertir smilies normales en imágenes'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Smilies normales como :-) y ;-) son convertidos en imágenes.'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); ?> \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/lang_fr.inc.php b/plugins/serendipity_event_emoticate/lang_fr.inc.php index 8304e73..393ad32 100644 --- a/plugins/serendipity_event_emoticate/lang_fr.inc.php +++ b/plugins/serendipity_event_emoticate/lang_fr.inc.php @@ -16,6 +16,7 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'Balises: Smilies'); @define('PLUGIN_EVENT_EMOTICATE_DESC', 'Convertit les smilies standard en images'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Les smilies standard comme :-) et ;-) sont convertis en images.'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); /* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/lang_is.inc.php b/plugins/serendipity_event_emoticate/lang_is.inc.php index edcb274..01f7d3b 100644 --- a/plugins/serendipity_event_emoticate/lang_is.inc.php +++ b/plugins/serendipity_event_emoticate/lang_is.inc.php @@ -3,6 +3,7 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'Textabreyting: Tilfinningavæða'); @define('PLUGIN_EVENT_EMOTICATE_DESC', 'Breyta venjulegum textabrosköllum í grafískar myndir'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Venjulegum brosköllum, eins og :-) og ;-), verður breytt í myndir.'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); /* vim: set sts=4 ts=4 expandtab : */ ?> \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/lang_ja.inc.php b/plugins/serendipity_event_emoticate/lang_ja.inc.php index 466f251..ab9fe00 100644 --- a/plugins/serendipity_event_emoticate/lang_ja.inc.php +++ b/plugins/serendipity_event_emoticate/lang_ja.inc.php @@ -9,6 +9,7 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'マークアップ: 感情表現'); @define('PLUGIN_EVENT_EMOTICATE_DESC', '標準的な感情表現を画像に変換します。'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', '標準的な感情表現、 :-) や ;-) といったものは画像に変換します。'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); /* vim: set sts=4 ts=4 expandtab : */ ?> diff --git a/plugins/serendipity_event_emoticate/lang_ko.inc.php b/plugins/serendipity_event_emoticate/lang_ko.inc.php index 0ed37c9..72c5589 100644 --- a/plugins/serendipity_event_emoticate/lang_ko.inc.php +++ b/plugins/serendipity_event_emoticate/lang_ko.inc.php @@ -5,5 +5,6 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', '마크업: 이모티콘'); @define('PLUGIN_EVENT_EMOTICATE_DESC', '표준 이모티콘을 그림으로 바꿈'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', ':-) 이나 ;-) 와 같은 표준 이모티콘은 그림으로 바뀝니다.'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); ?> diff --git a/plugins/serendipity_event_emoticate/lang_pt_PT.inc.php b/plugins/serendipity_event_emoticate/lang_pt_PT.inc.php index e4d798b..0e3b5be 100644 --- a/plugins/serendipity_event_emoticate/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_emoticate/lang_pt_PT.inc.php @@ -8,5 +8,6 @@ @define('PLUGIN_EVENT_EMOTICATE_NAME', 'Formato: Smilies'); @define('PLUGIN_EVENT_EMOTICATE_DESC', 'Converter smilies normais em imagens'); @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', 'Smilies normais como :-) e ;-) são convertidos em imagens.'); - +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); ?> diff --git a/plugins/serendipity_event_emoticate/lang_tn.inc.php b/plugins/serendipity_event_emoticate/lang_tn.inc.php index 849e669..04b3d13 100644 --- a/plugins/serendipity_event_emoticate/lang_tn.inc.php +++ b/plugins/serendipity_event_emoticate/lang_tn.inc.php @@ -1,19 +1,20 @@ - # -# http://www.jannis.to/programming/serendipity.html # -# # -# Translated by # -# (c) 2004-2005 CapriSkye # -# http://open.38.com # -########################################################################## - - @define('PLUGIN_EVENT_EMOTICATE_NAME', '標記語言: 表情圖案'); - @define('PLUGIN_EVENT_EMOTICATE_DESC', '轉換字串成表情圖案'); - @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', '字串像 :-) 和 ;-) 會轉換成圖案。'); - + # +# http://www.jannis.to/programming/serendipity.html # +# # +# Translated by # +# (c) 2004-2005 CapriSkye # +# http://open.38.com # +########################################################################## + + @define('PLUGIN_EVENT_EMOTICATE_NAME', '標記語言: 表情圖案'); + @define('PLUGIN_EVENT_EMOTICATE_DESC', '轉換字串成表情圖案'); + @define('PLUGIN_EVENT_EMOTICATE_TRANSFORM', '字串像 :-) 和 ;-) 會轉換成圖案。'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION', 'File extension'); +@define('PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH', 'The file extension of your emoticons. This is case sensitive.'); ?> \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php b/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php index f9d59cd..80d1b4a 100644 --- a/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php +++ b/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php @@ -20,7 +20,7 @@ class serendipity_event_emoticate extends serendipity_event $propbag->add('description', PLUGIN_EVENT_EMOTICATE_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.1'); + $propbag->add('version', '1.2'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -52,6 +52,7 @@ class serendipity_event_emoticate extends serendipity_event foreach($this->markup_elements as $element) { $conf_array[] = $element['name']; } + $conf_array[] = 'extension'; $propbag->add('configuration', $conf_array); } @@ -90,24 +91,25 @@ class serendipity_event_emoticate extends serendipity_event } if (!isset($this->smilies)) { + $ext = $this->get_config('extension', 'png'); $this->smilies = array( - "\:'\(" => serendipity_getTemplateFile('img/emoticons/cry.png'), + "\:'\(" => serendipity_getTemplateFile('img/emoticons/cry.'.$ext), - '\:\-?\)' => serendipity_getTemplateFile('img/emoticons/smile.png'), + '\:\-?\)' => serendipity_getTemplateFile('img/emoticons/smile.'.$ext), - '\:\|' => serendipity_getTemplateFile('img/emoticons/normal.png'), + '\:\|' => serendipity_getTemplateFile('img/emoticons/normal.'.$ext), - '\:\-?O' => serendipity_getTemplateFile('img/emoticons/eek.png'), + '\:\-?O' => serendipity_getTemplateFile('img/emoticons/eek.'.$ext), - '\:\-?\(' => serendipity_getTemplateFile('img/emoticons/sad.png'), + '\:\-?\(' => serendipity_getTemplateFile('img/emoticons/sad.'.$ext), - '8\-?\)' => serendipity_getTemplateFile('img/emoticons/cool.png'), + '8\-?\)' => serendipity_getTemplateFile('img/emoticons/cool.'.$ext), - '\:\-?D' => serendipity_getTemplateFile('img/emoticons/laugh.png'), + '\:\-?D' => serendipity_getTemplateFile('img/emoticons/laugh.'.$ext), - '\:\-?P' => serendipity_getTemplateFile('img/emoticons/tongue.png'), + '\:\-?P' => serendipity_getTemplateFile('img/emoticons/tongue.'.$ext), - ';\-?\)' => serendipity_getTemplateFile('img/emoticons/wink.png'), + ';\-?\)' => serendipity_getTemplateFile('img/emoticons/wink.'.$ext), ); } @@ -138,10 +140,19 @@ class serendipity_event_emoticate extends serendipity_event function introspect_config_item($name, &$propbag) { - $propbag->add('type', 'boolean'); - $propbag->add('name', constant($name)); - $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); - $propbag->add('default', 'true'); + switch($name) { + case 'extension': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_EVENT_EMOTICATE_EXTENSION); + $propbag->add('description', PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH); + $propbag->add('default', 'png'); + break; + default: + $propbag->add('type', 'boolean'); + $propbag->add('name', constant($name)); + $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); + $propbag->add('default', 'true'); + } return true; } -- 2.39.5