cleanup and db_bool()
This commit is contained in:
parent
a38e03f977
commit
8d5c70f616
|
@ -1,11 +1,12 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version
|
||||
* @author Ivan Cenov jwalker@hotmail.bg
|
||||
* EN-Revision: 1.1
|
||||
*/
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Езиково специфичен HTML блок');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Показва HTML блок в страничния панел за указан език или всички езици');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Изберете език');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'Всички езици');
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Езиково специфичен HTML блок');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Показва HTML блок в страничния панел за указан език или всички езици');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Изберете език');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'Всички езици');
|
||||
|
||||
|
|
|
@ -10,4 +10,5 @@
|
|||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Jazykově závislý HTML blok');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Pro zadaný jazyk zobrazuje v postranním sloupci HTML blok.');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Výběr jazyka');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'Všechny jazyky');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'Všechny jazyky');
|
||||
|
||||
|
|
|
@ -10,4 +10,5 @@
|
|||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Jazykově závislý HTML blok');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Pro zadaný jazyk zobrazuje v postranním sloupci HTML blok.');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Výběr jazyka');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'Všechny jazyky');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'Všechny jazyky');
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Language-Specific HTML Nugget');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Shows an HTML nugget on the sidebar, for a specific language.');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Choose language');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'All Languages');
|
||||
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Language-Specific HTML Nugget');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Shows an HTML nugget on the sidebar, for a specific language.');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Choose language');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'All Languages');
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
# Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
|
||||
# (c) 2005 http://www.tool-box.info/
|
||||
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', '특정 언어용 HTML 덩어리');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'HTML 덩어리가 특정 언어를 사용할 경우 옆줄에 나타남');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', '언어 선택');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', '모든 언어');
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', '특정 언어용 HTML 덩어리');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'HTML 덩어리가 특정 언어를 사용할 경우 옆줄에 나타남');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', '언어 선택');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', '모든 언어');
|
||||
|
||||
?>
|
|
@ -1,11 +1,12 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version
|
||||
* @author Ivan Cenov jwalker@hotmail.bg
|
||||
* EN-Revision: 1.1
|
||||
*/
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Åçèêîâî ñïåöèôè÷åí HTML áëîê');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Ïîêàçâà HTML áëîê â ñòðàíè÷íèÿ ïàíåë çà óêàçàí åçèê èëè âñè÷êè åçèöè');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Èçáåðåòå åçèê');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'Âñè÷êè åçèöè');
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Åçèêîâî ñïåöèôè÷åí HTML áëîê');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Ïîêàçâà HTML áëîê â ñòðàíè÷íèÿ ïàíåë çà óêàçàí åçèê èëè âñè÷êè åçèöè');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Èçáåðåòå åçèê');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'Âñè÷êè åçèöè');
|
||||
|
||||
|
|
|
@ -10,4 +10,5 @@
|
|||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Jazykovì závislý HTML blok');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Pro zadaný jazyk zobrazuje v postranním sloupci HTML blok.');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Výbìr jazyka');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'Všechny jazyky');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'Všechny jazyky');
|
||||
|
||||
|
|
|
@ -10,4 +10,5 @@
|
|||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Jazykovì závislý HTML blok');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Pro zadaný jazyk zobrazuje v postranním sloupci HTML blok.');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Výbìr jazyka');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'V¹echny jazyky');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'V¹echny jazyky');
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Language-Specific HTML Nugget');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Shows an HTML nugget on the sidebar, for a specific language.');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Choose language');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'All Languages');
|
||||
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', 'Language-Specific HTML Nugget');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'Shows an HTML nugget on the sidebar, for a specific language.');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Choose language');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'All Languages');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version
|
||||
|
@ -11,4 +11,3 @@
|
|||
@define('PLUGIN_NUGGET_MULTI_LANG', 'Choose language');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', 'All Languages');
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
# Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
|
||||
# (c) 2005 http://www.tool-box.info/
|
||||
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', '특정 언어용 HTML 덩어리');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'HTML 덩어리가 특정 언어를 사용할 경우 옆줄에 나타남');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', '언어 선택');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', '모든 언어');
|
||||
@define('PLUGIN_NUGGET_MULTI_NAME', '특정 언어용 HTML 덩어리');
|
||||
@define('PLUGIN_NUGGET_MULTI_DESC', 'HTML 덩어리가 특정 언어를 사용할 경우 옆줄에 나타남');
|
||||
@define('PLUGIN_NUGGET_MULTI_LANG', '언어 선택');
|
||||
@define('PLUGIN_NUGGET_MULTI_ALL', '모든 언어');
|
||||
|
||||
?>
|
|
@ -1,5 +1,4 @@
|
|||
<?php #
|
||||
|
||||
<?php
|
||||
|
||||
if (IN_serendipity !== true) {
|
||||
die ("Don't hack!");
|
||||
|
@ -34,39 +33,39 @@ class serendipity_plugin_nugget_multilingual extends serendipity_plugin {
|
|||
{
|
||||
switch($name) {
|
||||
|
||||
case 'language':
|
||||
$select = array('all' => PLUGIN_NUGGET_MULTI_ALL,
|
||||
'en' => 'English',
|
||||
'de' => 'German',
|
||||
'da' => 'Danish',
|
||||
'es' => 'Spanish',
|
||||
'fr' => 'French',
|
||||
'fi' => 'Finnish',
|
||||
'cs' => 'Czech (Win-1250)',
|
||||
'cz' => 'Czech (ISO-8859-2)',
|
||||
'nl' => 'Dutch',
|
||||
'is' => 'Icelandic',
|
||||
'se' => 'Swedish',
|
||||
'pt' => 'Portuguese Brazilian',
|
||||
'pt_PT' => 'Portuguese European',
|
||||
'bg' => 'Bulgarian',
|
||||
'hu' => 'Hungarian',
|
||||
'no' => 'Norwegian',
|
||||
'ro' => 'Romanian',
|
||||
'it' => 'Italian',
|
||||
'ru' => 'Russian',
|
||||
'fa' => 'Persian',
|
||||
'tw' => 'Traditional Chinese (Big5)',
|
||||
'tn' => 'Traditional Chinese (UTF-8)',
|
||||
'zh' => 'Simplified Chinese (GB2312)',
|
||||
'cn' => 'Simplified Chinese (UTF-8)',
|
||||
'ja' => 'Japanese',
|
||||
'ko' => 'Korean');
|
||||
case 'language':
|
||||
$select = array('all' => PLUGIN_NUGGET_MULTI_ALL,
|
||||
'en' => 'English',
|
||||
'de' => 'German',
|
||||
'da' => 'Danish',
|
||||
'es' => 'Spanish',
|
||||
'fr' => 'French',
|
||||
'fi' => 'Finnish',
|
||||
'cs' => 'Czech (Win-1250)',
|
||||
'cz' => 'Czech (ISO-8859-2)',
|
||||
'nl' => 'Dutch',
|
||||
'is' => 'Icelandic',
|
||||
'se' => 'Swedish',
|
||||
'pt' => 'Portuguese Brazilian',
|
||||
'pt_PT' => 'Portuguese European',
|
||||
'bg' => 'Bulgarian',
|
||||
'hu' => 'Hungarian',
|
||||
'no' => 'Norwegian',
|
||||
'ro' => 'Romanian',
|
||||
'it' => 'Italian',
|
||||
'ru' => 'Russian',
|
||||
'fa' => 'Persian',
|
||||
'tw' => 'Traditional Chinese (Big5)',
|
||||
'tn' => 'Traditional Chinese (UTF-8)',
|
||||
'zh' => 'Simplified Chinese (GB2312)',
|
||||
'cn' => 'Simplified Chinese (UTF-8)',
|
||||
'ja' => 'Japanese',
|
||||
'ko' => 'Korean');
|
||||
$propbag->add('type', 'select');
|
||||
$propbag->add('select_values', $select);
|
||||
$propbag->add('name', PLUGIN_NUGGET_MULTI_LANG);
|
||||
$propbag->add('default', 'all');
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'title':
|
||||
$propbag->add('type', 'string');
|
||||
|
@ -110,16 +109,16 @@ class serendipity_plugin_nugget_multilingual extends serendipity_plugin {
|
|||
$title = $this->get_config('title');
|
||||
$language = $this->get_config('language', 'all');
|
||||
$show_where = $this->get_config('show_where', 'both');
|
||||
// if the language doesn't match, do not display
|
||||
if ($language != 'all' && $serendipity['lang'] != $language) return false;
|
||||
// where to show
|
||||
// if the language doesn't match, do not display
|
||||
if ($language != 'all' && $serendipity['lang'] != $language) return false;
|
||||
// where to show
|
||||
if ($show_where == 'extended' && (!isset($serendipity['GET']['id']) || !is_numeric($serendipity['GET']['id']))) {
|
||||
return false;
|
||||
} else if ($show_where == 'overview' && isset($serendipity['GET']['id']) && is_numeric($serendipity['GET']['id'])) {
|
||||
return false;
|
||||
}
|
||||
// apply markup?
|
||||
if ($this->get_config('markup', 'true') == 'true') {
|
||||
// apply markup?
|
||||
if (serendipity_db_bool($this->get_config('markup', 'true'))) {
|
||||
$entry = array('html_nugget' => $this->get_config('content'));
|
||||
serendipity_plugin_api::hook_event('frontend_display', $entry);
|
||||
echo $entry['html_nugget'];
|
||||
|
@ -128,7 +127,7 @@ class serendipity_plugin_nugget_multilingual extends serendipity_plugin {
|
|||
}
|
||||
|
||||
if (serendipity_userLoggedIn()) {
|
||||
$is_plugin_owner = ($this->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers'));
|
||||
$is_plugin_owner = ($this->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers'));
|
||||
|
||||
if ($is_plugin_owner) {
|
||||
echo '<div class="serendipity_edit_nugget"><a href="' . $serendipity['baseURL'] . '/serendipity_admin.php?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . htmlentities($this->instance, ENT_COMPAT, LANG_CHARSET) . '">' . EDIT . '</a></div>';
|
||||
|
@ -137,4 +136,4 @@ class serendipity_plugin_nugget_multilingual extends serendipity_plugin {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
Loading…
Reference in a new issue