From 6ebb21a935436bdca03f8e6c1f9286b650ac1dc4 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 16 Oct 2015 21:44:10 +0200 Subject: [PATCH 01/21] directory.php: move html to templates --- mod/directory.php | 79 ++++++++++++++--------------- view/templates/directory_header.tpl | 28 +++++++--- view/templates/directory_item.tpl | 14 ++--- 3 files changed, 67 insertions(+), 54 deletions(-) diff --git a/mod/directory.php b/mod/directory.php index 6fd99256f..2093b1186 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -31,7 +31,7 @@ function directory_content(&$a) { require_once("mod/proxy.php"); if((get_config('system','block_public')) && (! local_user()) && (! remote_user()) || - (get_config('system','block_local_dir')) && (! local_user()) && (! remote_user())) { + (get_config('system','block_local_dir')) && (! local_user()) && (! remote_user())) { notice( t('Public access denied.') . EOL); return; } @@ -44,27 +44,12 @@ function directory_content(&$a) { else $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : ''); - $tpl = get_markup_template('directory_header.tpl'); - - $globaldir = ''; - $gdirpath = get_config('system','directory'); - if(strlen($gdirpath)) { - $globaldir = ''; + $gdirpath = ''; + $dirurl = get_config('system','directory'); + if(strlen($dirurl)) { + $gdirpath = zrl($dirurl,true); } - $admin = ''; - - $o .= replace_macros($tpl, array( - '$search' => $search, - '$globaldir' => $globaldir, - '$desc' => t('Find on this site'), - '$admin' => $admin, - '$finding' => (strlen($search) ? '

' . t('Finding: ') . "'" . $search . "'" . '

' : ""), - '$sitedir' => t('Site Directory'), - '$submit' => t('Find') - )); - if($search) { $search = dbesc($search); @@ -159,8 +144,6 @@ function directory_content(&$a) { $about = ((x($profile,'about') == 1) ? t('About:') : False); - $tpl = get_markup_template('directory_item.tpl'); - if($a->theme['template_engine'] === 'internal') { $location_e = template_escape($location); } @@ -168,23 +151,23 @@ function directory_content(&$a) { $location_e = $location; } - $entry = replace_macros($tpl,array( - '$id' => $rr['id'], - '$profile_link' => $profile_link, - '$photo' => proxy_url($a->get_cached_avatar_image($rr[$photo]), false, PROXY_SIZE_THUMB), - '$alt_text' => $rr['name'], - '$name' => $rr['name'], - '$details' => $pdesc . $details, - '$page_type' => $page_type, - '$profile' => $profile, - '$location' => $location_e, - '$gender' => $gender, - '$pdesc' => $pdesc, - '$marital' => $marital, - '$homepage' => $homepage, - '$about' => $about, + $entry = array( + 'id' => $rr['id'], + 'profile_link' => $profile_link, + 'photo' => proxy_url($a->get_cached_avatar_image($rr[$photo]), false, PROXY_SIZE_THUMB), + 'alt_text' => $rr['name'], + 'name' => $rr['name'], + 'details' => $pdesc . $details, + 'page_type' => $page_type, + 'profile' => $profile, + 'location' => $location_e, + 'gender' => $gender, + 'pdesc' => $pdesc, + 'marital' => $marital, + 'homepage' => $homepage, + 'about' => $about, - )); + ); $arr = array('contact' => $rr, 'entry' => $entry); @@ -193,11 +176,27 @@ function directory_content(&$a) { unset($profile); unset($location); - $o .= $entry; + if(! $arr['entry']) + continue; + + $entries[] = $arr['entry']; } - $o .= "
\r\n"; + $tpl = get_markup_template('directory_header.tpl'); + + $o .= replace_macros($tpl, array( + '$search' => $search, + '$globaldir' => t('Global Directory'), + '$gdirpath' => $gdirpath, + '$desc' => t('Find on this site'), + '$entries' => $entries, + '$finding' => t('Finding:'), + '$findterm' => (strlen($search) ? $search : ""), + '$sitedir' => t('Site Directory'), + '$submit' => t('Find') + )); + $o .= paginate($a); } diff --git a/view/templates/directory_header.tpl b/view/templates/directory_header.tpl index 2274f2e1f..ef9aa04af 100644 --- a/view/templates/directory_header.tpl +++ b/view/templates/directory_header.tpl @@ -1,17 +1,29 @@

{{$sitedir}}

-{{$globaldir}} -{{$admin}} +{{if $gdirpath}} + +{{/if}} -{{$finding}}
-
-{{$desc}} - - -
+
+ {{$desc}} + + +
+ +{{if $findterm}} +

{{$finding}} '{{$findterm}}'

+{{/if}} +
+{{foreach $entries as $entry}} + {{include file="directory_item.tpl"}} +{{/foreach}} + +
\ No newline at end of file diff --git a/view/templates/directory_item.tpl b/view/templates/directory_item.tpl index b43fcd28c..4dbe8a951 100644 --- a/view/templates/directory_item.tpl +++ b/view/templates/directory_item.tpl @@ -1,12 +1,14 @@ -
-
-
- {{$alt_text}} +
+
+
-
{{$name}}
-
{{$details}}
+
{{$entry.name}}
+
{{$entry.details}}
From 20bb16859f4ae23d268ef656029917c7277c59f7 Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Sat, 17 Oct 2015 00:19:01 +0200 Subject: [PATCH 02/21] dirfind.php: move html to templates --- mod/dirfind.php | 35 +++++++++++---------- view/templates/match.tpl | 67 +++++++++++++++++++++------------------- 2 files changed, 55 insertions(+), 47 deletions(-) diff --git a/mod/dirfind.php b/mod/dirfind.php index 95f9bf53a..39c13dcb7 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -38,10 +38,6 @@ function dirfind_content(&$a, $prefix = "") { $o = ''; - $o .= replace_macros(get_markup_template("section_title.tpl"),array( - '$title' => sprintf( t('People Search - %s'), $search) - )); - if($search) { if ($local) { @@ -121,7 +117,6 @@ function dirfind_content(&$a, $prefix = "") { $id = 0; - $tpl = get_markup_template('match.tpl'); foreach($j->results as $jj) { // If We already know this contact then don't show the "connect" button @@ -143,17 +138,26 @@ function dirfind_content(&$a, $prefix = "") { $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo); - $o .= replace_macros($tpl,array( - '$url' => zrl($jj->url), - '$name' => htmlentities($jj->name), - '$photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), - '$tags' => $jj->tags, - '$conntxt' => $conntxt, - '$connlnk' => $connlnk, - '$photo_menu' => $photo_menu, - '$id' => ++$id, - )); + $entry = array( + 'url' => zrl($jj->url), + 'name' => htmlentities($jj->name), + 'photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), + 'tags' => $jj->tags, + 'conntxt' => $conntxt, + 'connlnk' => $connlnk, + 'photo_menu' => $photo_menu, + 'id' => ++$id, + ); + $entries[] = $entry; } + + $tpl = get_markup_template('match.tpl'); + + $o .= replace_macros($tpl,array( + 'title' => sprintf( t('People Search - %s'), $search), + '$entries' => $entries, + )); + } else { info( t('No matches') . EOL); @@ -161,7 +165,6 @@ function dirfind_content(&$a, $prefix = "") { } - $o .= '
'; $o .= paginate($a); return $o; } diff --git a/view/templates/match.tpl b/view/templates/match.tpl index 3ebabf185..db612e3dc 100644 --- a/view/templates/match.tpl +++ b/view/templates/match.tpl @@ -1,33 +1,38 @@ +{{include file="section_title.tpl"}} -
-
- - {{$name}} - - {{if $photo_menu}} - menu -
-
    - {{foreach $photo_menu as $k=>$c}} - {{if $c.2}} -
  • {{$c.0}}
  • - {{else}} -
  • {{$c.0}}
  • - {{/if}} - {{/foreach}} -
-
- {{/if}} -
-
-
- {{$name}} -
-
- {{if $connlnk}} - - {{/if}} +{{foreach $entries as $entry}} +
+
+ + {{$entry.name}} + + {{if $entry.photo_menu}} + menu +
+
    + {{foreach $entry.photo_menu as $k=>$c}} + {{if $c.2}} +
  • {{$c.0}}
  • + {{else}} +
  • {{$c.0}}
  • + {{/if}} + {{/foreach}} +
+
+ {{/if}} +
+
+ +
+ {{if $entry.connlnk}} + + {{/if}} -
+
+{{/foreach}} + +
From 67f699403a6df541c1eb9dc26008232858e8084a Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Sat, 17 Oct 2015 00:39:50 +0200 Subject: [PATCH 03/21] match.php: restructure acdording to the change of match.tpl --- mod/match.php | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/mod/match.php b/mod/match.php index f31b0f67a..30d057a0d 100644 --- a/mod/match.php +++ b/mod/match.php @@ -4,6 +4,15 @@ require_once('include/socgraph.php'); require_once('include/contact_widgets.php'); require_once('mod/proxy.php'); +/** + * @brief Controller for /match. + * + * It takes keywords from your profile and queries the directory server for + * matching keywords from other profiles. + * + * @param App &$a + * @return void|string + */ function match_content(&$a) { $o = ''; @@ -15,10 +24,6 @@ function match_content(&$a) { $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd; - $o .= replace_macros(get_markup_template("section_title.tpl"),array( - '$title' => t('Profile Match') - )); - $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1", intval(local_user()) ); @@ -27,7 +32,6 @@ function match_content(&$a) { if(! $r[0]['pub_keywords'] && (! $r[0]['prv_keywords'])) { notice( t('No keywords to match. Please add keywords to your default profile.') . EOL); return; - } $params = array(); @@ -52,9 +56,6 @@ function match_content(&$a) { if(count($j->results)) { - - - $tpl = get_markup_template('match.tpl'); foreach($j->results as $jj) { $match_nurl = normalise_link($jj->url); $match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1", @@ -63,24 +64,33 @@ function match_content(&$a) { if (!count($match)) { $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo); $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url; - $o .= replace_macros($tpl,array( - '$url' => zrl($jj->url), - '$name' => $jj->name, - '$photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), - '$inttxt' => ' ' . t('is interested in:'), - '$conntxt' => t('Connect'), - '$connlnk' => $connlnk, - '$tags' => $jj->tags - )); + $entry = array( + 'url' => zrl($jj->url), + 'name' => $jj->name, + 'photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), + 'inttxt' => ' ' . t('is interested in:'), + 'conntxt' => t('Connect'), + 'connlnk' => $connlnk, + 'tags' => $jj->tags + ); + $entries[] = $entry; } } - } else { + + $tpl = get_markup_template('match.tpl'); + + $o .= replace_macros($tpl,array( + '$title' => t('Profile Match'), + 'entries' => $entries, + )); + + } + else { info( t('No matches') . EOL); } } - $o .= cleardiv(); $o .= paginate($a); return $o; } From 72896b0f6b1677a42970f432485df213318141e9 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sat, 17 Oct 2015 19:45:57 +0200 Subject: [PATCH 04/21] unify directory page --- mod/directory.php | 4 +++- view/templates/directory_header.tpl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/directory.php b/mod/directory.php index 2093b1186..d256c590a 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -6,6 +6,8 @@ function directory_init(&$a) { if(local_user()) { require_once('include/contact_widgets.php'); + $a->page['aside'] .= follow_widget(); + $a->page['aside'] .= findpeople_widget(); } @@ -193,7 +195,7 @@ function directory_content(&$a) { '$entries' => $entries, '$finding' => t('Finding:'), '$findterm' => (strlen($search) ? $search : ""), - '$sitedir' => t('Site Directory'), + '$title' => t('Site Directory'), '$submit' => t('Find') )); diff --git a/view/templates/directory_header.tpl b/view/templates/directory_header.tpl index ef9aa04af..07d625ed4 100644 --- a/view/templates/directory_header.tpl +++ b/view/templates/directory_header.tpl @@ -1,5 +1,5 @@ -

{{$sitedir}}

+{{include file="section_title.tpl"}} {{if $gdirpath}}
    From 9176e739a405a35e7283d61ea51018e96a534099 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sat, 17 Oct 2015 21:25:21 +0200 Subject: [PATCH 05/21] sugest.php: themeable as whole page --- mod/suggest.php | 37 ++++++++++--------- view/templates/suggest_friends.tpl | 36 ++++++++++-------- .../templates/suggest_friends.tpl | 36 ++++++++++-------- .../theme/frost/templates/suggest_friends.tpl | 36 ++++++++++-------- 4 files changed, 82 insertions(+), 63 deletions(-) diff --git a/mod/suggest.php b/mod/suggest.php index 8bf31ca8e..760bbf06a 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -65,11 +65,6 @@ function suggest_content(&$a) { $a->page['aside'] .= findpeople_widget(); - $o .= replace_macros(get_markup_template("section_title.tpl"),array( - '$title' => t('Friend Suggestions') - )); - - $r = suggestion_query(local_user()); if(! count($r)) { @@ -77,25 +72,31 @@ function suggest_content(&$a) { return $o; } - $tpl = get_markup_template('suggest_friends.tpl'); - foreach($r as $rr) { $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']); - $o .= replace_macros($tpl,array( - '$url' => zrl($rr['url']), - '$name' => $rr['name'], - '$photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB), - '$ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'], - '$ignid' => $rr['id'], - '$conntxt' => t('Connect'), - '$connlnk' => $connlnk, - '$ignore' => t('Ignore/Hide') - )); + $entry = array( + 'url' => zrl($rr['url']), + 'url_clean' => $rr['url'], + 'name' => $rr['name'], + 'photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB), + 'ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'], + 'ignid' => $rr['id'], + 'conntxt' => t('Connect'), + 'connlnk' => $connlnk, + 'ignore' => t('Ignore/Hide') + ); + $entries[] = $entry; } - $o .= cleardiv(); + $tpl = get_markup_template('suggest_friends.tpl'); + + $o .= replace_macros($tpl,array( + '$title' => t('Friend Suggestions'), + '$entries' => $entries, + )); + // $o .= paginate($a); return $o; } diff --git a/view/templates/suggest_friends.tpl b/view/templates/suggest_friends.tpl index a64c05dd8..e7c9c1ac0 100644 --- a/view/templates/suggest_friends.tpl +++ b/view/templates/suggest_friends.tpl @@ -1,17 +1,23 @@ -
    - -
    - - {{$name}} - +{{include file="section_title.tpl"}} + +{{foreach $entries as $entry}} +
    + +
    + + {{$entry.name}} + +
    +
    + +
    + {{if $entry.connlnk}} + + {{/if}}
    -
    -
    - {{$name}} -
    -
    - {{if $connlnk}} - - {{/if}} -
    \ No newline at end of file +{{/foreach}} + +
    diff --git a/view/theme/frost-mobile/templates/suggest_friends.tpl b/view/theme/frost-mobile/templates/suggest_friends.tpl index e39cca6e5..a386f30d0 100644 --- a/view/theme/frost-mobile/templates/suggest_friends.tpl +++ b/view/theme/frost-mobile/templates/suggest_friends.tpl @@ -1,17 +1,23 @@ -
    -
    - - {{$name}} - +{{include file="section_title.tpl"}} + +{{foreach $entries as $entry}} +
    +
    + + {{$entry.name}} + +
    +
    + +
    + {{if $entry.connlnk}} + + {{/if}} +
    -
    -
    - {{$name}} -
    -
    - {{if $connlnk}} - - {{/if}} - -
    +{{/foreach}} + +
    diff --git a/view/theme/frost/templates/suggest_friends.tpl b/view/theme/frost/templates/suggest_friends.tpl index e39cca6e5..a386f30d0 100644 --- a/view/theme/frost/templates/suggest_friends.tpl +++ b/view/theme/frost/templates/suggest_friends.tpl @@ -1,17 +1,23 @@ -
    -
    - - {{$name}} - +{{include file="section_title.tpl"}} + +{{foreach $entries as $entry}} +
    +
    + + {{$entry.name}} + +
    +
    + +
    + {{if $entry.connlnk}} + + {{/if}} +
    -
    -
    - {{$name}} -
    -
    - {{if $connlnk}} - - {{/if}} - -
    +{{/foreach}} + +
    From 6d559bf8a9e36ae9695dc77617f6ae8f574c7fa6 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sat, 17 Oct 2015 21:40:41 +0200 Subject: [PATCH 06/21] viewcontact: use section_title.tpl as headding --- view/templates/viewcontact_template.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/templates/viewcontact_template.tpl b/view/templates/viewcontact_template.tpl index ff33d6521..455551c68 100644 --- a/view/templates/viewcontact_template.tpl +++ b/view/templates/viewcontact_template.tpl @@ -1,5 +1,5 @@ -

    {{$title}}

    +{{include file="section_title.tpl"}} {{foreach $contacts as $contact}} {{include file="contact_template.tpl"}} From b9d9bf8ecdc4e82637524eb59386ff8a7f54de6c Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sat, 17 Oct 2015 21:45:55 +0200 Subject: [PATCH 07/21] directory: move pagination into template --- mod/directory.php | 5 ++--- view/templates/directory_header.tpl | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mod/directory.php b/mod/directory.php index d256c590a..46c4f38ad 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -196,11 +196,10 @@ function directory_content(&$a) { '$finding' => t('Finding:'), '$findterm' => (strlen($search) ? $search : ""), '$title' => t('Site Directory'), - '$submit' => t('Find') + '$submit' => t('Find'), + '$paginate' => paginate($a), )); - $o .= paginate($a); - } else info( t("No entries \x28some entries may be hidden\x29.") . EOL); diff --git a/view/templates/directory_header.tpl b/view/templates/directory_header.tpl index 07d625ed4..eda887a89 100644 --- a/view/templates/directory_header.tpl +++ b/view/templates/directory_header.tpl @@ -26,4 +26,6 @@ {{include file="directory_item.tpl"}} {{/foreach}} -
    \ No newline at end of file +
    + +{{$paginate}} From 4b8ca578d1245c760a1c04bea6daf5b8582d0cbd Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sat, 17 Oct 2015 22:09:19 +0200 Subject: [PATCH 08/21] dirfind: move pagination into template --- mod/dirfind.php | 2 +- mod/match.php | 2 +- view/templates/match.tpl | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/dirfind.php b/mod/dirfind.php index 39c13dcb7..9e02a47e2 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -156,6 +156,7 @@ function dirfind_content(&$a, $prefix = "") { $o .= replace_macros($tpl,array( 'title' => sprintf( t('People Search - %s'), $search), '$entries' => $entries, + '$paginate' => paginate($a), )); } @@ -165,6 +166,5 @@ function dirfind_content(&$a, $prefix = "") { } - $o .= paginate($a); return $o; } diff --git a/mod/match.php b/mod/match.php index 30d057a0d..380f6e74a 100644 --- a/mod/match.php +++ b/mod/match.php @@ -82,6 +82,7 @@ function match_content(&$a) { $o .= replace_macros($tpl,array( '$title' => t('Profile Match'), 'entries' => $entries, + '$paginate' => paginate($a), )); } @@ -91,6 +92,5 @@ function match_content(&$a) { } - $o .= paginate($a); return $o; } diff --git a/view/templates/match.tpl b/view/templates/match.tpl index db612e3dc..d269a253b 100644 --- a/view/templates/match.tpl +++ b/view/templates/match.tpl @@ -36,3 +36,5 @@ {{/foreach}}
    + +{{$paginate}} From f9c0c1d6967bdefe4f00700a19b8eba44063e3f7 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 18 Oct 2015 17:12:48 +0200 Subject: [PATCH 09/21] template rework: use viewcontact_template.tpl for contact dealing pages --- mod/contacts.php | 1 + mod/dirfind.php | 8 +++--- mod/match.php | 18 +++++++++---- mod/suggest.php | 24 ++++++++++++------ mod/viewcontacts.php | 2 +- view/templates/contact_template.tpl | 3 ++- view/templates/contacts-template.tpl | 2 +- view/theme/duepuntozero/style.css | 4 +++ view/theme/frost-mobile/style.css | 2 ++ .../templates/contact_template.tpl | 4 +-- .../templates/viewcontact_template.tpl | 12 +++++++++ view/theme/frost/style.css | 8 ++++-- .../frost/templates/contact_template.tpl | 12 ++++----- view/theme/quattro/dark/style.css | 25 +++++++++++++++++++ view/theme/quattro/green/style.css | 25 +++++++++++++++++++ view/theme/quattro/lilac/style.css | 25 +++++++++++++++++++ view/theme/quattro/quattro.less | 21 ++++++++++++++++ .../quattro/templates/contact_template.tpl | 7 +++++- view/theme/smoothly/style.css | 9 +++++-- view/theme/vier/style.css | 4 +++ .../theme/vier/templates/contact_template.tpl | 2 +- 21 files changed, 185 insertions(+), 33 deletions(-) create mode 100644 view/theme/frost-mobile/templates/viewcontact_template.tpl diff --git a/mod/contacts.php b/mod/contacts.php index c562c9822..bdb25b022 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -799,6 +799,7 @@ function contacts_content(&$a) { '$cmd' => $a->cmd, '$contacts' => $contacts, '$contact_drop_confirm' => t('Do you really want to delete this contact?'), + 'multiselect' => 1, '$batch_actions' => array( 'contacts_batch_update' => t('Update'), 'contacts_batch_block' => t('Block')."/".t("Unblock"), diff --git a/mod/dirfind.php b/mod/dirfind.php index 9e02a47e2..77e86c5db 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -141,8 +141,8 @@ function dirfind_content(&$a, $prefix = "") { $entry = array( 'url' => zrl($jj->url), 'name' => htmlentities($jj->name), - 'photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), - 'tags' => $jj->tags, + 'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), + 'img_hover' => $jj->tags, 'conntxt' => $conntxt, 'connlnk' => $connlnk, 'photo_menu' => $photo_menu, @@ -151,11 +151,11 @@ function dirfind_content(&$a, $prefix = "") { $entries[] = $entry; } - $tpl = get_markup_template('match.tpl'); + $tpl = get_markup_template('viewcontact_template.tpl'); $o .= replace_macros($tpl,array( 'title' => sprintf( t('People Search - %s'), $search), - '$entries' => $entries, + '$contacts' => $entries, '$paginate' => paginate($a), )); diff --git a/mod/match.php b/mod/match.php index 380f6e74a..f6174da66 100644 --- a/mod/match.php +++ b/mod/match.php @@ -56,32 +56,40 @@ function match_content(&$a) { if(count($j->results)) { + $id = 0; + foreach($j->results as $jj) { $match_nurl = normalise_link($jj->url); $match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1", intval(local_user()), dbesc($match_nurl)); + if (!count($match)) { $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo); $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url; + $photo_menu = array(array(t("View Profile"), zrl($jj->url))); + $photo_menu[] = array(t("Connect/Follow"), $connlnk); + $entry = array( 'url' => zrl($jj->url), 'name' => $jj->name, - 'photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), + 'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), 'inttxt' => ' ' . t('is interested in:'), 'conntxt' => t('Connect'), 'connlnk' => $connlnk, - 'tags' => $jj->tags + 'img_hover' => $jj->tags, + 'photo_menu' => $photo_menu, + 'id' => ++$id, ); - $entries[] = $entry; } + $entries[] = $entry; } - $tpl = get_markup_template('match.tpl'); + $tpl = get_markup_template('viewcontact_template.tpl'); $o .= replace_macros($tpl,array( '$title' => t('Profile Match'), - 'entries' => $entries, + '$contacts' => $entries, '$paginate' => paginate($a), )); diff --git a/mod/suggest.php b/mod/suggest.php index 760bbf06a..5241e485e 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -72,31 +72,41 @@ function suggest_content(&$a) { return $o; } + require_once 'include/contact_selectors.php'; + foreach($r as $rr) { $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']); + $ignlnk = $a->get_baseurl() . '/suggest?ignore=' . $rr['id']; + $photo_menu = array(array(t("View Profile"), zrl($jj->url))); + $photo_menu[] = array(t("Connect/Follow"), $connlnk); + $photo_menu[] = array(t('Ignore/Hide'), $ignlnk); $entry = array( 'url' => zrl($rr['url']), - 'url_clean' => $rr['url'], + 'itemurl' => $rr['url'], + 'img_hover' => $rr['url'], 'name' => $rr['name'], - 'photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB), - 'ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'], + 'thumb' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB), + 'ignlnk' => $ignlnk, 'ignid' => $rr['id'], 'conntxt' => t('Connect'), 'connlnk' => $connlnk, - 'ignore' => t('Ignore/Hide') + 'photo_menu' => $photo_menu, + 'ignore' => t('Ignore/Hide'), + 'network' => network_to_name($rr['network'], $rr['url']), + 'id' => ++$id, ); $entries[] = $entry; } - $tpl = get_markup_template('suggest_friends.tpl'); + $tpl = get_markup_template('viewcontact_template.tpl'); $o .= replace_macros($tpl,array( '$title' => t('Friend Suggestions'), - '$entries' => $entries, + '$contacts' => $entries, + )); -// $o .= paginate($a); return $o; } diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index a6bf74b28..927a59752 100644 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -48,7 +48,7 @@ function viewcontacts_content(&$a) { if($rr['self']) continue; - $url = $rr['url']; + $url = $rr['url']; // route DFRN profiles through the redirect diff --git a/view/templates/contact_template.tpl b/view/templates/contact_template.tpl index d4f65f70f..4e8c04297 100644 --- a/view/templates/contact_template.tpl +++ b/view/templates/contact_template.tpl @@ -7,9 +7,10 @@ {{$contact.name}} - {{if !$no_contacts_checkbox}} + {{if $multiselect}} {{/if}} + {{if $contact.photo_menu}} menu
    diff --git a/view/templates/contacts-template.tpl b/view/templates/contacts-template.tpl index 896f9af4c..bec295924 100644 --- a/view/templates/contacts-template.tpl +++ b/view/templates/contacts-template.tpl @@ -1,5 +1,5 @@ -

    {{$header}}{{if $total}} ({{$total}}){{/if}}

    +

    {{$header}}{{if $total}} ({{$total}}){{/if}}

    {{if $finding}}

    {{$finding}}

    {{/if}} diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index ae2530b6a..7220b4c47 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -891,6 +891,10 @@ input#dfrn-url { .contact-entry-photo img { border: none; } +.contact-entry-photo a img { + width: 80px; + height: 80px; +} .contact-entry-photo-end { clear: both; } diff --git a/view/theme/frost-mobile/style.css b/view/theme/frost-mobile/style.css index f4b46fed8..ef030c5f3 100644 --- a/view/theme/frost-mobile/style.css +++ b/view/theme/frost-mobile/style.css @@ -1124,6 +1124,8 @@ input#dfrn-url { .contact-entry-photo img { border: none; + width: 80px; + height: 80px; } .contact-entry-photo-end { clear: both; diff --git a/view/theme/frost-mobile/templates/contact_template.tpl b/view/theme/frost-mobile/templates/contact_template.tpl index a2506fc17..42f4b7372 100644 --- a/view/theme/frost-mobile/templates/contact_template.tpl +++ b/view/theme/frost-mobile/templates/contact_template.tpl @@ -29,8 +29,8 @@
    -
    {{$contact.name}}

    -{{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}} +
    {{$contact.name}}

    + {{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}}
    {{$contact.network}}
    diff --git a/view/theme/frost-mobile/templates/viewcontact_template.tpl b/view/theme/frost-mobile/templates/viewcontact_template.tpl new file mode 100644 index 000000000..3b68410f9 --- /dev/null +++ b/view/theme/frost-mobile/templates/viewcontact_template.tpl @@ -0,0 +1,12 @@ + +{{include file="section_title.tpl"}} + +
    +{{foreach $contacts as $contact}} + {{include file="contact_template.tpl"}} +{{/foreach}} +
    + +
    + +{{$paginate}} diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css index 8b87c3bd4..66121baf3 100644 --- a/view/theme/frost/style.css +++ b/view/theme/frost/style.css @@ -1093,15 +1093,19 @@ input#dfrn-url { .contact-entry-photo img { border: none; } +.contact-entry-photo a img { + width: 80px; + height: 80px; +} .contact-entry-photo-end { clear: both; } .contact-entry-name { - float: left; + /*float: left;*/ margin-left: 0px; margin-right: 10px; padding-bottom: 5px; - width: 120px; + /*width: 120px;*/ font-weight: 600; overflow: hidden; } diff --git a/view/theme/frost/templates/contact_template.tpl b/view/theme/frost/templates/contact_template.tpl index 7a29bd045..1ed1471a6 100644 --- a/view/theme/frost/templates/contact_template.tpl +++ b/view/theme/frost/templates/contact_template.tpl @@ -10,8 +10,8 @@ {{if $contact.photo_menu}} menu -
    -
      +
      +
        {{foreach $contact.photo_menu as $c}} {{if $c.2}}
      • {{$c.0}}
      • @@ -19,15 +19,15 @@
      • {{$c.0}}
      • {{/if}} {{/foreach}} -
      -
      +
    +
    {{/if}}
    -
    {{$contact.name}}

    -{{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}} +
    {{$contact.name}}
    + {{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}}
    {{$contact.network}}
    diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index 1eda67de1..b0489af80 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -1543,6 +1543,31 @@ span[id^="showmore-wrap"] { left: 0px; top: 63px; } +.contact-wrapper .drop { + background-image: url('../../../images/icons/22/delete.png'); + display: block; + width: 22px; + height: 22px; + position: relative; + top: 10px; + left: -10px; + z-index: 99; +} +.contact-wrapper .drophide { + background-image: url('../../../images/icons/22/delete.png'); + display: block; + width: 22px; + height: 22px; + opacity: 0.3; + position: relative; + top: 10px; + left: -10px; + z-index: 99; +} +.contact-wrapper .contact-entry-connect { + padding-top: 5px; + font-weight: bold; +} .directory-item { float: left; width: 200px; diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 71569971e..0c7050045 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -1543,6 +1543,31 @@ span[id^="showmore-wrap"] { left: 0px; top: 63px; } +.contact-wrapper .drop { + background-image: url('../../../images/icons/22/delete.png'); + display: block; + width: 22px; + height: 22px; + position: relative; + top: 10px; + left: -10px; + z-index: 99; +} +.contact-wrapper .drophide { + background-image: url('../../../images/icons/22/delete.png'); + display: block; + width: 22px; + height: 22px; + opacity: 0.3; + position: relative; + top: 10px; + left: -10px; + z-index: 99; +} +.contact-wrapper .contact-entry-connect { + padding-top: 5px; + font-weight: bold; +} .directory-item { float: left; width: 200px; diff --git a/view/theme/quattro/lilac/style.css b/view/theme/quattro/lilac/style.css index 55b81e5da..c5f655427 100644 --- a/view/theme/quattro/lilac/style.css +++ b/view/theme/quattro/lilac/style.css @@ -1543,6 +1543,31 @@ span[id^="showmore-wrap"] { left: 0px; top: 63px; } +.contact-wrapper .drop { + background-image: url('../../../images/icons/22/delete.png'); + display: block; + width: 22px; + height: 22px; + position: relative; + top: 10px; + left: -10px; + z-index: 99; +} +.contact-wrapper .drophide { + background-image: url('../../../images/icons/22/delete.png'); + display: block; + width: 22px; + height: 22px; + opacity: 0.3; + position: relative; + top: 10px; + left: -10px; + z-index: 99; +} +.contact-wrapper .contact-entry-connect { + padding-top: 5px; + font-weight: bold; +} .directory-item { float: left; width: 200px; diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index 3c9915576..cd604b656 100644 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -877,6 +877,27 @@ span[id^="showmore-wrap"] { left: 0px; top: 63px; } + .drop { + background-image: url('../../../images/icons/22/delete.png'); + display: block; width: 22px; height: 22px; + position: relative; + top: 10px; + left: -10px; + z-index: 99; + } + .drophide { + background-image: url('../../../images/icons/22/delete.png'); + display: block; width: 22px; height: 22px; + opacity: 0.3; + position: relative; + top: 10px; + left: -10px; + z-index: 99; + } + .contact-entry-connect { + padding-top: 5px; + font-weight: bold; + } } .directory-item { float: left; diff --git a/view/theme/quattro/templates/contact_template.tpl b/view/theme/quattro/templates/contact_template.tpl index 0f0207b2b..634630d9a 100644 --- a/view/theme/quattro/templates/contact_template.tpl +++ b/view/theme/quattro/templates/contact_template.tpl @@ -1,5 +1,6 @@
    + {{if $contact.ignlnk}}{{/if}}
    {{$contact.name}} - {{if !$no_contacts_checkbox}} + {{if $multiselect}} {{/if}} {{if $contact.photo_menu}} @@ -30,6 +31,10 @@
    {{$contact.itemurl}}
    {{$contact.network}}
    + {{if $contact.connlnk}} +
    {{$contact.conntxt}}
    + {{/if}} +
    diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index 46d8902ae..3fe04c064 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -291,7 +291,7 @@ section { margin: 10px 0 0 230px; } -.login-form, +.login-form { margin-top: 10px; } @@ -2784,7 +2784,7 @@ margin-left: 0px; font-weight: bold; } -.contact-entry-name { +.contact-entry-name, .contact-entry-connect { width: 100px; overflow: hidden; font: #999; @@ -2805,6 +2805,11 @@ margin-left: 0px; -webkit-box-shadow: 0 0 8px #BDBDBD;*/ } +.contact-entry-photo a img { + width: 80px; + height: 80px; +} + .contact-entry-edit-links .icon { border: 1px solid #babdb6; border-radius: 3px; diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 1c03edc6b..d914d944a 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -2282,6 +2282,10 @@ aside #id_password { float: left; margin: 0px 10px 10px 0px; } +.contact-entry-photo a img { + width: 80px; + height: 80px; +} /* profile match wrapper */ .profile-match-wrapper { float: left; diff --git a/view/theme/vier/templates/contact_template.tpl b/view/theme/vier/templates/contact_template.tpl index 5271112d8..a065b8fbf 100644 --- a/view/theme/vier/templates/contact_template.tpl +++ b/view/theme/vier/templates/contact_template.tpl @@ -7,7 +7,7 @@ {{$contact.name}} - {{if !$no_contacts_checkbox}} + {{if $multiselect}} {{/if}} {{if $contact.photo_menu}} From 2aad62190fd2c0d85e636d01b7e6607a2510906b Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 22 Oct 2015 22:48:49 +0200 Subject: [PATCH 10/21] template rework: use viewcontact_template.tpl also for directory --- mod/directory.php | 8 ++++---- view/templates/contact_template.tpl | 2 ++ view/templates/directory_header.tpl | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mod/directory.php b/mod/directory.php index 46c4f38ad..8ed4c2200 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -155,9 +155,9 @@ function directory_content(&$a) { $entry = array( 'id' => $rr['id'], - 'profile_link' => $profile_link, - 'photo' => proxy_url($a->get_cached_avatar_image($rr[$photo]), false, PROXY_SIZE_THUMB), - 'alt_text' => $rr['name'], + 'url' => $profile_link, + 'thumb' => proxy_url($a->get_cached_avatar_image($rr[$photo]), false, PROXY_SIZE_THUMB), + 'img_hover' => $rr['name'], 'name' => $rr['name'], 'details' => $pdesc . $details, 'page_type' => $page_type, @@ -192,7 +192,7 @@ function directory_content(&$a) { '$globaldir' => t('Global Directory'), '$gdirpath' => $gdirpath, '$desc' => t('Find on this site'), - '$entries' => $entries, + '$contacts' => $entries, '$finding' => t('Finding:'), '$findterm' => (strlen($search) ? $search : ""), '$title' => t('Site Directory'), diff --git a/view/templates/contact_template.tpl b/view/templates/contact_template.tpl index 4e8c04297..39502c91a 100644 --- a/view/templates/contact_template.tpl +++ b/view/templates/contact_template.tpl @@ -1,3 +1,5 @@ +{{* todo: better layout and implement $contact.details and other variables *}} +
    diff --git a/view/templates/directory_header.tpl b/view/templates/directory_header.tpl index eda887a89..46f17de40 100644 --- a/view/templates/directory_header.tpl +++ b/view/templates/directory_header.tpl @@ -22,8 +22,8 @@
    -{{foreach $entries as $entry}} - {{include file="directory_item.tpl"}} +{{foreach $contacts as $contact}} + {{include file="contact_template.tpl"}} {{/foreach}}
    From 0c3979720f0a2509cbc50662b4eba992ff81af13 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 23 Oct 2015 00:12:00 +0200 Subject: [PATCH 11/21] template rework: rearrange sidebar widgets for contact related pages --- mod/contacts.php | 16 +++++++++------- mod/directory.php | 4 ++-- mod/dirfind.php | 4 ++-- mod/match.php | 2 +- mod/suggest.php | 2 +- view/templates/contacts-widget-sidebar.tpl | 2 +- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index bdb25b022..3ace87090 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -27,6 +27,9 @@ function contacts_init(&$a) { require_once('include/group.php'); require_once('include/contact_widgets.php'); + if ($_GET['nets'] == "all") + $_GET['nets'] = ""; + if(! x($a->page,'aside')) $a->page['aside'] = ''; @@ -35,29 +38,28 @@ function contacts_init(&$a) { $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"),array( '$name' => htmlentities($a->data['contact']['name']), '$photo' => $a->data['contact']['photo'], - '$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url'] + '$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url'] )); $follow_widget = ''; + $networks_widget = ''; } else { $vcard_widget = ''; + $networks_widget .= networks_widget('contacts',$_GET['nets']); if (isset($_GET['add'])) $follow_widget = follow_widget($_GET['add']); else $follow_widget = follow_widget(); } - if ($_GET['nets'] == "all") - $_GET['nets'] = ""; - - $groups_widget .= group_side('contacts','group',false,0,$contact_id); $findpeople_widget .= findpeople_widget(); - $networks_widget .= networks_widget('contacts',$_GET['nets']); + $groups_widget .= group_side('contacts','group',false,0,$contact_id); + $a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array( '$vcard_widget' => $vcard_widget, + '$findpeople_widget' => $findpeople_widget, '$follow_widget' => $follow_widget, '$groups_widget' => $groups_widget, - '$findpeople_widget' => $findpeople_widget, '$networks_widget' => $networks_widget )); diff --git a/mod/directory.php b/mod/directory.php index 8ed4c2200..ef80b082a 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -6,10 +6,10 @@ function directory_init(&$a) { if(local_user()) { require_once('include/contact_widgets.php'); - $a->page['aside'] .= follow_widget(); - $a->page['aside'] .= findpeople_widget(); + $a->page['aside'] .= follow_widget(); + } else { unset($_SESSION['theme']); diff --git a/mod/dirfind.php b/mod/dirfind.php index 77e86c5db..bbd3badeb 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -13,9 +13,9 @@ function dirfind_init(&$a) { if(! x($a->page,'aside')) $a->page['aside'] = ''; - $a->page['aside'] .= follow_widget(); - $a->page['aside'] .= findpeople_widget(); + + $a->page['aside'] .= follow_widget(); } diff --git a/mod/match.php b/mod/match.php index f6174da66..5da1e036c 100644 --- a/mod/match.php +++ b/mod/match.php @@ -19,8 +19,8 @@ function match_content(&$a) { if(! local_user()) return; - $a->page['aside'] .= follow_widget(); $a->page['aside'] .= findpeople_widget(); + $a->page['aside'] .= follow_widget(); $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd; diff --git a/mod/suggest.php b/mod/suggest.php index 5241e485e..8870c65df 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -61,8 +61,8 @@ function suggest_content(&$a) { $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd; - $a->page['aside'] .= follow_widget(); $a->page['aside'] .= findpeople_widget(); + $a->page['aside'] .= follow_widget(); $r = suggestion_query(local_user()); diff --git a/view/templates/contacts-widget-sidebar.tpl b/view/templates/contacts-widget-sidebar.tpl index 5c52f4329..5b0610fcb 100644 --- a/view/templates/contacts-widget-sidebar.tpl +++ b/view/templates/contacts-widget-sidebar.tpl @@ -1,7 +1,7 @@ {{$vcard_widget}} +{{$findpeople_widget}} {{$follow_widget}} {{$groups_widget}} -{{$findpeople_widget}} {{$networks_widget}} From b2bb600f3a878409f925524e1de90d0239b662b0 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 23 Oct 2015 01:04:47 +0200 Subject: [PATCH 12/21] template rework: delete unused css --- view/theme/duepuntozero/style.css | 24 +----------------------- view/theme/frost-mobile/style.css | 26 -------------------------- view/theme/frost/style.css | 26 -------------------------- view/theme/quattro/dark/style.css | 13 ------------- view/theme/quattro/green/style.css | 13 ------------- view/theme/quattro/lilac/style.css | 13 ------------- view/theme/quattro/quattro.less | 9 --------- view/theme/smoothly/style.css | 19 ------------------- view/theme/vier/style.css | 13 ------------- 9 files changed, 1 insertion(+), 155 deletions(-) diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 7220b4c47..acdcd61c1 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -963,7 +963,7 @@ input#dfrn-url { } .wall-item-content-wrapper.comment { -# margin-left: 50px; +/* margin-left: 50px;*/ background: #EEEEEE; } @@ -1446,24 +1446,6 @@ blockquote.shared_content { .directory-end { clear: both; } -.directory-name { - text-align: center; -} -.directory-photo { - margin-left: 25px; -} -.directory-details { - font-size: 0.7em; - text-align: center; - margin-left: 5px; - margin-right: 5px; -} -.directory-item { - float: left; - width: 225px; - height: 260px; - overflow: auto; -} #directory-search-wrapper { margin-top: 20px; @@ -1474,10 +1456,6 @@ blockquote.shared_content { #directory-search-end { } -.directory-photo-img { - border: none; -} - .pager { padding: 10px; diff --git a/view/theme/frost-mobile/style.css b/view/theme/frost-mobile/style.css index ef030c5f3..80848e2dc 100644 --- a/view/theme/frost-mobile/style.css +++ b/view/theme/frost-mobile/style.css @@ -1779,27 +1779,6 @@ input#profile-jot-email { .directory-end { clear: both; } -.directory-name { - text-align: center; -} -.directory-photo { - margin-left: 15px; -} -.directory-details { - font-size: 0.7em; - text-align: center; - margin-left: 5px; - margin-right: 5px; -} -.directory-item { - float: left; -/* width: 225px; - height: 260px;*/ - padding-left: 15px; - width: 130px; - height: 235px; - overflow: auto; -} #directory-search-wrapper { margin-top: 20px; @@ -1810,11 +1789,6 @@ input#profile-jot-email { #directory-search-end { } -.directory-photo-img { - width: 125px; - border: none; -} - .pager { margin-top: 30px; diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css index 66121baf3..fe839dee1 100644 --- a/view/theme/frost/style.css +++ b/view/theme/frost/style.css @@ -1723,27 +1723,6 @@ input#dfrn-url { .directory-end { clear: both; } -.directory-name { - text-align: center; -} -.directory-photo { - margin-left: 25px; -} -.directory-details { - font-size: 0.7em; - text-align: center; - margin-left: 5px; - margin-right: 5px; -} -.directory-item { - float: left; -/* width: 225px; - height: 260px;*/ - padding-left: 25px; - width: 150px; - height: 225px; - overflow: auto; -} #directory-search-wrapper { margin-top: 20px; @@ -1754,11 +1733,6 @@ input#dfrn-url { #directory-search-end { } -.directory-photo-img { - width: 125px; - border: none; -} - /* NOTE: The order of the "pager" items here is very important! * The concern is maintaining a decent-looking pager for people who still use * the numbers, while also having a nice-looking pager for people who use the diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index b0489af80..57df37420 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -1568,19 +1568,6 @@ span[id^="showmore-wrap"] { padding-top: 5px; font-weight: bold; } -.directory-item { - float: left; - width: 200px; - height: 200px; -} -.directory-item .contact-photo { - width: 175px; - height: 175px; -} -.directory-item .contact-photo img { - width: 175px; - height: 175px; -} .contact-name { font-weight: bold; padding-top: 15px; diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 0c7050045..dbc48c1e4 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -1568,19 +1568,6 @@ span[id^="showmore-wrap"] { padding-top: 5px; font-weight: bold; } -.directory-item { - float: left; - width: 200px; - height: 200px; -} -.directory-item .contact-photo { - width: 175px; - height: 175px; -} -.directory-item .contact-photo img { - width: 175px; - height: 175px; -} .contact-name { font-weight: bold; padding-top: 15px; diff --git a/view/theme/quattro/lilac/style.css b/view/theme/quattro/lilac/style.css index c5f655427..fcfe7c0ec 100644 --- a/view/theme/quattro/lilac/style.css +++ b/view/theme/quattro/lilac/style.css @@ -1568,19 +1568,6 @@ span[id^="showmore-wrap"] { padding-top: 5px; font-weight: bold; } -.directory-item { - float: left; - width: 200px; - height: 200px; -} -.directory-item .contact-photo { - width: 175px; - height: 175px; -} -.directory-item .contact-photo img { - width: 175px; - height: 175px; -} .contact-name { font-weight: bold; padding-top: 15px; diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index cd604b656..777ee8ccc 100644 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -899,15 +899,6 @@ span[id^="showmore-wrap"] { font-weight: bold; } } -.directory-item { - float: left; - width: 200px; - height: 200px; - .contact-photo { - width: 175px; height: 175px; - img { width: 175px; height: 175px; } - } -} .contact-name { font-weight: bold; padding-top: 15px; } .contact-details { color: @Grey3; white-space: nowrap; diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index 3fe04c064..ef2be2fff 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -3656,25 +3656,6 @@ margin-left: 0px; margin-top: 10px; } -/* ============= */ -/* = Directory = */ -/* ============= */ - -.directory-item { - float: left; - margin: 50px 50px 0px 0px; -} - -.directory-details { - font-size: 0.9em; - width: 160px; -} - -.directory-name { - font-size: 1em; - width: 150px; -} - /* ========= */ /* = Admin = */ /* ========= */ diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index d914d944a..3757d79e2 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -2687,19 +2687,6 @@ a.mail-list-link { left: 0px; top: 63px; } -.directory-item { - float: left; - width: 200px; - height: 200px; -} -.directory-item .contact-photo { - width: 175px; - height: 175px; -} -.directory-item .contact-photo img { - width: 175px; - height: 175px; -} .contact-name { text-align: center; font-weight: bold; From efb12aed20231670107f475c6926aecf6ad07d1f Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 23 Oct 2015 01:32:03 +0200 Subject: [PATCH 13/21] template rework: little theme specific changes (frost, quattro) --- .../templates/suggest_friends.tpl | 23 ------------------- .../theme/frost/templates/suggest_friends.tpl | 23 ------------------- .../quattro/templates/contact_template.tpl | 5 ++-- 3 files changed, 3 insertions(+), 48 deletions(-) delete mode 100644 view/theme/frost-mobile/templates/suggest_friends.tpl delete mode 100644 view/theme/frost/templates/suggest_friends.tpl diff --git a/view/theme/frost-mobile/templates/suggest_friends.tpl b/view/theme/frost-mobile/templates/suggest_friends.tpl deleted file mode 100644 index a386f30d0..000000000 --- a/view/theme/frost-mobile/templates/suggest_friends.tpl +++ /dev/null @@ -1,23 +0,0 @@ - -{{include file="section_title.tpl"}} - -{{foreach $entries as $entry}} -
    -
    - - {{$entry.name}} - -
    -
    - -
    - {{if $entry.connlnk}} - - {{/if}} - -
    -{{/foreach}} - -
    diff --git a/view/theme/frost/templates/suggest_friends.tpl b/view/theme/frost/templates/suggest_friends.tpl deleted file mode 100644 index a386f30d0..000000000 --- a/view/theme/frost/templates/suggest_friends.tpl +++ /dev/null @@ -1,23 +0,0 @@ - -{{include file="section_title.tpl"}} - -{{foreach $entries as $entry}} -
    -
    - - {{$entry.name}} - -
    -
    - -
    - {{if $entry.connlnk}} - - {{/if}} - -
    -{{/foreach}} - -
    diff --git a/view/theme/quattro/templates/contact_template.tpl b/view/theme/quattro/templates/contact_template.tpl index 634630d9a..7060505e9 100644 --- a/view/theme/quattro/templates/contact_template.tpl +++ b/view/theme/quattro/templates/contact_template.tpl @@ -28,8 +28,9 @@
    {{$contact.name}}
    {{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}} -
    {{$contact.itemurl}}
    -
    {{$contact.network}}
    + {{if $contact.itemurl}}
    {{$contact.itemurl}}
    {{/if}} + {{if $contact.network}}
    {{$contact.network}}
    {{/if}} + {{if $contact.details}}
    {{$contact.details}}
    {{/if}} {{if $contact.connlnk}}
    {{$contact.conntxt}}
    From fad8ebc355c74d8ff06768342cdd8ecc609ece93 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 23 Oct 2015 15:18:05 +0200 Subject: [PATCH 14/21] template rework: two row contact page for vier --- view/theme/vier/style.css | 43 ++++++++++++++++--- .../theme/vier/templates/contact_template.tpl | 16 +++++-- 2 files changed, 48 insertions(+), 11 deletions(-) diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 3757d79e2..d6e47da01 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -351,7 +351,7 @@ code { margin: 0px; padding: 1em; list-style: none; - border: 3px solid #364e59; + /*border: 3px solid #364e59;*/ z-index: 100000; box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); } @@ -2270,12 +2270,40 @@ aside #id_password { float: left; } /* contacts */ -.contact-entry-wrapper { +/*.contact-entry-wrapper { width: 120px; height: 130px; float: left; -/* overflow: hidden; */ + overflow: hidden; margin-left: 5px; +}*/ + +.contact-entry-wrapper { + float: left; + width: 363px; + height: 90px; + padding-right: 10px; + margin: 0 10px 10px 0px; +} +.contact-entry-wrapper .contact-entry-photo-wrapper { + float: left; + margin-right: 10px; +} +.contact-entry-photo-wrapper { + position: relative; +} +.contact-entry-desc { + overflow: hidden; +} +.contact-entry-name { + font-weight: bold; +} +.contact-entry-details { + font-size: 13px; + color: #999999; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } /* photo */ .lframe { @@ -2323,14 +2351,15 @@ aside #id_password { } .contact-photo-menu { width: 11em; - border: 3px solid #364e59; + /*border: 3px solid #364e59;*/ color: #2d2d2d; background: #FFFFFF; -/* position: absolute;*/ - position: relative; - left: 0px; top: 0px; + position: absolute; + /*position: relative;*/ + left: 0px; /*top: 0px;*/ display: none; z-index: 10000; + box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); } .contact-photo-menu ul { margin:0px; padding: 0px; list-style: none } .contact-photo-menu li a { diff --git a/view/theme/vier/templates/contact_template.tpl b/view/theme/vier/templates/contact_template.tpl index a065b8fbf..add2eff5c 100644 --- a/view/theme/vier/templates/contact_template.tpl +++ b/view/theme/vier/templates/contact_template.tpl @@ -13,12 +13,12 @@ {{if $contact.photo_menu}}
    -
    -
    {{$contact.name}}
    + +
    +
    {{$contact.name}}
    + {{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}} + {{if $contact.itemurl}}
    {{$contact.itemurl}}
    {{/if}} + {{if $contact.network}}
    {{$contact.network}}
    {{/if}} + {{if $contact.details}}
    {{$contact.details}}
    {{/if}} +
    +
    From 7c9df689645f9674d13dd887ad53e838464b40a1 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 23 Oct 2015 15:23:00 +0200 Subject: [PATCH 15/21] template rework: revert #b2bb600 for vier (is needed for right sidebar) --- view/theme/vier/style.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index d6e47da01..d494cf459 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -2716,6 +2716,19 @@ a.mail-list-link { left: 0px; top: 63px; } +.directory-item { + float: left; + width: 200px; + height: 200px; +} +.directory-item .contact-photo { + width: 175px; + height: 175px; +} +.directory-item .contact-photo img { + width: 175px; + height: 175px; +} .contact-name { text-align: center; font-weight: bold; From b6cceda131abe24ec1ba56ef8d6cf6a27a8c310d Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Fri, 23 Oct 2015 15:41:49 +0200 Subject: [PATCH 16/21] template rework: revert commit because plugin community home uses the css classes --- view/theme/duepuntozero/style.css | 24 +++++++++++++++++++++++- view/theme/frost-mobile/style.css | 26 ++++++++++++++++++++++++++ view/theme/frost/style.css | 26 ++++++++++++++++++++++++++ view/theme/quattro/dark/style.css | 13 +++++++++++++ view/theme/quattro/green/style.css | 13 +++++++++++++ view/theme/quattro/lilac/style.css | 13 +++++++++++++ view/theme/quattro/quattro.less | 9 +++++++++ view/theme/smoothly/style.css | 19 +++++++++++++++++++ 8 files changed, 142 insertions(+), 1 deletion(-) diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index acdcd61c1..7220b4c47 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -963,7 +963,7 @@ input#dfrn-url { } .wall-item-content-wrapper.comment { -/* margin-left: 50px;*/ +# margin-left: 50px; background: #EEEEEE; } @@ -1446,6 +1446,24 @@ blockquote.shared_content { .directory-end { clear: both; } +.directory-name { + text-align: center; +} +.directory-photo { + margin-left: 25px; +} +.directory-details { + font-size: 0.7em; + text-align: center; + margin-left: 5px; + margin-right: 5px; +} +.directory-item { + float: left; + width: 225px; + height: 260px; + overflow: auto; +} #directory-search-wrapper { margin-top: 20px; @@ -1456,6 +1474,10 @@ blockquote.shared_content { #directory-search-end { } +.directory-photo-img { + border: none; +} + .pager { padding: 10px; diff --git a/view/theme/frost-mobile/style.css b/view/theme/frost-mobile/style.css index 80848e2dc..ef030c5f3 100644 --- a/view/theme/frost-mobile/style.css +++ b/view/theme/frost-mobile/style.css @@ -1779,6 +1779,27 @@ input#profile-jot-email { .directory-end { clear: both; } +.directory-name { + text-align: center; +} +.directory-photo { + margin-left: 15px; +} +.directory-details { + font-size: 0.7em; + text-align: center; + margin-left: 5px; + margin-right: 5px; +} +.directory-item { + float: left; +/* width: 225px; + height: 260px;*/ + padding-left: 15px; + width: 130px; + height: 235px; + overflow: auto; +} #directory-search-wrapper { margin-top: 20px; @@ -1789,6 +1810,11 @@ input#profile-jot-email { #directory-search-end { } +.directory-photo-img { + width: 125px; + border: none; +} + .pager { margin-top: 30px; diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css index fe839dee1..66121baf3 100644 --- a/view/theme/frost/style.css +++ b/view/theme/frost/style.css @@ -1723,6 +1723,27 @@ input#dfrn-url { .directory-end { clear: both; } +.directory-name { + text-align: center; +} +.directory-photo { + margin-left: 25px; +} +.directory-details { + font-size: 0.7em; + text-align: center; + margin-left: 5px; + margin-right: 5px; +} +.directory-item { + float: left; +/* width: 225px; + height: 260px;*/ + padding-left: 25px; + width: 150px; + height: 225px; + overflow: auto; +} #directory-search-wrapper { margin-top: 20px; @@ -1733,6 +1754,11 @@ input#dfrn-url { #directory-search-end { } +.directory-photo-img { + width: 125px; + border: none; +} + /* NOTE: The order of the "pager" items here is very important! * The concern is maintaining a decent-looking pager for people who still use * the numbers, while also having a nice-looking pager for people who use the diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index 57df37420..b0489af80 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -1568,6 +1568,19 @@ span[id^="showmore-wrap"] { padding-top: 5px; font-weight: bold; } +.directory-item { + float: left; + width: 200px; + height: 200px; +} +.directory-item .contact-photo { + width: 175px; + height: 175px; +} +.directory-item .contact-photo img { + width: 175px; + height: 175px; +} .contact-name { font-weight: bold; padding-top: 15px; diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index dbc48c1e4..0c7050045 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -1568,6 +1568,19 @@ span[id^="showmore-wrap"] { padding-top: 5px; font-weight: bold; } +.directory-item { + float: left; + width: 200px; + height: 200px; +} +.directory-item .contact-photo { + width: 175px; + height: 175px; +} +.directory-item .contact-photo img { + width: 175px; + height: 175px; +} .contact-name { font-weight: bold; padding-top: 15px; diff --git a/view/theme/quattro/lilac/style.css b/view/theme/quattro/lilac/style.css index fcfe7c0ec..c5f655427 100644 --- a/view/theme/quattro/lilac/style.css +++ b/view/theme/quattro/lilac/style.css @@ -1568,6 +1568,19 @@ span[id^="showmore-wrap"] { padding-top: 5px; font-weight: bold; } +.directory-item { + float: left; + width: 200px; + height: 200px; +} +.directory-item .contact-photo { + width: 175px; + height: 175px; +} +.directory-item .contact-photo img { + width: 175px; + height: 175px; +} .contact-name { font-weight: bold; padding-top: 15px; diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index 777ee8ccc..cd604b656 100644 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -899,6 +899,15 @@ span[id^="showmore-wrap"] { font-weight: bold; } } +.directory-item { + float: left; + width: 200px; + height: 200px; + .contact-photo { + width: 175px; height: 175px; + img { width: 175px; height: 175px; } + } +} .contact-name { font-weight: bold; padding-top: 15px; } .contact-details { color: @Grey3; white-space: nowrap; diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index ef2be2fff..3fe04c064 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -3656,6 +3656,25 @@ margin-left: 0px; margin-top: 10px; } +/* ============= */ +/* = Directory = */ +/* ============= */ + +.directory-item { + float: left; + margin: 50px 50px 0px 0px; +} + +.directory-details { + font-size: 0.9em; + width: 160px; +} + +.directory-name { + font-size: 1em; + width: 150px; +} + /* ========= */ /* = Admin = */ /* ========= */ From eaf5d05030e4c8d09d0fd221b0aa2657c69b0c0d Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 23 Oct 2015 16:48:32 +0200 Subject: [PATCH 17/21] template rework: display more infos for match and dirfind --- mod/dirfind.php | 8 ++++++-- mod/match.php | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mod/dirfind.php b/mod/dirfind.php index bbd3badeb..492f39d5a 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -2,6 +2,7 @@ require_once('include/contact_widgets.php'); require_once('include/socgraph.php'); require_once('include/Contact.php'); +require_once('include/contact_selectors.php'); function dirfind_init(&$a) { @@ -57,7 +58,7 @@ function dirfind_content(&$a, $prefix = "") { dbesc(escape_tags($search)), dbesc(escape_tags($search)), dbesc(escape_tags($search)), dbesc(escape_tags($search)), dbesc(escape_tags($search))); - $results = q("SELECT `contact`.`id` AS `cid`, `gcontact`.`url`, `gcontact`.`name`, `gcontact`.`photo`, `gcontact`.`keywords` + $results = q("SELECT `contact`.`id` AS `cid`, `gcontact`.`url`, `gcontact`.`name`, `gcontact`.`photo`, `gcontact`.`network` , `gcontact`.`keywords` FROM `gcontact` LEFT JOIN `contact` ON `contact`.`nurl` = `gcontact`.`nurl` AND `contact`.`uid` = %d AND NOT `contact`.`blocked` @@ -76,7 +77,7 @@ function dirfind_content(&$a, $prefix = "") { $j = new stdClass(); $j->total = $count[0]["total"]; $j->items_page = $perpage; - $j->page = $a->pager['page']; + $j->page = $a->pager['page']; foreach ($results AS $result) { if (poco_alternate_ostatus_url($result["url"])) continue; @@ -92,6 +93,7 @@ function dirfind_content(&$a, $prefix = "") { $objresult->url = $result["url"]; $objresult->photo = $result["photo"]; $objresult->tags = $result["keywords"]; + $objresult->network = $result["network"]; $j->results[] = $objresult; } @@ -140,12 +142,14 @@ function dirfind_content(&$a, $prefix = "") { $entry = array( 'url' => zrl($jj->url), + 'itemurl' => $jj->url, 'name' => htmlentities($jj->name), 'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), 'img_hover' => $jj->tags, 'conntxt' => $conntxt, 'connlnk' => $connlnk, 'photo_menu' => $photo_menu, + 'network' => network_to_name($jj->network, $jj->url), 'id' => ++$id, ); $entries[] = $entry; diff --git a/mod/match.php b/mod/match.php index 5da1e036c..ed7c21e4e 100644 --- a/mod/match.php +++ b/mod/match.php @@ -72,6 +72,7 @@ function match_content(&$a) { $entry = array( 'url' => zrl($jj->url), + 'itemurl' => $jj->url, 'name' => $jj->name, 'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), 'inttxt' => ' ' . t('is interested in:'), From 86f94570efb1577bbeaa591f8b7648114c78c1b5 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 23 Oct 2015 16:49:12 +0200 Subject: [PATCH 18/21] template rework: delete unused templates --- view/templates/match.tpl | 40 ------------------------------ view/templates/suggest_friends.tpl | 23 ----------------- 2 files changed, 63 deletions(-) delete mode 100644 view/templates/match.tpl delete mode 100644 view/templates/suggest_friends.tpl diff --git a/view/templates/match.tpl b/view/templates/match.tpl deleted file mode 100644 index d269a253b..000000000 --- a/view/templates/match.tpl +++ /dev/null @@ -1,40 +0,0 @@ -{{include file="section_title.tpl"}} - -{{foreach $entries as $entry}} -
    -
    - - {{$entry.name}} - - {{if $entry.photo_menu}} - menu -
    -
      - {{foreach $entry.photo_menu as $k=>$c}} - {{if $c.2}} -
    • {{$c.0}}
    • - {{else}} -
    • {{$c.0}}
    • - {{/if}} - {{/foreach}} -
    -
    - {{/if}} -
    -
    - -
    - {{if $entry.connlnk}} - - {{/if}} - -
    -{{/foreach}} - -
    - -{{$paginate}} diff --git a/view/templates/suggest_friends.tpl b/view/templates/suggest_friends.tpl deleted file mode 100644 index e7c9c1ac0..000000000 --- a/view/templates/suggest_friends.tpl +++ /dev/null @@ -1,23 +0,0 @@ - -{{include file="section_title.tpl"}} - -{{foreach $entries as $entry}} -
    - -
    - - {{$entry.name}} - -
    -
    - -
    - {{if $entry.connlnk}} - - {{/if}} -
    -{{/foreach}} - -
    From 442d59abc4c7c54abfee6b0d1d6583634b04ccf1 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Fri, 23 Oct 2015 21:45:16 +0200 Subject: [PATCH 19/21] template rework: multi-row view for the other themes --- view/templates/contact_template.tpl | 12 ++++--- view/theme/duepuntozero/style.css | 21 +++++++---- view/theme/frost-mobile/style.css | 18 +++++++--- .../templates/contact_template.tpl | 12 ++++--- .../templates/contacts-template.tpl | 3 +- .../templates/viewcontact_template.tpl | 12 ------- view/theme/frost/style.css | 20 +++++++---- .../frost/templates/contact_template.tpl | 12 ++++--- view/theme/smoothly/style.css | 35 +++++++++++++++---- 9 files changed, 96 insertions(+), 49 deletions(-) delete mode 100644 view/theme/frost-mobile/templates/viewcontact_template.tpl diff --git a/view/templates/contact_template.tpl b/view/templates/contact_template.tpl index 39502c91a..75f49653b 100644 --- a/view/templates/contact_template.tpl +++ b/view/templates/contact_template.tpl @@ -1,5 +1,3 @@ -{{* todo: better layout and implement $contact.details and other variables *}} -
    @@ -30,8 +28,14 @@
    -
    -
    {{$contact.name}}
    + +
    +
    {{$contact.name}}
    + {{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}} + {{if $contact.itemurl}}
    {{$contact.itemurl}}
    {{/if}} + {{if $contact.network}}
    {{$contact.network}}
    {{/if}} + {{if $contact.details}}
    {{$contact.details}}
    {{/if}} +
    diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 7220b4c47..4db523c5b 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -876,8 +876,14 @@ input#dfrn-url { .contact-entry-wrapper { float: left; - width: 120px; - height: 120px; + min-width: 363px; + height: 90px; + padding-right: 10px; + margin: 0 10px 10px 0px; +} +.contact-entry-wrapper .contact-entry-photo-wrapper { + float: left; + margin-right: 10px; } #contacts-search-end { margin-bottom: 10px; @@ -899,11 +905,14 @@ input#dfrn-url { clear: both; } .contact-entry-name { - float: left; - margin-left: 0px; - margin-right: 10px; - width: 120px; + font-weight: bold; +} +.contact-entry-details { + font-size: 13px; + color: #999999; + white-space: nowrap; overflow: hidden; + text-overflow: ellipsis; } .contact-entry-edit-links { margin-top: 6px; diff --git a/view/theme/frost-mobile/style.css b/view/theme/frost-mobile/style.css index ef030c5f3..46fe48caf 100644 --- a/view/theme/frost-mobile/style.css +++ b/view/theme/frost-mobile/style.css @@ -1110,8 +1110,13 @@ input#dfrn-url { height: 120px;*/ padding-left: 15px; padding-right: 15px; - width: 95px; - height: 200px; + max-width: 262px; + height: 90px; + margin: 0 10px 10px 0px; +} +.contact-entry-wrapper .contact-entry-photo-wrapper { + float: left; + margin-right: 10px; } #contacts-search-end { margin-bottom: 10px; @@ -1130,8 +1135,10 @@ input#dfrn-url { .contact-entry-photo-end { clear: both; } +.contact-entry-desc { + overflow: hidden; +} .contact-entry-name { - float: left; margin-left: 0px; margin-right: 10px; padding-bottom: 5px; @@ -1143,6 +1150,9 @@ input#dfrn-url { font-style: italic; font-size: 10px; font-weight: 500; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .contact-entry-network { font-size: 10px; @@ -2137,7 +2147,7 @@ input#profile-jot-email { border: 1px solid #AAA; background: #FFFFFF; position: absolute; - left: -30px; top: 80px; + /*left: -30px;*/ top: 80px; display: none; z-index: 101; -moz-box-shadow: 3px 3px 5px #555; diff --git a/view/theme/frost-mobile/templates/contact_template.tpl b/view/theme/frost-mobile/templates/contact_template.tpl index 42f4b7372..198b24746 100644 --- a/view/theme/frost-mobile/templates/contact_template.tpl +++ b/view/theme/frost-mobile/templates/contact_template.tpl @@ -28,10 +28,14 @@
    -
    -
    {{$contact.name}}

    - {{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}} -
    {{$contact.network}}
    + +
    +
    {{$contact.name}}
    + {{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}} + {{if $contact.itemurl}}
    {{$contact.itemurl}}
    {{/if}} + {{if $contact.network}}
    {{$contact.network}}
    {{/if}} + {{if $contact.details}}
    {{$contact.details}}
    {{/if}} +
diff --git a/view/theme/frost-mobile/templates/contacts-template.tpl b/view/theme/frost-mobile/templates/contacts-template.tpl index 94e9afbe5..f776222f3 100644 --- a/view/theme/frost-mobile/templates/contacts-template.tpl +++ b/view/theme/frost-mobile/templates/contacts-template.tpl @@ -15,11 +15,10 @@ {{$tabs}} -
+ {{foreach $contacts as $contact}} {{include file="contact_template.tpl"}} {{/foreach}} -
{{$paginate}} diff --git a/view/theme/frost-mobile/templates/viewcontact_template.tpl b/view/theme/frost-mobile/templates/viewcontact_template.tpl deleted file mode 100644 index 3b68410f9..000000000 --- a/view/theme/frost-mobile/templates/viewcontact_template.tpl +++ /dev/null @@ -1,12 +0,0 @@ - -{{include file="section_title.tpl"}} - -
-{{foreach $contacts as $contact}} - {{include file="contact_template.tpl"}} -{{/foreach}} -
- -
- -{{$paginate}} diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css index 66121baf3..b35c41405 100644 --- a/view/theme/frost/style.css +++ b/view/theme/frost/style.css @@ -1074,12 +1074,14 @@ input#dfrn-url { .contact-entry-wrapper { float: left; -/* width: 120px; - height: 120px;*/ - padding-left: 8px; - padding-right: 8px; - width: 95px; - height: 170px; + width: 262px; + height: 90px; + padding-right: 10px; + margin: 0 10px 10px 0px; +} +.contact-entry-wrapper .contact-entry-photo-wrapper { + float: left; + margin-right: 10px; } #contacts-search-end { margin-bottom: 10px; @@ -1100,6 +1102,9 @@ input#dfrn-url { .contact-entry-photo-end { clear: both; } +.contact-entry-desc { + overflow: hidden; +} .contact-entry-name { /*float: left;*/ margin-left: 0px; @@ -1113,6 +1118,9 @@ input#dfrn-url { font-style: italic; font-size: 10px; font-weight: 500; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .contact-entry-network { font-size: 10px; diff --git a/view/theme/frost/templates/contact_template.tpl b/view/theme/frost/templates/contact_template.tpl index 1ed1471a6..777ed5017 100644 --- a/view/theme/frost/templates/contact_template.tpl +++ b/view/theme/frost/templates/contact_template.tpl @@ -25,10 +25,14 @@
-
-
{{$contact.name}}
- {{if $contact.alt_text}}
{{$contact.alt_text}}
{{/if}} -
{{$contact.network}}
+ +
+
{{$contact.name}}
+ {{if $contact.alt_text}}
{{$contact.alt_text}}
{{/if}} + {{if $contact.itemurl}}
{{$contact.itemurl}}
{{/if}} + {{if $contact.network}}
{{$contact.network}}
{{/if}} + {{if $contact.details}}
{{$contact.details}}
{{/if}} +
diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index 3fe04c064..ae670cf3a 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -115,6 +115,10 @@ input[type=submit]:active { #search-save { } +#directory-search-end { + clear: both; +} + .dirsearch-desc { } @@ -2753,11 +2757,10 @@ margin-left: 0px; .view-contact-wrapper, .contact-entry-wrapper { float: left; - margin-right: 30px; - margin-bottom: 20px; - width: 88px; + padding-right: 10px; + width: 345px; height: 120px; - position: relative; + margin: 0 10px 10px 0px; } #view-contact-end { @@ -2768,6 +2771,10 @@ margin-left: 0px; margin-top: 15px; } +.contact-entry-wrapper .contact-entry-photo-wrapper { + float: left; + margin-right: 10px; +} .contact-entry-direction-wrapper { position: absolute; top: 20px; @@ -2784,17 +2791,27 @@ margin-left: 0px; font-weight: bold; } +.contact-entry-desc { + overflow: hidden; +} + .contact-entry-name, .contact-entry-connect { - width: 100px; overflow: hidden; font: #999; font-size: 12px; - text-align: center; font-weight: bold; margin-top: 5px; } -.contact-entry-photo { +.contact-entry-details { + font-size: 13px; + color: #999999; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.contact-entry-photo-wrapper { position: relative; /*border: 1px solid #7C7D7B; border-radius: 3px; @@ -2805,6 +2822,10 @@ margin-left: 0px; -webkit-box-shadow: 0 0 8px #BDBDBD;*/ } +.contact-entry-photo { + width: 80px; +} + .contact-entry-photo a img { width: 80px; height: 80px; From 9d720f69aad34d5c6bc4806a1584705b7a80737a Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Mon, 26 Oct 2015 13:36:01 +0100 Subject: [PATCH 20/21] template-rework: don't show the findpeople_widget on contact edit page --- mod/contacts.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod/contacts.php b/mod/contacts.php index 3ace87090..7f01c61c6 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -40,6 +40,7 @@ function contacts_init(&$a) { '$photo' => $a->data['contact']['photo'], '$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url'] )); + $finpeople_widget = ''; $follow_widget = ''; $networks_widget = ''; } @@ -50,9 +51,10 @@ function contacts_init(&$a) { $follow_widget = follow_widget($_GET['add']); else $follow_widget = follow_widget(); + + $findpeople_widget .= findpeople_widget(); } - $findpeople_widget .= findpeople_widget(); $groups_widget .= group_side('contacts','group',false,0,$contact_id); $a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array( From 7b1a95747453e66d589e7c8e35af63a7be9f6c75 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Mon, 26 Oct 2015 16:15:08 +0100 Subject: [PATCH 21/21] template-rework: try to fix double entries at match.php --- mod/match.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/match.php b/mod/match.php index ed7c21e4e..bbf1a6c63 100644 --- a/mod/match.php +++ b/mod/match.php @@ -82,8 +82,8 @@ function match_content(&$a) { 'photo_menu' => $photo_menu, 'id' => ++$id, ); + $entries[] = $entry; } - $entries[] = $entry; } $tpl = get_markup_template('viewcontact_template.tpl');