</a> </div> </div> <?php } ?> </div> <?php } else { ?> <!-- More than 4 photos uploaded --> <p class="joms-stream-photo-caption"><?php echo CStringHelper::getMood($this->acts[0]->title, $mood); ?> </p> <div class="joms-stream-single-photo"> <div class="joms-stream-multi-photo-hero"> <a href="<?php echo $firstPhoto->getPhotoLink(); ?> " > <img src="<?php echo $firstPhoto->getImageURI(); ?> " alt="<?php echo $this->escape($firstPhoto->caption); ?> " />
/** * General purpose stream formatting function */ public static function format($str, $mood = null) { // Some database actually already stored some URL already linked! Such as @mention format // To handle this, we strip to to the base format. and apply the linking later $str = preg_replace('|@<a href="(.*?)".*>(.*)</a>|', '@${2}', $str); //Strip html href tag $str = preg_replace('|<a href="(.*?)".*>(.*)</a>|', '${1}', $str); // Escape it first $str = CStringHelper::escape(rtrim(str_replace(' ', '', $str))); $str = str_replace('&quot;', '"', $str); // Autolink url $str = CStringHelper::autoLink($str); // Nl2Br $str = nl2br($str); // Autolinked username $str = CUserHelper::replaceAliasURL($str); $str = CStringHelper::getEmoticon($str); $str = CStringHelper::getMood($str, $mood); $str = CStringHelper::converttagtolink($str); return $str; }
echo $attachment->message->link; ?> "><?php echo JHTML::_('string.truncate', $attachment->message->title, 60, true, false); ?> </a></h4> <span><?php echo JHTML::_('string.truncate', strip_tags($attachment->message->description), $config->getInt('streamcontentlength')); ?> </span> </div> <?php break; case 'fetched': //this is the fecthed content from url echo CStringHelper::getMood($stream->sharedMessage, $stream->sharedMood); echo $attachment->message; break; case 'share.groups.discussion': ?> <div class="joms-media"> <h4 class="joms-text--title"><a href="<?php echo $attachment->link; ?> "><?php echo $attachment->discussion_title; ?> </a></h4> <p class="joms-text--desc"><?php echo $attachment->discussion_message; ?>
/** * General purpose stream formatting function */ public static function format($str, $mood = null) { // Some database actually already stored some URL already linked! Such as @mention format // To handle this, we strip to to the base format. and apply the linking later $str = preg_replace('|@<a href="(.*?)".*>(.*)</a>|', '@${2}', $str); //Strip html href tag $str = preg_replace('|<a href="(.*?)".*>(.*)</a>|', '${1}', $str); // Escape it first $str = CStringHelper::escape(rtrim(str_replace(' ', '', $str))); $str = str_replace('&quot;', '"', $str); // Autolink url $str = CStringHelper::autoLink($str); // Nl2Br $str = nl2br($str); // Autolinked username $str = CUserHelper::replaceAliasURL($str); $str = CStringHelper::getEmoticon($str); $str = CStringHelper::getMood($str, $mood); $str = CStringHelper::converttagtolink($str); //onstream comment filter // onMessageDisplay Event trigger if ($str) { $appsLib = CAppPlugins::getInstance(); $appsLib->loadApplications(); $strObj = new stdClass(); $strObj->body = $str; $arg[] = $strObj; $appsLib->triggerEvent('onFormatConversion', $arg); $str = $arg[0]->body; // reassign back to string } return $str; }