diff --git a/mod/directory.php b/mod/directory.php
index 7c7f63037..67074d8cd 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -13,6 +13,7 @@ function directory_init(&$a) {
intval(local_channel()),
dbesc($_GET['ignore'])
);
+ goaway(z_root() . '/directory?suggest=1');
}
$observer = get_observer_hash();
@@ -200,22 +201,24 @@ function directory_content(&$a) {
if(in_array($rr['hash'],$contacts))
$connect_link = '';
- $details = '';
+ $location = '';
if(strlen($rr['locale']))
- $details .= $rr['locale'];
+ $location .= $rr['locale'];
if(strlen($rr['region'])) {
if(strlen($rr['locale']))
- $details .= ', ';
- $details .= $rr['region'];
+ $location .= ', ';
+ $location .= $rr['region'];
}
if(strlen($rr['country'])) {
if(strlen($details))
- $details .= ', ';
- $details .= $rr['country'];
+ $location .= ', ';
+ $location .= $rr['country'];
}
+
+ $age = '';
if(strlen($rr['birthday'])) {
if(($years = age($rr['birthday'],'UTC','')) != 0)
- $details .= '
' . t('Age: ') . $years ;
+ $age = $years;
}
$page_type = '';
@@ -231,7 +234,6 @@ function directory_content(&$a) {
|| (x($profile,'region') == 1)
|| (x($profile,'postcode') == 1)
|| (x($profile,'country') == 1))
- $location = t('Location:');
$gender = ((x($profile,'gender') == 1) ? t('Gender: ') . $profile['gender']: False);
@@ -240,9 +242,9 @@ function directory_content(&$a) {
$homepage = ((x($profile,'homepage') == 1) ? t('Homepage: ') : False);
$homepageurl = ((x($profile,'homepage') == 1) ? $profile['homepage'] : '');
- $hometown = ((x($profile,'hometown') == 1) ? t('Hometown: ') . $profile['hometown'] : False);
+ $hometown = ((x($profile,'hometown') == 1) ? $profile['hometown'] : False);
- $about = ((x($profile,'about') == 1) ? t('About: ') . bbcode(strip_bbimage($profile['about'])) : False);
+ $about = ((x($profile,'about') == 1) ? bbcode(strip_bbimage($profile['about'])) : False);
$keywords = ((x($profile,'keywords')) ? $profile['keywords'] : '');
@@ -284,21 +286,27 @@ function directory_content(&$a) {
'hash' => $rr['hash'],
'alttext' => $rr['name'] . ((local_channel() || remote_channel()) ? ' ' . $rr['address'] : ''),
'name' => $rr['name'],
- 'details' => $pdesc . $details,
+ 'details' => $details,
+ 'age' => $age,
+ 'age_label' => t('Age:'),
'profile' => $profile,
'address' => $rr['address'],
'nickname' => substr($rr['address'],0,strpos($rr['address'],'@')),
'location' => $location,
+ 'location_label' => t('Location:'),
'gender' => $gender,
'total_ratings' => $total_ratings,
'viewrate' => true,
'canrate' => ((local_channel()) ? true : false),
'pdesc' => $pdesc,
+ 'pdesc_label' => t('Description:'),
'marital' => $marital,
'homepage' => $homepage,
'homepageurl' => linkify($homepageurl),
'hometown' => $hometown,
+ 'hometown_label' => t('Hometown:'),
'about' => $about,
+ 'about_label' => t('About:'),
'conn_label' => t('Connect'),
'forum_label' => t('Public Forum:'),
'connect' => $connect_link,
@@ -306,9 +314,10 @@ function directory_content(&$a) {
'kw' => (($out) ? t('Keywords: ') : ''),
'keywords' => $out,
'ignlink' => $suggest ? $a->get_baseurl() . '/directory?ignore=' . $rr['hash'] : '',
- 'ignore_label' => "Don't suggest",
+ 'ignore_label' => t('Don\'t suggest'),
'common_friends' => (($common[$rr['address']]) ? intval($common[$rr['address']]) : ''),
- 'common_txt' => sprintf( t('Common connections: %s'), intval($common[$rr['address']]) ),
+ 'common_label' => t('Common connections:'),
+ 'common_count' => intval($common[$rr['address']]),
'safe' => $safe_mode
);
@@ -354,7 +363,7 @@ function directory_content(&$a) {
killme();
}
else {
- $maxheight = 175;
+ $maxheight = 94;
$o .= "";
$o .= replace_macros($tpl, array(
diff --git a/view/css/mod_directory.css b/view/css/mod_directory.css
index 7b149d744..d3831e589 100644
--- a/view/css/mod_directory.css
+++ b/view/css/mod_directory.css
@@ -1,76 +1,29 @@
-
-.directory-end {
- clear: both;
-}
-.directory-name {
- float: left;
- width: 250px;
-}
-
-.directory-photo {
- margin-left: 25px;
-}
.directory-photo-img {
- margin-left: auto;
- margin-right: auto;
- display:block;
width: 80px;
height: 80px;
-}
-.directory-details {
- text-align: center;
- margin-left: 5px;
- margin-right: 5px;
-}
-.directory-item {
- overflow: hidden;
- margin: 2px;
- border-bottom: 2px solid #f1f1f1;
- padding-bottom: 3px;
-}
-
-#directory-search-wrapper {
- margin-top: 20px;
- margin-right: 20px;
- margin-bottom: 50px;
-}
-
-#directory-search-end {
-}
-
-.directory-photo-img {
border: none;
}
-div.dirtagblock.widget {
- overflow: hidden;
+.directory-item {
+ margin-bottom: 20px;
}
-.dirpopup {
- float: left;
- width: 225px;
-}
-
-.contact-photo {
- float: left;
- margin-right: 16px;
-}
-
-.contact-name {
- font-size: larger;
+.contact-photo-wrapper {
+ display: table-cell;
+ vertical-align: top;
}
.contact-info {
- display: block;
- overflow: hidden;
+ display: table-cell;
+ vertical-align: top;
+ padding-left: 10px;
}
-.directory-item {
- margin: 16px;
+.contact-info-label {
+ font-weight: bold;
}
-.directory-connect {
- margin-top: 3px;
- display:block;
- margin-left:auto;
- margin-right: auto;
+
+.section-subtitle-wrapper .btn-xs {
+ margin-top: -2px;
}
+
diff --git a/view/js/main.js b/view/js/main.js
index 625ac5b01..698e2d79c 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -615,7 +615,7 @@ function updateConvItems(mode,data) {
function collapseHeight() {
- $(".wall-item-body, .contact-info").each(function() {
+ $(".wall-item-body, .directory-collapse").each(function() {
var orgHeight = $(this).height();
if(orgHeight > divmore_height + 10) {
if(! $(this).hasClass('divmore')) {
diff --git a/view/js/mod_directory.js b/view/js/mod_directory.js
index 90942f9ac..e850963c1 100644
--- a/view/js/mod_directory.js
+++ b/view/js/mod_directory.js
@@ -38,4 +38,4 @@ function postRatings() {
$(document).ready(function() {
collapseHeight();
-});
\ No newline at end of file
+});
diff --git a/view/tpl/directory_header.tpl b/view/tpl/directory_header.tpl
index 477df8a63..26739efc3 100755
--- a/view/tpl/directory_header.tpl
+++ b/view/tpl/directory_header.tpl
@@ -1,16 +1,12 @@
-