Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $HAANGA_VERSION = '1.1.3';
- /* Generated from /home/gallir/Proyectos/meneame/dev/templates/link_summary.html */
- function haanga_39c726a1f3dba6484a78462497fb3c7bad10a6d3($vars, $return=FALSE, $blocks=array())
- {
- global $globals, $current_user;
- extract($vars);
- if ($return == TRUE) {
- ob_start();
- }
- echo '<div class="news-summary"> <div class="news-body"> ';
- if ($self->show_shakebox) {
- echo ' <div class="news-shakeit"> <div class="'.$self->box_class.'"> <a id="a-votes-'.$self->id.'" href="'.$self->permalink.'">'.$self->total_votes.'</a> '._('meneos').' </div> ';
- if (!$globals['bot']) {
- echo ' <div class="menealo" id="a-va-'.$self->id.'"> ';
- if (!$self->votes_enabled) {
- echo ' <span>'._('cerrado').'</span> ';
- } else {
- if (!$self->voted) {
- echo ' <a href="javascript:menealo('.$current_user->user_id.', '.$self->id.')" id="a-shake-'.$self->id.'">'._('menéalo').'</a> ';
- } else {
- if ($self->voted > 0) {
- echo ' <span id="a-shake-'.$self->id.'">'._('¡chachi!').'</span> ';
- } else {
- echo ' <span id="a-shake-'.$self->id.'" class="negative">'.$globals['negative_votes_values'][$self->voted].'</span> ';
- }
- }
- }
- echo ' </div> ';
- }
- echo ' </div> ';
- }
- if ($self->status == 'abuso' OR $self->has_warning) {
- if ($self->status == 'abuse') {
- echo ' <div class="warn"><strong>'._('Aviso').'</strong> '._('noticia descartada por violar las').' <a href="'.$globals['legal'].'#tos">'._('normas de uso').'</a> </div> ';
- } else {
- if ($self->has_warning) {
- echo ' <div class="warn"><strong>'._('Aviso automático').'</strong>: ';
- if ($self->status == 'published') {
- echo ' '._('noticia errónea o controvertida, por favor lee los comentarios.').' ';
- } else {
- if ($self->author == $current_user->user_id AND $self->is_editable) {
- echo ' '._('Esta noticia tiene varios votos negativos.').' '._('Tu karma no será afectado si la descartas manualmente.').' ';
- } else {
- if ($self->negative_text) {
- echo ' '._('Esta noticia podría ser').' <strong>'.$self->negative_text.'</strong> ';
- } else {
- echo ' '._('Esta noticia tiene varios votos negativos.').' ';
- }
- echo ' <a href="'.$self->permalink.'">'._('Asegúrate').'</a> '._('antes de menear').' ';
- }
- }
- echo ' </div> ';
- }
- }
- }
- if ($globals['ads']) {
- echo '<!-- google_ad_section_start -->';
- }
- echo ' <h1> <a href="'.htmlentities($self->url).'"';
- if ($self->status != 'published') {
- echo ' rel="nofollow"';
- }
- echo '>'.$self->title.'</a> ';
- if ($self->content_type == 'image') {
- echo ' <img src="'.$globals['base_static'].'img/common/is-photo01.png" class="media-icon" width="18" height="15" alt="'._('imagen').'" title="'._('imagen').'" /> ';
- }
- if ($self->content_type == 'video') {
- echo ' <img src="'.$globals['base_static'].'img/common/is-video01.png" class="media-icon" width="18" height="15" alt="'._('vídeo').'" title="'._('vídeo').'" /> ';
- }
- echo ' </h1> <div class="news-submitted"> ';
- if ($type != 'short') {
- echo ' <a href="'.get_user_uri($self->username).'"><img src="'.get_avatar_url($self->author, $self->avatar, 25).'" width="25" height="25" alt="" onmouseover="return tooltip.ajax_delayed(event, \'get_user_info.php\', '.$self->author.')" onmouseout="tooltip.clear(event);" /></a> ';
- }
- echo ' <strong>'.$self->url_str.'</strong> <br /> '.sprintf(_('por %s'), $self->username_str).' ';
- if ($self->print_date) {
- echo ' '._('el').' '.get_date_time($self->sent_date).' ';
- if ($self->status == 'published') {
- echo ' '._('publicado el').' '.txt_time_diff($self->date).' ';
- }
- } else {
- echo ' '._('hace').' '.txt_time_diff($self->sent_date).' ';
- if ($self->status == 'published') {
- echo ' '._('publicado hace').' '.txt_time_diff($self->date).' ';
- }
- }
- echo ' </div> ';
- if ($type == 'full' || $type == 'preview') {
- if ($self->thumb_url) {
- echo ' <img src=\''.$self->thumb_url.'\' width=\''.$self->thumb_x.'\' height=\''.$self->thumb_y.'\' alt=\'\' class=\'thumbnail\'/> ';
- }
- echo ' <p> '.$self->content_txt.' ';
- if (($globals['link'] AND $type != 'preview')) {
- if ($self->is_editable) {
- echo ' <a href="'.$globals['base_url'].'editlink.php?id='.$self->id.'&user='.$current_user->user_id.'" title="'._('editar noticia').' #'.$self->id.'"><img class="mini-icon-text" src="'.$globals['base_static'].'img/common/edit-misc01.png" alt="edit" width="18" height="12"/></a> ';
- }
- if ($self->map_editable) {
- echo ' <a href="#" onclick="$(\'#geoedit\').load(\''.$globals['base_url'].'geo/get_form.php?id='.$self->id.'&type=link&icon='.$self->status.'\'); return false;"> <img class="mini-icon-text" src="'.$globals['base_static'].'img/common/edit-geo01.png" alt="edit" title="'._('editar geolocalización').'"/></a> ';
- }
- }
- echo ' </p> ';
- }
- if ($self->best_comment) {
- echo ' <div class="box" style="font-size: 80%; border: 1px solid; border-color: #dadada; background: #fafafa; margin: 7px 50px 7px 25px; padding: 4px; overflow:hidden"> <a onmouseout="tooltip.clear(event);" onclick="tooltip.clear(this);" onmouseover="return tooltip.ajax_delayed(event, \'get_comment_tooltip.php\', \''.$self->best_comment->comment_id.'\', 10000);" href="'.$self->permalink.'/000'.$self->best_comment->comment_order.'"> <strong>'.$self->best_comment->comment_order.'</strong></a>: '.text_to_summary($self->best_comment->content, 200).' </div> ';
- }
- if ($self->do_inline_friend_votes AND $self->friend_votes) {
- echo ' <div style="padding: 3px 0 2px 0;"> ';
- foreach ($self->friend_votes as $vote) {
- echo ' <a href="'.get_user_uri($vote->user_login).'" title="'.$vote->user_login.': '._('valor').' '.$vote->vote_value.'"><img class="avatar" src="'.get_avatar_url($vote->user_id, $vote->user_avatar, 40).'" width="40" height="40" alt=""/></a> ';
- }
- echo ' </div> ';
- }
- echo ' <div class="news-details main"> <span class="comments-counter"> <a href="'.$self->permalink.'">';
- if ($self->comments > 0) {
- echo sprintf(_('%d comentarios'), $self->comments);
- } else {
- echo _('sin comentarios');
- }
- echo '</a></span> ';
- if ($current_user->user_id > 0) {
- echo ' <span class="tool"> <a id="fav-'.$self->id.'" href="javascript:get_votes(\'get_favorite.php\',\''.$current_user->user_id.'\', \'fav-'.$self->id.'\',0,\''.$self->id.'\')"> '.favorite_teaser($current_user->user_id, $self).' </a> </span> ';
- }
- echo ' <span class="tool">'._('en').': <a href="'.$globals['base_url'].'?meta='.$self->meta_uri.'" title="'._('meta').'"> '.$self->meta_name.'</a>, <a href="'.$globals['base_url'].'?meta='.$self->meta_uri.'&category='.$self->category.'" title="'._('categoría').'"> '.$self->category_name.'</a> </span> <span class="tool">karma: <span id="a-karma-'.$self->id.'"> '.intval($self->karma).' </span></span> ';
- if ($self->can_vote_negative) {
- echo ' <form class="tool" action="" id="problem-'.$self->id.'"> <select name="ratings" onchange="report_problem(this.form,'.$current_user->user_id.', '.$self->id.')"> <option value="0" selected="selected">'._('problema').'</option> ';
- foreach ($globals['negative_votes_values'] as $pkey => $pvalue) {
- echo ' <option value="'.$pkey.'">'.$pvalue.'</option> ';
- }
- echo ' </select> </form> ';
- }
- echo ' </div> ';
- if ($globals['ads']) {
- echo '<!-- google_ad_section_end -->';
- }
- if ($globals['link'] || $type == 'short') {
- if ($self->show_tags AND $self->tags) {
- echo ' <div class="news-details"> <strong>'._('etiquetas').'</strong>: ';
- $tags_array = explode(',', $self->tags);
- foreach ($tags_array as $id => $tag) {
- $tag_url = urlencode($tag);
- if ($id > 0) {
- echo ', ';
- }
- if ($globals['base_search_url']) {
- echo '<a href="'.$globals['base_url'].$globals['base_search_url'].'tag:'.$tag_url.'">'.$tag.'</a>';
- } else {
- echo '<a href=\''.$globals['base_url'].'search.php?p=tag=&q='.$tag_url.'\'>'.$tag.'</a>';
- }
- }
- echo ' </div> ';
- }
- if ($type != 'short') {
- echo ' <div class="news-details"> <strong>'._('negativos').'</strong>: <span id="a-neg-'.$self->id.'">'.$self->negatives.'</span> <strong>'._('usuarios').'</strong>: <span id="a-usu-'.$self->id.'">'.$self->votes.'</span> <strong>'._('anónimos').'</strong>: <span id="a-ano-'.$self->id.'">'.$self->anonymous.'</span> <span class="tool"> ';
- $shortlink = $self->get_short_permalink();
- $enc_shortlink = urlencode($shortlink);
- echo ' <strong> <a href="'.$shortlink.'" title="'._('enlace corto').'">'._('compartir').'</a> </strong>: <a href="http://twitter.com/home?status='.$self->title.' '.$enc_shortlink.' (via @'.$globals['twitter_user'].')" target="_blank"><img src="'.$globals['base_static'].'img/favicons/twitter.gif" alt="twitter" title="'.sprintf(_('compartir en %s'), 'twitter').'" width="16" height="16"/></a> <a href="http://www.facebook.com/share.php?u='.$enc_shortlink.'" target="_blank"><img src="'.$globals['base_static'].'img/favicons/fb.gif" alt="facebook" title="'.sprintf(_('compartir en %s'), 'facebook').'" width="16" height="16"/></a> <a href="http://www.google.com/buzz/post?url='.$enc_shortlink.'" target="_blank"><img src="'.$globals['base_static'].'img/favicons/buzz.png" alt="buzz" title="'.sprintf(_('compartir en %s'), 'buzz').'" width="16" height="16"/></a> <a href="http://friendfeed.com/?url='.$enc_shortlink.'&title='.urlencode($self->title).'" target="_blank"><img src="'.$globals['base_static'].'img/favicons/ff.png" alt="friendfeed" title="'.sprintf(_('compartir en %s'), 'friendfeed').'" width="16" height="16"/></a> </span> </div> ';
- }
- }
- $dummy = do_banner_story();
- echo ' </div> </div> ';
- if ($self->map_editable) {
- echo ' <div id="geoedit" class="geoform" style="margin-left:20px"> ';
- if ($self->add_geo) {
- $geotxt = _('ubica al origen de la noticia o evento (ciudad, país)');
- $dummy = geo_coder_print_form('link', $self->id, $globals['latlng'], $geotxt);
- }
- echo ' </div> ';
- }
- if ($return == TRUE) {
- return ob_get_clean();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement