diff options
author | friendica <info@friendica.com> | 2015-02-03 23:30:07 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-02-03 23:30:07 -0800 |
commit | 127bf82187c266c2202fd33003e60b5061778cd7 (patch) | |
tree | ad29cff6716c658a10ff33ff40b5771750f8b787 | |
parent | 0cc29af6d0c305efa35fbe3b0c7bc314f21b4166 (diff) | |
download | volse-hubzilla-127bf82187c266c2202fd33003e60b5061778cd7.tar.gz volse-hubzilla-127bf82187c266c2202fd33003e60b5061778cd7.tar.bz2 volse-hubzilla-127bf82187c266c2202fd33003e60b5061778cd7.zip |
probably enough for now - couldn't get the censorship filter in today, I think that's the only bit missing.
-rw-r--r-- | mod/directory.php | 1 | ||||
-rw-r--r-- | mod/ratings.php | 2 | ||||
-rwxr-xr-x | view/tpl/direntry.tpl | 12 |
3 files changed, 8 insertions, 7 deletions
diff --git a/mod/directory.php b/mod/directory.php index 40ca93af9..f19b1142e 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -277,6 +277,7 @@ function directory_content(&$a) { 'keywords' => $out, 'ignlink' => $suggest ? $a->get_baseurl() . '/directory?ignore=' . $rr['hash'] : '', 'ignore_label' => "Don't suggest", + 'safe' => $safe_mode ); $arr = array('contact' => $rr, 'entry' => $entry); diff --git a/mod/ratings.php b/mod/ratings.php index 66392fe2b..fe7865778 100644 --- a/mod/ratings.php +++ b/mod/ratings.php @@ -55,7 +55,7 @@ function ratings_init(&$a) { if($results['ratings']) { foreach($results['ratings'] as $n) { - if(array_key_exists($n['xchan_hash'],$a->contacts)) + if(is_array($a->contacts) && array_key_exists($n['xchan_hash'],$a->contacts)) $friends[] = $n; else $others[] = $n; diff --git a/view/tpl/direntry.tpl b/view/tpl/direntry.tpl index b0a1084e8..db098baa1 100755 --- a/view/tpl/direntry.tpl +++ b/view/tpl/direntry.tpl @@ -1,8 +1,8 @@ -<div class="directory-item lframe" id="directory-item-{{$entry.id}}" > +<div class="directory-item lframe{{if $entry.safe}} safe{{/if}}" id="directory-item-{{$entry.hash}}" > -<div class="contact-photo-wrapper" id="directory-photo-wrapper-{{$entry.id}}" > -<div class="contact-photo" id="directory-photo-{{$entry.id}}" > -<a href="{{$entry.profile_link}}" class="directory-profile-link" id="directory-profile-link-{{$entry.id}}" ><img class="directory-photo-img" src="{{$entry.photo}}" alt="{{$entry.alttext}}" title="{{$entry.alttext}}" /></a> +<div class="contact-photo-wrapper" id="directory-photo-wrapper-{{$entry.hash}}" > +<div class="contact-photo" id="directory-photo-{{$entry.hash}}" > +<a href="{{$entry.profile_link}}" class="directory-profile-link" id="directory-profile-link-{{$entry.hash}}" ><img class="directory-photo-img" src="{{$entry.photo}}" alt="{{$entry.alttext}}" title="{{$entry.alttext}}" /></a> {{if $entry.connect}} <div class="directory-connect btn btn-default"><a href="{{$entry.connect}}"><i class="icon-plus connect-icon"></i> {{$entry.conn_label}}</a></div> {{/if}} @@ -13,10 +13,10 @@ </div> <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> +<div class="contact-name" id="directory-name-{{$entry.hash}}" ><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.viewrate}} -<div id="dir-rating-wrapper-{{$entry.id}}" class="directory-rating" >{{if $entry.total_ratings}}<a href="ratings/{{$entry.hash}}"><button class="btn btn-default">{{$entry.total_ratings}}</button></a>{{/if}} +<div id="dir-rating-wrapper-{{$entry.hash}}" class="directory-rating" >{{if $entry.total_ratings}}<a href="ratings/{{$entry.hash}}"><button class="btn btn-default">{{$entry.total_ratings}}</button></a>{{/if}} {{if $entry.canrate}}<button class="btn btn-default" onclick="doRatings('{{$entry.hash}}'); return false;" ><i class="icon-pencil"></i></button><span class="required" id="edited-{{$entry.hash}}" style="display: none;" >*</span>{{/if}} </div> {{/if}} |