diff --git a/db/gelato_db.sql b/db/gelato_db.sql index 8f5bc4a..7024c54 100644 --- a/db/gelato_db.sql +++ b/db/gelato_db.sql @@ -1,4 +1,4 @@ --- DB Gelato CMS v0.85 +-- DB Gelato CMS v0.90 CREATE TABLE `gel_data` ( `id_post` int(11) NOT NULL auto_increment, @@ -63,4 +63,7 @@ INSERT INTO `gel_users` VALUES (1, 'System administrator', 'admin', 'fe01ce2a7fb -- Example data for table `gel_options` INSERT INTO `gel_options` VALUES ('url_friendly', '1'); -INSERT INTO `gel_options` VALUES ('rich_text', '0'); \ No newline at end of file +INSERT INTO `gel_options` VALUES ('rich_text', '0'); +INSERT INTO `gel_options` VALUES ('allow_comments', '0'); +INSERT INTO `gel_options` VALUES ('offset_city', 'Mexico/General'); +INSERT INTO `gel_options` VALUES ('offset_time', '-6'); \ No newline at end of file diff --git a/index.php b/index.php index bb3cb0c..51d2dd9 100644 --- a/index.php +++ b/index.php @@ -213,7 +213,8 @@ if ($x[0] > 500) { $photoPath = $conf->urlGelato."/classes/imgsize.php?w=500&img=".$register["url"]; } else { - $photoPath = $register["url"]; + //$photoPath = $register["url"]; + $photoPath = str_replace("../", $conf->urlGelato."/", $register["url"]); } $effect = " onclick=\"Lightbox.show('".$register["url"]."', '".strip_tags($register["description"])."');\" "; diff --git a/install.php b/install.php index ca87a3f..e2cd5f7 100644 --- a/install.php +++ b/install.php @@ -335,6 +335,10 @@ function install_db($login, $password, $email, $title, $description, $url_instal $db->ejecutarConsulta($sqlStr); + $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');"; + + $db->ejecutarConsulta($sqlStr); + $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', '".$offset_city."');"; $db->ejecutarConsulta($sqlStr); diff --git a/readme.txt b/readme.txt index 70e04a0..d2e8867 100644 --- a/readme.txt +++ b/readme.txt @@ -29,13 +29,15 @@ That's it! gelato should now be installed. Demo user: admin Demo pass: demo -==== How to update to v0.85 from any previous version ===== +==== How to update to v0.90 from v0.85 any previous version ===== 1) Download and unzip the gelato package, if you haven't already. 2) Create a backup of your config.php file. -3) Replace all the old files with those from the new 0.85 EXCEPT for the file config.php +3) Replace all the old files with those from the new 0.90 EXCEPT for the file config.php 3.1) If you do replace it by error, use the backup you create during step two. 4) Execute the update.php file. 7) Set CHMOD / permission ( Chmod 777 ) to the folder 'uploads' -That's it! gelato should now be updated. \ No newline at end of file +That's it! gelato should now be updated. + +==== Update files for version previous to v0.85 are available on the download section ===== \ No newline at end of file diff --git a/update.php b/update.php index 130f574..a804708 100644 --- a/update.php +++ b/update.php @@ -26,45 +26,10 @@ if (!file_exists($configFile)) { $db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password); -$sqlStr = "CREATE TABLE `".Table_prefix."comments` ( - `id_comment` int(11) NOT NULL auto_increment, - `id_post` int(11) NOT NULL, - `username` varchar(50) NOT NULL, - `email` varchar(100) NOT NULL, - `web` varchar(250) default NULL, - `content` text NOT NULL, - `ip_user` varchar(50) NOT NULL, - `comment_date` datetime NOT NULL, - `spam` tinyint(4) NOT NULL, - PRIMARY KEY (`id_comment`) -) ENGINE = MYISAM ;"; - -$db->ejecutarConsulta($sqlStr); - -$sqlStr = "CREATE TABLE `".Table_prefix."options` ( - `name` varchar(100) NOT NULL, - `val` varchar(255) NOT NULL, - PRIMARY KEY (`name`) -) ENGINE = MYISAM ;"; - -$db->ejecutarConsulta($sqlStr); - -$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('url_friendly', '1');"; +$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');"; $db->ejecutarConsulta($sqlStr); -$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('rich_text', '0');"; - -$db->ejecutarConsulta($sqlStr); - -$sqlStr = "ALTER TABLE ".Table_prefix."config DROP url_friendly"; - -$db->ejecutarConsulta($sqlStr); - -$sqlStr = "ALTER TABLE ".Table_prefix."config DROP rich_text"; - -$db->ejecutarConsulta($sqlStr); - $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', 'Mexico/General');"; $db->ejecutarConsulta($sqlStr); @@ -74,6 +39,6 @@ $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_time', '-6');"; $db->ejecutarConsulta($sqlStr); echo "
Finished!
"; -echo "Now you are running on the new version!!!
"; +echo "Now you are running on the new 0.90 version!!!
"; ?>