コード例 #1
0
ファイル: VoUserHelper.php プロジェクト: voota/voota
function fullName($user, $length = false)
{
    $ret = "";
    if ($user && $user->getProfile()->getNombre()) {
        $ret .= $user->getProfile()->getNombre();
        if ($user->getProfile()->getApellidos()) {
            $ret .= " " . $user->getProfile()->getApellidos();
        }
        if ($length) {
            $ret = sfVoUtil::cutToLength($ret, $length);
        }
    }
    // else if ($user && $user->getProfile()->getFacebookUid()){
    //  $ret .= jsWrite('fb:name', array('uid' => $user->getProfile()->getFacebookUid(), 'useyou' => 'false', 'linked' => 'false', 'ifcantsee' => "Facebook_".$user->getProfile()->getFacebookUid()));
    // }
    return $ret;
}
コード例 #2
0
ファイル: _activityForList.php プロジェクト: voota/voota
</a><?php 
    echo $activity->getEntity()->getType() == Politico::NUM_ENTITY && $activity->getEntity()->getPartido() ? " (" . $activity->getEntity()->getPartido() . ")" : '';
    ?>
.
	    <span class="review-date"><?php 
    echo link_to(ago(strtotime($activity->getDate())), 'sfReviewFront/show?id=' . SfVoUtil::reviewPermalink($activity));
    ?>
.</span>
  	<?php 
}
?>
  	<?php 
if ($activity->getMode() == 2) {
    ?>
	  		<?php 
    echo __('A %1% le han puesto la etiqueta "%2%".', array('%1%' => "<a title='" . sfVoUtil::secureString($activity->getEntity(), "&#39;") . "' href= \"" . url_for($activity->getEntity()->getModule() . '/show?id=' . $activity->getEntity()->getVanity()) . "\">" . trim(sfVoUtil::cutToLength(sfVoUtil::secureString($activity->getEntity(), "&#39;"), 32, '...')) . "</a>" . ($activity->getEntity()->getType() == Politico::NUM_ENTITY && $activity->getEntity()->getPartido() ? " (" . $activity->getEntity()->getPartido() . ")" : ''), '%2%' => review_text($activity)));
    ?>
	<?php 
}
?>
  </div>
  
  <?php 
if ($activity->getMode() == 1) {
    ?>
	  <?php 
    if ($activity->getText() && $activity->getCulture() == $sf_user->getCulture()) {
        ?>
	  	<p class="review-body">
	    	<?php 
        echo review_text($activity);
コード例 #3
0
ファイル: _reviewForList.php プロジェクト: voota/voota
    echo __('voota a favor de');
    ?>
  	<?php 
}
?>
    <?php 
echo $aReview ? __('otro comentario sobre ') . " " : '';
?>
<a title='<?php 
echo sfVoUtil::secureString($entity, "&#39;");
?>
' href="<?php 
echo url_for($entity->getModule() . '/show?id=' . $entity->getVanity());
?>
"><?php 
echo sfVoUtil::cutToLength(sfVoUtil::secureString($entity, "&#39;"), 32, '...');
?>
</a>.
    <?php 
echo link_to(ago(strtotime($review->getModifiedAt() ? $review->getModifiedAt() : $review->getCreatedAt())), 'sfReviewFront/show?id=' . SfVoUtil::reviewPermalink($review));
?>
.
  </div>
  <?php 
if ($review->getText() && $review->getCulture() == $sf_user->getCulture()) {
    ?>
  	<p class="review-body">
    	<?php 
    echo review_text($review);
    ?>
  	</p>
コード例 #4
0
ファイル: SfReviewHelper.php プロジェクト: voota/voota
function toShownUrl($str)
{
    $aStr = trim($str);
    $ret = $aStr;
    if (strpos($aStr, 'http://') === 0) {
        $ret = substr($aStr, 7);
    }
    if (strlen($ret) > 30) {
        $ret = sfVoUtil::cutToLength($ret, 30);
    }
    return $ret;
}