function afficher_forum_thread($row, $controle_id_article, $compteur_forum, $nb_forum, $i, $retour, $arg, $script, $argscript) { global $spip_lang_right, $spip_display; static $voir_logo = array(); // pour ne calculer qu'une fois if (is_array($voir_logo)) { $voir_logo = (($spip_display != 1 AND $spip_display != 4 AND $GLOBALS['meta']['image_process'] != "non") ? "position: absolute; $spip_lang_right: 0px; margin: 0px; margin-top: -3px; margin-$spip_lang_right: 0px;" : ''); } $id_forum=$row['id_forum']; $id_parent=$row['id_parent']; $id_rubrique=$row['id_rubrique']; $id_article=$row['id_article']; $id_breve=$row['id_breve']; $id_message=$row['id_message']; $id_syndic=$row['id_syndic']; $id_auteur=$row["id_auteur"]; $titre=$row['titre']; $texte=$row['texte']; $nom_site=$row['nom_site']; $url_site=$row['url_site']; $statut=$row['statut']; $ip=$row["ip"]; $h = (!$id_article ? '' : generer_url_entite($id_article, 'article')) . "#forum$id_forum"; $titre_boite = "<a href='$h' id='forum$id_forum'>" . typo($titre) . '</a>'; if ($spip_display == 4) { $res = $titre_boite ."<br id='id$id_forum' />"; } else { if ($id_auteur AND $voir_logo) { $chercher_logo = charger_fonction('chercher_logo', 'inc'); if ($logo = $chercher_logo($id_auteur, 'id_auteur', 'on')) { list($fid, $dir, $nom, $format) = $logo; include_spip('inc/filtres_images_mini'); $logo = image_reduire("<img src='$fid' alt='' />", 48, 48); if ($logo) $titre_boite = "\n<div style='$voir_logo'>$logo</div>$titre_boite" ; } } $res = "<tr id='id$id_forum'>" . afficher_forum_4($compteur_forum, $nb_forum, $i) . "\n<td style='width: 100%' valign='top'>" . (($compteur_forum == 1) ? debut_cadre_forum(forum_logo($statut), true, "", $titre_boite) : debut_cadre_thread_forum("", true, "", $titre_boite)); } // Si refuse, cadre rouge if ($statut=="off") { $style =" style='border: 2px dashed red; padding: 5px;'"; } // Si propose, cadre jaune else if ($statut=="prop") { $style = " style='border: 1px solid yellow; padding: 5px;'"; } // Si original, cadre vert else if ($statut=="original") { $style = " style='border: 1px solid green; padding: 5px;'"; } else $style = ''; $mots = afficher_forum_mots($id_forum); $res .= "<table$style width='100%' cellpadding='5' cellspacing='0'>\n<tr><td>" . afficher_forum_auteur($row) . (!$controle_id_article ? '' : boutons_controle_forum($id_forum, $statut, $id_auteur, "id_article=$id_article", $ip, $script, $argscript)) . "<div style='font-weight: normal;'>" . safehtml(justifier(propre($texte))) . "</div>\n" . (!$nom_site ? '' : ((strlen($url_site) > 10) ? "\n<div style='text-align: left' class='verdana2'><b><a href='$url_site'>$nom_site</a></b></div>" : "<b>$nom_site</b>")) . ($controle_id_article ? '' : repondre_forum($row, $titre, $statut, "$retour?$arg", _T('lien_repondre_message'))) . $mots . "</td></tr></table>"; if ($spip_display == 4) return "\n<li>$res</li>\n"; if ($compteur_forum == 1) $res .= fin_cadre_forum(true); else $res .= fin_cadre_thread_forum(true); $res .= "</td></tr>"; return "<table width='100%' cellpadding='0' cellspacing='0' border='0'>$res</table>\n"; }
function forum_envoi_entete($parent, $titre_parent, $texte, $titre, $nom_site, $url_site) { global $spip_lang_rtl; return "\n<br /><br /><table width='100%' cellpadding='0' cellspacing='0' border='0'>" . (!$parent ? '' : "<tr><td colspan='2'>$parent</td></tr>") . "<tr>" . (!$parent ? "<td colsan='2'" : (" <td style='width: 10px; background-image: url(" . chemin_image('forum-vert.gif') . ");'>" . http_img_pack('rien.gif', ' ', " style='width: 0px; height: 0px; border: 0px;'") . "</td>\n<td ")) . " style='width: 100%' valign='top' rowspan='2'>" . debut_cadre_thread_forum("", true, "", typo($titre)) . propre($texte) . (!$nom_site ? '' : "<p><a href='$url_site'>$nom_site</a></p>") . "\n<div style='text-align: right'><input type='submit' name='valider_forum' value='" . _T('bouton_envoyer_message') . "'\nonclick='AjaxNamedSubmit(this)' /></div>" . fin_cadre_thread_forum(true) . "</td>" . "</tr>\n" . (!$parent ? '' : ("<tr><td valign='top' style='width: 10px; background-image: url(" . chemin_image('rien.gif') . ");'>" . http_img_pack("forum-droite$spip_lang_rtl.gif", ' ', " style='width: 10px; height: 13px'") . "</td>\n</tr>")) . "</table>"; }