Update textile
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
Version 1.3 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Updated Textile library to 2.0, by Lars Strojny
|
||||
|
||||
* Allow the "send mail" plugin to send mails to all registered
|
||||
authors (garvinhicking)
|
||||
|
||||
|
||||
@@ -3,3 +3,6 @@
|
||||
@define('PLUGIN_EVENT_TEXTILE_NAME', 'Textformatierung: Textile');
|
||||
@define('PLUGIN_EVENT_TEXTILE_DESC', 'Textile-Formatierung durchführen');
|
||||
@define('PLUGIN_EVENT_TEXTILE_TRANSFORM', '<a href="http://www.textism.com/tools/textile/">Textile</a>-Formatierung erlaubt');
|
||||
@define('PLUGIN_EVENT_TEXTILE_VERSION', 'Textile-Version');
|
||||
@define('PLUGIN_EVENT_TEXTILE_VERSION_DESCRIPTION', 'Welche Version von Textile soll verwendet werden?');
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,3 +3,6 @@
|
||||
@define('PLUGIN_EVENT_TEXTILE_NAME', 'Textformatierung: Textile');
|
||||
@define('PLUGIN_EVENT_TEXTILE_DESC', 'Textile-Formatierung durchführen');
|
||||
@define('PLUGIN_EVENT_TEXTILE_TRANSFORM', '<a href="http://www.textism.com/tools/textile/">Textile</a>-Formatierung erlaubt');
|
||||
@define('PLUGIN_EVENT_TEXTILE_VERSION', 'Textile-Version');
|
||||
@define('PLUGIN_EVENT_TEXTILE_VERSION_DESCRIPTION', 'Welche Version von Textile soll verwendet werden?');
|
||||
|
||||
|
||||
@@ -9,5 +9,6 @@
|
||||
@define('PLUGIN_EVENT_TEXTILE_NAME', 'Markup: Textile');
|
||||
@define('PLUGIN_EVENT_TEXTILE_DESC', 'Parse all output through the Textile converter');
|
||||
@define('PLUGIN_EVENT_TEXTILE_TRANSFORM', '<a href="http://www.textism.com/tools/textile/">Textile</a>-formatting allowed');
|
||||
|
||||
@define('PLUGIN_EVENT_TEXTILE_VERSION', 'Textile version');
|
||||
@define('PLUGIN_EVENT_TEXTILE_VERSION_DESCRIPTION', 'Which version of Textile do you want to use?');
|
||||
?>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?php # $Id$
|
||||
|
||||
require_once S9Y_INCLUDE_PATH . 'plugins/serendipity_event_textile/textile.php';
|
||||
|
||||
|
||||
if (IN_serendipity !== true) {
|
||||
@@ -26,8 +25,8 @@ class serendipity_event_textile extends serendipity_event
|
||||
$propbag->add('name', PLUGIN_EVENT_TEXTILE_NAME);
|
||||
$propbag->add('description', PLUGIN_EVENT_TEXTILE_DESC);
|
||||
$propbag->add('stackable', false);
|
||||
$propbag->add('author', 'Serendipity Team');
|
||||
$propbag->add('version', '1.4');
|
||||
$propbag->add('author', 'Serendipity Team', 'Lars Strojny');
|
||||
$propbag->add('version', '1.5');
|
||||
$propbag->add('requirements', array(
|
||||
'serendipity' => '0.8',
|
||||
'smarty' => '2.6.7',
|
||||
@@ -68,6 +67,7 @@ class serendipity_event_textile extends serendipity_event
|
||||
foreach($this->markup_elements as $element) {
|
||||
$conf_array[] = $element['name'];
|
||||
}
|
||||
$conf_array[] = 'textile_version';
|
||||
$propbag->add('configuration', $conf_array);
|
||||
}
|
||||
|
||||
@@ -87,6 +87,17 @@ class serendipity_event_textile extends serendipity_event
|
||||
|
||||
function introspect_config_item($name, &$propbag)
|
||||
{
|
||||
if ($name === 'textile_version') {
|
||||
$propbag->add('type', 'radio');
|
||||
$propbag->add('name', PLUGIN_EVENT_TEXTILE_VERSION);
|
||||
$propbag->add('description', PLUGIN_EVENT_TEXTILE_VERSION_DESCRIPTION);
|
||||
$propbag->add('radio', array(
|
||||
'value' => array(1, 2),
|
||||
'desc' => array('1.0', '2.0'),
|
||||
));
|
||||
$propbag->add('default', 2);
|
||||
return true;
|
||||
}
|
||||
$propbag->add('type', 'boolean');
|
||||
$propbag->add('name', constant($name));
|
||||
$propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name)));
|
||||
@@ -133,7 +144,7 @@ class serendipity_event_textile extends serendipity_event
|
||||
|
||||
/* textile it */
|
||||
|
||||
$eventData[$element] = textile($eventData[$element]);
|
||||
$eventData[$element] = $this->textile($eventData[$element]);
|
||||
|
||||
/* each block will now be "<code>BLOCK::2</code>"
|
||||
* so look for those place holders and replace
|
||||
@@ -230,6 +241,16 @@ class serendipity_event_textile extends serendipity_event
|
||||
return '<a name="'. $text . '"></a>';
|
||||
}
|
||||
|
||||
function textile($string) {
|
||||
if ($this->get_config('textile_version') == 2) {
|
||||
require_once S9Y_INCLUDE_PATH . 'plugins/serendipity_event_textile/classTextile.php';
|
||||
$textile = new Textile();
|
||||
return $textile->textileThis($string);
|
||||
} else {
|
||||
require_once S9Y_INCLUDE_PATH . 'plugins/serendipity_event_textile/textile.php';
|
||||
return textile($string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
|
||||
Reference in New Issue
Block a user