diff options
author | zotlabs <mike@macgirvin.com> | 2017-03-15 16:55:47 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-03-15 16:55:47 -0700 |
commit | df6c07aaadda2e89d2843bae136f813c909637ba (patch) | |
tree | 295d72d88f6986c06399e0eef148048daf8367e1 /Zotlabs/Widget/Notes.php | |
parent | c95e9b9ba52b8376eea079850caf178e223a1a6d (diff) | |
download | volse-hubzilla-df6c07aaadda2e89d2843bae136f813c909637ba.tar.gz volse-hubzilla-df6c07aaadda2e89d2843bae136f813c909637ba.tar.bz2 volse-hubzilla-df6c07aaadda2e89d2843bae136f813c909637ba.zip |
Comanche: allow widgets to be class based and stored appropriately in Zotlabs
Diffstat (limited to 'Zotlabs/Widget/Notes.php')
-rw-r--r-- | Zotlabs/Widget/Notes.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Zotlabs/Widget/Notes.php b/Zotlabs/Widget/Notes.php new file mode 100644 index 000000000..5c83a550f --- /dev/null +++ b/Zotlabs/Widget/Notes.php @@ -0,0 +1,23 @@ +<?php + +namespace Zotlabs\Widget; + +class Notes { + + function widget($arr) { + if(! local_channel()) + return ''; + if(! feature_enabled(local_channel(),'private_notes')) + return ''; + + $text = get_pconfig(local_channel(),'notes','text'); + + $o = replace_macros(get_markup_template('notes.tpl'), array( + '$banner' => t('Notes'), + '$text' => $text, + '$save' => t('Save'), + )); + + return $o; + } +} |