upstream patch by ian
This commit is contained in:
parent
f701a87ab9
commit
bbcc4184da
|
@ -1 +1,12 @@
|
|||
1.6: Fix pagination being off by one page, thanks to montebianco
|
||||
1.7.2:
|
||||
------
|
||||
|
||||
* Set plugin consistencies
|
||||
* Add missing db type for mysqli cases
|
||||
* Use load language API - extends required Serendipity version to v.1.6
|
||||
|
||||
|
||||
1.6:
|
||||
----
|
||||
* Fix pagination being off by one page, thanks to montebianco
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version
|
||||
|
@ -6,5 +6,6 @@
|
|||
* EN-Revision: 1.1
|
||||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Филтриране на статии');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Позволява посетителите да филтрират статиите по различни критерии');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Филтриране на статии');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Позволява посетителите да филтрират статиите по различни критерии');
|
||||
|
||||
|
|
|
@ -8,4 +8,5 @@
|
|||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Filtrování příspěvků');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Umožňuje návštěvníkům blogu filtrovat/řadit příspěvky podle různých pravidel');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Umožňuje návštěvníkům blogu filtrovat/řadit příspěvky podle různých pravidel');
|
||||
|
||||
|
|
|
@ -8,4 +8,5 @@
|
|||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Filtrování příspěvků');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Umožňuje návštěvníkům blogu filtrovat/řadit příspěvky podle různých pravidel');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Umožňuje návštěvníkům blogu filtrovat/řadit příspěvky podle různých pravidel');
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Filtern von Einträgen im Frontend');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Ermöglich Besuchern die Einträge im Blog nach Kriterien zu durchsuchen/sortieren');
|
||||
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Filtern von Einträgen im Frontend');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Ermöglich Besuchern die Einträge im Blog nach Kriterien zu durchsuchen/sortieren');
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
|
||||
<title>Dokumentace: Filtrování příspěvků</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Dokumentace k pluginu 'Filtrování příspěvků'<br />
|
||||
<small>(serendipity_event_filter_entries)</small></h1>
|
||||
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 23.6.2013. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="ChangeLog">aktuální anglický ChangeLog</a>.
|
||||
</p>
|
||||
|
||||
<h2>Popis pluginu</h2>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
|
||||
<title>Dokumentace: Filtrování příspěvků</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Dokumentace k pluginu 'Filtrování příspěvků'<br />
|
||||
<small>(serendipity_event_filter_entries)</small></h1>
|
||||
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 23.6.2013. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="ChangeLog">aktuální anglický ChangeLog</a>.
|
||||
</p>
|
||||
|
||||
<h2>Popis pluginu</h2>
|
||||
<p>Umožňuje návštěvníkům blogu filtrovat/řadit příspěvky podle různých pravidel.
|
||||
</p>
|
||||
|
||||
<h2>Historie verzí (ChangeLog)</h2>
|
||||
<ul>
|
||||
<li>verze 1.6</li>
|
||||
<ul>
|
||||
<li>Oprava stránkování - vypnutí, pokud je pouze jediný stránka. Díky uživeteli [montebianco]</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</body>
|
||||
|
||||
<h2>Historie verzí (ChangeLog)</h2>
|
||||
<ul>
|
||||
<li>verze 1.6</li>
|
||||
<ul>
|
||||
<li>Oprava stránkování - vypnutí, pokud je pouze jediný stránka. Díky uživeteli [montebianco]</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
|
||||
<title>Dokumentace: Filtrování příspěvků</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Dokumentace k pluginu 'Filtrování příspěvků'<br />
|
||||
<small>(serendipity_event_filter_entries)</small></h1>
|
||||
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 23.6.2013. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="ChangeLog">aktuální anglický ChangeLog</a>.
|
||||
</p>
|
||||
|
||||
<h2>Popis pluginu</h2>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
|
||||
<title>Dokumentace: Filtrování příspěvků</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Dokumentace k pluginu 'Filtrování příspěvků'<br />
|
||||
<small>(serendipity_event_filter_entries)</small></h1>
|
||||
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 23.6.2013. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="ChangeLog">aktuální anglický ChangeLog</a>.
|
||||
</p>
|
||||
|
||||
<h2>Popis pluginu</h2>
|
||||
<p>Umožňuje návštěvníkům blogu filtrovat/řadit příspěvky podle různých pravidel.
|
||||
</p>
|
||||
|
||||
<h2>Historie verzí (ChangeLog)</h2>
|
||||
<ul>
|
||||
<li>verze 1.6</li>
|
||||
<ul>
|
||||
<li>Oprava stránkování - vypnutí, pokud je pouze jediný stránka. Díky uživeteli [montebianco]</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</body>
|
||||
|
||||
<h2>Historie verzí (ChangeLog)</h2>
|
||||
<ul>
|
||||
<li>verze 1.6</li>
|
||||
<ul>
|
||||
<li>Oprava stránkování - vypnutí, pokud je pouze jediný stránka. Díky uživeteli [montebianco]</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version
|
||||
|
@ -6,5 +6,6 @@
|
|||
* EN-Revision: 1.1
|
||||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Ôèëòðèðàíå íà ñòàòèè');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Ïîçâîëÿâà ïîñåòèòåëèòå äà ôèëòðèðàò ñòàòèèòå ïî ðàçëè÷íè êðèòåðèè');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Ôèëòðèðàíå íà ñòàòèè');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Ïîçâîëÿâà ïîñåòèòåëèòå äà ôèëòðèðàò ñòàòèèòå ïî ðàçëè÷íè êðèòåðèè');
|
||||
|
||||
|
|
|
@ -8,4 +8,5 @@
|
|||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Filtrování pøíspìvkù');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Umožòuje návštìvníkùm blogu filtrovat/øadit pøíspìvky podle rùzných pravidel');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Umožòuje návštìvníkùm blogu filtrovat/øadit pøíspìvky podle rùzných pravidel');
|
||||
|
||||
|
|
|
@ -8,4 +8,5 @@
|
|||
*/
|
||||
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Filtrování pøíspìvkù');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Umo¾òuje náv¹tìvníkùm blogu filtrovat/øadit pøíspìvky podle rùzných pravidel');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Umo¾òuje náv¹tìvníkùm blogu filtrovat/øadit pøíspìvky podle rùzných pravidel');
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Filtern von Einträgen im Frontend');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Ermöglich Besuchern die Einträge im Blog nach Kriterien zu durchsuchen/sortieren');
|
||||
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Filtern von Einträgen im Frontend');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Ermöglich Besuchern die Einträge im Blog nach Kriterien zu durchsuchen/sortieren');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version
|
||||
|
@ -9,4 +9,3 @@
|
|||
@define('PLUGIN_EVENT_FILTER_ENTRIES_NAME', 'Frontend entry filtering');
|
||||
@define('PLUGIN_EVENT_FILTER_ENTRIES_DESC', 'Allows visitors to filter/order your entries by several options');
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,17 +1,10 @@
|
|||
<?php #
|
||||
|
||||
<?php
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
include dirname(__FILE__) . '/lang_en.inc.php';
|
||||
@serendipity_plugin_api::load_language(dirname(__FILE__));
|
||||
|
||||
class serendipity_event_filter_entries extends serendipity_event
|
||||
{
|
||||
|
@ -25,10 +18,10 @@ class serendipity_event_filter_entries extends serendipity_event
|
|||
$propbag->add('name', PLUGIN_EVENT_FILTER_ENTRIES_NAME);
|
||||
$propbag->add('description', PLUGIN_EVENT_FILTER_ENTRIES_DESC);
|
||||
$propbag->add('stackable', false);
|
||||
$propbag->add('author', 'Garvin Hicking');
|
||||
$propbag->add('version', '1.7.1');
|
||||
$propbag->add('author', 'Garvin Hicking, Ian');
|
||||
$propbag->add('version', '1.7.2');
|
||||
$propbag->add('requirements', array(
|
||||
'serendipity' => '0.8',
|
||||
'serendipity' => '1.6',
|
||||
'smarty' => '2.6.7',
|
||||
'php' => '4.1.0'
|
||||
));
|
||||
|
@ -41,11 +34,13 @@ class serendipity_event_filter_entries extends serendipity_event
|
|||
$propbag->add('groups', array('FRONTEND_VIEWS'));
|
||||
}
|
||||
|
||||
function generate_content(&$title) {
|
||||
function generate_content(&$title)
|
||||
{
|
||||
$title = $this->title;
|
||||
}
|
||||
|
||||
function event_hook($event, &$bag, &$eventData, $addData = null) {
|
||||
function event_hook($event, &$bag, &$eventData, $addData = null)
|
||||
{
|
||||
global $serendipity;
|
||||
|
||||
$hooks = &$bag->get('event_hooks');
|
||||
|
@ -108,7 +103,7 @@ class serendipity_event_filter_entries extends serendipity_event
|
|||
<?php
|
||||
$categories = serendipity_fetchCategories();
|
||||
$categories = serendipity_walkRecursive($categories, 'categoryid', 'parentid', VIEWMODE_THREADED);
|
||||
foreach ( $categories as $cat ) {
|
||||
foreach ( $categories AS $cat ) {
|
||||
echo '<option value="'. $cat['categoryid'] .'"'. ($_SESSION['filter']['category'] == $cat['categoryid'] ? ' selected="selected"' : '') .'>'. str_repeat(' ', $cat['depth']) . $cat['category_name'] .'</option>' . "\n";
|
||||
}
|
||||
?> </select>
|
||||
|
@ -124,7 +119,7 @@ class serendipity_event_filter_entries extends serendipity_event
|
|||
<td>
|
||||
<select name="sort[order]">
|
||||
<?php
|
||||
foreach($sort_order as $so_key => $so_val) {
|
||||
foreach($sort_order AS $so_key => $so_val) {
|
||||
echo '<option value="' . $so_key . '" ' . (isset($_SESSION['sort']['order']) && $_SESSION['sort']['order'] == $so_key ? 'selected="selected"': '') . '>' . $so_val . '</option>' . "\n";
|
||||
}
|
||||
?> </select>
|
||||
|
@ -155,7 +150,6 @@ class serendipity_event_filter_entries extends serendipity_event
|
|||
</form>
|
||||
</div>
|
||||
<?php
|
||||
return true;
|
||||
break;
|
||||
|
||||
case 'external_plugin':
|
||||
|
@ -206,7 +200,7 @@ class serendipity_event_filter_entries extends serendipity_event
|
|||
}
|
||||
|
||||
/* Attempt to locate hidden variables within the URI */
|
||||
foreach ($serendipity['uriArguments'] as $k => $v){
|
||||
foreach ($serendipity['uriArguments'] AS $k => $v){
|
||||
if ($v[0] == 'P') { /* Page */
|
||||
$page = substr($v, 1);
|
||||
if (is_numeric($page)) {
|
||||
|
@ -249,7 +243,7 @@ class serendipity_event_filter_entries extends serendipity_event
|
|||
}
|
||||
|
||||
if (!empty($_SESSION['filter']['body'])) {
|
||||
if ($serendipity['dbType'] == 'mysql') {
|
||||
if ($serendipity['dbType'] == 'mysql' || $serendipity['dbType'] == 'mysqli') {
|
||||
$filter[] = "MATCH (title,body,extended) AGAINST ('" . serendipity_db_escape_string($_SESSION['filter']['body']) . "')";
|
||||
$full = true;
|
||||
}
|
||||
|
@ -282,18 +276,18 @@ class serendipity_event_filter_entries extends serendipity_event
|
|||
$serendipity['smarty']->display(serendipity_getTemplateFile($serendipity['smarty_file'], 'serendipityPath'));
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
?>
|
Loading…
Reference in a new issue