diff --git a/include/nav.php b/include/nav.php index b95a4263c2..ce83d94d37 100644 --- a/include/nav.php +++ b/include/nav.php @@ -6,9 +6,12 @@ if(x($_SESSION['uid'])) { $a->page['nav'] .= "\r\n"; - if(($a->module != 'home') && (! (x($_SESSION['uid'])))) + if(($a->module != 'home') && (! (local_user()))) $a->page['nav'] .= '' . t('Home') . "\r\n"; - + if(($a->config['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user())) + $a->page['nav'] .= '' + . t('Register Now (it\'s FREE)') . "\r\n"; + $a->page['nav'] .= '' . t('Site Directory') . "\r\n"; if(x($_SESSION,'uid')) { diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php new file mode 100644 index 0000000000..47132e6a82 --- /dev/null +++ b/mod/viewcontacts.php @@ -0,0 +1,57 @@ +argv[1]); + +} + + +function viewcontacts_content(&$a) { + + if(((! count($a->profile)) || ($a->profile['hide-friends']))) { + notice( t('Permission denied.') . EOL); + return; + } + + $o .= '

' . t('View Contacts') . '

'; + + + $r = q("SELECT COUNT(*) as `total` FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0", + intval($a->profile['uid']) + ); + if(count($r)) + $a->pager['totalitems'] = $r[0]['total']; + + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 ORDER BY `name` ASC LIMIT %d , %d ", + intval($a->profile['uid']), + intval($a->pager['start']), + intval($a->pager['itemspage']) + ); + if(! count($r)) { + notice( t('No contacts.') . EOL ); + return $o; + } + + $tpl = file_get_contents("view/viewcontact_template.tpl"); + + foreach($r as $rr) { + if($rr['self']) + continue; + + $o .= replace_macros($tpl, array( + '$id' => $rr['id'], + '$alt_text' => t('Visit ') . $rr['name'] . t('\'s profile'), + '$thumb' => $rr['thumb'], + '$name' => $rr['name'], + '$url' => $rr['url'] + )); + } + + $o .= '
'; + + $o .= paginate($a); + + return $o; +} \ No newline at end of file diff --git a/view/contact_edit.tpl b/view/contact_edit.tpl index e1cffc460a..dbcc3fd716 100644 --- a/view/contact_edit.tpl +++ b/view/contact_edit.tpl @@ -18,6 +18,8 @@ +
diff --git a/view/profile.php b/view/profile.php index e8de331e1f..8ec9ab599e 100644 --- a/view/profile.php +++ b/view/profile.php @@ -19,8 +19,11 @@ diff --git a/view/style.css b/view/style.css index 740ca13f65..f8c483a896 100644 --- a/view/style.css +++ b/view/style.css @@ -295,6 +295,26 @@ input#dfrn-url { clear: both; margin-bottom: 30px; } + +#profile-extra-links ul { + list-style-type: none; +} + +#profile-extra-links li { + margin-top: 5px; +} + +.view-contact-wrapper { + margin-top: 20px; + float: left; + margin-left: 20px; + width: 180px; +} +#view-contact-end { + clear: both; +} + + #profile-edit-default-desc { color: #FF0000; border: 1px solid #FF8888; @@ -815,11 +835,27 @@ input#dfrn-url { #contact-edit-photo-wrapper { margin-bottom: 20px; } +#contact-edit-links { + float: left; +} #contact-edit-links img { margin-left: 20px; border: none; } +#contact-drop-links { + float: left; +} + +#contact-drop-links img { + margin-left: 20px; + border: none; +} + +#contact-edit-nav-end { + clear: both; +} + #contact-edit-direction-icon { float: left; margin-top: 70px; diff --git a/view/viewcontact_template.tpl b/view/viewcontact_template.tpl new file mode 100644 index 0000000000..3436a5c453 --- /dev/null +++ b/view/viewcontact_template.tpl @@ -0,0 +1,15 @@ + +
+
+
+ $name +
+
+
+
+
$name
+
+
+
+
+