public static function ArtistsByAlbum($id) { $artists = AlbumArtistModel::model()->getArtistsByAlbum($id); $i = 0; $html = ""; foreach ($artists as $artist) { $html .= $i > 0 ? "<span> - </span>" : ""; $html .= '<a href="' . URLHelper::buildFriendlyURL("artist", $artist->artist_id, Common::makeFriendlyUrl($artist->artist_name)) . '" title="' . $artist->artist_name . '">' . Formatter::substring($artist->artist_name, " ", 3, 15) . '</a>'; $i++; } return $html; }
</div> <div class="lyrics"> <h3 class='lyric-label'> <i class='ic-lyric'></i> <?php echo Yii::t("wap", "Lyric"); ?> </h3> <?php $lyrics = $song->song_extra && $song->song_extra->lyrics ? $song->song_extra->lyrics : Yii::t("wap", "Lyric Updating"); $p = new CHtmlPurifier(); $p->options = array('HTML.ForbiddenElements' => array('div', 'span')); $lyrics = $p->purify($lyrics); $lyrics = str_replace("<br />", " ", $lyrics); $lyrics = nl2br($lyrics); $content = Formatter::substring($lyrics, " ", 50, 250); ?> <?php if (!empty($lyrics)) { ?> <div class="lyrics-short-desc text-desc t10 fs_15"> <p class="pad-10 subtext"><?php echo $content; ?> </p> <div class="short-desc-view-more"> <?php if ($song->song_extra && $song->song_extra->lyrics) { ?> <a href="javascript:void(0)"
?> "> <a href="<?php echo $link; ?> "> <img style="width: 120px;" src="<?php echo AvatarHelper::getAvatar("artist", $artist->id, 120); ?> " alt="<?php echo $artist->name; ?> " /> </a> <p><a href="<?php echo $link; ?> " title="<?php echo $artist->name; ?> "><?php echo Formatter::substring(CHtml::encode($artist->name), " ", 3, 12); ?> </a></p> </li> <?php } } ?> </ul> </div>