function page_news_test() { echo "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8;'>"; echo news_date(0); echo news_text(0); echo news_date(1); echo news_text(1); echo news_date(3); echo news_text(3); echo page_news_list(); die; }
function news() { global $secteur, $page, $_path; if ($page == 'news') { $liste_news = news_read(); if (!empty($liste_news)) { echo '<table class="newsboard" >'; foreach ($liste_news as $id => $news) { $News = array_map('htmlspecialchars', $news); // update by Dimitri if (isset($_SESSION['admin']) && $_SESSION['admin'] === true) { echo '<tr>'; echo '<th>'; echo LanguageValidation::iMsg("intro.news.record", news_date($News), $News['auteur']); //"News publiée le " .. " Par " .. ""; echo '</th>'; echo '</tr>'; } echo '<tr>'; echo '<td>'; echo '<h4>' . $News['titre'] . '</h4>'; echo '' . news_message($News) . ''; echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<td>' . news_details_form($id) . '</td>'; echo '</tr>'; //none affiche un espace vide entre les news echo '<tr><td class="none" ></td></tr>'; } echo '</table>'; } else { echo 'Il n\'y a aucune news pour le moment<br />'; } echo '<a href="' . get_link("news_add", 'Install') . '">Ajouter une news</a>'; } }
$query->the_post(); ?> <div class="news-small"> <div class="news-title"> <a href="<?php the_permalink(); ?> "> <?php the_title(); ?> </a> </div> <div class="date-time"> <?php news_date($post->ID); ?> <?php echo ', ' . get_the_time(); ?> </div> </div> <?php } } wp_reset_postdata(); ?> </div> </div> </div>
<?php echo '<table class="newsboard" >'; // update by Dimitri echo '<tr>'; echo '<th>'; echo LanguageValidation::iMsg("intro.news.record", news_date($News), $News['News_Account_Pseudo']); //"News publiée le " .. " Par " .. ""; //echo "News publiée le " . news_date($News). " Par " .$News['News_Account_Pseudo']. ""; echo '</th>'; echo '</tr>'; echo '<tr>'; echo '<td>'; echo '<h4>' . $News['News_Title'] . '</h4>'; echo '<p>' . news_intro($News) . '</p>'; echo '' . news_message($News) . ''; echo '</td>'; echo '</tr>'; //none affiche un espace vide entre les news echo '<tr><td class="none" ></td></tr>'; if (verif_connect(true)) { echo "<tr><th>" . LanguageValidation::iMsg("label.comment.content") . "</th></tr>"; //Message echo '<tr><td>' . news_comment_form($News) . '</td></tr>'; //none affiche un espace vide entre les news echo '<tr><td class="none" ></td></tr>'; } if (!empty($list_comment)) { foreach ($list_comment as $comment) { echo '<tr>'; echo '<th>';
function last_news($total_news) { $category_link = get_category_link($categ_id); $args = array('posts_per_page' => $total_news, 'orderby' => 'comment_count', 'author' => all_experts()); $query = new WP_Query($args); if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); $avtor = get_the_author_meta('ID', $post->post_author); $author_posts_url = get_author_posts_url($avtor); $user = get_userdata($avtor); echo '<div class="news-wrapper"><div class="img_wrapper"><img src="' . author_img($avtor) . '" alt="' . $user->user_firstname . ' ' . $user->user_lastname . '" /></div>'; echo '<div class="avtor"><a href="' . $author_posts_url . '">' . $user->user_firstname . ' ' . $user->user_lastname . '</a></div><div class="blog-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></div><div class="date-time">'; news_date($post->ID); echo ', ' . get_the_time() . ' ' . comments($post->ID) . '</div><div class="clearfix"></div></div>'; } } wp_reset_postdata(); }
</tr> <?php $list_news = list_db('limit_list_news', array('limit' => 2)); if (!empty($list_news)) { foreach ($list_news as $e => $News) { $pl = $e + 1; ?> <tr> <td valign="top" width="58" align="left"> <img src="<?php echo $_url . "Design/xakar/images/homepage/no" . $pl . ".gif"; ?> " alt="No1" class="no_padding" title="No1" width="52" height="38"></td> <td valign="top" align="left"><p class="information_text"> <?php echo "News publiée le " . news_date($News) . " Par " . $News['News_Account_Pseudo'] . ""; ?> <br/> <?php echo '' . news_message($News) . ''; ?> </p> </td> </tr> <tr> <td colspan="2" valign="top" align="right"><?php echo news_details_form($News); ?> <!--a href="#" title="more">more</a--></td> </tr> <?php
?> <?php // fetch del modello e dell'oggetto che ha generato la notizia $generator_model = $n->getGeneratorModel(); if ($n->getGeneratorPrimaryKeys()) { $pks = array_values(unserialize($n->getGeneratorPrimaryKeys())); $generator = call_user_func_array(array($generator_model . 'Peer', 'retrieveByPK'), $pks); } else { $pks = array(); $generator = null; } ?> <tr style='border-top:1px solid #DFE0E0;'> <td><?php echo news_date($n->getDate('d/m/Y')); ?> </td> </tr> <tr> <td> <?php echo news_text($n, $generator_model, $pks, $generator, array('context' => $context)); ?> </td> </tr> <?php } ?> </table> <?php