From 75666905a3ccb9613a02f539a3357b03c96414c1 Mon Sep 17 00:00:00 2001
From: Antoine Pitrou <pitrou@free.fr>
Date: Fri, 24 Oct 2003 21:38:59 +0000
Subject: [PATCH] cosmetique

---
 ecrire/inc_lang.php3         |  1 +
 ecrire/inc_presentation.php3 |  9 +++++++--
 ecrire/spip_style.php3       | 32 +++++++++++++++-----------------
 inc-login.php3               | 21 +++++++++++----------
 4 files changed, 34 insertions(+), 29 deletions(-)

diff --git a/ecrire/inc_lang.php3 b/ecrire/inc_lang.php3
index 8a75707420..ce1de049c9 100644
--- a/ecrire/inc_lang.php3
+++ b/ecrire/inc_lang.php3
@@ -395,6 +395,7 @@ function menu_langues($nom_select = 'var_lang', $default = '', $texte = '', $her
 	if ($nom_select == 'var_lang') $ret .= "\n<select name='$nom_select' class='verdana1' style='background-color: $couleur_foncee; color: white;' onChange=\"document.location.href='". $lien . $amp."$nom_select='+this.options[this.selectedIndex].value\">\n";
 	else $ret .= "\n<select name='$nom_select' class='fondl'>\n";
 
+	ksort($langues);
 	while (list(, $l) = each ($langues)) {
 		if ($l == $default) {
 			$selected = ' selected';
diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3
index 7558a830e4..2cec113460 100644
--- a/ecrire/inc_presentation.php3
+++ b/ecrire/inc_presentation.php3
@@ -17,7 +17,7 @@ function aide($aide='') {
 
 	if (!$aide) return;
 
-	return "&nbsp;&nbsp;<a class='aide' href=\"${dir_ecrire}aide_index.php3?aide=$aide\" target=\"spip_aide\" ".
+	return "&nbsp;&nbsp;<a class='aide' href=\"".$dir_ecrire."aide_index.php3?aide=$aide\" target=\"spip_aide\" ".
 		"onclick=\"javascript:window.open(this.href, 'spip_aide', 'scrollbars=yes, ".
 		"resizable=yes, width=740, height=580'); return false;\"><img ".
 		"src=\"img_pack/aide.gif\" alt=\""._T('info_image_aide')."\" ".
@@ -935,7 +935,12 @@ function debut_html($titre = "") {
 	echo '<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'">';
 	echo '<link rel="stylesheet" type="text/css" href="';
 	if (!$flag_ecrire) echo 'ecrire/';
-	echo "spip_style.php3?couleur_claire=".urlencode($couleur_claire)."&couleur_foncee=" . urlencode($couleur_foncee) ."\">\n";
+	$link = new Link('spip_style.php3');
+	$link->addVar('couleur_claire', $couleur_claire);
+	$link->addVar('couleur_foncee', $couleur_foncee);
+	$link->addVar('left', $GLOBALS['spip_lang_left']);
+	$link->addVar('right', $GLOBALS['spip_lang_right']);
+	echo $link->getUrl()."\">\n";
 
 	afficher_script_layer();
 ?>
diff --git a/ecrire/spip_style.php3 b/ecrire/spip_style.php3
index 099b13f734..30e65a655b 100644
--- a/ecrire/spip_style.php3
+++ b/ecrire/spip_style.php3
@@ -50,10 +50,10 @@ body { font-family: Verdana,Arial,Helvetica,sans-serif; }
 	padding: 2px;
 }
 .bandeau-icones .gauche {
-	float: left;
+	float: <?php echo $left; ?>;
 }
 .bandeau-icones .droite {
-	float: right;
+	float: <?php echo $right; ?>;
 }
 .bandeau-icones .milieu {
 	text-align: center;
@@ -123,15 +123,14 @@ body { font-family: Verdana,Arial,Helvetica,sans-serif; }
 }
 
 .cellule36 a.aide, .cellule36 a.aide:hover {
-	background: url(img_pack/rien.gif);
+	display: inline;
+	background: none;
 	margin: 0px;
 	padding: 0px;
-	display: inline;
 }
 .cellule36 a.aide img {
 	margin: 0px;
 	padding: 0px;
-	display: inline;
 }
 
 /* Navigation texte */
@@ -172,28 +171,29 @@ body { font-family: Verdana,Arial,Helvetica,sans-serif; }
 }
 .cellule-texte a.aide img {
 	margin: 0px;
-	display: inline;
 }
 
-/* Icones horizontales */
+/*
+ * Icones horizontales
+ */
 
 a.cellule-h {
-	text-align: left;
+	text-align: <?php echo $left; ?>;
 	display: block;
 	margin-top: 3px;
 	margin-bottom: 3px;
 }
 a.cellule-h {
-	text-decoration: none; background: url(img_pack/pave-gris-24.png) no-repeat center left;
+	text-decoration: none; background: url(img_pack/pave-gris-24.png) no-repeat center <?php echo $left; ?>;
 }
 a.cellule-h:hover {
-	text-decoration: none; background: url(img_pack/pave-blanc-24.png) no-repeat center left;
+	text-decoration: none; background: url(img_pack/pave-blanc-24.png) no-repeat center <?php echo $left; ?>;
 }
 .danger a.cellule-h {
-	text-decoration: none; background: url(img_pack/pave-gris-24.png) no-repeat center left;
+	text-decoration: none; background: url(img_pack/pave-gris-24.png) no-repeat center <?php echo $left; ?>;
 }
 .danger a.cellule-h:hover {
-	text-decoration: none; background: url(img_pack/pave-rouge-24.png) no-repeat center left;
+	text-decoration: none; background: url(img_pack/pave-rouge-24.png) no-repeat center <?php echo $left; ?>;
 }
 a.cellule-h table {
 	border: none;
@@ -201,7 +201,7 @@ a.cellule-h table {
 	margin: 0px;
 }
 a.cellule-h td {
-	text-align: left;
+	text-align: <?php echo $left; ?>;
 	font-family: Verdana, Arial, Helvetica, sans-serif;
 	font-weight: bold;
 	font-size: 11px;
@@ -212,7 +212,7 @@ a.cellule-h img {
 	height: 24px;
 	border: none;
 	margin: 1px;
-	margin-right: 6px;
+	margin-<?php echo $right; ?>: 6px;
 	background-repeat: no-repeat;
 	background-position: center center;
 }
@@ -224,7 +224,7 @@ a.cellule-h a.aide img {
 a.cellule-h-texte {
 	display: block;
 	clear: both;
-	text-align: left;
+	text-align: <?php echo $left; ?>;
 	font-family: Verdana, Arial, Helvetica, sans-serif;
 	font-weight: bold;
 	font-size: 11px;
@@ -472,5 +472,3 @@ table.spip td {
 	text-align: left;
 	vertical-align: center;
 }
-
-
diff --git a/inc-login.php3 b/inc-login.php3
index 1b89054f3a..5abc9b4e54 100644
--- a/inc-login.php3
+++ b/inc-login.php3
@@ -219,20 +219,21 @@ function login($cible = '', $prive = 'prive', $message_login='') {
 
 	echo "\n<center>"; // debut du pied de login
 
+	// Bouton s'inscrire
 	$inscriptions_ecrire = (lire_meta("accepter_inscriptions") == "oui");
-	if ((!$prive AND (lire_meta('accepter_visiteurs') == 'oui') OR (lire_meta('forums_publics') == 'abo')) OR ($prive AND $inscriptions_ecrire))
-		echo ' [<script type="text/javascript"><!--
-document.write("<a href=\\"javascript:window.open(\\\'spip_pass.php3\\\', \\\'spip_pass\\\', \\\'scrollbars=yes,resizable=yes,width=480,height=450\\\'); void(0);\\"");
-//--></script><noscript><a href=\'spip_pass.php3\' target=\'_blank\'></noscript>'._T('login_sinscrire').'</a>]';
-
-	// bouton oubli de mot de passe
+	if ((!$prive AND (lire_meta('accepter_visiteurs') == 'oui') OR (lire_meta('forums_publics') == 'abo')) OR ($prive AND $inscriptions_ecrire)) {
+		echo '[<a href="spip_pass.php3" target="spip_pass" onclick="'
+			."javascript:window.open('spip_pass.php3', 'spip_pass', 'scrollbars=yes, resizable=yes, width=480, height=450'); return false;\">"
+			._T('login_sinscrire').'</a>]';
+	}
+	// Bouton oubli de mot de passe
 	include_ecrire ("inc_mail.php3");
 	if (tester_mail()) {
-		echo ' [<script type="text/javascript"><!--
-document.write("<a href=\\"javascript:window.open(\\\'spip_pass.php3?oubli_pass=oui\\\', \\\'spip_pass\\\', \\\'scrollbars=yes,resizable=yes,width=480,height=280\\\'); void(0);\\"");
-//--></script><noscript><a href=\'spip_pass.php3?oubli_pass=oui\' target=\'_blank\'></noscript>'._T('login_motpasseoublie').'</a>]';
+		echo ' [<a href="spip_pass.php3?oubli_pass=oui" target="spip_pass" onclick="'
+			."javascript:window.open('spip_pass.php3?oubli_pass=oui', 'spip_pass', 'scrollbars=yes, resizable=yes, width=480, height=280'); return false;\">"
+			._T('login_motpasseoublie').'</a>]';
 	}
-
+	// Bouton retour au site public
 	if ($prive) echo " [<a href='$url_site'>"._T('login_retoursitepublic')."</a>]";
 
 	echo "</center>\n";
-- 
GitLab