Procházet zdrojové kódy

installer and updater for v0.90 and minor bug fixes

pecesama před 16 roky
rodič
revize
c2487ca0d8
5 změnil soubory, kde provedl 18 přidání a 42 odebrání
  1. 5 1
      db/gelato_db.sql
  2. 2 1
      index.php
  3. 4 0
      install.php
  4. 5 3
      readme.txt
  5. 2 37
      update.php

+ 5 - 1
db/gelato_db.sql Zobrazit soubor

@@ -1,4 +1,4 @@
1
+-- DB Gelato CMS v0.90
1 2
 
2 3
 CREATE TABLE `gel_data` (
3 4
   `id_post` int(11) NOT NULL auto_increment,
@@ -63,4 +63,7 @@ INSERT INTO `gel_users` VALUES (1, 'System administrator', 'admin', 'fe01ce2a7fb
63 63
 -- Example data for table `gel_options`
64 64
 
65 65
 INSERT INTO `gel_options` VALUES ('url_friendly', '1');
66
-INSERT INTO `gel_options` VALUES ('rich_text', '0');
66
+INSERT INTO `gel_options` VALUES ('rich_text', '0');
67
+INSERT INTO `gel_options` VALUES ('allow_comments', '0');
68
+INSERT INTO `gel_options` VALUES ('offset_city', 'Mexico/General');
69
+INSERT INTO `gel_options` VALUES ('offset_time', '-6');

+ 2 - 1
index.php Zobrazit soubor

@@ -213,7 +213,8 @@
213 213
                                 if ($x[0] > 500) {                                      
214 214
                                         $photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$register["url"];
215 215
                                 } else {
216
-                                        $photoPath = $register["url"];
216
+                                        //$photoPath = $register["url"];
217
+										$photoPath = str_replace("../", $conf->urlGelato."/", $register["url"]);
217 218
                                 }
218 219
                                 
219 220
                                 $effect = " onclick=\"Lightbox.show('".$register["url"]."', '".strip_tags($register["description"])."');\" ";

+ 4 - 0
install.php Zobrazit soubor

@@ -335,6 +335,10 @@ function install_db($login, $password, $email, $title, $description, $url_instal
335 335
 		
336 336
 		$db->ejecutarConsulta($sqlStr);
337 337
 		
338
+		$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');";
339
+		
340
+		$db->ejecutarConsulta($sqlStr);
341
+		
338 342
 		$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', '".$offset_city."');";
339 343
 		
340 344
 		$db->ejecutarConsulta($sqlStr);

+ 5 - 3
readme.txt Zobrazit soubor

@@ -29,13 +29,15 @@ That's it! gelato should now be installed.
29 29
 	Demo user: admin
30 30
 	Demo pass: demo
31 31
 
32
-==== How to update to v0.85 from any previous version =====
32
+==== How to update to v0.90 from v0.85 any previous version =====
33 33
 
34 34
 1) Download and unzip the gelato package, if you haven't already.
35 35
 2) Create a backup of your config.php file.
36
-3) Replace all the old files with those from the new 0.85 EXCEPT for the file config.php
36
+3) Replace all the old files with those from the new 0.90 EXCEPT for the file config.php
37 37
 	3.1) If you do replace it by error, use the backup you create during step two.
38 38
 4) Execute the update.php file.
39 39
 7) Set CHMOD / permission ( Chmod 777 ) to the folder 'uploads'
40 40
 
41
-That's it! gelato should now be updated.
41
+That's it! gelato should now be updated.
42
+
43
+==== Update files for version previous to v0.85 are available on the download section =====

+ 2 - 37
update.php Zobrazit soubor

@@ -26,45 +26,10 @@ if (!file_exists($configFile)) {
26 26
 
27 27
 $db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
28 28
 
29
-$sqlStr = "CREATE TABLE `".Table_prefix."comments` (
30
-  `id_comment` int(11) NOT NULL auto_increment,
31
-  `id_post` int(11) NOT NULL,
32
-  `username` varchar(50) NOT NULL,
33
-  `email` varchar(100) NOT NULL,
34
-  `web` varchar(250) default NULL,
35
-  `content` text NOT NULL,
36
-  `ip_user` varchar(50) NOT NULL,
37
-  `comment_date` datetime NOT NULL,
38
-  `spam` tinyint(4) NOT NULL,
39
-  PRIMARY KEY  (`id_comment`)
40
-) ENGINE = MYISAM ;";
41
-
42
-$db->ejecutarConsulta($sqlStr);
43
-
44
-$sqlStr = "CREATE TABLE `".Table_prefix."options` (
45
-  `name` varchar(100) NOT NULL,
46
-  `val` varchar(255) NOT NULL,
47
-  PRIMARY KEY  (`name`)
48
-) ENGINE = MYISAM ;";
49
-
50
-$db->ejecutarConsulta($sqlStr);
51
-
52
-$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('url_friendly', '1');";
29
+$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');";
53 30
 		
54 31
 $db->ejecutarConsulta($sqlStr);
55 32
 
56
-$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('rich_text', '0');";
57
-
58
-$db->ejecutarConsulta($sqlStr);
59
-
60
-$sqlStr = "ALTER TABLE ".Table_prefix."config DROP url_friendly";
61
-
62
-$db->ejecutarConsulta($sqlStr);
63
-
64
-$sqlStr = "ALTER TABLE ".Table_prefix."config DROP rich_text";
65
-
66
-$db->ejecutarConsulta($sqlStr);
67
-
68 33
 $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', 'Mexico/General');";
69 34
 		
70 35
 $db->ejecutarConsulta($sqlStr);
@@ -74,6 +39,6 @@ $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_time', '-6');";
74 39
 $db->ejecutarConsulta($sqlStr);
75 40
 
76 41
 echo "<p><em>Finished!</em></p>";
77
-echo "<p>Now you are running on the new version!!!</p>";
42
+echo "<p>Now you are running on the new <strong>0.90</strong> version!!!</p>";
78 43
 
79 44
 ?>