/** * Convenience function to combine functions below */ function finalUrl($url) { // This function should only works for google proxy feeds if (!str_contains($url, 'feedproxy.google.com')) { return $url; } // redirect $url = redirectUrl($url); // cleanup $url = cleanupUrl($url); // return result return $url; }
} $img = CHtml::image(Yii::app()->theme->getBaseUrl() . '/images/etc/twitter.png'); if (!empty($model->twitter)) { echo '<div class="span-6">' . CHtml::link($img . ' ' . $model->twitter, 'http://www.twitter.com/' . $model->twitter, array('target' => '_blank')) . "</div>\n"; } $img = CHtml::image(Yii::app()->theme->getBaseUrl() . '/images/etc/googleplus.png'); if (!empty($model->googleplus)) { echo '<div class="span-6">' . CHtml::link($img . ' ' . humanUrl($model->googleplus), cleanupUrl($model->googleplus), array('target' => '_blank')) . "</div>\n"; } $img = CHtml::image(Yii::app()->theme->getBaseUrl() . '/images/etc/linkedin.png'); if (!empty($model->linkedin)) { echo '<div class="span-6">' . CHtml::link($img . ' ' . humanUrl($model->linkedin), cleanupUrl($model->linkedin), array('target' => '_blank')) . "</div>\n"; } $img = CHtml::image(Yii::app()->theme->getBaseUrl() . '/images/etc/other.png'); if (!empty($model->otherUrl)) { echo '<div class="span-6">' . CHtml::link($img . ' ' . humanUrl($model->otherUrl), cleanupUrl($model->otherUrl), array('target' => '_blank')) . "</div>\n"; } ?> </div> </td> </tr> <tr> <td colspan="6" style="padding:10px;"> <?php echo $this->convertUrls($model->backgroundInfo); ?> </td> </tr> <tr> <td class="label" width="80">Assigned to</td> <td>
<div class="detail-field"><?php echo $model->linkedin; ?></div> <div class="detail-form"> <?php echo $form->textField($model, 'linkedin', array( 'size'=>10, 'maxlength'=>100, 'tabindex'=>19, 'style'=>'width:135px;' ));?> </div> </td> <td class="label"> <?php $img = CHtml::image(Yii::app()->theme->getBaseUrl().'/images/etc/other.png'); if(!empty($model->otherUrl)) echo CHtml::link($img,cleanupUrl($model->otherUrl),array('target'=>'_blank')); else echo $img.' '; ?> </td> <td colspan="3" id="otherUrl" onclick="showField(this,true);"> <div class="detail-field"><?php echo $model->otherUrl; ?></div> <div class="detail-form"> <?php echo $form->textField($model, 'otherUrl', array( 'size'=>10, 'maxlength'=>100, 'tabindex'=>20, 'style'=>'width:225px;' )); ?> </div>