예제 #1
0
/**
 * Muestra un post en la portada
 * @param object $new_post post
 * @param string $type tipo de post
 * @return void
 */
function setup_featured_news($new_post, $type)
{
    $img_link = NULL;
    $img = NULL;
    $html = str_get_html($new_post->post_content);
    $img_link = $html->find('img', 0)->src;
    $img = $html->find('img', 0);
    $html->clear();
    unset($html);
    $youtube = get_youtubetag($new_post->post_content);
    ?>
  
    <div class="top_news_content">
      
		<h4><?php 
    echo $type;
    ?>
</h4>
        <h3>
            <a href="<?php 
    echo $new_post->guid;
    ?>
"><?php 
    echo $new_post->post_title;
    ?>
</a>
        </h3>
      
        <div>
        <?php 
    if ($img_link != "") {
        ?>
          <div class="top_news_media">
            <img title="<?php 
        if ($youtube != FALSE) {
            echo $youtube;
        }
        ?>
" src="<?php 
        echo $img_link;
        ?>
" alt="" title=""/>                  
          </div>

          <div class="top_news_featured_companion_text">
            <?php 
        if ($img->outertext != FALSE) {
            $new_post->post_content = eregi_replace($img->outertext, ' ', $new_post->post_content);
        }
        ?>

            <?php 
        echo mulapress_trim_excerpt($new_post->post_content, 30);
        ?>
                 
		    <div class="top_news_featured_footer">
	      	<a href="<?php 
        echo $new_post->guid;
        ?>
" class="leer_mas_footer">Leer m&aacute;s</a>
	      	<p class="comments"><a href="<?php 
        echo $new_post->guid;
        ?>
#comments" class="comments"><?php 
        echo comments_number('ning&uacute;n comentario', 'un comentario', 'm&aacute;s comentarios', $new_post->comment_count);
        ?>
 </a></p>
		     <p class="rate"><em><?php 
        //wp_gdsr_render_article();
        ?>
</em></p>

		    </div>	          

          </div>
          <?php 
    } else {
        ?>
          <div class="top_news_featured_text">
            <?php 
        echo mulapress_trim_excerpt($new_post->post_content, 30);
        ?>
     

		    <div class="top_news_featured_footer">
	      	<a href="<?php 
        echo $new_post->guid;
        ?>
" class="leer_mas_footer">Leer m&aacute;s</a>
	      	<p class="comments"><a href="<?php 
        echo $new_post->guid;
        ?>
#comments" class="comments"><?php 
        echo comments_number('ning&uacute;n comentario', 'un comentario', 'm&aacute;s comentarios', $new_post->comment_count);
        ?>
 </a></p>
		     <p class="rate"><em><?php 
        //wp_gdsr_render_article();
        ?>
</em></p>

		    </div>	          

                                       
          </div>   
        <?php 
    }
    ?>

        </div>
      <span class="author">enviado por <a href="http://lamula.pe/members/<?php 
    echo $new_post->user_nicename;
    ?>
" ><?php 
    echo $new_post->user_nicename;
    ?>
</a> <em>el <?php 
    echo $new_post->post_date;
    ?>
</em></span>

    </div>

  
<?php 
}
예제 #2
0
	                  <div class="top_news_featured_companion_text">
	                    <?php 
    $blog_random->post_content = eregi_replace($img->outertext, ' ', $blog_random->post_content);
    ?>
	                	<?php 
    echo mulapress_trim_excerpt($blog_random->post_content, 235);
    ?>
                 
	                  </div>
	                
	              <?php 
} else {
    ?>
	                    <div class="top_news_featured_text">
	                     <?php 
    echo mulapress_trim_excerpt($blog_random->post_content, 235);
    ?>
                                            
	                    </div>   
	                <?php 
}
?>
	
	              </div>
	                 <?php 
$html->clear();
unset($html);
?>
            
	              <span class="author">enviado por <a href="http://lamula.pe/members/<?php 
echo $blog_random->user_nicename;
예제 #3
0
                    </a>
                  </div>

                  <div class="post_companion_content">
                    <?php 
            echo mulapress_trim_excerpt($post->post_content, 35);
            ?>
     	              
                  </div>
                  <?php 
        } else {
            ?>

                    <div class="post_content">
                    <?php 
            echo mulapress_trim_excerpt($post->post_content, 35);
            ?>
                   
                    </div>

                    <?php 
        }
        ?>

                  </div> <!-- post_item -->

                  <div class="news_footer">

                    <div class="footer_links">

                      <a href="<?php