Comanche: allow widgets to be class based and stored appropriately in Zotlabs

This commit is contained in:
zotlabs
2017-03-15 16:55:47 -07:00
parent c95e9b9ba5
commit df6c07aaad
3 changed files with 37 additions and 16 deletions

23
Zotlabs/Widget/Notes.php Normal file
View File

@@ -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;
}
}