From 63d02d98c5ea1767e3cfa20b1dec0cd5ab069bc0 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Fri, 7 Sep 2012 12:17:03 -0600 Subject: [PATCH] add settings sections and add contacts; other tweaks and fixes --- mod/contacts.php | 33 ++++++----- mod/settings.php | 4 +- view/contacts-widget-sidebar.tpl | 6 ++ view/field_themeselect.tpl | 2 +- view/theme/frost-mobile/contact_edit.tpl | 5 ++ .../frost-mobile/contacts-widget-sidebar.tpl | 2 + view/theme/frost-mobile/default.php | 7 ++- view/theme/frost-mobile/field_themeselect.tpl | 2 +- .../frost-mobile/generic_links_widget.tpl | 11 ++++ view/theme/frost-mobile/js/main.js | 2 +- view/theme/frost-mobile/js/main.min.js | 2 +- view/theme/frost-mobile/style.css | 56 +++++++++++++------ view/theme/frost-mobile/theme.php | 2 +- view/theme/frost/field_themeselect.tpl | 2 +- view/theme/frost/style.css | 21 ++++--- view/theme/frost/theme.php | 2 +- view/vcard-widget.tpl | 5 ++ 17 files changed, 113 insertions(+), 51 deletions(-) create mode 100644 view/contacts-widget-sidebar.tpl create mode 100644 view/theme/frost-mobile/contacts-widget-sidebar.tpl create mode 100644 view/theme/frost-mobile/generic_links_widget.tpl create mode 100644 view/vcard-widget.tpl diff --git a/mod/contacts.php b/mod/contacts.php index bdf498989..8a36fa4cb 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -28,28 +28,35 @@ function contacts_init(&$a) { if($contact_id) { $a->data['contact'] = $r[0]; - $o .= '
'; - $o .= '
' . $a->data['contact']['name'] . '
'; - $o .= '
' . $a->data['contact']['name'] . '
'; - $o .= '
'; - $a->page['aside'] .= $o; - + $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"),array( + '$name' => $a->data['contact']['name'], + '$photo' => $a->data['contact']['photo'] + )); + $follow_widget = ''; } - else - $a->page['aside'] .= follow_widget(); + else { + $vcard_widget = ''; + $follow_widget = follow_widget(); + } - $a->page['aside'] .= group_side('contacts','group',false,0,$contact_id); + $groups_widget .= group_side('contacts','group',false,0,$contact_id); + $findpeople_widget .= findpeople_widget(); + $networks_widget .= networks_widget('contacts',$_GET['nets']); + $a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array( + '$vcard_widget' => $vcard_widget, + '$follow_widget' => $follow_widget, + '$groups_widget' => $groups_widget, + '$findpeople_widget' => $findpeople_widget, + '$networks_widget' => $networks_widget + )); - $a->page['aside'] .= findpeople_widget(); - - $a->page['aside'] .= networks_widget('contacts',$_GET['nets']); $base = $a->get_baseurl(); - $tpl = get_markup_template("contacts-head.tpl"); $a->page['htmlhead'] .= replace_macros($tpl,array( '$baseurl' => $a->get_baseurl(true), '$base' => $base )); + $tpl = get_markup_template("contacts-end.tpl"); $a->page['end'] .= replace_macros($tpl,array( '$baseurl' => $a->get_baseurl(true), diff --git a/mod/settings.php b/mod/settings.php index a7b2791a9..fd2bb9e57 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -770,8 +770,8 @@ function settings_content(&$a) { '$baseurl' => $a->get_baseurl(true), '$uid' => local_user(), - '$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview'), - '$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, ''), + '$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, true), + '$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, false), '$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')), '$itemspage_network' => array('itemspage_network', t("Number of items to display per page:"), $itemspage_network, t('Maximum of 100 items')), '$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''), diff --git a/view/contacts-widget-sidebar.tpl b/view/contacts-widget-sidebar.tpl new file mode 100644 index 000000000..c9450ce64 --- /dev/null +++ b/view/contacts-widget-sidebar.tpl @@ -0,0 +1,6 @@ +$vcard_widget +$follow_widget +$groups_widget +$findpeople_widget +$networks_widget + diff --git a/view/field_themeselect.tpl b/view/field_themeselect.tpl index 1b3ede36c..654c18d45 100644 --- a/view/field_themeselect.tpl +++ b/view/field_themeselect.tpl @@ -1,7 +1,7 @@
- {{ for $field.4 as $opt=>$val }}{{ endfor }} $field.3 diff --git a/view/theme/frost-mobile/contact_edit.tpl b/view/theme/frost-mobile/contact_edit.tpl index 6dcb9a72b..b87b3b651 100644 --- a/view/theme/frost-mobile/contact_edit.tpl +++ b/view/theme/frost-mobile/contact_edit.tpl @@ -11,6 +11,11 @@ +
+
$name
+
$name
+
+