Exemple #1
0
// SUBNAV
echo '<div id="subnav">' . "\n";
// Affichage formulaire filtrage commentaires
if (isset($_GET['filtre'])) {
    afficher_form_filtre('commentaires', htmlspecialchars($_GET['filtre']));
} else {
    afficher_form_filtre('commentaires', '');
}
echo '</div>' . "\n";
echo erreurs($erreurs_form);
echo '<div id="page">' . "\n";
echo '<p class="nombre-elem">' . "\n";
if ($param_makeup['menu_theme'] == 'for_article') {
    echo '<a href="ecrire.php?post_id=' . $article_id . '">' . $GLOBALS['lang']['ecrire'] . $article_title . '</a> &nbsp; – &nbsp; ' . ucfirst(nombre_commentaires(count($commentaires)));
} elseif ($param_makeup['menu_theme'] == 'for_comms') {
    echo ucfirst(nombre_commentaires(count($commentaires))) . ' ' . $GLOBALS['lang']['sur'] . ' ' . $nb_total_comms;
}
echo '</p>' . "\n";
// COMMENTAIRES
if (count($commentaires) > 0) {
    $token = new_token();
    foreach ($commentaires as $content) {
        $content['comm-token'] = $token;
        afficher_commentaire($content, $param_makeup['show_links']);
    }
} else {
    echo info($GLOBALS['lang']['note_no_comment']);
}
if ($param_makeup['menu_theme'] == 'for_article') {
    afficher_form_commentaire($article_id, 'admin', $erreurs_form);
    echo '<h2 class="poster-comment">' . $GLOBALS['lang']['comment_ajout'] . '</h2>' . "\n";
Exemple #2
0
function conversions_theme_article($texte, $billet)
{
    // Formulaire commentaires
    if (isset($GLOBALS['form_commentaire'])) {
        $texte = str_replace($GLOBALS['balises']['form_commentaire'], $GLOBALS['form_commentaire'], $texte);
    } else {
        $texte = str_replace($GLOBALS['balises']['form_commentaire'], '', $texte);
    }
    // FIXME : remplacer uniquement dans le texte, pas les liens.
    //	$billet['bt_content'] = str_replace($q, '<mark>'.$q.'</mark>', $billet['bt_content']);
    $texte = str_replace($GLOBALS['balises']['blog_auteur'], $GLOBALS['auteur'], $texte);
    $texte = str_replace($GLOBALS['balises']['style'], $GLOBALS['theme_style'], $texte);
    $texte = str_replace($GLOBALS['balises']['rss_comments'], 'rss.php?id=' . $billet['bt_id'], $texte);
    $texte = str_replace($GLOBALS['balises']['article_titre'], $billet['bt_title'], $texte);
    $texte = str_replace($GLOBALS['balises']['article_chapo'], $billet['bt_abstract'], $texte);
    $texte = str_replace($GLOBALS['balises']['article_contenu'], $billet['bt_content'], $texte);
    $texte = str_replace($GLOBALS['balises']['article_date'], date_formate($billet['bt_date']), $texte);
    $texte = str_replace($GLOBALS['balises']['article_heure'], heure_formate($billet['bt_date']), $texte);
    // comments closed (globally or only for this article) and no comments => say « comments closed »
    if (($billet['bt_allow_comments'] == 0 or $GLOBALS['global_com_rule'] == 1) and $billet['bt_nb_comments'] == 0) {
        $texte = str_replace($GLOBALS['balises']['nb_commentaires'], $GLOBALS['lang']['note_comment_closed'], $texte);
    }
    // comments open OR ( comments closed AND comments exists ) => say « nb comments ».
    if (!($billet['bt_allow_comments'] == 0 or $GLOBALS['global_com_rule'] == 1) or $billet['bt_nb_comments'] != 0) {
        $texte = str_replace($GLOBALS['balises']['nb_commentaires'], nombre_commentaires($billet['bt_nb_comments']), $texte);
    }
    $texte = str_replace($GLOBALS['balises']['article_lien'], $billet['lien'], $texte);
    $texte = str_replace($GLOBALS['balises']['article_tags'], liste_tags($billet, '1'), $texte);
    $texte = str_replace($GLOBALS['balises']['article_tags_plain'], liste_tags($billet, '0'), $texte);
    return $texte;
}
Exemple #3
0
     $table = scaled_size(get_tableau_date('articles'), 130);
     foreach ($table as $month => $data) {
         echo '<div class="month"><div class="month-bar" style="height: ' . $data['nb_scale'] . 'px; margin-top:' . max(20 - $data['nb_scale'], 0) . 'px"></div><span class="month-nb">' . $data['nb'] . '</span><a href="articles.php?filtre=' . $month . '"><span class="month-name">' . substr($month, 4, 2) . " \n " . substr($month, 2, 2) . '</span></a></div>';
     }
     echo '</div>' . "\n";
 } else {
     $nothingyet++;
 }
 if (!$total_comms == 0) {
     // print sur chaque div pour les com.
     echo '<div class="graphique" id="commentaires"><h3>' . ucfirst($GLOBALS['lang']['label_commentaires']) . ' :</h3>' . "\n";
     $table = scaled_size(get_tableau_date('commentaires'), 50);
     foreach ($table as $month => $data) {
         echo '<div class="month"><div class="month-bar" style="height: ' . $data['nb_scale'] . 'px; margin-top:' . max(20 - $data['nb_scale'], 0) . 'px"></div><a href="commentaires.php?filtre=' . $month . '"><span class="month-name">' . mois_en_lettres(substr($month, 4, 2), 1) . ' ' . substr($month, 0, 4) . ' : </span><span class="month-nb">' . nombre_commentaires($data['nb']) . '</span></a></div>';
     }
     echo '<a href="commentaires.php" class="comm-total">Total : ' . nombre_commentaires($total_comms) . '</a>' . "\n";
     echo '</div>' . "\n";
 } else {
     $nothingyet++;
 }
 if (!$total_links == 0) {
     // print sur chaque div pour les liens.
     echo '<div class="graphique" id="links"><h3>' . ucfirst($GLOBALS['lang']['label_links']) . ' :</h3>' . "\n";
     $table = scaled_size(get_tableau_date('links'), 50);
     foreach ($table as $month => $data) {
         echo '<div class="month"><div class="month-bar" style="height: ' . $data['nb_scale'] . 'px; margin-top:' . max(20 - $data['nb_scale'], 0) . 'px"></div><a href="links.php?filtre=' . $month . '"><span class="month-name">' . mois_en_lettres(substr($month, 4, 2), 1) . ' ' . substr($month, 0, 4) . ' : </span><span class="month-nb">' . nombre_liens($data['nb']) . '</span></a></div>';
     }
     echo '<a href="links.php" class="links-total">Total : ' . nombre_liens($total_links) . '</a>' . "\n";
     echo '</div>' . "\n";
 } else {
     $nothingyet++;
Exemple #4
0
    $titre_ecrire = $titre_ecrire_court . ' : ' . $post['bt_title'];
} else {
    $post = '';
    $titre_ecrire_court = $GLOBALS['lang']['titre_ecrire'];
    $titre_ecrire = $titre_ecrire_court;
}
// DEBUT PAGE
afficher_top($titre_ecrire);
echo '<div id="top">' . "\n";
afficher_msg($titre_ecrire_court);
afficher_menu(pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME));
echo '</div>' . "\n";
echo '<div id="axe">' . "\n";
echo '<div class="reminder"><span>' . 'Pensez à enregistrer votre article.' . '</span></div>' . "\n";
// SUBNAV
if ($post != '') {
    echo '<div id="subnav">' . "\n";
    echo '<p>';
    echo '<a href="' . $post['bt_link'] . '">' . $GLOBALS['lang']['lien_article'] . '</a> &nbsp; – &nbsp; ';
    echo '<a href="commentaires.php?post_id=' . $article_id . '">' . ucfirst(nombre_commentaires($post['bt_nb_comments'])) . '</a>';
    echo '</p>' . "\n";
    echo '</div>' . "\n";
}
echo '<div id="page">' . "\n";
// EDIT
if ($post != '') {
    apercu($post);
}
afficher_form_billet($post, $erreurs_form);
echo js_alert_before_quit(1);
footer('', $begin);