From 56c3d5dbcbdbaef9df7cb03d24e67ad8c4a157d0 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 29 Oct 2017 22:00:03 -0700 Subject: add some documentation about shareable widgets --- doc/Widgets.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/Widgets.md b/doc/Widgets.md index 4ad899a0f..7761b1833 100644 --- a/doc/Widgets.md +++ b/doc/Widgets.md @@ -129,14 +129,44 @@ Some/many of these widgets have restrictions which may restrict the type of page Creating New Widgets ==================== -If you want a widget named 'slugfish', create widget/slugfish.php containing +### Class Widgets + +To create a class-based widget named 'slugfish' create a file with the following contents: + +```` + 3 ] + + } + +```` + +The resultant file may be placed in widget/Slugfish/Slugfish.php , or Zotlabs/SiteWidgets/Slugfish.php . It also may be linked from a git repository using util/add_widget_repo. + + + +Traditional function based widget: + +If you want a widget named 'slugfish', create widget/widget_slugfish.php containing