diff --git a/serendipity_event_head_nugget/UTF-8/lang_bg.inc.php b/serendipity_event_head_nugget/UTF-8/lang_bg.inc.php index 50a5c867..7a298399 100644 --- a/serendipity_event_head_nugget/UTF-8/lang_bg.inc.php +++ b/serendipity_event_head_nugget/UTF-8/lang_bg.inc.php @@ -1,4 +1,4 @@ - oblasti html kódu stránky. Použití pro vložení meta-tagů nebo vložení JavaScriptu.'); \ No newline at end of file +@define('HEAD_NUGGET_TITLE', 'HTML kód v záhlaví stránky (HTML-Head Nugget)'); +@define('HEAD_NUGGET_HOLDS_A_BLAHBLAH', 'Umožňuje vložit HTML kód do oblasti html kódu stránky. Použití pro vložení meta-tagů nebo vložení JavaScriptu.'); + diff --git a/serendipity_event_head_nugget/UTF-8/lang_cz.inc.php b/serendipity_event_head_nugget/UTF-8/lang_cz.inc.php index 9f500774..259b3ce3 100644 --- a/serendipity_event_head_nugget/UTF-8/lang_cz.inc.php +++ b/serendipity_event_head_nugget/UTF-8/lang_cz.inc.php @@ -7,5 +7,6 @@ * @revisionDate 2009/08/26 */ -@define('HEAD_NUGGET_TITLE', 'HTML kód v záhlaví stránky (HTML-Head Nugget)'); -@define('HEAD_NUGGET_HOLDS_A_BLAHBLAH', 'Umožňuje vložit HTML kód do oblasti html kódu stránky. Použití pro vložení meta-tagů nebo vložení JavaScriptu.'); \ No newline at end of file +@define('HEAD_NUGGET_TITLE', 'HTML kód v záhlaví stránky (HTML-Head Nugget)'); +@define('HEAD_NUGGET_HOLDS_A_BLAHBLAH', 'Umožňuje vložit HTML kód do oblasti html kódu stránky. Použití pro vložení meta-tagů nebo vložení JavaScriptu.'); + diff --git a/serendipity_event_head_nugget/UTF-8/lang_de.inc.php b/serendipity_event_head_nugget/UTF-8/lang_de.inc.php index 1eeb690b..4b8492e5 100644 --- a/serendipity_event_head_nugget/UTF-8/lang_de.inc.php +++ b/serendipity_event_head_nugget/UTF-8/lang_de.inc.php @@ -1,5 +1,5 @@ \ No newline at end of file +@define('HEAD_NUGGET_TITLE', 'HTML-Code für den head-Bereich (HTML-Kopf Klotz)'); +@define('HEAD_NUGGET_HOLDS_A_BLAHBLAH', 'Beinhaltet HTML-Code der im HEAD-Bereich des Blogs eingebunden werden kann, z.B. für Meta-Tags oder JavaScripts.'); + diff --git a/serendipity_event_head_nugget/lang_bg.inc.php b/serendipity_event_head_nugget/lang_bg.inc.php index bcc662b9..b66b8582 100644 --- a/serendipity_event_head_nugget/lang_bg.inc.php +++ b/serendipity_event_head_nugget/lang_bg.inc.php @@ -1,4 +1,4 @@ - oblasti html kdu strnky. Pouit pro vloen meta-tag nebo vloen JavaScriptu.'); \ No newline at end of file +@define('HEAD_NUGGET_TITLE', 'HTML kd v zhlav strnky (HTML-Head Nugget)'); +@define('HEAD_NUGGET_HOLDS_A_BLAHBLAH', 'Umouje vloit HTML kd do oblasti html kdu strnky. Pouit pro vloen meta-tag nebo vloen JavaScriptu.'); + diff --git a/serendipity_event_head_nugget/lang_cz.inc.php b/serendipity_event_head_nugget/lang_cz.inc.php index d610ea5b..e0032432 100644 --- a/serendipity_event_head_nugget/lang_cz.inc.php +++ b/serendipity_event_head_nugget/lang_cz.inc.php @@ -7,5 +7,6 @@ * @revisionDate 2009/08/26 */ -@define('HEAD_NUGGET_TITLE', 'HTML kd v zhlav strnky (HTML-Head Nugget)'); -@define('HEAD_NUGGET_HOLDS_A_BLAHBLAH', 'Umouje vloit HTML kd do oblasti html kdu strnky. Pouit pro vloen meta-tag nebo vloen JavaScriptu.'); \ No newline at end of file +@define('HEAD_NUGGET_TITLE', 'HTML kd v zhlav strnky (HTML-Head Nugget)'); +@define('HEAD_NUGGET_HOLDS_A_BLAHBLAH', 'Umouje vloit HTML kd do oblasti html kdu strnky. Pouit pro vloen meta-tag nebo vloen JavaScriptu.'); + diff --git a/serendipity_event_head_nugget/lang_de.inc.php b/serendipity_event_head_nugget/lang_de.inc.php index 5cb8b83f..171375cc 100644 --- a/serendipity_event_head_nugget/lang_de.inc.php +++ b/serendipity_event_head_nugget/lang_de.inc.php @@ -1,5 +1,5 @@ +@define('HEAD_NUGGET_TITLE', 'HTML-Code fr den head-Bereich (HTML-Kopf Klotz)'); +@define('HEAD_NUGGET_HOLDS_A_BLAHBLAH', 'Beinhaltet HTML-Code der im HEAD-Bereich des Blogs eingebunden werden kann, z.B. fr Meta-Tags oder JavaScripts.'); + diff --git a/serendipity_event_head_nugget/lang_en.inc.php b/serendipity_event_head_nugget/lang_en.inc.php index 2aa95c1a..ba3a6acb 100644 --- a/serendipity_event_head_nugget/lang_en.inc.php +++ b/serendipity_event_head_nugget/lang_en.inc.php @@ -1,4 +1,4 @@ - diff --git a/serendipity_event_head_nugget/lang_pl.inc.php b/serendipity_event_head_nugget/lang_pl.inc.php index e8fef37f..c6f37a42 100644 --- a/serendipity_event_head_nugget/lang_pl.inc.php +++ b/serendipity_event_head_nugget/lang_pl.inc.php @@ -1,12 +1,11 @@ - - * EN-Revision: Revision of lang_en.inc.php + * EN-Revision: Revision of */ @define('HEAD_NUGGET_TITLE', 'Kod HTML w nagwku (HTML-Head Nugget)'); @define('HEAD_NUGGET_HOLDS_A_BLAHBLAH', 'Zezwala na dodanie kodu HTML w sekcji HEAD bloga. Mona dziki tej wtyczce zdefiniowa wasne meta-tagi lub inkorporowa skrypty JavaScript.'); -?> diff --git a/serendipity_event_head_nugget/serendipity_event_head_nugget.php b/serendipity_event_head_nugget/serendipity_event_head_nugget.php index fd4e88ea..18cbc3b5 100644 --- a/serendipity_event_head_nugget/serendipity_event_head_nugget.php +++ b/serendipity_event_head_nugget/serendipity_event_head_nugget.php @@ -4,15 +4,12 @@ if (IN_serendipity !== true) { die ("Don't hack!"); } -// Probe for a language include with constants. Still include defines later on, if some constants were missing -$probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php'; -if (file_exists($probelang)) { - include $probelang; -} +@serendipity_plugin_api::load_language(dirname(__FILE__)); -include dirname(__FILE__) . '/lang_en.inc.php'; +class serendipity_event_head_nugget extends serendipity_event + { + var $title = HEAD_NUGGET_TITLE; -class serendipity_event_head_nugget extends serendipity_event { function introspect(&$propbag) { $propbag->add('name', HEAD_NUGGET_TITLE); @@ -23,9 +20,9 @@ class serendipity_event_head_nugget extends serendipity_event { ); $propbag->add('event_hooks', array('frontend_header' => true)); $propbag->add('author', 'Jannis Hermanns'); - $propbag->add('version', '1.4'); + $propbag->add('version', '1.5'); $propbag->add('requirements', array( - 'serendipity' => '0.7', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -33,8 +30,16 @@ class serendipity_event_head_nugget extends serendipity_event { $propbag->add('groups', array('BACKEND_METAINFORMATION')); } - function event_hook($event, &$bag, &$eventData, $addData = null) { - if ($event == 'frontend_header') echo $this->get_config('content'); + function generate_content(&$title) + { + $title = $this->title; + } + + function event_hook($event, &$bag, &$eventData, $addData = null) + { + if ($event == 'frontend_header') { + echo $this->get_config('content'); + } } function introspect_config_item($name, &$propbag) @@ -52,5 +57,7 @@ class serendipity_event_head_nugget extends serendipity_event { } return true; } + } -?> + +?> \ No newline at end of file