diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-07-03 21:33:24 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-07-03 21:33:24 +0200 |
commit | d0961068247ce57ba0eb45afc078cacb44b87810 (patch) | |
tree | f9372689e943a522f4c0bd417d4458474aee0cfd /include/page_widgets.php | |
parent | 562124c29f821b046bc4cf4b48a7bde39c70a07b (diff) | |
parent | 64cad0a041e44940f75bf351fc3755b3202f9029 (diff) | |
download | volse-hubzilla-d0961068247ce57ba0eb45afc078cacb44b87810.tar.gz volse-hubzilla-d0961068247ce57ba0eb45afc078cacb44b87810.tar.bz2 volse-hubzilla-d0961068247ce57ba0eb45afc078cacb44b87810.zip |
merge red into hubzilla
Diffstat (limited to 'include/page_widgets.php')
-rw-r--r-- | include/page_widgets.php | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/include/page_widgets.php b/include/page_widgets.php deleted file mode 100644 index 3270de4a3..000000000 --- a/include/page_widgets.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -// A basic toolbar for observers with write_pages permissions - -function writepages_widget ($who,$which) { - return replace_macros(get_markup_template('write_pages.tpl'), array( - '$new' => t('New Page'), - '$newurl' => "webpages/$who", - '$edit' => t('Edit'), - '$editurl' => "editwebpage/$who/$which" - )); -} - - - -// Chan is channel_id, $which is channel_address - we'll need to pass observer later too. - -function pagelist_widget ($owner,$which) { - - $r = q("select * from iconfig left join item on iconfig.iid = item.id where item_id.uid = %d - and iconfig.cat = 'system' and iconfig.k = 'WEBPAGE' order by item.created desc", - intval($owner) - ); - - $pages = null; - - if($r) { - $pages = array(); - foreach($r as $rr) { - $pages[$rr['iid']][] = array('url' => $rr['iid'],'pagetitle' => $rr['v'],'title' => $rr['title'],'created' => datetime_convert('UTC',date_default_timezone_get(),$rr['created']),'edited' => datetime_convert('UTC',date_default_timezone_get(),$rr['edited'])); - } - } - - //Build the base URL for edit links - $url = z_root() . "/editwebpage/" . $which; - // This isn't pretty, but it works. Until I figure out what to do with the UI, it's Good Enough(TM). - return $o . replace_macros(get_markup_template("webpagelist.tpl"), array( - '$baseurl' => $url, - '$edit' => t('Edit'), - '$pages' => $pages, - '$channel' => $which, - '$view' => t('View'), - '$preview' => t('Preview'), - '$actions_txt' => t('Actions'), - '$pagelink_txt' => t('Page Link'), - '$title_txt' => t('Title'), - '$created_txt' => t('Created'), - '$edited_txt' => t('Edited') - - )); - -} |