add to 4cde8ac
This commit is contained in:
parent
4cde8ac427
commit
259c76df98
|
@ -1,3 +1,8 @@
|
|||
1.13:
|
||||
-----
|
||||
Add lang <de>
|
||||
Add new option for case bottom, closing a div class with certain templates
|
||||
|
||||
1.12:
|
||||
-----
|
||||
Add ability for "plaintext" markup
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
# Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
|
||||
# (c) 2005 http://www.tool-box.info/
|
||||
|
||||
|
@ -20,3 +20,4 @@
|
|||
@define('PLUGIN_PAGE_NUGGET_LANG', 'Език');
|
||||
@define('PLUGIN_PAGE_NUGGET_ALL', 'Всички езици');
|
||||
@define('PLUGIN_PAGE_NUGGET_NOSHOW', ' (не се показва на действителната страница)');
|
||||
|
||||
|
|
|
@ -18,4 +18,3 @@
|
|||
@define('PLUGIN_PAGE_NUGGET_ALL', 'Všechny jazyky');
|
||||
@define('PLUGIN_PAGE_NUGGET_NOSHOW', ' Nezobrazuje se na aktuální stránce.');
|
||||
|
||||
?>
|
||||
|
|
|
@ -18,4 +18,3 @@
|
|||
@define('PLUGIN_PAGE_NUGGET_ALL', 'Všechny jazyky');
|
||||
@define('PLUGIN_PAGE_NUGGET_NOSHOW', ' Nezobrazuje se na aktuální stránce.');
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Matthias Mees <mm@yellowled.de>
|
||||
|
@ -18,4 +18,7 @@
|
|||
@define('PLUGIN_PAGE_NUGGET_NOSHOW', ' (Wird nie auf Seite(n) angezeigt.)');
|
||||
@define('PLUGIN_PAGE_NUGGET_RSS', 'In RSS/Atom-Feeds');
|
||||
@define('PLUGIN_PAGE_NUGGET_CONTENT', 'Zusätzlich zu HTML-formatierten Inhalten kann hier jedes spezifische HTML-Markup angegeben werden. Es wird zusammen mit den oben angegebenen Inhalten ausgegeben. Man kann also entweder beide Inhaltsfelder oder nur eines von beiden ausfüllen. Dieses Inhaltsfeld ist besonders nützlich, wenn man einen WYSIWYG-Editor verwendet, da dieser bestimmte HTML-Elemente, die man vielleicht einfügen möchte, entfernen würde (wie z.B. das meta-Element).');
|
||||
?>
|
||||
|
||||
@define('PLUGIN_PAGE_NUGGET_CLOSE_FOOTER_DIV', 'Schließe "div" bei Auswahl: "Am Ende des Seiteninhalts"?');
|
||||
@define('PLUGIN_PAGE_NUGGET_CLOSE_FOOTER_DIV_DESC', 'Schließt vorher eine eventuell vorhandene <div class="serendipity_entryFooter"> Klasse für bestimmte "ältere" Templates.');
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
# Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
|
||||
# (c) 2005 http://www.tool-box.info/
|
||||
|
||||
|
@ -15,4 +15,3 @@
|
|||
@define('PLUGIN_PAGE_NUGGET_ALL', '모든 언어');
|
||||
@define('PLUGIN_PAGE_NUGGET_NOSHOW', ' 페이지에는 실제로 나타나지 않습니다.');
|
||||
|
||||
?>
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
# Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
|
||||
# (c) 2005 http://www.tool-box.info/
|
||||
|
||||
|
@ -20,3 +20,4 @@
|
|||
@define('PLUGIN_PAGE_NUGGET_LANG', 'Åçèê');
|
||||
@define('PLUGIN_PAGE_NUGGET_ALL', 'Âñè÷êè åçèöè');
|
||||
@define('PLUGIN_PAGE_NUGGET_NOSHOW', ' (íå ñå ïîêàçâà íà äåéñòâèòåëíàòà ñòðàíèöà)');
|
||||
|
||||
|
|
|
@ -18,4 +18,3 @@
|
|||
@define('PLUGIN_PAGE_NUGGET_ALL', 'Všechny jazyky');
|
||||
@define('PLUGIN_PAGE_NUGGET_NOSHOW', ' Nezobrazuje se na aktuální stránce.');
|
||||
|
||||
?>
|
||||
|
|
|
@ -18,4 +18,3 @@
|
|||
@define('PLUGIN_PAGE_NUGGET_ALL', 'V¹echny jazyky');
|
||||
@define('PLUGIN_PAGE_NUGGET_NOSHOW', ' Nezobrazuje se na aktuální stránce.');
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Matthias Mees <mm@yellowled.de>
|
||||
|
@ -18,4 +18,7 @@
|
|||
@define('PLUGIN_PAGE_NUGGET_NOSHOW', ' (Wird nie auf Seite(n) angezeigt.)');
|
||||
@define('PLUGIN_PAGE_NUGGET_RSS', 'In RSS/Atom-Feeds');
|
||||
@define('PLUGIN_PAGE_NUGGET_CONTENT', 'Zusätzlich zu HTML-formatierten Inhalten kann hier jedes spezifische HTML-Markup angegeben werden. Es wird zusammen mit den oben angegebenen Inhalten ausgegeben. Man kann also entweder beide Inhaltsfelder oder nur eines von beiden ausfüllen. Dieses Inhaltsfeld ist besonders nützlich, wenn man einen WYSIWYG-Editor verwendet, da dieser bestimmte HTML-Elemente, die man vielleicht einfügen möchte, entfernen würde (wie z.B. das meta-Element).');
|
||||
?>
|
||||
|
||||
@define('PLUGIN_PAGE_NUGGET_CLOSE_FOOTER_DIV', 'Schließe "div" bei Auswahl: "Am Ende des Seiteninhalts"?');
|
||||
@define('PLUGIN_PAGE_NUGGET_CLOSE_FOOTER_DIV_DESC', 'Schließt vorher eine eventuell vorhandene <div class="serendipity_entryFooter"> Klasse für bestimmte "ältere" Templates.');
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version
|
||||
|
@ -20,4 +20,7 @@
|
|||
@define('PLUGIN_PAGE_NUGGET_NOSHOW', ' It does not show up on the actual page.');
|
||||
@define('PLUGIN_PAGE_NUGGET_RSS', 'RSS/Atom feeds');
|
||||
@define('PLUGIN_PAGE_NUGGET_CONTENT', 'On top of the HTML-formatted content, you can also add any specific HTML markup here. This will be emitted additionally to the content above, so you can either fill out both contents, or only one of them. This content area is specifically helpful if you are using a WYSIWYG-Editor which would otherwise strip out specific HTML tags (like META tags) you might want to add.');
|
||||
?>
|
||||
|
||||
@define('PLUGIN_PAGE_NUGGET_CLOSE_FOOTER_DIV', 'Close "div" for case "Bottom of the content"?');
|
||||
@define('PLUGIN_PAGE_NUGGET_CLOSE_FOOTER_DIV_DESC', 'Get out of a possible <div class="serendipity_entryFooter"> class for certain "older" templates');
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
# Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
|
||||
# (c) 2005 http://www.tool-box.info/
|
||||
|
||||
|
@ -15,4 +15,3 @@
|
|||
@define('PLUGIN_PAGE_NUGGET_ALL', '모든 언어');
|
||||
@define('PLUGIN_PAGE_NUGGET_NOSHOW', ' 페이지에는 실제로 나타나지 않습니다.');
|
||||
|
||||
?>
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
if (IN_serendipity !== true) {
|
||||
die ("Don't hack!");
|
||||
|
@ -36,7 +36,7 @@ class serendipity_event_page_nugget extends serendipity_event
|
|||
'entries_footer' => true,
|
||||
'frontend_footer' => true,
|
||||
'frontend_display' => true));
|
||||
$propbag->add('configuration', array('title', 'placement', 'language', 'content', 'content_plain', 'markup', 'show_where'));
|
||||
$propbag->add('configuration', array('title', 'placement', 'language', 'content', 'content_plain', 'footer_close', 'markup', 'show_where'));
|
||||
}
|
||||
|
||||
function introspect_config_item($name, &$propbag)
|
||||
|
@ -111,6 +111,13 @@ class serendipity_event_page_nugget extends serendipity_event
|
|||
$propbag->add('default', '');
|
||||
break;
|
||||
|
||||
case 'footer_close':
|
||||
$propbag->add('type', 'boolean');
|
||||
$propbag->add('name', PLUGIN_PAGE_NUGGET_CLOSE_FOOTER_DIV);
|
||||
$propbag->add('description', PLUGIN_PAGE_NUGGET_CLOSE_FOOTER_DIV_DESC);
|
||||
$propbag->add('default', 'true');
|
||||
break;
|
||||
|
||||
case 'markup':
|
||||
$propbag->add('type', 'boolean');
|
||||
$propbag->add('name', DO_MARKUP);
|
||||
|
@ -151,7 +158,7 @@ class serendipity_event_page_nugget extends serendipity_event
|
|||
// RSS-Feed special case
|
||||
if ($event == 'frontend_display' && $addData['from'] == 'functions_entries:printEntries_rss') {
|
||||
if ($placement == 'rss') {
|
||||
if ($this->get_config('markup', 'true') == 'true' && $event != 'frontend_header') {
|
||||
if (serendipity_db_bool($this->get_config('markup', 'true')) && $event != 'frontend_header') {
|
||||
$entry = array('html_nugget' => $this->get_config('content'));
|
||||
serendipity_plugin_api::hook_event('frontend_display', $entry);
|
||||
$eventData['body'] .= $entry['html_nugget'] . $this->get_config('content_plain');
|
||||
|
@ -175,9 +182,11 @@ class serendipity_event_page_nugget extends serendipity_event
|
|||
($placement == 'bottom' && $event == 'entries_footer') ||
|
||||
($placement == 'foot' && $event == 'frontend_footer')) {
|
||||
// entries_footer hook location workaround: get out of the 'serendipity_entryFooter' class
|
||||
if ($event == 'entries_footer') echo '</div><div>';
|
||||
if (serendipity_db_bool($this->get_config('footer_close', 'true')) && $event == 'entries_footer') {
|
||||
echo "\n</div>\n<div>\n";
|
||||
}
|
||||
// if not for HEAD, apply markup?
|
||||
if ($this->get_config('markup', 'true') == 'true' && $event != 'frontend_header') {
|
||||
if (serendipity_db_bool($this->get_config('markup', 'true')) && $event != 'frontend_header') {
|
||||
$entry = array('html_nugget' => $this->get_config('content'));
|
||||
serendipity_plugin_api::hook_event('frontend_display', $entry);
|
||||
echo $entry['html_nugget'] . $this->get_config('content_plain');
|
||||
|
@ -189,12 +198,12 @@ class serendipity_event_page_nugget extends serendipity_event
|
|||
if (!is_array($eventData)) return false;
|
||||
$elements = count($eventData);
|
||||
for ($i = 0; $i < $elements; $i++) {
|
||||
if ($this->get_config('markup', 'true') == 'true') {
|
||||
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);
|
||||
$eventData[$i]['add_footer'] .= sprintf('</div>' . $entry['html_nugget'] . $this->get_config('content_plain') . '<div>');
|
||||
$eventData[$i]['add_footer'] .= sprintf("\n</div>\n" . $entry['html_nugget'] . $this->get_config('content_plain') . "\n<div>\n");
|
||||
} else {
|
||||
$eventData[$i]['add_footer'] .= sprintf('</div>' . $this->get_config('content') . $this->get_config('content_plain') . '<div>');
|
||||
$eventData[$i]['add_footer'] .= sprintf("\n</div>\n" . $this->get_config('content') . $this->get_config('content_plain') . "\n<div>\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -202,3 +211,5 @@ class serendipity_event_page_nugget extends serendipity_event
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in a new issue