New feature: Feed importer, there's some changes in the Db, so you must update, don't forget to chmod(777) the uploads/CACHE dir

master
ravenlp 2007-10-05 00:36:38 +00:00
parent f8da07dc4b
commit f0524983d9
12 changed files with 6115 additions and 290 deletions

View File

@ -69,6 +69,7 @@ form.newpost label{}
form.newpost input{ margin-bottom:10px;}
form.newpost input.txt{ background: #fff url(images/grad-small.png) top left repeat-x; height:15px; border:1px solid #999; width:490px; padding:5px;}
form.newpost input.btn{ }
form.newpost input.check{ vertical-align:middle;}
form.newpost textarea{background: #fff url(images/grad-big.png) top left repeat-x; height:190px; border:1px solid #999; width:490px; padding:5px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:0.8em;}
form.newpost select{ position:absolute; right:10px; top:1px;}
html > body form.newpost select{min-width:100px;}
@ -107,6 +108,16 @@ legend.install{font: normal 16.5px/17px georgia, "times new roman", serif; borde
a.linkFrm, a.linkFrm:link, a.linkFrm:visited, a.linkFrm:active{ color:#297aab; text-decoration:none; outline:none;}
a.linkFrm:hover{ text-decoration:underline; color:#297aab; outline:none;}
/* Feeds */
#feedlist{}
#feedlist ul{ list-style-type:none;}
#feedlist li{ border-bottom:1px solid #999; font-size:12px; padding:2px 4px 2px 4px; margin:0 2px 0 2px;}
#feedlist li span{ font-weight:bold;}
#feedlist li.feederror{ background-color:#FFCCCC;}
#feedlist li.feederror span{ color:#CC0000;}
#feedlist li a img{border:none; padding:0 2px 2px 2px; vertical-align:middle;}
/* User messages */
.error { width:80%; background: #FFF7F2 url('../../images/error.png') 15px center no-repeat; border-top: 2px solid #CC0000; border-bottom: 2px solid #CC0000; margin: 0 auto; padding: 5px 20px 5px 45px; }

138
admin/feeds.php Normal file
View File

@ -0,0 +1,138 @@
<?php
if(!defined('entry')) define('entry', true);
/* ===========================
gelato CMS - A PHP based tumblelog CMS
development version
http://www.gelatocms.com/
gelato CMS is a free software licensed under the GPL 2.0
Copyright (C) 2007 by Pedro Santana <pecesama at gmail dot com>
=========================== */
?>
<?php
require('../entry.php');
global $user, $conf, $tumble;
$template = new plantillas("admin");
$user= new User();
if ($user->isAdmin()) {
$message = '';
$f = new feeds();
if(isset($_POST['add'], $_POST['url'])){
$credits =(isset($_POST['credits']))? 1 : 0;
if($f->addFeed($_POST['url'],$_POST['type'],$_POST['source'], $credits)){
$message = __('Feed added');
$messageStatus = 'exito';
}
}
if(isset($_GET['delete']) && is_numeric($_GET['delete'])){
if($f->removeFeed((int)$_GET['delete'])){
$message = __('Feed deleted');
$messageStatus = 'error';
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>gelato :: <?php echo __("Feeds")?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="gelato cms <?php echo version();?>" />
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
<style type="text/css" media="screen">
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
</style>
</head>
<body>
<div id="cont">
<div id="head">
<h1><a href="<?php echo $conf->urlGelato;?>/" title="gelato :: <?php echo __("home")?>">gelato cms</a></h1>
<ul id="nav">
<li><a href="<?php echo $conf->urlGelato;?>/" title="<?php echo __("Take me to the tumblelog")?>"><?php echo __("Back to the Tumblelog")?></a></li>
</ul>
</div>
<div id="main">
<div class="box">
<h3><?php echo __("Configure your feeds")?></h3>
<ul class="menu manage">
<li><a href="index.php"><?php echo __("Post")?></a></li>
<li><a href="options.php"><?php echo __("Options")?></a></li>
</ul>
<?php echo (!(empty($message))? '<div class="'.$messageStatus.'" id="divMessages"> '.$message.'</div>' : ''); ?>
<div class="tabla">
<form action="feeds.php" method="post" class="newpost">
<fieldset>
<ul>
<li>
<label for="source"><?php echo __("Import data from:")?></label>
<select name="source" id="source" onchange="selectFeedType('<?php echo __("Feed Url:")?>','<?php echo __(" username:")?>' )">
<option value="Rss" selected="selected">Rss/atom Feed</option>
<option value="Flickr">Flickr</option>
<option value="Twitter">Twitter</option>
<option value="Youtube">Youtube</option>
<option value="Last.fm">Last.fm</option>
<option value="Tumblr">Tumblr</option>
<option value="Wordpress.com">Wordpress.com</option>
<option value="Blogger">Blogger</option>
<option value="VOX">VOX</option>
</select>
</li>
<li id="import_as"><label for="type"><?php echo __("Import As:")?></label>
<select name="type" id="type">
<option value="1" selected="selected"><?php echo __("Text")?></option>
<option value="2"><?php echo __("Photos")?></option>
</select>
</li>
<li>
<label for="url" id="url_label"><?php echo __("Feed Url (double check):")?></label>
<input type="text" name="url" id="url" class="txt" />
</li>
<li><label for="credits"><?php echo __('Show credits on each post?')?></label><input type="checkbox" name="credits" checked="checked" class="check" /></li>
<li>
<input name="add" type="submit" value="<?php echo __("Add"); ?>" />
</li>
</ul>
</fieldset>
</form>
<div id="feedlist">
<ul>
<?php
$actual_feeds = $f->getFeedList();
foreach($actual_feeds as $feed){
if($feed['error']>0){
echo '<li class="feederror"><a href="feeds.php?delete='.$feed['id_feed'].'" title="'.__('Delete this Feed').'" class="action"><img title="" alt="" src="css/images/delete.png"/></a><span class="status">'.__('Error updating').'</span> '.((!empty($feed['title']))? $feed['title'] : $feed['url']).'</li>';
}else{
echo '<li><a href="feeds.php?delete='.$feed['id_feed'].'" title="'.__('Delete this Feed').'" class="action"><img title="" alt="" src="css/images/delete.png"/></a><span class="status" title="'.__('Last update').': '.$feed['updated_at'].'">'.__('Importing').'</span> '.((!empty($feed['title']))? $feed['title'] : $feed['url']).'</li>';
}
}
?>
</ul>
</div>
</div>
<div class="footer-box">&nbsp;</div>
</div>
</div>
<div id="foot">
<a href="http://www.gelatocms.com/" title="gelato CMS">gelato CMS</a> :: PHP/MySQL Tumblelog Content Management System.
</div>
</div>
</body>
</html>
<?php
} else {
header("Location: ".$conf->urlGelato."/login.php");
}
?>

View File

@ -317,6 +317,7 @@ if ($user->isAdmin()) {
<h3>Manage</h3>
<li><a href="<?php echo $conf->urlGelato;?>/admin/settings.php"><?php echo __("Settings")?></a></li>
<li><a href="<?php echo $conf->urlGelato;?>/admin/options.php"><?php echo __("Options")?></a></li>
<li><a href="<?php echo $conf->urlGelato;?>/admin/feeds.php"><?php echo __("Feeds")?></a></li>
<li><a href="<?php echo $conf->urlGelato;?>/admin/admin.php"><?php echo __("Users")?></a></li>
<li><a href="<?php echo $conf->urlGelato;?>/admin/comments.php"><?php echo __("Comments")?></a></li>
<li class="selected"><a><?php echo __("Posts")?></a></li>

View File

@ -53,6 +53,11 @@ if ($user->isAdmin()) {
die();
}
if (!$tumble->saveOption($_POST["rss_import_frec"], "rss_import_frec")) {
header("Location: ".$conf->urlGelato."/admin/options.php?error=1&des=".$conf->merror);
die();
}
header("Location: ".$conf->urlGelato."/admin/options.php?modified=true");
die();
} else {
@ -203,8 +208,25 @@ if ($user->isAdmin()) {
</li>
<li class="select"><label for="shorten_links"><?php echo __("Shorten long URLs:")?></label>
<select name="shorten_links" id="shorten_links">
<option value="1" <?php if($conf->shorten_links) echo "selected"; ?>><?php echo __("Active")?></option>
<option value="0" <?php if(!$conf->shorten_links) echo "selected"; ?>><?php echo __("Deactive")?></option>
<option value="1" <?php if($conf->shorten_links) echo "selected=\"selected\""; ?>><?php echo __("Active")?></option>
<option value="0" <?php if(!$conf->shorten_links) echo "selected=\"selected\""; ?>><?php echo __("Deactive")?></option>
</select>
</li>
<li class="select"><label for="rss_import_frec"><?php echo __("Import feeds every:")?></label>
<select name="rss_import_frec" id="rss_import_frec">
<option value="5 minutes" <?php if($conf->rssImportFrec == '5 minutes') echo "selected=\"selected\""; ?>>5 <?php echo __("minutes");?></option>
<option value="10 minutes" <?php if($conf->rssImportFrec == '10 minutes') echo "selected=\"selected\""; ?>>10 <?php echo __("minutes");?></option>
<option value="15 minutes" <?php if($conf->rssImportFrec == '15 minutes') echo "selected=\"selected\""; ?>>15 <?php echo __("minutes");?></option>
<option value="30 minutes" <?php if($conf->rssImportFrec == '30 minutes') echo "selected=\"selected\""; ?>>30 <?php echo __("minutes");?></option>
<option value="45 minutes" <?php if($conf->rssImportFrec == '45 minutes') echo "selected=\"selected\""; ?>>45 <?php echo __("minutes");?></option>
<option value="1 hour" <?php if($conf->rssImportFrec == '1 hour') echo "selected=\"selected\""; ?>>1 <?php echo __("hour");?></option>
<option value="2 hours" <?php if($conf->rssImportFrec == '2 hours') echo "selected=\"selected\""; ?>>2 <?php echo __("hours");?></option>
<option value="3 hours" <?php if($conf->rssImportFrec == '3 hours') echo "selected=\"selected\""; ?>>3 <?php echo __("hours");?></option>
<option value="4 hours" <?php if($conf->rssImportFrec == '4 hours') echo "selected=\"selected\""; ?>>4 <?php echo __("hours");?></option>
<option value="6 hours" <?php if($conf->rssImportFrec == '6 hours') echo "selected=\"selected\""; ?>>6 <?php echo __("hours");?></option>
<option value="12 hours" <?php if($conf->rssImportFrec == '12 hours') echo "selected=\"selected\""; ?>>12 <?php echo __("hours");?></option>
<option value="1 day" <?php if($conf->rssImportFrec == '1 day') echo "selected=\"selected\""; ?>>24 <?php echo __("hours");?></option>
</select>
</li>
</ul>

View File

@ -29,7 +29,7 @@ class configuration extends Conexion_Mysql {
var $offset_city;
var $offset_time;
var $shorten_links;
var $rssImportFrec;
function configuration() {
parent::Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
@ -54,6 +54,8 @@ class configuration extends Conexion_Mysql {
$this->offsetTime = $this->get_option("offset_time");
$this->allowComments = $this->get_option("allow_comments");
$this->shorten_links = $this->get_option("shorten_links");
$this->rssImportFrec = $this->get_option("rss_import_frec");
} else {
if($isFeed) {
header("HTTP/1.0 503 Service Unavailable");

141
classes/feeds.class.php Normal file
View File

@ -0,0 +1,141 @@
<?php
if(!defined('entry') || !entry) die('Not a valid page');
/* ===========================
gelato CMS - A PHP based tumblelog CMS
development version
http://www.gelatocms.com/
gelato CMS is a free software licensed under the GPL 2.0
Copyright (C) 2007 by Pedro Santana <pecesama at gmail dot com>
=========================== */
?>
<?php
require_once("configuration.class.php");
require_once("simplepie.class.php");
class feeds extends Conexion_Mysql {
var $conf;
function feeds() {
parent::Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
$this->conf = new configuration();
}
function addFeed($url, $type, $source, $credits){
$f = array();
$f['updated_at'] = '0000-00-00 00:00:00';
$f['error'] = 0;
$f['title'] = '';
$f['url'] = '';
$f['credits'] = $credits;
$f['site_url'] = '';
$f['id_user'] = $_SESSION['user_id'];
switch($source){
case 'Rss': $f['url'] = $url; $f['type'] = $type; break;
case 'VOX': $f['url'] = 'http://{{username}}.vox.com/library/posts/atom.xml'; $f['type'] = 1; break;
case 'Digg': $f['url'] = 'http://digg.com/rss/{{username}}/index2.xml'; $f['type'] = 1; break;
case 'Tumblr': $f['url'] = 'http://{{username}}.tumblr.com/rss'; $f['type'] = 1; break;
/*>>*/ case 'Flickr': $f['url'] = 'http:/flickr.com/photos/{{username}}'; $f['type'] = 2; break;
/*>>*/ case 'Twitter': $f['url'] = 'http://twitter.com/{{username}}'; $f['type'] = 1; break;
case 'Last.fm': $f['url'] = 'http://ws.audioscrobbler.com/1.0/user/{{username}}/recenttracks.rss'; $f['type'] = 1; break;
case 'Blogger': $f['url'] = 'http://{{username}}.blogspot.com/feeds/posts/default'; $f['type'] = 1; break;
case 'Youtube': $f['url'] = 'http://www.youtube.com/rss/user/{{username}}/videos.rss'; $f['type'] = 1; break;
case 'Wordpress.com': $f['url'] = 'http://{{username}}.wordpress.com/feed/'; $f['type'] = 1; break;
default : $f['url'] = ''; break;
}
if(!empty($f['url'])){
$f['url'] = str_replace('{{username}}',$url,$f['url']);
return ($this->insertarDeFormulario($this->conf->tablePrefix."feeds", $f));
}
print_r($_POST);
print_r($f);
}
function removeFeed($id){
return ($this->ejecutarConsulta("DELETE FROM ".$this->conf->tablePrefix."feeds WHERE id_feed=".$id));
}
function updateFeeds(){
$timeToUpdate = trim($this->conf->rssImportFrec). ' ago';
$feeds = $this->getFeedList("WHERE updated_at < '".date("Y-m-d H:i:s",strtotime($timeToUpdate))."'");
foreach($feeds as $feed){
$data = new SimplePie();
$data->feed_url($feed['url']);
$data->cache_location(Absolute_Path."/uploads/CACHE");
$data->init();
$temp = array();
$temp['updated_at'] = date("Y-m-d H:i:s");
if (!empty($data->error)){
// Error report
$temp['error'] = 1;
$this->modificarDeFormulario($this->conf->tablePrefix."feeds", $temp, 'id_feed = '.$feed['id_feed']);
}else{
if($data->data){
$timeFilter = strtotime($timeToUpdate);
foreach($data->get_items() as $post){
if (strtotime($post->get_date("Y-m-d H:i:s")) > strtotime($feed['updated_at'])) {
$newPost = array();
$newPost['id_user'] = $feed['id_user'];
$newPost['title'] = $post->get_title();
$newPost['date'] = $post->get_date("Y-m-d H:i:s");
if($feed['type'] == 1){ //TEXT
$newPost['type'] = 1;
if($post->get_title() != $post->get_description()){
if(strpos($feed['url'],'twitter.com') <= 0){
$newPost['description'] = $post->get_description();
}
}
}elseif($feed['type'] == 2){ //IMAGES
$ma = array();
$url_image = '';
@preg_match_all('/\<img ([^\>]+)/',$post->get_description(), $ma);
@preg_match_all('/src\=\"([^\"]+)\"/',$ma[0][0], $ma);
$url_image = $ma[1][0];
if(empty($url_image)){
/* Theres no image, lets make a text post */
$newPost['type'] = 1;
if($post->get_title() != $post->get_description()){
if(strpos($feed['url'],'twitter.com') <= 0){
$newPost['description'] = $post->get_description();
}
}
}else{
$newPost['type'] = 2;
$newPost['url'] = $url_image;
$newPost['description'] = $post->get_title();
}
}
if($feed['credits'] == 1 && !empty($feed['title'])){
$newPost['description'] .= '<p class="rss-credits">(via <a href="'.((empty($feed['site_url']))? $feed['url'] : $feed['site_url']).'" title="'.$feed['title'].'">'.$feed['title'].'</a>)</p>';
}
$this->insertarDeFormulario($this->conf->tablePrefix."data", $newPost);
}
}
$temp['title'] = (!empty($data->data['info']['title']))? $data->data['info']['title'] : '';
$temp['site_url'] = (!empty($data->data['info']['link']['alternate'][0]))? $data->data['info']['link']['alternate'][0] : $data->data['info']['link'];
$temp['error'] = 0;
$this->modificarDeFormulario($this->conf->tablePrefix."feeds", $temp, 'id_feed = '.$feed['id_feed']);
}
}
}
}
function getFeedList($condition = ''){
$feeds = array();
$this->ejecutarConsulta('SELECT * FROM '.$this->conf->tablePrefix.'feeds '.$condition.' ORDER BY id_feed DESC');
while($feed = mysql_fetch_assoc($this->mid_consulta)){
$feeds[] = $feed;
}
return $feeds;
}
}
?>

View File

@ -107,6 +107,20 @@ class Install {
PRIMARY KEY (`id_comment`)
) ENGINE = MYISAM ;";
$sqlStr[] = "CREATE TABLE `".Table_prefix."feeds` (
`id_feed` int(11) NOT NULL auto_increment,
`url` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`type` tinyint(4) NOT NULL default '1',
`updated_at` datetime NOT NULL,
`error` tinyint(1) NOT NULL default '0',
`credits` int(1) NOT NULL default '0',
`site_url` varchar(255) NOT NULL,
`id_user` int(10) NOT NULL,
PRIMARY KEY (`id_feed`)
) ENGINE=MyISAM ;";
$sqlStr[] = "INSERT INTO `".Table_prefix."config` VALUES (". $this->data['posts_limit'] .", '".$this->data['title']."', '".$this->data['description']."', '".$this->data['lang']."', '".$this->data['template']."', '".$this->data['url_installation']."');";
$sqlStr[] = "INSERT INTO `".Table_prefix."users` VALUES ('', '', '".$this->data['login']."', '".md5($this->data['password'])."', '".$this->data['email']."', '".$this->data['website']."', '".$this->data['about']."');";
$sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('url_friendly', '1');";
@ -115,6 +129,8 @@ class Install {
$sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', '".$this->data['offset_city']."');";
$sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('offset_time', '".$this->data['offset_time']."');";
$sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('shorten_links', '0');";
$sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('rss_import_frec', '5 minutes');";
foreach($sqlStr as $key => $query){
if(!$db->ejecutarConsulta($query)){
return false;
@ -143,20 +159,18 @@ class Install {
function is_gelato_installed(){
if (!$this->check_for_config()){
return false;
} else {/*
} else {
if (!$this->is_db_installed()){
return false;
}
*/
}
return true;
}
/*
function is_db_installed(){
global $db;
if (function_exists($db->ejecutarConsulta)){
$sqlStr = "SELECT * FROM `".Table_prefix."config`";
if($db->ejecutarConsulta($sqlStr)) {
@ -167,7 +181,7 @@ class Install {
}
}
*/
function check_for_config(){
if(!file_exists('config.php')) return false;
if(!defined('DB_Server')) return false;

5449
classes/simplepie.class.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -51,6 +51,20 @@ CREATE TABLE `gel_comments` (
PRIMARY KEY (`id_comment`)
) ENGINE = MYISAM ;
CREATE TABLE `gel_feeds` (
`id_feed` int(11) NOT NULL auto_increment,
`url` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`type` tinyint(4) NOT NULL default '1',
`updated_at` datetime NOT NULL,
`error` tinyint(1) NOT NULL default '0',
`credits` int(1) NOT NULL default '0',
`site_url` varchar(255) NOT NULL,
`id_user` int(10) NOT NULL,
PRIMARY KEY (`id_feed`)
) ENGINE=MyISAM1 ;
-- Example data for table `gel_config`
INSERT INTO `gel_config` VALUES (10, 'Tumble title', 'tumble description', 'en', 'tumblr', 'http://localhost/gelato');
@ -67,3 +81,4 @@ 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');
INSERT INTO `gel_options` VALUES ('rss_import_frec', '5 minutes');

View File

@ -19,8 +19,8 @@
* admin/admin.php
* admin/comments.php
* admin/users.php
* admin/form.autosave.php
* classes/imgsize.php
* admin/feeds.php
*/
@ -43,6 +43,7 @@ require_once("classes/templates.class.php");
require_once("classes/pagination.class.php");
require_once("classes/user.class.php");
require_once("classes/comments.class.php");
require_once("classes/feeds.class.php");
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'mysql_connection.class.php');
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'streams.class.php');
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gettext.class.php');
@ -55,4 +56,8 @@ $tumble = new gelato();
session_start();
$feeds = new feeds();
$feeds->updateFeeds();
unset($feeds);
?>

View File

@ -5,7 +5,7 @@
3) Run the gelato installation script by accessing install.php in your favorite web browser.
* If you installed gelato in the root directory, you should visit: http://example.com/install.php
* If you installed gelato in its own subdirectory called tumblelog, for example, you should visit: http://example.com/tumblelog/install.php
4) Set CHMOD / permission ( Chmod 777 ) to the folder 'uploads'
4) Set CHMOD / permission ( Chmod 777 ) to the folder 'uploads' and the folder 'uploads/CACHE'
That's it! gelato should now be installed.
@ -20,7 +20,7 @@ That's it! gelato should now be installed.
Note: The test data on the script /db/gelato_db.sql use the table prefix 'gel_'
6) Place the gelato files in the desired location on your web server.
Note: The test data on the script /db/gelato_db.sql point the installation to http://localhost/gelato
7) Set CHMOD / permission ( Chmod 777 ) to the folder 'uploads'
7) Set CHMOD / permission ( Chmod 777 ) to the folder 'uploads' and the folder 'uploads/CACHE'
That's it! gelato should now be installed.
Demo user: admin
@ -33,7 +33,7 @@ That's it! gelato should now be installed.
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'
7) Set CHMOD / permission ( Chmod 777 ) to the folder 'uploads' and the folder 'uploads/CACHE'
That's it! gelato should now be updated.

View File

@ -27,7 +27,7 @@ if (!file_exists($configFile)) {
$db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');";
/*$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');";
$db->ejecutarConsulta($sqlStr);
@ -43,7 +43,34 @@ $sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('shorten_links', '0');"
$db->ejecutarConsulta($sqlStr);
AFTER v0.90 */
$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('rss_import_frec', '5 minutes');";
$db->ejecutarConsulta($sqlStr);
$sqlStr = "CREATE TABLE `".Table_prefix."feeds` (
`id_feed` int(11) NOT NULL auto_increment,
`url` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`type` tinyint(4) NOT NULL default '1',
`updated_at` datetime NOT NULL,
`error` tinyint(1) NOT NULL default '0',
`credits` int(1) NOT NULL default '0',
`site_url` varchar(255) NOT NULL,
`id_user` int(10) NOT NULL,
PRIMARY KEY (`id_feed`)
) ENGINE=MyISAM ;";
$db->ejecutarConsulta($sqlStr);
if(!is_dir('upload/CACHE')){
mkdir('upload/CACHE');
chmod('upload/CACHE',777);
}
echo "<p><em>Finished!</em></p>";
echo "<p>Now you are running on the new <strong>0.90</strong> version!!!</p>";
echo "<p>Now you are running on the new <strong>After 0.90</strong> version!!!</p>";
?>