From 1980d2554a999129fb83dfa36f3aedef02ff0c44 Mon Sep 17 00:00:00 2001 From: ARNO* <arno@rezo.net> Date: Wed, 20 Oct 2004 13:22:27 +0000 Subject: [PATCH] Logos sites et breves dans listes --- ecrire/inc_presentation.php3 | 30 +++++++++++++++++++++++++----- ecrire/inc_sites.php3 | 27 ++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 8 deletions(-) diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3 index 523b2e578f..2de6a25996 100644 --- a/ecrire/inc_presentation.php3 +++ b/ecrire/inc_presentation.php3 @@ -747,7 +747,7 @@ function afficher_articles($titre_table, $requete, $afficher_visites = false, $a $taille = $logo[1]; $taille_x = $logo[3]; $taille_y = $logo[4]; - $taille = image_ratio($taille_x, $taille_y, 26, 18); + $taille = image_ratio($taille_x, $taille_y, 26, 20); $w = $taille[0]; $h = $taille[1]; $fid = $logo[2]; @@ -852,7 +852,7 @@ function afficher_breves($titre_table, $requete, $affrub=false) { bandeau_titre_boite2($titre_table, "breve-24.gif", $couleur_foncee, "white"); } - echo "<table width='100%' cellpadding='3' cellspacing='0' border='0' background=''>"; + echo "<table width='100%' cellpadding='2' cellspacing='0' border='0' background=''>"; echo $tranches; @@ -875,6 +875,26 @@ function afficher_breves($titre_table, $requete, $affrub=false) { $s = "<div>"; $s .= "<a href='breves_voir.php3?id_breve=$id_breve'$dir_lang style=\"display:block;\">"; + + if ($spip_display != 1 AND $spip_display != 4 AND lire_meta('image_process') != "non") { + include_ecrire("inc_logos.php3"); + $logo = decrire_logo("breveon$id_breve"); + if ($logo) { + $fichier = $logo[0]; + $taille = $logo[1]; + $taille_x = $logo[3]; + $taille_y = $logo[4]; + $taille = image_ratio($taille_x, $taille_y, 26, 20); + $w = $taille[0]; + $h = $taille[1]; + $fid = $logo[2]; + $hash = calculer_action_auteur ("reduire $w $h"); + + $s.= "<div style='float: $spip_lang_right; margin-top: -2px; margin-bottom: -2px;'><img src='../spip_image_reduite.php3?img="._DIR_IMG."$fichier&taille_x=$w&taille_y=$h&hash=$hash&hash_id_auteur=$connect_id_auteur' alt='' width='$w' height='$h' border='0'></div>"; + + } + } + $s .= typo($titre); if ($afficher_langue AND $lang != $langue_defaut) $s .= " <font size='1' color='#666666'$dir_lang>(".traduire_nom_langue($lang).")</font>"; @@ -903,11 +923,11 @@ function afficher_breves($titre_table, $requete, $affrub=false) { spip_free_result($result); if ($options == "avancees") { - if ($affrub) $largeurs = array('7', '', '170', '30'); - else $largeurs = array('7','', '100', '30'); + if ($affrub) $largeurs = array('7', '', '188', '35'); + else $largeurs = array('7','', '100', '35'); $styles = array('', 'arial11', 'arial1', 'arial1'); } else { - if ($affrub) $largeurs = array('7','', '170'); + if ($affrub) $largeurs = array('7','', '188'); else $largeurs = array('7','', '100'); $styles = array('','arial11', 'arial1'); } diff --git a/ecrire/inc_sites.php3 b/ecrire/inc_sites.php3 index 4ebea6a275..b1b58ea0bc 100644 --- a/ecrire/inc_sites.php3 +++ b/ecrire/inc_sites.php3 @@ -410,7 +410,7 @@ function syndic_a_jour($now_id_syndic, $statut = 'off') { function afficher_sites($titre_table, $requete) { - global $couleur_claire, $couleur_foncee; + global $couleur_claire, $couleur_foncee, $spip_lang_left, $spip_lang_right; global $connect_id_auteur; $tranches = afficher_tranches_requete($requete, 3); @@ -420,7 +420,7 @@ function afficher_sites($titre_table, $requete) { if ($titre_table) echo "<div style='height: 12px;'></div>"; echo "<div class='liste'>"; bandeau_titre_boite2($titre_table, "site-24.gif", $couleur_claire, "black"); - echo "<TABLE WIDTH=100% CELLPADDING=3 CELLSPACING=0 BORDER=0>"; + echo "<table width='100%' cellpadding='2' cellspacing='0' border='0'>"; echo $tranches; @@ -479,6 +479,27 @@ function afficher_sites($titre_table, $requete) { } $s = "<a href=\"".$link->getUrl()."\" title=\"$title\">"; + + if ($spip_display != 1 AND $spip_display != 4 AND lire_meta('image_process') != "non") { + include_ecrire("inc_logos.php3"); + $logo = decrire_logo("siteon$id_syndic"); + if ($logo) { + $fichier = $logo[0]; + $taille = $logo[1]; + $taille_x = $logo[3]; + $taille_y = $logo[4]; + $taille = image_ratio($taille_x, $taille_y, 26, 20); + $w = $taille[0]; + $h = $taille[1]; + $fid = $logo[2]; + $hash = calculer_action_auteur ("reduire $w $h"); + + $s.= "<div style='float: $spip_lang_right; margin-top: -2px; margin-bottom: -2px;'><img src='../spip_image_reduite.php3?img="._DIR_IMG."$fichier&taille_x=$w&taille_y=$h&hash=$hash&hash_id_auteur=$connect_id_auteur' alt='' width='$w' height='$h' border='0'></div>"; + + } + } + + $s .= "<img src='img_pack/$puce' alt='' width='7' height='7' border='0'> "; $s .= typo($nom_site); @@ -521,7 +542,7 @@ function afficher_sites($titre_table, $requete) { $largeurs = array('','',''); $styles = array('arial11', 'arial1', 'arial1'); afficher_liste($largeurs, $table, $styles); - echo "</TABLE>"; + echo "</table>"; //fin_cadre_relief(); echo "</div>\n"; } -- GitLab