Browse Source

template rework: rearrange sidebar widgets for contact related pages

pull/1975/head
rabuzarus 6 years ago
parent
commit
0c3979720f
6 changed files with 16 additions and 14 deletions
  1. +9
    -7
      mod/contacts.php
  2. +2
    -2
      mod/directory.php
  3. +2
    -2
      mod/dirfind.php
  4. +1
    -1
      mod/match.php
  5. +1
    -1
      mod/suggest.php
  6. +1
    -1
      view/templates/contacts-widget-sidebar.tpl

+ 9
- 7
mod/contacts.php View File

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


+ 2
- 2
mod/directory.php View File

@ -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']);


+ 2
- 2
mod/dirfind.php View File

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


+ 1
- 1
mod/match.php View File

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


+ 1
- 1
mod/suggest.php View File

@ -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());


+ 1
- 1
view/templates/contacts-widget-sidebar.tpl View File

@ -1,7 +1,7 @@
{{$vcard_widget}}
{{$findpeople_widget}}
{{$follow_widget}}
{{$groups_widget}}
{{$findpeople_widget}}
{{$networks_widget}}

Loading…
Cancel
Save