Also support "last X" REST interface
This commit is contained in:
12
plugins/serendipity_event_nl2br/UTF-8/lang_bg.inc.php
Normal file
12
plugins/serendipity_event_nl2br/UTF-8/lang_bg.inc.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php # $Id$
|
||||
|
||||
/**
|
||||
* @version $Revision$
|
||||
* @author Ivan Cenov imc@okto7.com
|
||||
* EN-Revision: 690
|
||||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'Форматиране на текст: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Заменя новите редове в текста с HTML BR тагове');
|
||||
|
||||
?>
|
||||
4
plugins/serendipity_event_nl2br/UTF-8/lang_de.inc.php
Normal file
4
plugins/serendipity_event_nl2br/UTF-8/lang_de.inc.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php # $Id: serendipity_event_nl2br.php 235 2005-07-08 13:29:39Z garvinhicking $
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'Textformatierung: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Konvertiert Zeilenumbrüche zu HTML');
|
||||
11
plugins/serendipity_event_nl2br/UTF-8/lang_es.inc.php
Normal file
11
plugins/serendipity_event_nl2br/UTF-8/lang_es.inc.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php # $Id: lang_es.inc.php,v 1.0 2005/08/20 11:37:42 garvinhicking Exp $
|
||||
/**
|
||||
* @version $Revision: 690 $
|
||||
* @author Rodrigo Lazo Paz <rlazo.paz@gmail.com>
|
||||
* EN-Revision: 690
|
||||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'Formato: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Convierte los saltos de linea en etiquetas BR');
|
||||
|
||||
?>
|
||||
20
plugins/serendipity_event_nl2br/UTF-8/lang_fr.inc.php
Normal file
20
plugins/serendipity_event_nl2br/UTF-8/lang_fr.inc.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $
|
||||
|
||||
##########################################################################
|
||||
# serendipity - another blogger... #
|
||||
##########################################################################
|
||||
# #
|
||||
# (c) 2003 Jannis Hermanns <J@hacked.it> #
|
||||
# http://www.jannis.to/programming/serendipity.html #
|
||||
# #
|
||||
# Translated by #
|
||||
# Sebastian Mordziol <argh@php-tools.net> #
|
||||
# http://sebastian.mordziol.de #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'Balises: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Convertit les retours à la ligne en balises BR');
|
||||
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
?>
|
||||
13
plugins/serendipity_event_nl2br/UTF-8/lang_ja.inc.php
Normal file
13
plugins/serendipity_event_nl2br/UTF-8/lang_ja.inc.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php # $Id: lang_ja.inc.php 693 2005-11-13 07:25:16Z elf2000 $
|
||||
|
||||
/**
|
||||
* @version $Revision$
|
||||
* @author Tadashi Jokagi <elf2000@users.sourceforge.net>
|
||||
* EN-Revision: 690
|
||||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'マークアップ: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', '改行を BR タグに変換します。');
|
||||
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
?>
|
||||
8
plugins/serendipity_event_nl2br/UTF-8/lang_ko.inc.php
Normal file
8
plugins/serendipity_event_nl2br/UTF-8/lang_ko.inc.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php # $Id: lang_ko.inc.php,v 1.0 2005/06/29 13:41:13 garvinhicking Exp $
|
||||
# Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
|
||||
# (c) 2005 http://www.tool-box.info/
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', '마크업: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', '새 줄을 BR 태그로 변환함');
|
||||
|
||||
?>
|
||||
12
plugins/serendipity_event_nl2br/UTF-8/lang_pl.inc.php
Normal file
12
plugins/serendipity_event_nl2br/UTF-8/lang_pl.inc.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php # $Id: lang_en.inc.php 690 2005-11-13 04:49:04Z elf2000 $
|
||||
|
||||
/**
|
||||
* @version $Revision: 690 $
|
||||
* @author Kostas CoSTa Brzezinski <costa@kofeina.net>
|
||||
* EN-Revision: Revision of lang_en.inc.php
|
||||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'Znacznik: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Zmieniaj znaki nowych linii na tagi BR');
|
||||
|
||||
?>
|
||||
19
plugins/serendipity_event_nl2br/UTF-8/lang_pt_PT.inc.php
Normal file
19
plugins/serendipity_event_nl2br/UTF-8/lang_pt_PT.inc.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php # $Id:$
|
||||
|
||||
##########################################################################
|
||||
# serendipity - another blogger... #
|
||||
##########################################################################
|
||||
# #
|
||||
# (c) 2003 Jannis Hermanns <J@hacked.it> #
|
||||
# http://www.jannis.to/programming/serendipity.html #
|
||||
# #
|
||||
# Translated by #
|
||||
# João P Matos <jmatos@math.ist.utl.pt> #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'Código: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Converte os fins de linha em etiquetas BR');
|
||||
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
?>
|
||||
17
plugins/serendipity_event_nl2br/UTF-8/lang_tn.inc.php
Normal file
17
plugins/serendipity_event_nl2br/UTF-8/lang_tn.inc.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php # $Id: $
|
||||
##########################################################################
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity #
|
||||
# Developer Team) All rights reserved. See LICENSE file for licensing #
|
||||
# details #
|
||||
# #
|
||||
# (c) 2003 Jannis Hermanns <J@hacked.it> #
|
||||
# http://www.jannis.to/programming/serendipity.html #
|
||||
# #
|
||||
# Translated by #
|
||||
# (c) 2004-2005 CapriSkye <admin@capriskye.com> #
|
||||
# http://open.38.com #
|
||||
##########################################################################
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', '標記語言: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', '轉換新行成 BR 標籤');
|
||||
?>
|
||||
17
plugins/serendipity_event_nl2br/UTF-8/lang_zh.inc.php
Normal file
17
plugins/serendipity_event_nl2br/UTF-8/lang_zh.inc.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php # $Id: $
|
||||
##########################################################################
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity #
|
||||
# Developer Team) All rights reserved. See LICENSE file for licensing #
|
||||
# details #
|
||||
# #
|
||||
# (c) 2003 Jannis Hermanns <J@hacked.it> #
|
||||
# http://www.jannis.to/programming/serendipity.html #
|
||||
# #
|
||||
# Translated by #
|
||||
# (c) 2006 Aphonex Li <aphonex.li@gmail.com> #
|
||||
# http://www.exten.cn #
|
||||
##########################################################################
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', '标记语言: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', '转换新行成 BR 标签');
|
||||
?>
|
||||
12
plugins/serendipity_event_nl2br/lang_bg.inc.php
Normal file
12
plugins/serendipity_event_nl2br/lang_bg.inc.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php # $Id$
|
||||
|
||||
/**
|
||||
* @version $Revision$
|
||||
* @author Ivan Cenov imc@okto7.com
|
||||
* EN-Revision: 690
|
||||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> HTML BR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||||
|
||||
?>
|
||||
4
plugins/serendipity_event_nl2br/lang_de.inc.php
Normal file
4
plugins/serendipity_event_nl2br/lang_de.inc.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php # $Id: serendipity_event_nl2br.php 235 2005-07-08 13:29:39Z garvinhicking $
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'Textformatierung: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Konvertiert Zeilenumbr<62>che zu HTML');
|
||||
12
plugins/serendipity_event_nl2br/lang_en.inc.php
Normal file
12
plugins/serendipity_event_nl2br/lang_en.inc.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php # $Id$
|
||||
|
||||
/**
|
||||
* @version $Revision$
|
||||
* @author Translator Name <yourmail@example.com>
|
||||
* EN-Revision: Revision of lang_en.inc.php
|
||||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'Markup: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Convert newlines to BR tags');
|
||||
|
||||
?>
|
||||
11
plugins/serendipity_event_nl2br/lang_es.inc.php
Normal file
11
plugins/serendipity_event_nl2br/lang_es.inc.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php # $Id: lang_es.inc.php,v 1.0 2005/08/20 11:37:42 garvinhicking Exp $
|
||||
/**
|
||||
* @version $Revision: 690 $
|
||||
* @author Rodrigo Lazo Paz <rlazo.paz@gmail.com>
|
||||
* EN-Revision: 690
|
||||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'Formato: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Convierte los saltos de linea en etiquetas BR');
|
||||
|
||||
?>
|
||||
20
plugins/serendipity_event_nl2br/lang_fr.inc.php
Normal file
20
plugins/serendipity_event_nl2br/lang_fr.inc.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $
|
||||
|
||||
##########################################################################
|
||||
# serendipity - another blogger... #
|
||||
##########################################################################
|
||||
# #
|
||||
# (c) 2003 Jannis Hermanns <J@hacked.it> #
|
||||
# http://www.jannis.to/programming/serendipity.html #
|
||||
# #
|
||||
# Translated by #
|
||||
# Sebastian Mordziol <argh@php-tools.net> #
|
||||
# http://sebastian.mordziol.de #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'Balises: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Convertit les retours <20> la ligne en balises BR');
|
||||
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
?>
|
||||
13
plugins/serendipity_event_nl2br/lang_ja.inc.php
Normal file
13
plugins/serendipity_event_nl2br/lang_ja.inc.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php # $Id$
|
||||
|
||||
/**
|
||||
* @version $Revision$
|
||||
* @author Tadashi Jokagi <elf2000@users.sourceforge.net>
|
||||
* EN-Revision: 690
|
||||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'マークアップ: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', '改行を BR タグに変換します。');
|
||||
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
?>
|
||||
8
plugins/serendipity_event_nl2br/lang_ko.inc.php
Normal file
8
plugins/serendipity_event_nl2br/lang_ko.inc.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php # $Id: lang_ko.inc.php,v 1.0 2005/06/29 13:41:13 garvinhicking Exp $
|
||||
# Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
|
||||
# (c) 2005 http://www.tool-box.info/
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', '마크업: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', '새 줄을 BR 태그로 변환함');
|
||||
|
||||
?>
|
||||
12
plugins/serendipity_event_nl2br/lang_pl.inc.php
Normal file
12
plugins/serendipity_event_nl2br/lang_pl.inc.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php # $Id: lang_en.inc.php 690 2005-11-13 04:49:04Z elf2000 $
|
||||
|
||||
/**
|
||||
* @version $Revision: 690 $
|
||||
* @author Kostas CoSTa Brzezinski <costa@kofeina.net>
|
||||
* EN-Revision: Revision of lang_en.inc.php
|
||||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'Znacznik: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Zmieniaj znaki nowych linii na tagi BR');
|
||||
|
||||
?>
|
||||
19
plugins/serendipity_event_nl2br/lang_pt_PT.inc.php
Normal file
19
plugins/serendipity_event_nl2br/lang_pt_PT.inc.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php # $Id:$
|
||||
|
||||
##########################################################################
|
||||
# serendipity - another blogger... #
|
||||
##########################################################################
|
||||
# #
|
||||
# (c) 2003 Jannis Hermanns <J@hacked.it> #
|
||||
# http://www.jannis.to/programming/serendipity.html #
|
||||
# #
|
||||
# Translated by #
|
||||
# Jo<4A>o P Matos <jmatos@math.ist.utl.pt> #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', 'C<>digo: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'Converte os fins de linha em etiquetas BR');
|
||||
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
?>
|
||||
17
plugins/serendipity_event_nl2br/lang_tn.inc.php
Normal file
17
plugins/serendipity_event_nl2br/lang_tn.inc.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php # $Id: $
|
||||
##########################################################################
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity #
|
||||
# Developer Team) All rights reserved. See LICENSE file for licensing #
|
||||
# details #
|
||||
# #
|
||||
# (c) 2003 Jannis Hermanns <J@hacked.it> #
|
||||
# http://www.jannis.to/programming/serendipity.html #
|
||||
# #
|
||||
# Translated by #
|
||||
# (c) 2004-2005 CapriSkye <admin@capriskye.com> #
|
||||
# http://open.38.com #
|
||||
##########################################################################
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', '標記語言: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', '轉換新行成 BR 標籤');
|
||||
?>
|
||||
17
plugins/serendipity_event_nl2br/lang_zh.inc.php
Normal file
17
plugins/serendipity_event_nl2br/lang_zh.inc.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php # $Id: $
|
||||
##########################################################################
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity #
|
||||
# Developer Team) All rights reserved. See LICENSE file for licensing #
|
||||
# details #
|
||||
# #
|
||||
# (c) 2003 Jannis Hermanns <J@hacked.it> #
|
||||
# http://www.jannis.to/programming/serendipity.html #
|
||||
# #
|
||||
# Translated by #
|
||||
# (c) 2006 Aphonex Li <aphonex.li@gmail.com> #
|
||||
# http://www.exten.cn #
|
||||
##########################################################################
|
||||
|
||||
@define('PLUGIN_EVENT_NL2BR_NAME', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: NL2BR');
|
||||
@define('PLUGIN_EVENT_NL2BR_DESC', 'ת<><D7AA><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD> BR <20><>ǩ');
|
||||
?>
|
||||
115
plugins/serendipity_event_nl2br/serendipity_event_nl2br.php
Normal file
115
plugins/serendipity_event_nl2br/serendipity_event_nl2br.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php # $Id$
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
include dirname(__FILE__) . '/lang_en.inc.php';
|
||||
|
||||
class serendipity_event_nl2br extends serendipity_event
|
||||
{
|
||||
var $title = PLUGIN_EVENT_NL2BR_NAME;
|
||||
|
||||
function introspect(&$propbag)
|
||||
{
|
||||
global $serendipity;
|
||||
|
||||
$propbag->add('name', PLUGIN_EVENT_NL2BR_NAME);
|
||||
$propbag->add('description', PLUGIN_EVENT_NL2BR_DESC);
|
||||
$propbag->add('stackable', false);
|
||||
$propbag->add('author', 'Serendipity Team');
|
||||
$propbag->add('version', '1.4');
|
||||
$propbag->add('requirements', array(
|
||||
'serendipity' => '0.8',
|
||||
'smarty' => '2.6.7',
|
||||
'php' => '4.1.0'
|
||||
));
|
||||
$propbag->add('cachable_events', array('frontend_display' => true));
|
||||
$propbag->add('event_hooks', array('frontend_display' => true));
|
||||
$propbag->add('groups', array('MARKUP'));
|
||||
|
||||
$this->markup_elements = array(
|
||||
array(
|
||||
'name' => 'ENTRY_BODY',
|
||||
'element' => 'body',
|
||||
),
|
||||
array(
|
||||
'name' => 'EXTENDED_BODY',
|
||||
'element' => 'extended',
|
||||
),
|
||||
array(
|
||||
'name' => 'COMMENT',
|
||||
'element' => 'comment',
|
||||
),
|
||||
array(
|
||||
'name' => 'HTML_NUGGET',
|
||||
'element' => 'html_nugget',
|
||||
)
|
||||
);
|
||||
|
||||
$conf_array = array();
|
||||
foreach($this->markup_elements as $element) {
|
||||
$conf_array[] = $element['name'];
|
||||
}
|
||||
$propbag->add('configuration', $conf_array);
|
||||
}
|
||||
|
||||
function install() {
|
||||
serendipity_plugin_api::hook_event('backend_cache_entries', $this->title);
|
||||
}
|
||||
|
||||
function uninstall() {
|
||||
serendipity_plugin_api::hook_event('backend_cache_purge', $this->title);
|
||||
serendipity_plugin_api::hook_event('backend_cache_entries', $this->title);
|
||||
}
|
||||
|
||||
function generate_content(&$title) {
|
||||
$title = $this->title;
|
||||
}
|
||||
|
||||
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');
|
||||
return true;
|
||||
}
|
||||
|
||||
function event_hook($event, &$bag, &$eventData) {
|
||||
global $serendipity;
|
||||
|
||||
$hooks = &$bag->get('event_hooks');
|
||||
|
||||
if (isset($hooks[$event])) {
|
||||
switch($event) {
|
||||
case 'frontend_display':
|
||||
|
||||
foreach ($this->markup_elements as $temp) {
|
||||
if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) &&
|
||||
!$eventData['properties']['ep_disable_markup_' . $this->instance] &&
|
||||
!isset($serendipity['POST']['properties']['disable_markup_' . $this->instance]) &&
|
||||
!$eventData['properties']['ep_no_nl2br'] &&
|
||||
!isset($serendipity['POST']['properties']['ep_no_nl2br'])) {
|
||||
|
||||
$element = $temp['element'];
|
||||
$eventData[$element] = nl2br($eventData[$element]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
?>
|
||||
Reference in New Issue
Block a user