]> git.mjollnir.org Git - s9y.git/commitdiff
allow EDIT button
authorgarvinhicking <garvinhicking>
Fri, 9 Dec 2005 13:19:23 +0000 (13:19 +0000)
committergarvinhicking <garvinhicking>
Fri, 9 Dec 2005 13:19:23 +0000 (13:19 +0000)
docs/NEWS
include/plugin_internal.inc.php

index ce5db2aaf39338d36302789212381ccd9bc4375b..71f946258fcf4155293f955854a72b90be73e5a7 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,8 @@
 Version 1.0 ()
 ------------------------------------------------------------------------
 
+   * Allow to edit a HTML nugget with a frontend link (garvinhicking)
+
    * Added sidebar plugin to show statistical data (garvinhicking)
 
    * Changed detection of "last_modified" timestamp, so that the date
index 8490d737cc8e989a8b79cd06137cd770aa236412..73413644175af6e1b9a7bbf3953aa025b39dc68a 100644 (file)
@@ -1177,6 +1177,14 @@ class serendipity_html_nugget_plugin extends serendipity_plugin {
         } else {
             echo $this->get_config('content');
         }
+        
+        if (serendipity_userLoggedIn()) {
+            $is_plugin_owner    = ($this->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers'));
+            
+            if ($is_plugin_owner) {
+                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>';
+            }
+        }
     }
 }