aboutsummaryrefslogtreecommitdiffstats
path: root/doc/Plugins.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Plugins.md')
-rw-r--r--doc/Plugins.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/Plugins.md b/doc/Plugins.md
index f92f4c3f2..90ff0fb7d 100644
--- a/doc/Plugins.md
+++ b/doc/Plugins.md
@@ -1,3 +1,4 @@
+
Creating Plugins/Addons for the $Projectname
==========================================
@@ -7,6 +8,7 @@ So you want to make the $Projectname do something it doesn't already do. There a
In your $Projectname folder/directory, you will probably see a sub-directory called 'addon'. If you don't have one already, go ahead and create it.
+
mkdir addon
Then figure out a name for your addon. You probably have at least a vague idea of what you want it to do. For our example I'm going to create a plugin called 'randplace' that provides a somewhat random location for each of your posts. The name of your plugin is used to find the functions we need to access and is part of the function names, so to be safe, use only simple text characters.
@@ -99,8 +101,8 @@ Let's go ahead and add some code to implement our post_local hook handler.
if(local_channel() != $item['uid']) /* Does this person own the post? */
return;
- if(($item['parent']) || ($item['item_restrict'])) {
- /* If the item has a parent, or item_restrict is non-zero, this is a comment or something else, not a status post. */
+ if(($item['parent']) || (! is_item_normal($item))) {
+ /* If the item has a parent, or isn't "normal", this is a comment or something else, not a status post. */
return;
}