diff --git a/.gitattributes b/.gitattributes index 1ecbb96f1a4f9c88f2dfb7ea7a0be8662262176b..ca044ad2a5bf61b542c85f4f694ecbf7af946a44 100644 --- a/.gitattributes +++ b/.gitattributes @@ -125,6 +125,7 @@ ecrire/img_pack/forum-admin-24.gif -text ecrire/img_pack/forum-droite.gif -text ecrire/img_pack/forum-droite_rtl.gif -text ecrire/img_pack/forum-interne-24.gif -text +ecrire/img_pack/forum-public-24.gif -text ecrire/img_pack/forum-vert.gif -text ecrire/img_pack/groupe-mot-24.gif -text ecrire/img_pack/heures-am.png -text diff --git a/ecrire/controle_forum.php3 b/ecrire/controle_forum.php3 index 031609795a7d0a74a2f8a0e2f2b43fdb076e007f..8e70efb9476c2c5921238ec3c165a021a441bec3 100644 --- a/ecrire/controle_forum.php3 +++ b/ecrire/controle_forum.php3 @@ -123,21 +123,30 @@ function controle_forum($row, $rappel) { $type = $r['type']; $valeur = $r['valeur']; $pref = $r['pref']; - + + $cadre = ""; + $controle = "\n<br /><br /><a id='$id_forum'></a>"; + +// $controle.= "[$forum_stat]"; + if ($forum_stat == "prive") $logo = "forum-interne-24.gif"; + else if ($forum_stat == "privadm") $logo = "forum-admin-24.gif"; + else if ($forum_stat == "privrac") $logo = "forum-admin-24.gif"; + else $logo = "forum-public-24.gif"; + + $controle .= debut_cadre_thread_forum("", true, "", typo($forum_titre)); - if ($forum_stat=="off" OR $forum_stat == "privoff") - $controle .= "<div style='border: 2px #ff0000 dashed; background-color: white;'>"; - else if ($forum_stat=="prop") + if ($forum_stat=="off" OR $forum_stat == "privoff") { + $controle .= "<div style='border: 2px #ff0000 dashed;'>"; + } + else if ($forum_stat=="prop") { $controle .= "<div style='border: 2px yellow solid; background-color: white;'>"; + } else { - $controle .= "<div style='border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc;'>" . - "<div style='border: 1px #999999 dashed; background-color: white;'>"; + $controle .= "<div>"; } - - $controle .= "<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td width=100% valign='top'><table width=100% cellpadding=5 cellspacing=0><tr><td bgcolor='$couleur_foncee'><font face='verdana,arial,sans,sans-serif' size=2 color='#ffffff'><b>" . - typo($forum_titre). - "</b></font></td></tr><tr><td class='serif'><span class='arial2'>" . + + $controle .= "<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td width=100% valign='top'><table width=100% cellpadding=5 cellspacing=0><tr><td class='serif'><span class='arial2'>" . affdate_heure($forum_date_heure) . "</span>"; if ($forum_auteur) { @@ -153,7 +162,7 @@ function controle_forum($row, $rappel) { $id_forum, _T('icone_supprimer_message'), "controle_forum.php3?$rappel#$id_forum", - "forum-interne-24.gif", + $logo, "supprimer.gif"); else if ($forum_stat == "prive" OR $forum_stat == "privrac" OR $forum_stat == "privadm") $controle .= @@ -161,7 +170,7 @@ function controle_forum($row, $rappel) { $id_forum, _T('icone_supprimer_message'), "controle_forum.php3?$rappel#$id_forum", - "forum-interne-24.gif", + $logo, "supprimer.gif"); } else { @@ -178,7 +187,7 @@ function controle_forum($row, $rappel) { $id_forum, _T('icone_valider_message'), "controle_forum.php3?$rappel&#$id_forum", - "forum-interne-24.gif", + $logo, "creer.gif") . controle_cache_forum('valid_forum', $id_forum, @@ -210,9 +219,8 @@ function controle_forum($row, $rappel) { $controle .= "</TD></TR></TABLE>"; $controle .= "</TD></TR></TABLE>\n"; - if (!($forum_stat == 'off' OR $forum_stat == 'privoff' OR $forum_stat=='prop')) - $controle .= "</div>"; - $controle .= "</div>"; + + $controle .= "</div>".fin_cadre_thread_forum(true); return $controle; } diff --git a/ecrire/forum.php3 b/ecrire/forum.php3 index a0f06317bf870365985fde001697e840967772c1..90f3fff6af27dc3b9d0eced9573ca4982f01ea29 100644 --- a/ecrire/forum.php3 +++ b/ecrire/forum.php3 @@ -6,10 +6,12 @@ include ("inc.php3"); if ($admin=='oui') { debut_page(_T('titre_page_forum'), "redacteurs", "forum-admin"); $statutforum = 'privadm'; + $logo = "forum-admin-24.gif"; $urlforum = 'forum_admin.php3'; } else { debut_page(_T('titre_forum'), "redacteurs", "forum-interne"); $statutforum = 'privrac'; + $logo = "forum-interne-24.gif"; $urlforum = 'forum.php3'; } @@ -61,7 +63,7 @@ if ($total > 10) { echo "<p><div align='center'>"; -icone (_T('icone_poster_message'), "forum_envoi.php3?statut=$statutforum&adresse_retour=$urlforum&titre_message=".urlencode(filtrer_entites(_T('texte_nouveau_message'))), "forum-interne-24.gif", "creer.gif"); +icone (_T('icone_poster_message'), "forum_envoi.php3?statut=$statutforum&adresse_retour=$urlforum&titre_message=".urlencode(filtrer_entites(_T('texte_nouveau_message'))), $logo, "creer.gif"); echo "</div>"; diff --git a/ecrire/img_pack/forum-admin-24.gif b/ecrire/img_pack/forum-admin-24.gif index 5d43a58a530102a797ec416500ae140c0b9a4903..e459824348a28ccb21e7320d39f9e775b7228626 100644 Binary files a/ecrire/img_pack/forum-admin-24.gif and b/ecrire/img_pack/forum-admin-24.gif differ diff --git a/ecrire/img_pack/forum-public-24.gif b/ecrire/img_pack/forum-public-24.gif new file mode 100644 index 0000000000000000000000000000000000000000..cce445faa8e8cb76f7b3a11a9a40897f6fa1d0df Binary files /dev/null and b/ecrire/img_pack/forum-public-24.gif differ diff --git a/ecrire/img_pack/suivi-forum-24.gif b/ecrire/img_pack/suivi-forum-24.gif index 8ade7cdb48fcfeba00396d5710a4483f008ff89c..31b7614bf86f0b1ce35f0f994287385cdfceacef 100644 Binary files a/ecrire/img_pack/suivi-forum-24.gif and b/ecrire/img_pack/suivi-forum-24.gif differ diff --git a/ecrire/inc_forum.php3 b/ecrire/inc_forum.php3 index bad51a523bee0ed2b4bf145bd9876ec4bf832f83..8f44be32d349346a304b407f1a3ba77a9209ba7a 100644 --- a/ecrire/inc_forum.php3 +++ b/ecrire/inc_forum.php3 @@ -45,7 +45,7 @@ function changer_statut_forum($id_forum, $statut) { } // Installer un bouton de moderation (securise) dans l'espace prive -function controle_cache_forum($action, $id, $texte, $lien, $fond, $fonc) { +function controle_cache_forum($action, $id, $texte, $lien, $fond, $fonction) { $link = $GLOBALS['clean_link']; $link->addvar('controle_forum', $action); $link->addvar('id_controle_forum', $id); diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3 index c84b91ef7c456a783dd9a4ee46665958d6f091df..2a0018fe2c644ac7e021a0f17ba4e79354efa8fe 100644 --- a/ecrire/inc_presentation.php3 +++ b/ecrire/inc_presentation.php3 @@ -1142,6 +1142,12 @@ function afficher_forum($request, $adresse_retour, $controle_id_article = 0) { $statut=$row['statut']; $ip=$row["ip"]; $id_auteur=$row["id_auteur"]; + + $forum_stat = $statut; + if ($forum_stat == "prive") $logo = "forum-interne-24.gif"; + else if ($forum_stat == "privadm") $logo = "forum-admin-24.gif"; + else if ($forum_stat == "privrac") $logo = "forum-admin-24.gif"; + else $logo = "forum-public-24.gif"; if ($compteur_forum==1) echo "\n<br /><br />"; $afficher = ($controle_id_article) ? ($statut!="perso") : @@ -1165,19 +1171,20 @@ function afficher_forum($request, $adresse_retour, $controle_id_article = 0) { echo "\n<td width=100% valign='top'>"; + + if ($compteur_forum == 1) echo debut_cadre_forum($logo, false, "", typo($titre)); + else echo debut_cadre_thread_forum("", false, "", typo($titre)); + // Si refuse, cadre rouge if ($statut=="off") { - echo "<table width=100% cellpadding=2 cellspacing=0 border=0><tr><td>"; + echo "<div style='border: 2px dashed red; padding: 5px;'>"; } // Si propose, cadre jaune else if ($statut=="prop") { - echo "<table width=100% cellpadding=2 cellspacing=0 border=0><tr><td>"; + echo "<div style='border: 1px solid yellow; padding: 5px;'>"; } - - if ($compteur_forum == 1) echo debut_cadre_forum("forum-interne-24.gif", false, "", typo($titre)); - else echo debut_cadre_thread_forum("", false, "", typo($titre)); - - echo "<span class='arial2'>"; + + echo "<span class='arial2'>"; echo affdate_court($date_heure); echo ", "; echo heures($date_heure).":".minutes($date_heure); @@ -1201,7 +1208,7 @@ function afficher_forum($request, $adresse_retour, $controle_id_article = 0) { $id_forum, _T('icone_supprimer_message'), "articles_forum.php3?id_article=$controle_id_article&debut=$debut#$id_forum", - "forum-interne-24.gif", + $logo, "supprimer.gif"); } else { @@ -1216,7 +1223,7 @@ function afficher_forum($request, $adresse_retour, $controle_id_article = 0) { $id_forum, _T('icone_valider_message'), "articles_forum.php3?id_article=$id_article&debut=$debut#$id_forum", - "forum-interne-24.gif", + $logo, "creer.gif"); } } @@ -1246,13 +1253,13 @@ function afficher_forum($request, $adresse_retour, $controle_id_article = 0) { } } + + if ($statut == "off" OR $statut == "prop") echo "</div>"; if ($compteur_forum == 1) echo fin_cadre_forum(); else echo fin_cadre_thread_forum(); - if ($statut == "off" OR $statut == "prop") { - echo "</td></tr></table>"; - } + echo "</td></tr></table>\n"; afficher_thread_forum($id_forum,$adresse_retour,$controle_id_article); @@ -1728,7 +1735,7 @@ function barre_onglets($rubrique, $onglet){ } if ($rubrique == "suivi_forum"){ - onglet(_T('onglet_messages_publics'), "controle_forum.php3?page=public", "public", $onglet, "racine-site-24.gif"); + onglet(_T('onglet_messages_publics'), "controle_forum.php3?page=public", "public", $onglet, "forum-public-24.gif"); onglet(_T('onglet_messages_internes'), "controle_forum.php3?page=interne", "interne", $onglet, "forum-interne-24.gif"); $query_forum = "SELECT * FROM spip_forum WHERE statut='publie' AND texte='' LIMIT 0,1";