Show "Edit this plugin" link for every sidebar plugin
This commit is contained in:
@ -3,6 +3,9 @@
|
|||||||
Version 1.4 ()
|
Version 1.4 ()
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
* Add a "Configure this plugin" link to the frontend output for
|
||||||
|
every sidebar plugin, not only HTML nuggets. (garvinhicking)
|
||||||
|
|
||||||
* Enhance entryproperties plugin to use sequencing widget: Allows
|
* Enhance entryproperties plugin to use sequencing widget: Allows
|
||||||
you to configure which fields you want to see in the 'Edit Entry'
|
you to configure which fields you want to see in the 'Edit Entry'
|
||||||
panel for "Advanced Options". (garvinhicking)
|
panel for "Advanced Options". (garvinhicking)
|
||||||
|
@ -830,6 +830,8 @@ class serendipity_plugin_api
|
|||||||
if (count($plugins) == 0) {
|
if (count($plugins) == 0) {
|
||||||
$serendipity['prevent_sidebar_plugins_' . $side] = true;
|
$serendipity['prevent_sidebar_plugins_' . $side] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$loggedin = serendipity_userLoggedIn();
|
||||||
|
|
||||||
foreach ($plugins AS $plugin_data) {
|
foreach ($plugins AS $plugin_data) {
|
||||||
$plugin =& serendipity_plugin_api::load_plugin($plugin_data['name'], $plugin_data['authorid'], $plugin_data['path']);
|
$plugin =& serendipity_plugin_api::load_plugin($plugin_data['name'], $plugin_data['authorid'], $plugin_data['path']);
|
||||||
@ -842,6 +844,10 @@ class serendipity_plugin_api
|
|||||||
$show_plugin = $plugin->generate_content($title);
|
$show_plugin = $plugin->generate_content($title);
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
|
if ($loggedin) {
|
||||||
|
$content .= '<div class="serendipity_edit_nugget"><a href="' . $serendipity['serendipityHTTPPath'] . 'serendipity_admin.php?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . htmlentities($plugin->instance) . '">' . ADMIN . ': ' . EDIT . '</a></div>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($show_plugin !== false) {
|
if ($show_plugin !== false) {
|
||||||
$pluginData[] = array('side' => $side,
|
$pluginData[] = array('side' => $side,
|
||||||
|
@ -1354,6 +1354,7 @@ class serendipity_html_nugget_plugin extends serendipity_plugin {
|
|||||||
echo $this->get_config('content');
|
echo $this->get_config('content');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* THIS FUNCTIONALITY IS NOW IN THE CORE, YET A BIT REDUCED [performance]
|
||||||
if (serendipity_userLoggedIn()) {
|
if (serendipity_userLoggedIn()) {
|
||||||
$is_plugin_owner = ($this->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers'));
|
$is_plugin_owner = ($this->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers'));
|
||||||
|
|
||||||
@ -1361,6 +1362,7 @@ class serendipity_html_nugget_plugin extends serendipity_plugin {
|
|||||||
echo '<div class="serendipity_edit_nugget"><a href="' . $serendipity['baseURL'] . '/serendipity_admin.php?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . htmlentities($this->instance) . '">' . EDIT . '</a></div>';
|
echo '<div class="serendipity_edit_nugget"><a href="' . $serendipity['baseURL'] . '/serendipity_admin.php?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . htmlentities($this->instance) . '">' . EDIT . '</a></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user