indicate public forums in directory results (there will be some [possibly considerable] lag time before existing forums are correctly tagged).
This commit is contained in:
parent
6209465233
commit
5619902776
@ -702,10 +702,6 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) {
|
||||
if((($arr['site']['directory_mode'] === 'standalone') || ($dirmode & DIRECTORY_MODE_STANDALONE)) && ($arr['site']['url'] != z_root()))
|
||||
$arr['searchable'] = false;
|
||||
|
||||
$public_forum = (($r[0]['xchan_flags'] & XCHAN_FLAGS_PUBFORUM) ? true : false);
|
||||
$pubforum_changed = ((intval($public_forum) != intval($arr['public_forum'])) ? true : false);
|
||||
if($pubforum_changed)
|
||||
$new_flags = $r[0]['xchan_flags'] ^ XCHAN_FLAGS_PUBFORUM;
|
||||
|
||||
$hidden = (1 - intval($arr['searchable']));
|
||||
|
||||
@ -725,6 +721,11 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) {
|
||||
if($deleted_changed)
|
||||
$new_flags = $new_flags ^ XCHAN_FLAGS_DELETED;
|
||||
|
||||
$public_forum = (($r[0]['xchan_flags'] & XCHAN_FLAGS_PUBFORUM) ? true : false);
|
||||
$pubforum_changed = ((intval($public_forum) != intval($arr['public_forum'])) ? true : false);
|
||||
if($pubforum_changed)
|
||||
$new_flags = $r[0]['xchan_flags'] ^ XCHAN_FLAGS_PUBFORUM;
|
||||
|
||||
if(($r[0]['xchan_name_date'] != $arr['name_updated'])
|
||||
|| ($r[0]['xchan_connurl'] != $arr['connections_url'])
|
||||
|| ($r[0]['xchan_flags'] != $new_flags)
|
||||
|
@ -203,6 +203,7 @@ function directory_content(&$a) {
|
||||
$entry = array(
|
||||
'id' => ++$t,
|
||||
'profile_link' => $profile_link,
|
||||
'public_forum' => $rr['public_forum'],
|
||||
'photo' => $rr['photo'],
|
||||
'hash' => $rr['hash'],
|
||||
'alttext' => $rr['name'] . ' ' . $rr['address'],
|
||||
@ -210,6 +211,7 @@ function directory_content(&$a) {
|
||||
'details' => $pdesc . $details,
|
||||
'profile' => $profile,
|
||||
'address' => $rr['address'],
|
||||
'nickname' => substr($rr['address'],0,strpos($rr['address'],'@')),
|
||||
'location' => $location,
|
||||
'gender' => $gender,
|
||||
'pdesc' => $pdesc,
|
||||
@ -219,6 +221,7 @@ function directory_content(&$a) {
|
||||
'hometown' => $hometown,
|
||||
'about' => $about,
|
||||
'conn_label' => t('Connect'),
|
||||
'forum_label' => t('Public Forum:'),
|
||||
'connect' => $connect_link,
|
||||
'online' => $online,
|
||||
'kw' => (($out) ? t('Keywords: ') : ''),
|
||||
|
@ -226,6 +226,8 @@ function dirsearch_content(&$a) {
|
||||
$entry['name'] = $rr['xchan_name'];
|
||||
$entry['hash'] = $rr['xchan_hash'];
|
||||
|
||||
$entry['public_forum'] = (($rr['xchan_flags'] & XCHAN_FLAGS_PUBFORUM) ? true : false);
|
||||
|
||||
$entry['url'] = $rr['xchan_url'];
|
||||
$entry['photo_l'] = $rr['xchan_photo_l'];
|
||||
$entry['photo'] = $rr['xchan_photo_m'];
|
||||
|
@ -12,6 +12,12 @@
|
||||
<div class='contact-info'>
|
||||
<div class="contact-name" id="directory-name-{{$entry.id}}" ><a href='{{$entry.profile_link}}' >{{$entry.name}}</a>{{if $entry.online}} <i class="icon-asterisk online-now" title="{{$entry.online}}"></i>{{/if}}</div>
|
||||
|
||||
{{if $entry.public_forum}}
|
||||
<div class="contact-forum">
|
||||
{{$entry.forum_label}} @{{$entry.nickname}}+
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="contact-details">{{$entry.details}}</div>
|
||||
{{if $entry.hometown}}
|
||||
<div class="directory-hometown">{{$entry.hometown}} </div>
|
||||
|
Reference in New Issue
Block a user