function getAvatarFull($user) { // TODO: Refactorizar con getAvatar $ret = ""; if ($user && $user->getProfile()->getImagen()) { $ret .= image_tag(S3Voota::getImagesUrl() . '/usuarios/cc_' . $user->getProfile()->getImagen(), array('alt' => fullName($user))); } else { if ($user && $user->getProfile()->getFacebookUid()) { $ret .= jsWrite("fb:profile-pic", array('uid' => $user->getProfile()->getFacebookUid(), 'linked' => 'false', 'size' => 'normal', 'facebook-logo' => 'true')); } else { //$ret .= image_tag(S3Voota::getImagesUrl().'/usuarios/no-imago.png', array('alt' => fullName( $user ), 'width' => 180, 'height' => 240)); $ret .= image_tag('/images/no-imago.png', array('alt' => fullName($user), 'width' => 180, 'height' => 240)); } } return $ret; }
} echo ' for "' . $search . '"'; } else { echo 'There was no match for "' . $search . '" in our archive. Please try again.'; } ?> </h1></td> </tr> <tr> <td class="columnLeft"> <?php while ($result && ($row = mysql_fetch_assoc($result))) { $contribArray = array(); $result2 = mysql_query("SELECT tirwContributors.firstname, tirwContributors.lastname, tirwContributors.biography \r\n FROM tirwContributors, tirwRelationalArticlesToAuthors\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE tirwRelationalArticlesToAuthors.tirwArticleId = " . $row['tirwArticleId'] . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND tirwContributors.tirwContributorId = tirwRelationalArticlesToAuthors.tirwContributorId\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY tirwContributors.tirwContributorId ASC"); while ($result2 && ($row2 = mysql_fetch_assoc($result2))) { $contribArray[] = array("name" => fullName($row2['firstname'], $row2['lastname']), "bio" => $row2['biography']); } echo '<h4><a href="' . $row['url'] . '">' . highlight($row['title'], $search) . '</a></h4>' . "\n"; echo '<p>'; echo '<span style="color:green;">' . $row['url'] . '</span> - ' . highlight($row['year'], $search) . '<br />'; foreach ($contribArray as $contrib) { echo '<strong>' . highlight($contrib['name'], $search) . '</strong>'; if (!empty($contrib['bio'])) { if (substr($contrib['bio'], 0, 7) == 'http://') { echo ' (<a href="' . $contrib['bio'] . '" target="_bla nk">' . highlight($contrib['bio'], $search) . '</a>)'; } else { echo '<br />' . highlight($contrib['bio'], $search); } } echo '<br />'; }
?> </a>)</span> </span> <?php } ?> <?php } ?> <?php echo getAvatar($sf_user->getGuardUser()); ?> <?php echo link_to($sf_user->isAuthenticated() ? fullName($sf_user) : '', '@usuario_votos'); ?> <span class="separator">·</span> <?php echo link_to(__('salir'), '@sf_guard_signout', array('id' => 'logout')); ?> </p> <?php end_slot('logged'); ?> <?php include_slot($sf_user->isAuthenticated() ? 'logged' : 'not_logged'); ?> </div>
<div id="sidebar"> <div id="ultimos-usuarios"> <h3><?php echo __('Últimos en llegar a Voota'); ?> </h3> <ol> <?php foreach ($lastUsers as $user) { ?> <li> <?php echo getAvatar($user, 19, 19); echo link_to(fullName($user), '@usuario?username='******'rssFeed')); ?> "><?php echo __('RSS de esta maravilla');
echo link_to(__('Mandar un mensaje a') . ' ' . fullName($user), '@usuario_contact?username='******'Las propuestas de %nombre% (%1%)', array('%nombre%' => fullName($user), '%1%' => count($propuestas))); ?> </h2> <ol> <?php foreach ($propuestas as $propuesta) { ?> <?php include_partial('propuesta', array('propuesta' => $propuesta)); ?> <?php } ?> </ol> <?php }
?> <div class="review-name"> <?php if ($activity->getMode() == 1) { ?> <?php if (!$activity->getAnonymous()) { ?> <a title='<?php echo $activity->getsfGuardUserId(); ?> ' href="<?php echo url_for('@usuario?username='******'Vooto secreto'); ?> <?php echo __('(está en su derecho)'); ?> <?php } ?> <?php
?> "> <div class="review-avatar"> <?php echo getAvatar($review->getsfGuardUser(), 19, 19); ?> </div> <div class="review-name"> <a title='<?php echo $review->getsfGuardUser(); ?> ' href="<?php echo url_for('@usuario?username='******'voota en contra de'); ?> <?php } ?> <?php if ($review->getValue() == 1) { ?> <?php
<?php } else { ?> <?php echo image_tag(S3Voota::getImagesUrl() . '/usuarios/v.png', array('alt' => __('Vooto secreto (está en su derecho)'), 'width' => 36, 'height' => 36)); ?> <?php } ?> </div> <h4 class="review-name"> <?php if (!$review->getAnonymous()) { ?> <?php echo link_to(fullName($review->getsfGuardUser()), '@usuario?username='******'%1% años', array('%1%' => review_date_diff($review->getsfGuardUser()->getProfile()->getFechaNacimiento()))); ?> </span> <?php } ?> <?php
<?php use_helper('I18N'); ?> <h2 id="profile_comments_header"><?php echo __('Los comentarios de %nombre% (%1%)', array('%nombre%' => fullName($user), '%1%' => $reviewsPager->getNbResults())); ?> </h2> <?php if ($reviewsPager->getPage() == 1) { ?> <script type="text/javascript"> $(document).ready(function(){ $('#filterForm_f, #filterForm_text').change(function(){ var n = $('#filterForm_f').val(); var t = $('#filterForm_text').is(':checked'); var theForm = $(this).closest('form'); theForm.submit(); return false; }); }); </script> <form id="filterForm" method="post" action="<?php echo url_for('@' . sfContext::getInstance()->getRouting()->getCurrentRouteName() . (isset($user) && $sf_request->getParameter('action') == 'show' ? '?username='******'')); ?> #profile_comments_header">
// if ($number < 0) { // return $number * -1; // } else { // return $number; // } // } // $x = -5; // echo absValue(100); // function smashNames($firstName, $lastName) { // return $firstName . ' ' . $lastName; // } // $firstName = 'Bryan'; // $lastName = 'Wood'; // echo smashNames($firstName, $lastName); $num_array2 = []; // function calcMean($array) { // if (count($array) == 0) { // return 0; // } // return sum_array($array) / count($array); // } // echo calcMean($num_array); function fullName($array) { $firstName = $array['first_name']; $lastName = $array['last_name']; return $firstName . ' ' . $lastName; } $person = ['first_name' => 'bob', 'last_name' => 'barker']; echo fullName($person);
facebookPublishStory({ message: '<?php echo __('He hecho profundos cambios en mi perfil de Voota. '); echo $profileEditForm['presentacion']->getValue(); ?> ' }); <?php } ?> }); //--> </script> <h2><?php echo __('Hola %1%, este es tu perfil', array('%1%' => fullName($sf_user))); ?> </h2> <p class="next-step-msg"><?php echo link_to(__("Tus comentarios y vootos (en total %1%)", array('%1%' => format_number($numReviews, 'es_ES'))), '@usuario_votos'); ?> </p> <p class="next-step-msg"><?php echo link_to(__("Tu perfil público"), "@usuario?username="******"next-step-msg"><?php echo link_to(__('Tu página de político y lo que opinan sobre ti'), "politico/show?id=" . $politico->getVanity());
<?php use_helper('I18N'); use_helper('VoUser'); ?> <h2 class="error"> <?php echo __('Lo siento, %1% no nos autoriza a mandarle emails.', array('%1%' => fullName($user))); ?> </h2> <div id="content"> <p class="next-step-msg"><?php echo __('¿Que hacemos ahora?'); ?> <?php echo __('Tú dirás.'); ?> </p> <p class="next-step-msg"><?php echo __('¿Nos vamos a la'); ?> <?php echo link_to("home de Voota", "@homepage"); ?> ?</p> <p class="next-step-msg"><?php echo __('¿Una vuelta por el'); ?> <?php