installer and updater for v0.90 and minor bug fixes

master
pecesama 2007-09-03 05:43:44 +00:00
parent f0653b5e23
commit c2487ca0d8
5 changed files with 18 additions and 43 deletions

View File

@ -1,4 +1,4 @@
-- DB Gelato CMS v0.85 -- DB Gelato CMS v0.90
CREATE TABLE `gel_data` ( CREATE TABLE `gel_data` (
`id_post` int(11) NOT NULL auto_increment, `id_post` int(11) NOT NULL auto_increment,
@ -64,3 +64,6 @@ INSERT INTO `gel_users` VALUES (1, 'System administrator', 'admin', 'fe01ce2a7fb
INSERT INTO `gel_options` VALUES ('url_friendly', '1'); INSERT INTO `gel_options` VALUES ('url_friendly', '1');
INSERT INTO `gel_options` VALUES ('rich_text', '0'); 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');

View File

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

View File

@ -335,6 +335,10 @@ function install_db($login, $password, $email, $title, $description, $url_instal
$db->ejecutarConsulta($sqlStr); $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."');"; $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', '".$offset_city."');";
$db->ejecutarConsulta($sqlStr); $db->ejecutarConsulta($sqlStr);

View File

@ -29,13 +29,15 @@ That's it! gelato should now be installed.
Demo user: admin Demo user: admin
Demo pass: demo 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. 1) Download and unzip the gelato package, if you haven't already.
2) Create a backup of your config.php file. 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. 3.1) If you do replace it by error, use the backup you create during step two.
4) Execute the update.php file. 4) Execute the update.php file.
7) Set CHMOD / permission ( Chmod 777 ) to the folder 'uploads' 7) Set CHMOD / permission ( Chmod 777 ) to the folder 'uploads'
That's it! gelato should now be updated. That's it! gelato should now be updated.
==== Update files for version previous to v0.85 are available on the download section =====

View File

@ -26,42 +26,7 @@ if (!file_exists($configFile)) {
$db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password); $db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
$sqlStr = "CREATE TABLE `".Table_prefix."comments` ( $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');";
`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');";
$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); $db->ejecutarConsulta($sqlStr);
@ -74,6 +39,6 @@ $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('offset_time', '-6');";
$db->ejecutarConsulta($sqlStr); $db->ejecutarConsulta($sqlStr);
echo "<p><em>Finished!</em></p>"; echo "<p><em>Finished!</em></p>";
echo "<p>Now you are running on the new version!!!</p>"; echo "<p>Now you are running on the new <strong>0.90</strong> version!!!</p>";
?> ?>