Version 0.9 ()
------------------------------------------------------------------------
+ * Pagination of plugins to install to save memory allocation if many
+ plugins are downloaded (garvinhicking)
+
* Fix possible arbitrary media file upload for editors
(garvinhicking, sesser, nohn)
<td width="100" align="center"><strong>Action</strong></td>
</tr>
<?php
+ $plugin_navigation = '';
+
if (count($foreignPlugins) > 0) {
$pluginstack = $foreignPlugins['pluginstack'];
$errorstack = $foreignPlugins['errorstack'];
} else {
+ $pluginsPerPage = 45;
+ $currentPage = (int)(!empty($serendipity['GET']['page']) ? $serendipity['GET']['page'] : 1);
+ $countStart = ($currentPage-1) * $pluginsPerPage;
+ $countEnd = ($currentPage) * $pluginsPerPage;
+
$plugins = serendipity_plugin_api::get_installed_plugins();
$errorstack = $pluginstack = array();
- $classes = serendipity_plugin_api::enum_plugin_classes(($serendipity['GET']['type'] == 'event'));
+ $classes = serendipity_plugin_api::enum_plugin_classes(($serendipity['GET']['type'] == 'event'));
+ // TODO: With pagination of the plugins we cannot get the localized title of the plugins before sorting it.
+ // This means we get a weird order of the plugins. We need to find a way
+ // to do the sorting on the real plugin name WITHOUT loading ALL dozen plugins
+ usort($classes, 'serendipity_pluginListSort');
+
+ $maxPage = ceil(count($classes)/$pluginsPerPage);
+ $plugin_navigation = '<tr><td colspan="2" align="center">' . sprintf(PAGE_BROWSE_PLUGINS, $currentPage, $maxPage, count($classes)) . '<br />';
+ $plugin_pages = array();
+ for ($i = 1; $i <= $maxPage; $i++) {
+ $plugin_page = '';
+ if ($i == $currentPage) {
+ $plugin_page .= '<strong>';
+ }
+
+ $plugin_page .= '<a href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[type]=' . $serendipity['GET']['type'] . '&serendipity[page]=' . $i . '">' . $i . '</a>';
+
+ if ($i == $currentPage) {
+ $plugin_page .= '</strong>';
+ }
+
+ $plugin_pages[] = $plugin_page;
+ }
+ $plugin_navigation .= implode(' | ', $plugin_pages);
+
+ echo $plugin_navigation;
+
+ $counter = 0;
foreach ($classes as $class_data) {
+ $counter++;
+
+ if ($counter < $countStart || $counter > $countEnd) {
+ continue;
+ }
+
$plugin =& serendipity_plugin_api::load_plugin($class_data['name'], null, $class_data['pluginPath']);
if (is_object($plugin)) {
$bag = new serendipity_property_bag;
foreach($errorstack as $e_idx => $e_name) {
echo ERROR . ': ' . $e_name . '<br />';
}
-?>
-<?php
+
foreach ($pluginstack as $plug) {
$jsLine = " onmouseout=\"document.getElementById('serendipity_plugin_". $plug['class_name'] ."').className='';\"";
$jsLine .= " onmouseover=\"document.getElementById('serendipity_plugin_". $plug['class_name'] ."').className='serendipity_admin_list_item_uneven';\"";
</tr>
<?php
}
+
+ echo $plugin_navigation;
?>
</table>
}
$pluginData = array();
+ $addData = func_get_args();
+ serendipity_plugin_api::hook_event('frontend_generate_plugins', $plugins, $addData);
+
foreach ($plugins as $plugin_data) {
$plugin =& serendipity_plugin_api::load_plugin($plugin_data['name'], $plugin_data['authorid'], $plugin_data['path']);
if (is_object($plugin)) {
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
@define('BACKEND_TITLE_FOR_NUGGET', 'Here you can define a custom string which is displayed in the Plugin Configuration screen together with the description of the HTML Nugget plugin. If you have multiple HTML nuggets with an empty title, this helps to distinct the plugins from another.'); // Translate
@define('CATEGORIES_ALLOW_SELECT', 'Allow visitors to display multiple categories at once?'); // Translate
@define('CATEGORIES_ALLOW_SELECT_DESC', 'If this option is enabled, a checkbox will be put next to each category in this sidebar plugin. Users can check those boxes and then see entries belonging to their selection.'); // Translate
+@define('PAGE_BROWSE_PLUGINS', 'Page %s of %s, totalling %s plugins.');
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file