X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2FDirectory%2Flib%2Fsortablegrouplist.php;h=709547ae0f4ee0c9629ed9e02b115d7c4df2e771;hb=ed13c9a09840f4ed13473eaa4804cb9b192ba7b1;hp=4f34a8a897722be45c7f8584ee197157ffe40a5d;hpb=6d5b6d98b5f68d784fee736518eaaae7a26a51f6;p=quix0rs-gnu-social.git diff --git a/plugins/Directory/lib/sortablegrouplist.php b/plugins/Directory/lib/sortablegrouplist.php index 4f34a8a897..709547ae0f 100644 --- a/plugins/Directory/lib/sortablegrouplist.php +++ b/plugins/Directory/lib/sortablegrouplist.php @@ -149,6 +149,24 @@ class SortableGroupListItem extends SortableSubscriptionListItem } } + function showDescription() + { + if (!empty($this->profile->description)) { + $cutoff = 140; // XXX Should this be configurable? + $description = htmlspecialchars($this->profile->description); + + if (mb_strlen($description) > $cutoff) { + $description = mb_substr($description, 0, $cutoff - 1) + .'…'; + } + + $this->out->elementStart('p', 'note'); + $this->out->raw($description); + $this->out->elementEnd('p'); + } + + } + function showAvatar() { $logo = ($this->profile->stream_logo) ? @@ -205,6 +223,19 @@ class SortableGroupListItem extends SortableSubscriptionListItem } } + function showProfile() + { + $this->startProfile(); + $this->showAvatar(); + $this->showFullName(); + $this->showLocation(); + $this->showHomepage(); + $this->showDescription(); // groups have this instead of bios + // Relevant portion! + $this->showTags(); + $this->endProfile(); + } + function showActions() { $this->startActions();