Browse Source

Minor bug fixes

pecesama 18 years ago
parent
commit
8443382cb1

+ 6 - 5
admin/css/style.css View File

@@ -18,7 +18,7 @@ h1, h2, h3, h4, h5, h6, h7{ font-weight:normal;}
18 18
 a, a:link, a:visited, a:active{ color:#000000; text-decoration:none; outline:none;}
19 19
 a:hover{ text-decoration:underline; color:#000000;  outline:none;}
20 20
 
21
-.inslnl { text-decoration:underline; }
21
+.inslnl a{ text-decoration:underline; }
22 22
 
23 23
 acronym{ border-bottom: 1px dotted #666; cursor:help;}
24 24
 fieldset{ border:none; margin:0; padding:0;}
@@ -118,11 +118,12 @@ a.linkFrm:hover{ text-decoration:underline; color:#297aab;  outline:none;}
118 118
 .exito { width:80%; background: #F4FBF5 url('../../images/information.png') 15px center no-repeat; border-top: 2px solid #006600; border-bottom: 2px solid #006600; margin: 0 auto; padding: 5px 20px 5px 45px; }
119 119
 .information { width:80%; background: #FFF6BF url('../../images/icon_info.gif') 15px center no-repeat; border-top: 2px solid #FFD324; border-bottom: 2px solid #FFD324; margin: 0 auto;padding: 5px 20px 5px 45px; }
120 120
 
121
+
121 122
 #update { text-align:center; font-size: 10px; color: #000; }
122
-	#update a { color: #000; text-decoration:none; }
123
-	#update a:visited { color: #000; text-decoration:none; }
124
-	#update a:active { color: #000; text-decoration:none; }
125
-	#update a:hover { color: #000; text-decoration:underline; }
123
+	#update a { color: #000; text-decoration:underline; }
124
+	#update a:visited { color: #000; text-decoration:underline; }
125
+	#update a:active { color: #000; text-decoration:underline; }
126
+	#update a:hover { color: #F00; text-decoration:underline; }
126 127
 
127 128
 /* Pagination */
128 129
 

+ 6 - 6
admin/index.php View File

@@ -68,11 +68,11 @@ if ($user->isAdmin()) {
68 68
 				$_POST["url"] = $conf->urlGelato."/uploads/".$mp3Name;
69 69
 			}
70 70
 		}		
71
-		
72
-		if (get_magic_quotes_gpc()) {
73
-			$_POST["title"] = stripslashes($_POST["title"]);
74
-			$_POST["description"] = stripslashes($_POST["description"]);
75
-		}
71
+				
72
+		if (!get_magic_quotes_gpc()) {	
73
+			$_POST["title"] = addslashes($_POST["title"]);
74
+			$_POST["description"] = addslashes($_POST["description"]);
75
+		}	
76 76
 		
77 77
 		$_POST["title"] = strip_tags($_POST["title"]);
78 78
 		$_POST["description"] = strip_tags($_POST["description"]);
@@ -163,7 +163,7 @@ if ($user->isAdmin()) {
163 163
 					$present = version();
164 164
 					$lastest = _file_get_contents("http://www.gelatocms.com/vgel.txt");
165 165
 					if ($present < $lastest) {
166
-						echo "<div class=\"information\" id=\"update\">A new gelato version has been released and is ready <a href=\"http://www.gelatocms.com/\">for download</a>.</div>";
166
+						echo "<div class=\"information\" id=\"update\">A new gelato version has been released and is ready <a href=\"http://www.gelatocms.com/\">for download</a>.</div><br />";
167 167
 					}
168 168
 					
169 169
 					if (isset($_GET["deleted"])) {

+ 34 - 1
admin/scripts/tools.js View File

@@ -1,3 +1,36 @@
1
-//<!--
1
+//<!-- 
2
+
3
+function validateFrmAddUser() {
4
+	if ($('login').value == "") {
5
+	   alert("The username field cannot be left blank.");
6
+	   document.frm_add.login.select();	
7
+	   return false;
8
+	}
9
+	if ($('password').value == "") {
10
+	   alert("The password field cannot be left blank.");
11
+	   document.frm_add.password.select();	
12
+	   return false;
13
+	}	
14
+	if ($('password').value != $('repass').value) {
15
+	   alert("The password must match,\nplease verify them.");
16
+	   document.frm_add.password.focus();	
17
+	   return false;
18
+	}		
19
+	return true;
20
+}
21
+
22
+function verifyExistingUser() {
23
+	$('div-process').style.display="block";
24
+	el = $('target');
25
+	el.style.display="block";										
26
+	var path = 'ajax.php?action=verify&login='+$('login').value;
27
+	new Ajax(path, {
28
+		onComplete:function(e) {						
29
+			el.setHTML(e);
30
+			$('div-process').style.display="none";
31
+		}
32
+	}).request();
33
+	return false;
34
+}
2 35
 
3 36
 //-->

+ 1 - 1
admin/settings.php View File

@@ -108,7 +108,7 @@ if ($user->isAdmin()) {
108 108
 <?php
109 109
 										$themes = getThemes();
110 110
 										foreach ($themes as $theme) {
111
-											$active = ($conf->template) ? "selected" : "";
111
+											$active = ($conf->template==$theme) ? "selected" : "";
112 112
 											echo "<option value=\"".$theme."\" ".$active.">".$theme."</option>\n";
113 113
 											
114 114
 										}

+ 1 - 34
admin/user.php View File

@@ -57,40 +57,7 @@ if ($user->isAdmin()) {
57 57
 		<meta name="generator" content="gelato cms <?php echo version();?>" />
58 58
 		<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
59 59
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
60
-		<script language="javascript" type="text/javascript">								
61
-			function validateFrmAddUser() {
62
-				if ($('login').value == "") {
63
-				   alert("The username field cannot be left blank.");
64
-				   document.frm_add.login.select();	
65
-				   return false;
66
-				}
67
-				if ($('password').value == "") {
68
-				   alert("The password field cannot be left blank.");
69
-				   document.frm_add.password.select();	
70
-				   return false;
71
-				}	
72
-				if ($('password').value != $('repass').value) {
73
-				   alert("The password must match,\nplease verify them.");
74
-				   document.frm_add.password.focus();	
75
-				   return false;
76
-				}		
77
-				return true;
78
-			}
79
-			
80
-			function verifyExistingUser() {
81
-				$('div-process').style.display="block";
82
-				el = $('target');
83
-				el.style.display="block";										
84
-				var path = 'ajax.php?action=verify&login='+$('login').value;
85
-				new Ajax(path, {
86
-					onComplete:function(e) {						
87
-						el.setHTML(e);
88
-						$('div-process').style.display="none";
89
-					}
90
-				}).request();
91
-				return false;
92
-			}
93
-		</script>
60
+		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
94 61
 		<style type="text/css" media="screen">	
95 62
 			@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
96 63
 		</style>

+ 7 - 0
classes/functions.php View File

@@ -49,6 +49,13 @@
49 49
 		}
50 50
 	}
51 51
 	
52
+	function getGoEarCode($songUrl) {
53
+		$pos = strpos($songUrl, "?v=");
54
+		$lon = strlen($songUrl);
55
+		$str = substr($songUrl, $pos + 3, $lon);
56
+		return $str;
57
+	}
58
+	
52 59
 	function isGoEar($songUrl) {
53 60
 		if (beginsWith($songUrl, "http://www.goear.com/listen.php?v="))
54 61
 			return true;

+ 1 - 1
classes/gelato.class.php View File

@@ -158,7 +158,7 @@ class gelato extends Conexion_Mysql {
158 158
 			$playerUrl = $this->conf->urlGelato."/admin/scripts/player.swf?soundFile=".$url;
159 159
 			return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"" . $playerUrl . "\" width=\"290\" height=\"24\"><param name=\"movie\" value=\"" . $playerUrl . "\" /><param name=\"quality\" value=\"high\" /><param name=\"menu\" value=\"false\" /><param name=\"wmode\" value=\"transparent\" /></object>\n";
160 160
 		} elseif (isGoEar($url)) {
161
-			return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"http://www.goear.com/files/localplayer.swf\" width=\"366\" height=\"75\"><param name=\"movie\" value=\"http://www.goear.com/files/localautoplayer.swf\" /><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"file=c0a2c85\" /></object>\n";
161
+			return "\t\t\t<object type=\"application/x-shockwave-flash\" data=\"http://www.goear.com/files/localplayer.swf\" width=\"366\" height=\"75\"><param name=\"movie\" value=\"http://www.goear.com/files/localautoplayer.swf\" /><param name=\"quality\" value=\"high\" /><param name=\"FlashVars\" value=\"file=".getGoEarCode($url)."\" /></object>\n";
162 162
 		} else {
163 163
 			return "This URL is not an MP3 file.";
164 164
 		}		

+ 1 - 1
themes/tumblr/template_header.htm View File

@@ -2,7 +2,7 @@
2 2
 	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 3
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 4
 <head>	
5
-	{Gelato_includes}	
5
+	{Gelato_includes}
6 6
     <title>{Title}</title>
7 7
     <!--[if IE]>
8 8
         <style type="text/css">

+ 4 - 7
themes/tumblr/template_regular_post.htm View File

@@ -2,15 +2,12 @@
2 2
                 <div class="date">
3 3
                     {Date_Added}
4 4
                 </div>
5
-
6 5
         
7 6
             <div class="post">
8 7
                 <a href="{Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
9
-
10 8
                 
11
-                    <div class="regular">
12
-                        <h2><a href="{Permalink}">{Title}</a></h2>
13
-                        {Body}
14
-                    </div>                
15
-				
9
+				<div class="regular">
10
+					<h2><a href="{Permalink}">{Title}</a></h2>
11
+					{Body}
12
+				</div>				
16 13
 			</div>