瀏覽代碼

installer and updater for v0.90 and minor bug fixes

pecesama 18 年之前
父節點
當前提交
c2487ca0d8
共有 5 個文件被更改,包括 18 次插入42 次删除
  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 查看文件

1
+-- DB Gelato CMS v0.90
1
 
2
 
2
 CREATE TABLE `gel_data` (
3
 CREATE TABLE `gel_data` (
3
   `id_post` int(11) NOT NULL auto_increment,
4
   `id_post` int(11) NOT NULL auto_increment,
63
 -- Example data for table `gel_options`
63
 -- Example data for table `gel_options`
64
 
64
 
65
 INSERT INTO `gel_options` VALUES ('url_friendly', '1');
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 查看文件

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

+ 4 - 0
install.php 查看文件

335
 		
335
 		
336
 		$db->ejecutarConsulta($sqlStr);
336
 		$db->ejecutarConsulta($sqlStr);
337
 		
337
 		
338
+		$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');";
339
+		
340
+		$db->ejecutarConsulta($sqlStr);
341
+		
338
 		$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', '".$offset_city."');";
342
 		$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', '".$offset_city."');";
339
 		
343
 		
340
 		$db->ejecutarConsulta($sqlStr);
344
 		$db->ejecutarConsulta($sqlStr);

+ 5 - 3
readme.txt 查看文件

29
 	Demo user: admin
29
 	Demo user: admin
30
 	Demo pass: demo
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
 1) Download and unzip the gelato package, if you haven't already.
34
 1) Download and unzip the gelato package, if you haven't already.
35
 2) Create a backup of your config.php file.
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
 	3.1) If you do replace it by error, use the backup you create during step two.
37
 	3.1) If you do replace it by error, use the backup you create during step two.
38
 4) Execute the update.php file.
38
 4) Execute the update.php file.
39
 7) Set CHMOD / permission ( Chmod 777 ) to the folder 'uploads'
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 查看文件

26
 
26
 
27
 $db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
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
 $db->ejecutarConsulta($sqlStr);
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
 $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', 'Mexico/General');";
33
 $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', 'Mexico/General');";
69
 		
34
 		
70
 $db->ejecutarConsulta($sqlStr);
35
 $db->ejecutarConsulta($sqlStr);
74
 $db->ejecutarConsulta($sqlStr);
39
 $db->ejecutarConsulta($sqlStr);
75
 
40
 
76
 echo "<p><em>Finished!</em></p>";
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
 ?>