From 70860e5836046e3fe174c93a7f43361aef84b266 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 29 Nov 2015 16:16:18 +0100 Subject: [PATCH 1/8] new_event: default size of textfields --- view/templates/event_form.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/view/templates/event_form.tpl b/view/templates/event_form.tpl index 1ea282b116..63d1e827ba 100644 --- a/view/templates/event_form.tpl +++ b/view/templates/event_form.tpl @@ -29,15 +29,15 @@
{{$t_text}}
- +
{{$d_text}}
- +
{{$l_text}}
- +
From 45c2a4868efbf8f457914f87bee8553cc28fa77f Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Mon, 30 Nov 2015 03:25:23 +0100 Subject: [PATCH 2/8] make viewcontacts part of the profile tab --- include/identity.php | 10 ++++++++++ mod/viewcontacts.php | 24 ++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/include/identity.php b/include/identity.php index 48fd5056dc..8abcce27c6 100644 --- a/include/identity.php +++ b/include/identity.php @@ -700,6 +700,16 @@ if(! function_exists('profile_tabs')){ ); } + if ((! $is_owner) && ((count($a->profile)) || (! $a->profile['hide-friends']))) { + $tabs[] = array( + 'label' => t('Contacts'), + 'url' => $a->get_baseurl() . '/viewcontacts/' . $nickname, + 'sel' => ((!isset($tab)&&$a->argv[0]=='viewcontacts')?'active':''), + 'title' => t('Contacts'), + 'id' => 'viewcontacts-tab', + 'accesskey' => 's', + ); + } $arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs); call_hooks('profile_tabs', $arr); diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index d16a48e349..04520e0d93 100644 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -8,7 +8,23 @@ function viewcontacts_init(&$a) { return; } - profile_load($a,$a->argv[1]); + nav_set_selected('home'); + + if($a->argc > 1) { + $nick = $a->argv[1]; + $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `blocked` = 0 LIMIT 1", + dbesc($nick) + ); + + if(! count($r)) + return; + + $a->data['user'] = $r[0]; + $a->profile_uid = $r[0]['uid']; + $is_owner = (local_user() && (local_user() == $a->profile_uid)); + + profile_load($a,$a->argv[1]); + } } @@ -25,6 +41,10 @@ function viewcontacts_content(&$a) { return; } + $o = ""; + + // tabs + $o .= profile_tabs($a,$is_owner, $a->data['user']['nickname']); $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 @@ -93,7 +113,7 @@ function viewcontacts_content(&$a) { $tpl = get_markup_template("viewcontact_template.tpl"); $o .= replace_macros($tpl, array( - '$title' => t('View Contacts'), + '$title' => t('Contacts'), '$contacts' => $contacts, '$paginate' => paginate($a), )); From 39b85c848615f1b19c61292736913d6acad3292e Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Mon, 30 Nov 2015 16:00:41 +0100 Subject: [PATCH 3/8] vier event_form: include bb-tags for editing --- view/templates/event_form.tpl | 7 +-- view/templates/event_head.tpl | 4 ++ view/theme/vier/style.css | 7 +++ view/theme/vier/templates/event_form.tpl | 74 ++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 view/theme/vier/templates/event_form.tpl diff --git a/view/templates/event_form.tpl b/view/templates/event_form.tpl index 63d1e827ba..1c065477b2 100644 --- a/view/templates/event_form.tpl +++ b/view/templates/event_form.tpl @@ -29,15 +29,15 @@
{{$t_text}}
- +
{{$d_text}}
- +
{{$l_text}}
- +
@@ -51,4 +51,3 @@ - diff --git a/view/templates/event_head.tpl b/view/templates/event_head.tpl index ceb251a9e2..745327e992 100644 --- a/view/templates/event_head.tpl +++ b/view/templates/event_head.tpl @@ -138,6 +138,10 @@ } }); + + $(document).ready(function() { + $('.comment-edit-bb').hide(); + }); {{else}}