Advertisement
Guest User

Code from header,html template

a guest
Aug 11th, 2010
565
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.71 KB | None | 0 0
  1. <?php
  2. $HAANGA_VERSION  = '1.1.3';
  3. /* Generated from /home/gallir/Proyectos/meneame/dev/templates/link_summary.html */
  4. function haanga_39c726a1f3dba6484a78462497fb3c7bad10a6d3($vars, $return=FALSE, $blocks=array())
  5. {
  6.     global $globals, $current_user;
  7.     extract($vars);
  8.     if ($return == TRUE) {
  9.         ob_start();
  10.     }
  11.     echo '<div class="news-summary"> <div class="news-body"> ';
  12.     if ($self->show_shakebox) {
  13.         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> ';
  14.         if (!$globals['bot']) {
  15.             echo ' <div class="menealo" id="a-va-'.$self->id.'"> ';
  16.             if (!$self->votes_enabled) {
  17.                 echo ' <span>'._('cerrado').'</span> ';
  18.             } else {
  19.                
  20.                 if (!$self->voted) {
  21.                     echo ' <a href="javascript:menealo('.$current_user->user_id.', '.$self->id.')" id="a-shake-'.$self->id.'">'._('menéalo').'</a> ';
  22.                 } else {
  23.                    
  24.                     if ($self->voted > 0) {
  25.                         echo ' <span id="a-shake-'.$self->id.'">'._('¡chachi!').'</span> ';
  26.                     } else {
  27.                         echo ' <span id="a-shake-'.$self->id.'" class="negative">'.$globals['negative_votes_values'][$self->voted].'</span> ';
  28.                     }
  29.                    
  30.                 }
  31.                
  32.             }
  33.             echo ' </div> ';
  34.         }
  35.         echo ' </div> ';
  36.     }
  37.    
  38.     if ($self->status == 'abuso' OR  $self->has_warning) {
  39.        
  40.         if ($self->status == 'abuse') {
  41.             echo ' <div class="warn"><strong>'._('Aviso').'</strong> '._('noticia descartada por violar las').' <a href="'.$globals['legal'].'#tos">'._('normas de uso').'</a> </div> ';
  42.         } else {
  43.            
  44.             if ($self->has_warning) {
  45.                 echo ' <div class="warn"><strong>'._('Aviso automático').'</strong>: ';
  46.                 if ($self->status == 'published') {
  47.                     echo ' '._('noticia errónea o controvertida, por favor lee los comentarios.').' ';
  48.                 } else {
  49.                    
  50.                     if ($self->author == $current_user->user_id AND  $self->is_editable) {
  51.                         echo ' '._('Esta noticia tiene varios votos negativos.').' '._('Tu karma no será afectado si la descartas manualmente.').' ';
  52.                     } else {
  53.                        
  54.                         if ($self->negative_text) {
  55.                             echo ' '._('Esta noticia podría ser').' <strong>'.$self->negative_text.'</strong> ';
  56.                         } else {
  57.                             echo ' '._('Esta noticia tiene varios votos negativos.').' ';
  58.                         }
  59.                         echo ' <a href="'.$self->permalink.'">'._('Asegúrate').'</a> '._('antes de menear').' ';
  60.                     }
  61.                    
  62.                 }
  63.                 echo ' </div> ';
  64.             }
  65.            
  66.         }
  67.        
  68.     }
  69.    
  70.     if ($globals['ads']) {
  71.         echo '<!-- google_ad_section_start -->';
  72.     }
  73.     echo ' <h1> <a href="'.htmlentities($self->url).'"';
  74.     if ($self->status != 'published') {
  75.         echo ' rel="nofollow"';
  76.     }
  77.     echo '>'.$self->title.'</a> ';
  78.     if ($self->content_type == 'image') {
  79.         echo ' &nbsp;<img src="'.$globals['base_static'].'img/common/is-photo01.png" class="media-icon" width="18" height="15" alt="'._('imagen').'" title="'._('imagen').'" /> ';
  80.     }
  81.    
  82.     if ($self->content_type == 'video') {
  83.         echo ' &nbsp;<img src="'.$globals['base_static'].'img/common/is-video01.png" class="media-icon" width="18" height="15" alt="'._('vídeo').'" title="'._('vídeo').'" /> ';
  84.     }
  85.     echo ' </h1> <div class="news-submitted"> ';
  86.     if ($type != 'short') {
  87.         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> ';
  88.     }
  89.     echo ' <strong>'.$self->url_str.'</strong>&nbsp;<br /> '.sprintf(_('por %s'), $self->username_str).' ';
  90.     if ($self->print_date) {
  91.         echo ' '._('el').' '.get_date_time($self->sent_date).' ';
  92.         if ($self->status == 'published') {
  93.             echo ' '._('publicado el').' '.txt_time_diff($self->date).' ';
  94.         }
  95.        
  96.     } else {
  97.         echo ' '._('hace').' '.txt_time_diff($self->sent_date).' ';
  98.         if ($self->status == 'published') {
  99.             echo ' '._('publicado hace').' '.txt_time_diff($self->date).' ';
  100.         }
  101.        
  102.     }
  103.     echo ' </div> ';
  104.     if ($type == 'full' || $type == 'preview') {
  105.        
  106.         if ($self->thumb_url) {
  107.             echo ' <img src=\''.$self->thumb_url.'\' width=\''.$self->thumb_x.'\' height=\''.$self->thumb_y.'\' alt=\'\' class=\'thumbnail\'/> ';
  108.         }
  109.         echo ' <p> '.$self->content_txt.' ';
  110.         if (($globals['link'] AND  $type != 'preview')) {
  111.            
  112.             if ($self->is_editable) {
  113.                 echo ' &nbsp;&nbsp;<a href="'.$globals['base_url'].'editlink.php?id='.$self->id.'&amp;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> ';
  114.             }
  115.            
  116.             if ($self->map_editable) {
  117.                 echo ' &nbsp;&nbsp;<a href="#" onclick="$(\'#geoedit\').load(\''.$globals['base_url'].'geo/get_form.php?id='.$self->id.'&amp;type=link&amp;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> ';
  118.             }
  119.            
  120.         }
  121.         echo ' </p> ';
  122.     }
  123.    
  124.     if ($self->best_comment) {
  125.         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>:&nbsp;'.text_to_summary($self->best_comment->content, 200).' </div> ';
  126.     }
  127.    
  128.     if ($self->do_inline_friend_votes AND  $self->friend_votes) {
  129.         echo ' <div style="padding: 3px 0 2px 0;"> ';
  130.         foreach ($self->friend_votes as  $vote) {
  131.             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>&nbsp;&nbsp; ';
  132.         }
  133.         echo ' </div> ';
  134.     }
  135.     echo ' <div class="news-details main"> <span class="comments-counter">&nbsp;<a href="'.$self->permalink.'">';
  136.     if ($self->comments > 0) {
  137.         echo sprintf(_('%d comentarios'), $self->comments);
  138.     } else {
  139.         echo _('sin comentarios');
  140.     }
  141.     echo '</a></span> ';
  142.     if ($current_user->user_id > 0) {
  143.         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> ';
  144.     }
  145.     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.'&amp;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> ';
  146.     if ($self->can_vote_negative) {
  147.         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> ';
  148.         foreach ($globals['negative_votes_values'] as  $pkey => $pvalue) {
  149.             echo ' <option value="'.$pkey.'">'.$pvalue.'</option> ';
  150.         }
  151.         echo ' </select> </form> ';
  152.     }
  153.     echo ' </div> ';
  154.     if ($globals['ads']) {
  155.         echo '<!-- google_ad_section_end -->';
  156.     }
  157.    
  158.     if ($globals['link'] || $type == 'short') {
  159.        
  160.         if ($self->show_tags AND  $self->tags) {
  161.             echo ' <div class="news-details"> <strong>'._('etiquetas').'</strong>: ';
  162.             $tags_array  = explode(',', $self->tags);
  163.            
  164.             foreach ($tags_array as  $id => $tag) {
  165.                
  166.                 $tag_url  = urlencode($tag);
  167.                 if ($id > 0) {
  168.                     echo ', ';
  169.                 }
  170.                
  171.                 if ($globals['base_search_url']) {
  172.                     echo '<a href="'.$globals['base_url'].$globals['base_search_url'].'tag:'.$tag_url.'">'.$tag.'</a>';
  173.                 } else {
  174.                     echo '<a href=\''.$globals['base_url'].'search.php?p=tag=&amp;q='.$tag_url.'\'>'.$tag.'</a>';
  175.                 }
  176.                
  177.             }
  178.             echo ' </div> ';
  179.         }
  180.        
  181.         if ($type != 'short') {
  182.             echo ' <div class="news-details"> <strong>'._('negativos').'</strong>: <span id="a-neg-'.$self->id.'">'.$self->negatives.'</span>&nbsp;&nbsp; <strong>'._('usuarios').'</strong>: <span id="a-usu-'.$self->id.'">'.$self->votes.'</span>&nbsp;&nbsp; <strong>'._('anónimos').'</strong>: <span id="a-ano-'.$self->id.'">'.$self->anonymous.'</span>&nbsp;&nbsp; <span class="tool"> ';
  183.             $shortlink  = $self->get_short_permalink();
  184.            
  185.             $enc_shortlink  = urlencode($shortlink);
  186.             echo ' <strong> <a href="'.$shortlink.'" title="'._('enlace corto').'">'._('compartir').'</a> </strong>:  &nbsp;<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> &nbsp;<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> &nbsp;<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> &nbsp;<a href="http://friendfeed.com/?url='.$enc_shortlink.'&amp;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> ';
  187.         }
  188.        
  189.     }
  190.    
  191.     $dummy  = do_banner_story();
  192.     echo ' </div> </div> ';
  193.     if ($self->map_editable) {
  194.         echo ' <div id="geoedit" class="geoform" style="margin-left:20px"> ';
  195.         if ($self->add_geo) {
  196.            
  197.             $geotxt  = _('ubica al origen de la noticia o evento (ciudad, país)');
  198.            
  199.             $dummy  = geo_coder_print_form('link', $self->id, $globals['latlng'], $geotxt);
  200.            
  201.         }
  202.         echo ' </div> ';
  203.     }
  204.    
  205.     if ($return == TRUE) {
  206.         return ob_get_clean();
  207.     }
  208. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement