blogschapines-svn Mailing List for Blogs Chapines
Status: Beta
Brought to you by:
j_aroche
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(27) |
Sep
(14) |
Oct
(26) |
Nov
(21) |
Dec
(27) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
(30) |
Jun
|
Jul
(1) |
Aug
(3) |
Sep
|
Oct
(6) |
Nov
(30) |
Dec
(9) |
| 2008 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
(8) |
May
(4) |
Jun
|
Jul
(3) |
Aug
(11) |
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
|
From: <j_a...@us...> - 2008-10-06 11:04:55
|
Revision: 268
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=268&view=rev
Author: j_aroche
Date: 2008-10-06 11:00:34 +0000 (Mon, 06 Oct 2008)
Log Message:
-----------
new styles for blogs and pagination notices on home, cats, and blogs
Modified Paths:
--------------
trunk/blogschapines/interface.php
trunk/blogschapines/lib/template-functions.php
trunk/blogschapines/style.css
Modified: trunk/blogschapines/interface.php
===================================================================
--- trunk/blogschapines/interface.php 2008-10-06 09:46:25 UTC (rev 267)
+++ trunk/blogschapines/interface.php 2008-10-06 11:00:34 UTC (rev 268)
@@ -36,10 +36,10 @@
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="StyleSheet" href="<?php site_address(); ?>/style.css" type="text/css" />
+ <link rel="stylesheet" href="<?php site_address(); ?>/style.css" type="text/css" />
<link rel="alternate" type="application/xml" title="<?php site_title(); ?> RSS" href="<?php site_feed() ?>" />
<title><?php page_title(); ?></title>
<meta name="description" content="<?php page_description(); ?>" />
@@ -75,12 +75,14 @@
Interface_Header();
$currentday = '';
+ $notice = true; // flag for pagination notice
?>
<div id="content" >
<?php foreach ($posts as $post) :
$postday=the_date('j \d\e F',$post->post_date);
if ($currentday != $postday) : $currentday = $postday?>
- <h2><?=$currentday?></h2>
+ <h2><?=$currentday?><?php
+ if($notice) { pagination_notice('<span id="pagination">','Página #', '</span>'); $notice=false;}?></h2>
<?endif;?>
<div class="entry">
<h3><a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3>
@@ -116,33 +118,38 @@
<div class="blog-info">
<h2>Blog: <?php blog_url(); ?></h2>
- <?php blog_description( '<div class="blog-desc">Descripción: ', '</div>' ); ?>
+ <?php blog_description( '<div class="blog-desc"><span>Descripción:</span> ', '</div>' ); ?>
<div class="blog-meta">
+ <?php if ( !empty($blog->blog_author) ): ?>
+ <span class="blog-author">Autor: <?=$blog->blog_author;?></span>
+ <?php endif;?>
<span class="blog-category">Categoría: <?php blog_category(); ?></span>
- -
<span class="blog-pingurl"><?php blog_ping_url(); ?></span>
- -
<span class="blog-feed"><?php blog_feed_url(); ?></span>
+ <?php if ( $blog->blog_date > 0): ?>
+ <span class="blog-date">Registrado: <?=the_date('j \d\e F \d\e Y',$blog->blog_date) ?></span>
+ <?php endif; ?>
</div>
</div>
<?php if ($posts) : ?>
+ <?php pagination_notice('<div id="pagination">','Página #', '</div>'); ?>
+ <h2>Ultimas entradas</h2>
<?php foreach ($posts as $post) : ?>
-
<div class="entry">
- <h3><?=date("d/m/Y",$post->post_date) ?> - <a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3>
- <div class="details"></div>
+ <h3><a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3>
+ <div class="details">Fecha: <?=date("d/m/Y",$post->post_date) ?></div>
<div class="content"><?=$post->post_content?></div>
</div>
<?php endforeach; ?>
<?php else : ?>
<div class="noposts">
- <h3>No hay posts en este blog</h3>
+ <h3 class="error">No hay posts en este blog</h3>
<p>No tenemos registrados posts para este blog, puede que aún no se haya hecho una actualización.</p>
</div>
<?php endif; ?>
<div class="nav">
- <?php prev_page('<div class="nav-prev">' , '« Entradas anteriores' , '</div>' ); ?>
+ <?php prev_page('<div class="nav-prev">' , '« Entradas anteriores' , '</div>' ); ?>
<?php next_page('<div class="nav-next">' , 'Entradas siguientes »' , '</div>' ); ?>
</div>
</div> <!--content -->
@@ -169,6 +176,7 @@
</div>
</div>
<?php if ($posts) : ?>
+ <?php pagination_notice('<div id="pagination">','Página #', '</div>'); ?>
<?php foreach ($posts as $post) :
$postday=the_date('j \d\e F',$post->post_date);
if ($currentday != $postday) : $currentday = $postday?>
@@ -187,7 +195,7 @@
<?php endforeach; ?>
<?php else : ?>
<div class="noposts">
- <h3>No hay posts en esta categoría</h3>
+ <h3 class="error">No hay posts en esta categoría</h3>
<p>No tenemos registrados posts para esta categoría, puede que aún no se haya hecho una actualización</p>
</div>
<?php endif; ?>
@@ -219,6 +227,7 @@
</div>
</div>
<?php if ($blogs) : ?>
+ <?php pagination_notice('<div id="pagination">','Página #', '</div>'); ?>
<?php foreach ($blogs as $blog) : ?>
<div class="blog-info">
@@ -234,13 +243,13 @@
<?php endforeach; ?>
<?php else : ?>
<div class="noposts">
- <h3>No hay blogs en esta categoría</h3>
+ <h3 class="error">No hay blogs en esta categoría</h3>
<p>No tenemos registrados blogs para esta categoría, puede que aún no se haya hecho una actualización</p>
</div>
<?php endif; ?>
<div class="nav">
- <?php prev_page('<div class="nav-prev">' , '« Entradas anteriores' , '</div>' ); ?>
- <?php next_page('<div class="nav-next">' , 'Entradas siguientes »' , '</div>' ); ?>
+ <?php prev_page('<div class="nav-next">' , 'Siguientes »' , '</div>' ); ?>
+ <?php next_page('<div class="nav-prev">' , '« Anteriores' , '</div>' ); ?>
</div>
</div> <!--content -->
Modified: trunk/blogschapines/lib/template-functions.php
===================================================================
--- trunk/blogschapines/lib/template-functions.php 2008-10-06 09:46:25 UTC (rev 267)
+++ trunk/blogschapines/lib/template-functions.php 2008-10-06 11:00:34 UTC (rev 268)
@@ -51,12 +51,22 @@
}
}
+function pagination_notice($before, $text , $after) {
+ global $bcdb;
+ $q = &$bcdb->query_vars; //shortcut
+
+ if ( $q['paged'] > 1 ) {
+ echo $before, $text, (int)$q['paged'], $after;
+ }
+}
function page_title($sep = ' » ', $display=true) {
global $config,$bcdb;
$title = $config['site_title'];
+ if ($bcdb->query_vars['paged'] > 1)
+ $sep = ' / Página ' . (int)$bcdb->query_vars['paged'] . $sep;
if ( is_blog() )
$title = $bcdb->get_blog()->blog_title . $sep . $title;
elseif ( is_category() )
Modified: trunk/blogschapines/style.css
===================================================================
--- trunk/blogschapines/style.css 2008-10-06 09:46:25 UTC (rev 267)
+++ trunk/blogschapines/style.css 2008-10-06 11:00:34 UTC (rev 268)
@@ -26,7 +26,7 @@
color:#069;
font-size:2em;
font-weight:bold;
- margin-bottom:4px;}
+ margin:0 0 0.2em;}
#container {
margin: 0 auto;
@@ -50,6 +50,7 @@
#content> h2:first-child{
margin-top:0;}
#content > h2 {
+ color: #218a1e;
margin:0.5em 0;}
.entry {
@@ -71,8 +72,36 @@
.entry .content{
color:#444;
padding: 0.8em 0.8em 0.4em;
- line-height:1.8em;}
+ line-height:1.8em;}
+
+.nav {font-size: 1.2em;}
+.nav-prev {float:left;}
+.nav-next {float:right;}
+
+#pagination {
+ color:#218A1E;
+ float:right;
+ font-size:2em;}
+
+h2 #pagination {
+ font-size:1em;
+ font-weight:normal;
+ margin-top:-1.3em}
+
+.category-info, .blog-info {
+ margin-bottom: 2em;}
+.category-info h2, .blog-info h2 {
+ font-size:1.8em;}
+.category-desc, .blog-desc {
+ font-size:1.2em;
+ margin-bottom:0.5em;}
+
+.blog-desc span {font-weight:bold;}
+
+.blog-meta {padding:5px;}
+.blog-meta span{display:block;}
+
/* ----- Sidebar Stuff ------ */
#sidebar {
float: right;
@@ -106,8 +135,6 @@
clear: both;
font-size: 1.1em;
margin: 0;}
-
-#footer a { color:#003163;}
#suggestform { margin-left: 20px; }
#suggestform input { padding: 3px; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-10-06 09:49:08
|
Revision: 267
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=267&view=rev
Author: j_aroche
Date: 2008-10-06 09:46:25 +0000 (Mon, 06 Oct 2008)
Log Message:
-----------
Fix when the requested page is greater than max_pages
Modified Paths:
--------------
trunk/blogschapines/lib/template-functions.php
Modified: trunk/blogschapines/lib/template-functions.php
===================================================================
--- trunk/blogschapines/lib/template-functions.php 2008-10-06 08:44:21 UTC (rev 266)
+++ trunk/blogschapines/lib/template-functions.php 2008-10-06 09:46:25 UTC (rev 267)
@@ -7,7 +7,7 @@
$q = &$bcdb->query_vars; //shortcut
- if ( $q['paged'] > 1) {
+ if ( $q['paged'] > 1 && $q['paged'] < $bcdb->max_pages ) {
$vars = array();
if ( is_blog() )
@@ -26,6 +26,7 @@
$url = $config['site_address']."/";
echo "$before<a href=\"$url\">$text</a>$after";
}
+
}
function prev_page($before='', $text, $after=''){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-10-06 09:27:25
|
Revision: 266
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=266&view=rev
Author: j_aroche
Date: 2008-10-06 08:44:21 +0000 (Mon, 06 Oct 2008)
Log Message:
-----------
Using array_uniquie()
Modified Paths:
--------------
trunk/blogschapines/lib/query.php
trunk/blogschapines/lib_misc.php
Modified: trunk/blogschapines/lib/query.php
===================================================================
--- trunk/blogschapines/lib/query.php 2008-09-08 08:20:05 UTC (rev 265)
+++ trunk/blogschapines/lib/query.php 2008-10-06 08:44:21 UTC (rev 266)
@@ -328,23 +328,26 @@
if ( !$posts ) return false;
- $blogslist = new UniqueList();
- $catslist = new UniqueList();
+ $blogslist = array();
+ $catslist = array();
- foreach ( $posts as $post ) {
- $blogslist->add( $post->blog_id );
- }
+ foreach ( $posts as $post )
+ $blogslist[]= (int)$post->blog_id;
- $sql = "SELECT * FROM bc_blogs WHERE blog_id IN (" . $blogslist->getlist() . ") ";
+ $blogslist = array_unique($blogslist);
+
+ $sql = "SELECT * FROM bc_blogs WHERE blog_id IN (" . implode(',' , $blogslist) . ") ";
$res = @mysql_query($sql);
if ( !$res ) return false;
while ( $blog= mysql_fetch_object($res) ) {
$this->blogs[$blog->blog_id] = $blog;
- $catslist->add( $blog->category_id );
+ $catslist[]= (int)$blog->category_id;
}
- $sql = "SELECT * FROM bc_categories WHERE category_id IN (" . $catslist->getlist() . ") ";
+ $catslist = array_unique($catslist);
+
+ $sql = "SELECT * FROM bc_categories WHERE category_id IN (" . implode(',' , $catslist) . ") ";
$res = @mysql_query($sql);
if ( !$res ) return false;
Modified: trunk/blogschapines/lib_misc.php
===================================================================
--- trunk/blogschapines/lib_misc.php 2008-09-08 08:20:05 UTC (rev 265)
+++ trunk/blogschapines/lib_misc.php 2008-10-06 08:44:21 UTC (rev 266)
@@ -181,36 +181,6 @@
HTTP_Session::destroy();
}
-// utility class: keeps a list of unique items
-Class UniqueList {
- var $thelist;
- function __construct () {
- $this->thelist = array();
- }
-
- function add($id) {
- foreach ($this->thelist as $element) {
- if ($element == $id)
- return false;
- }
-
- $this->thelist[] = $id;
- return true;
- }
-
- // print the list as comma separated, useful for SQL queries
- function getlist() {
-
- $out = '';
- foreach ($this->thelist as $element) {
- $out.= $element . ", ";
- }
-
- $out = substr($out,0, -2);
- return $out;
- }
-}
-
// Adds a slash to every character.
function slashstring($string) {
$string = preg_replace('/^([0-9])/', '\\\\\\\\\1', $string);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-09-08 08:20:03
|
Revision: 265
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=265&view=rev
Author: j_aroche
Date: 2008-09-08 08:20:05 +0000 (Mon, 08 Sep 2008)
Log Message:
-----------
Only pre get blogs and categories if it's a category or home request.
Modified Paths:
--------------
trunk/blogschapines/index.php
Modified: trunk/blogschapines/index.php
===================================================================
--- trunk/blogschapines/index.php 2008-09-08 08:15:25 UTC (rev 264)
+++ trunk/blogschapines/index.php 2008-09-08 08:20:05 UTC (rev 265)
@@ -34,7 +34,8 @@
}
$posts = $bcdb->get_posts();
- $bcdb->preget_blogs_categories($posts);
+ if ( is_category() || is_home() )
+ $bcdb->preget_blogs_categories($posts);
if ( is_blog() && ($blog = $bcdb->get_blog()) )
Interface_ShowBlog($blog,$posts);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-09-08 08:15:16
|
Revision: 264
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=264&view=rev
Author: j_aroche
Date: 2008-09-08 08:15:25 +0000 (Mon, 08 Sep 2008)
Log Message:
-----------
blog date converted to unix timestamp.
Modified Paths:
--------------
trunk/blogschapines/lib/query.php
Modified: trunk/blogschapines/lib/query.php
===================================================================
--- trunk/blogschapines/lib/query.php 2008-08-30 09:24:53 UTC (rev 263)
+++ trunk/blogschapines/lib/query.php 2008-09-08 08:15:25 UTC (rev 264)
@@ -271,6 +271,11 @@
return false;
}
+ if ( $blog->blog_date != '0000-00-00 00:00:00' )
+ $blog->blog_date = datetime("U",$blog->blog_date);//+$timezone;
+ else
+ $blog->blog_date = 0;
+
if ( $blog->last_update != '0000-00-00 00:00:00' )
$blog->last_update = datetime("U",$blog->last_update);//+$timezone;
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-08-30 09:24:42
|
Revision: 263
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=263&view=rev
Author: j_aroche
Date: 2008-08-30 09:24:53 +0000 (Sat, 30 Aug 2008)
Log Message:
-----------
background image added
Added Paths:
-----------
trunk/blogschapines/images/back-body.png
Property changes on: trunk/blogschapines/images/back-body.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-08-30 09:22:52
|
Revision: 262
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=262&view=rev
Author: j_aroche
Date: 2008-08-30 09:23:02 +0000 (Sat, 30 Aug 2008)
Log Message:
-----------
style fixes.
Modified Paths:
--------------
trunk/blogschapines/interface.php
trunk/blogschapines/lib/template-functions.php
trunk/blogschapines/style.css
Modified: trunk/blogschapines/interface.php
===================================================================
--- trunk/blogschapines/interface.php 2008-08-30 05:36:07 UTC (rev 261)
+++ trunk/blogschapines/interface.php 2008-08-30 09:23:02 UTC (rev 262)
@@ -48,6 +48,7 @@
<div id="container">
<div id="header">
<h1><a href="<?php site_address(); ?>/" title="<?php site_description(); ?>"><?php site_title(); ?></a></h1>
+ <p><?php site_description(); ?></p>
</div>
<?php
}
@@ -78,18 +79,20 @@
<div id="content" >
<?php foreach ($posts as $post) :
$postday=the_date('j \d\e F',$post->post_date);
- if ($currentday != $postday) : $currentday = $postday?>
+ if ($currentday != $postday) : $currentday = $postday?>
<h2><?=$currentday?></h2>
<?endif;?>
- <div class="article">
- <div class="title"><h2><a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h2></div>
- <div class="details">En: <?php blog_permalink($post->blog_id) ?></div>
- <div class="body"><?=$post->post_content?></div>
- <div class="category">Categoría: <?php blog_category($post->blog_id); ?>
- <?php if ($post->postcount>1)
- echo " - Ver las <a href=\"index.php?feed=$post->feed_id\">$post->postcount notas</a> en total";
- ?>
+ <div class="entry">
+ <h3><a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3>
+ <div class="details">En: <?php blog_permalink($post->blog_id) ?>
+ -
+ <span class="category">Categoría: <?php blog_category($post->blog_id); ?></span>
+ <?php if ($post->postcount>1) : ?>-
+ <span class="daycount">
+ Ver las <a href="<?=get_blog_permalink($post->blog_id)?>"><?=$post->postcount?> notas</a> en total
+ </span><?php endif; ?>
</div>
+ <div class="content"><?=$post->post_content?></div>
</div>
<?php endforeach; ?>
<div class="nav">
@@ -126,16 +129,16 @@
<?php if ($posts) : ?>
<?php foreach ($posts as $post) : ?>
- <div class="article">
- <div class="title"><h3><?=date("d/m/Y",$post->post_date) ?> - <a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3></div>
+ <div class="entry">
+ <h3><?=date("d/m/Y",$post->post_date) ?> - <a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3>
<div class="details"></div>
- <div class="body"><?=$post->post_content?></div>
+ <div class="content"><?=$post->post_content?></div>
</div>
<?php endforeach; ?>
<?php else : ?>
<div class="noposts">
<h3>No hay posts en este blog</h3>
- <p>No tenemos registrados posts para este blog, puede que aún no se haya hecho un ping</p>
+ <p>No tenemos registrados posts para este blog, puede que aún no se haya hecho una actualización.</p>
</div>
<?php endif; ?>
<div class="nav">
@@ -171,21 +174,21 @@
if ($currentday != $postday) : $currentday = $postday?>
<h2><?=$currentday?></h2>
<?endif;?>
- <div class="article">
- <div class="title"><h3><a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3></div>
- <div class="details">En: <?php blog_permalink($post->blog_id) ?></div>
- <div class="body"><?=$post->post_content?></div>
- <div class="category">Categoría: <?php blog_category($post->blog_id); ?>
- <?php if ($post->postcount>1)
- echo " - Ver las <a href=\"index.php?feed=$post->feed_id\">$post->postcount notas</a> en total";
- ?>
+ <div class="entry">
+ <h3><a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3>
+ <div class="details">En: <?php blog_permalink($post->blog_id) ?>
+ <?php if ($post->postcount>1) : ?>-
+ <span class="daycount">
+ Ver las <a href="<?=get_blog_permalink($post->blog_id)?>"><?=$post->postcount?> notas</a> en total
+ </span><?php endif; ?>
</div>
+ <div class="content"><?=$post->post_content?></div>
</div>
<?php endforeach; ?>
<?php else : ?>
<div class="noposts">
<h3>No hay posts en esta categoría</h3>
- <p>No tenemos registrados posts para esta categoría, puede que aún no se haya hecho un ping</p>
+ <p>No tenemos registrados posts para esta categoría, puede que aún no se haya hecho una actualización</p>
</div>
<?php endif; ?>
<div class="nav">
@@ -232,7 +235,7 @@
<?php else : ?>
<div class="noposts">
<h3>No hay blogs en esta categoría</h3>
- <p>No tenemos registrados blogs para esta categoría, puede que aún no se haya hecho un ping</p>
+ <p>No tenemos registrados blogs para esta categoría, puede que aún no se haya hecho una actualización</p>
</div>
<?php endif; ?>
<div class="nav">
Modified: trunk/blogschapines/lib/template-functions.php
===================================================================
--- trunk/blogschapines/lib/template-functions.php 2008-08-30 05:36:07 UTC (rev 261)
+++ trunk/blogschapines/lib/template-functions.php 2008-08-30 09:23:02 UTC (rev 262)
@@ -136,13 +136,22 @@
echo $before.$blog->description.$after;
}
-function blog_permalink($blog_id=0) {
+function get_blog_permalink($blog_id=0) {
global $bcdb,$config;
$blog = $bcdb->get_blog($blog_id);
+
+ // todo handle blog slugs here
+ $blog_link = $config['site_address']. "/?blog=$blog->blog_id";
+ return $blog_link;
+}
+
+function blog_permalink($blog_id=0) {
+ global $bcdb;
+ $blog = $bcdb->get_blog($blog_id);
if ( !$blog ) return false;
// todo handle blog slugs here
- $blog_link = $config['site_address']. "/?blog=$blog->blog_id";
+ $blog_link = get_blog_permalink($blog->blog_id);
echo "<a href=\"$blog_link\" title=\"Detalles de este blog\">$blog->blog_title</a>";
}
@@ -229,7 +238,7 @@
$category = $bcdb->get_category($category_id);
//to do: manage category slugs
- $catlink = $config['site_address']."/?catblogs=$category->category_id";
+ $catlink = $config['site_address']."/?cat=$category->category_id";
echo "<a href=\"$catlink\" title=\"Posts en esta categoría\">$text</a>";
}
Modified: trunk/blogschapines/style.css
===================================================================
--- trunk/blogschapines/style.css 2008-08-30 05:36:07 UTC (rev 261)
+++ trunk/blogschapines/style.css 2008-08-30 09:23:02 UTC (rev 262)
@@ -3,138 +3,111 @@
Author: Javier Aroche http://javieraroche.com/
*/
-body {
- background: #E8E8E8;
- font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
- padding-top: 5px;
- margin: 0; }
+body {
+ background:#F3F3F3 url(./images/back-body.png) repeat-x scroll left top;
+ font-family:"Lucida Grande",Verdana,"Bitstream Vera Sans",Arial,sans-serif;
+ font-size:62.5%;
+ text-align:center;
+}
img { border: 0; }
-
a { color: #003163; text-decoration: none; }
a:hover { color:blue; text-decoration: underline; }
+
+h1, h2, h3 {
+ /*font-family:Helvetica,Verdana,"Bitstream Vera Sans",Arial,sans-serif;*/
+ letter-spacing:-1px;
+}
+
+h1 { font-size:2.2em;
+ margin: 0.5em 0;}
+
+h2 {
+ color:#069;
+ font-size:2em;
+ font-weight:bold;
+ margin-bottom:4px;}
-
#container {
margin: 0 auto;
padding: 0;
- background-color: #fff;
+ background-color: #FFF;
text-align: left;
- width: 770px; }
-
+ width: 960px; }
+
#header {
- width: 100%;
height: 100px;
- border-bottom: 2px dashed #EEE;
- margin: 0;
- background: url('images/top.png') top center no-repeat; }
+ padding:1.5em 1em 1em;
+ position:relative;
+ font-size:1.25em;}
-#header img { float:left; margin: 10px 0 0 10px; }
-
-#content {
- padding: 8px 0 0px 10px;
+#content {
+ font-size:1.2em;
+ padding: 0 1.5em;
float: left;
- width: 500px;
- font-size: 0.8em; }
+ width: 600px; }
+
+#content> h2:first-child{
+ margin-top:0;}
+#content > h2 {
+ margin:0.5em 0;}
-.article {
- font-size: 0.95em;
- margin-left: -4px;
- margin-right: 4px;
- padding-top: 4px;
- padding-bottom: 6px;
- font-family:verdana; }
+.entry {
+ margin: 0 0 0.8em 0.8em;
+ padding: 0.5em;
+ overflow:hidden;}
+.entry h3 {
+ font-size:1.5em;
+ margin: 0 0 0.4em;}
+.entry h3 a{
+ color: #0759A3;}
+.entry h3 a:hover {
+ border-bottom:2px solid #0759A3;
+ text-decoration: none !important;}
-.article .title {
- background:#0077C2 url(images/article-top.png) left top no-repeat;
- color:#9AD6D4; }
+.entry .details a {
+ color:#3D9D3B;}
-.article .title h2 {
- font-family:helvetica;
- font-size: 1.5em;
- color:#C4E4F7;
- padding: 5px 3px 3px 10px;
- margin:0;
- font-weight:normal; }
+.entry .content{
+ color:#444;
+ padding: 0.8em 0.8em 0.4em;
+ line-height:1.8em;}
-
-.article .title a {
- border-bottom:1px solid #4A9B99;
- color:#C4E4F7;
- text-decoration: none;
- font-weight:bold; }
-
-.article .title a:hover{
- color:white;
- border-bottom:1px solid white;
- text-decoration: none; }
-
-.article .details {
- height:20px;
- font-size: 0.8em;
- color:#9AD6D4;
- background: #0077C2 url(images/article-bottom.png) right bottom no-repeat;
- padding-left:10px; }
-
-.article .details a{ color:#BFE8E7; }
-
-.article .details a:hover{ color:white; }
-
-.article .body{
- margin: 0 1px 0 1px;
- padding:10px;
- line-height:1.47em;
- background:white url(images/bodyback.gif) top left repeat-x;
- border: 1px solid #EAEAEA;
- overflow: hidden; }
-
-.article .category{
- margin: 0 1px 0 1px;
- padding-left:10px;
- background:white url(images/bodyback.gif) top left repeat-x;
- border: 1px solid #EAEAEA;
- border-top: 0; }
-
-.article .category a { font-weight: bold; }
-
/* ----- Sidebar Stuff ------ */
#sidebar {
float: right;
- width: 230px;
- font-size: 0.8em;
- margin: 6px 6px 0 0; }
+ width: 300px;
+ font-size: 1.2em;
+ margin-right: 0.8em; }
#sidebar ul ul { margin: 0; padding: 0; margin-bottom: 8px; }
#sidebar li, #sidebar ul { margin: 0; padding: 0; list-style: none; }
#sidebar li h3 {
- font-size: 1.05em;
- margin: 0;
- padding: 1px 0 5px 0;
- text-align: center;
- color: black; }
+ font-size: 1.1em;
+ padding: 0.2em;
+ background-color: #0089D3;
+ color:white;
+ margin: 0;
+ letter-spacing:0;}
#sidebar li a { font-weight: bold; }
#sidebar li span a { font-weight: normal; }
-#sidebar li li { color: #00639c; }
+#sidebar li li {
+ color: #00639c;
+ padding:0.2em 0.8em;}
#footer {
- color: white;
- width: 100%;
text-align: center;
- padding: 60px 0 10px 0;
+ padding: 2em;
clear: both;
- font-size: 0.8em;
- margin: 0;
- background: url('images/bottom.png') top center no-repeat #0093DD; }
+ font-size: 1.1em;
+ margin: 0;}
-#footer span { font-size: 0.75em; }
-
-#footer a { color: #e5f2f6; text-decoration: none; }
-#footer a:hover { color: white; text-decoration: underline; }
+#footer a { color:#003163;}
#suggestform { margin-left: 20px; }
#suggestform input { padding: 3px; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-08-30 05:35:56
|
Revision: 261
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=261&view=rev
Author: j_aroche
Date: 2008-08-30 05:36:07 +0000 (Sat, 30 Aug 2008)
Log Message:
-----------
typo error in db_script.sql. field blog_date deleted in table bg_blogs_suggest
Modified Paths:
--------------
trunk/blogschapines/install/db_script.sql
Modified: trunk/blogschapines/install/db_script.sql
===================================================================
--- trunk/blogschapines/install/db_script.sql 2008-08-25 07:38:00 UTC (rev 260)
+++ trunk/blogschapines/install/db_script.sql 2008-08-30 05:36:07 UTC (rev 261)
@@ -35,7 +35,7 @@
`blog_id` int(8) unsigned NOT NULL default '0',
`day` date NOT NULL default '0000-00-00',
`postcount` int(8) unsigned NOT NULL default '0',
- `lastpostid` INT(11) unsigned NOT NULL DEFAULT '0';
+ `lastpostid` INT(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`blog_id`,`day`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@@ -49,7 +49,6 @@
`category_id` int(8) unsigned NOT NULL default '0',
`feed_url` varchar(255) NOT NULL default '',
`blog_title` varchar(255) NOT NULL default '',
- `blog_date` datetime NOT NULL default '0000-00-00 00:00:00',
`description` text NOT NULL,
`blog_url` varchar(255) NOT NULL default '',
`blog_author` varchar(64) NOT NULL default '',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-08-25 07:37:50
|
Revision: 260
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=260&view=rev
Author: j_aroche
Date: 2008-08-25 07:38:00 +0000 (Mon, 25 Aug 2008)
Log Message:
-----------
Removed Paths:
-------------
trunk/blogschapines/templates/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-08-25 07:36:29
|
Revision: 259
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=259&view=rev
Author: j_aroche
Date: 2008-08-25 07:36:38 +0000 (Mon, 25 Aug 2008)
Log Message:
-----------
* month translations.
* posts grouped by date in home page and categories page.
Modified Paths:
--------------
trunk/blogschapines/config-sample.php
trunk/blogschapines/interface.php
trunk/blogschapines/lib/template-functions.php
trunk/blogschapines/lib_misc.php
Modified: trunk/blogschapines/config-sample.php
===================================================================
--- trunk/blogschapines/config-sample.php 2008-08-25 06:04:32 UTC (rev 258)
+++ trunk/blogschapines/config-sample.php 2008-08-25 07:36:38 UTC (rev 259)
@@ -52,6 +52,14 @@
$config['suggest_sendfrom'] = '';
+// Translate Dates to language. Only if you aren't in english.
+$config['translate_date'] = true;
+
+// Month translations in Spanish.
+$config['lang_months'] = array ( 'null', 'Enero', 'Febrero', 'Marzo', 'Abril',
+ 'Mayo', 'Junio', 'Julio', 'Agosto',
+ 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre');
+
// Disable all website? Only if you gonna do some upgrade
$config['site_disable'] = 'n';
Modified: trunk/blogschapines/interface.php
===================================================================
--- trunk/blogschapines/interface.php 2008-08-25 06:04:32 UTC (rev 258)
+++ trunk/blogschapines/interface.php 2008-08-25 07:36:38 UTC (rev 259)
@@ -73,12 +73,16 @@
{
Interface_Header();
+ $currentday = '';
?>
<div id="content" >
- <?php foreach ($posts as $post) : ?>
-
+ <?php foreach ($posts as $post) :
+ $postday=the_date('j \d\e F',$post->post_date);
+ if ($currentday != $postday) : $currentday = $postday?>
+ <h2><?=$currentday?></h2>
+ <?endif;?>
<div class="article">
- <div class="title"><h2><?=date("d/m/Y",$post->post_date) ?> - <a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h2></div>
+ <div class="title"><h2><a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h2></div>
<div class="details">En: <?php blog_permalink($post->blog_id) ?></div>
<div class="body"><?=$post->post_content?></div>
<div class="category">Categoría: <?php blog_category($post->blog_id); ?>
@@ -162,10 +166,13 @@
</div>
</div>
<?php if ($posts) : ?>
- <?php foreach ($posts as $post) : ?>
-
+ <?php foreach ($posts as $post) :
+ $postday=the_date('j \d\e F',$post->post_date);
+ if ($currentday != $postday) : $currentday = $postday?>
+ <h2><?=$currentday?></h2>
+ <?endif;?>
<div class="article">
- <div class="title"><h3><?=date("d/m/Y",$post->post_date) ?> - <a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3></div>
+ <div class="title"><h3><a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3></div>
<div class="details">En: <?php blog_permalink($post->blog_id) ?></div>
<div class="body"><?=$post->post_content?></div>
<div class="category">Categoría: <?php blog_category($post->blog_id); ?>
@@ -326,4 +333,4 @@
<?php
die();
}
-?>
+?>
\ No newline at end of file
Modified: trunk/blogschapines/lib/template-functions.php
===================================================================
--- trunk/blogschapines/lib/template-functions.php 2008-08-25 06:04:32 UTC (rev 258)
+++ trunk/blogschapines/lib/template-functions.php 2008-08-25 07:36:38 UTC (rev 259)
@@ -272,4 +272,19 @@
//TODO: manage pretty urls
return $config['site_address'] . '/?suggest&list';
}
+
+
+function the_date($format, $timestamp) {
+ global $config;
+
+ if ( $config['translate_date'] ) {
+ // month
+ if ( strpos($format,'F')!==false ) {
+ $imonth = idate('m',$timestamp);
+ $format = str_replace('F', slashstring( $config['lang_months'][$imonth]), $format );
+ }
+ }
+
+ return date($format, $timestamp);
+}
?>
\ No newline at end of file
Modified: trunk/blogschapines/lib_misc.php
===================================================================
--- trunk/blogschapines/lib_misc.php 2008-08-25 06:04:32 UTC (rev 258)
+++ trunk/blogschapines/lib_misc.php 2008-08-25 07:36:38 UTC (rev 259)
@@ -210,4 +210,11 @@
return $out;
}
}
+
+// Adds a slash to every character.
+function slashstring($string) {
+ $string = preg_replace('/^([0-9])/', '\\\\\\\\\1', $string);
+ $string = preg_replace('/([a-z])/i', '\\\\\1', $string);
+ return $string;
+}
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-08-25 06:04:22
|
Revision: 258
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=258&view=rev
Author: j_aroche
Date: 2008-08-25 06:04:32 +0000 (Mon, 25 Aug 2008)
Log Message:
-----------
removing timezones, simplepie always uses localtime.
Modified Paths:
--------------
trunk/blogschapines/lib/query.php
Modified: trunk/blogschapines/lib/query.php
===================================================================
--- trunk/blogschapines/lib/query.php 2008-08-24 08:34:53 UTC (rev 257)
+++ trunk/blogschapines/lib/query.php 2008-08-25 06:04:32 UTC (rev 258)
@@ -136,7 +136,7 @@
while ( $blog= mysql_fetch_object($res) ) {
- $blog->blog_date = datetime("U",$blog->blog_date)+$timezone;
+ $blog->blog_date = datetime("U",$blog->blog_date);//+$timezone;
$result[$numrows] = $blog;
$numrows++;
@@ -168,7 +168,7 @@
while ( $blog= mysql_fetch_object($res) ) {
- $blog->blog_date = datetime("U",$blog->blog_date)+$timezone;
+ $blog->blog_date = datetime("U",$blog->blog_date);//+$timezone;
$result[$numrows] = $blog;
$numrows++;
@@ -272,12 +272,12 @@
}
if ( $blog->last_update != '0000-00-00 00:00:00' )
- $blog->last_update = datetime("U",$blog->last_update)+$timezone;
+ $blog->last_update = datetime("U",$blog->last_update);//+$timezone;
else
$blog->last_update = 0;
if ( $blog->lastauto_update != '0000-00-00 00:00:00' )
- $blog->lastauto_update = datetime("U",$blog->lastauto_update)+$timezone;
+ $blog->lastauto_update = datetime("U",$blog->lastauto_update);//+$timezone;
else
$blog->lastauto_update = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-08-24 08:34:43
|
Revision: 257
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=257&view=rev
Author: j_aroche
Date: 2008-08-24 08:34:53 +0000 (Sun, 24 Aug 2008)
Log Message:
-----------
'templates' not longer used.
Removed Paths:
-------------
trunk/blogschapines/templates/footer.html
trunk/blogschapines/templates/suggest_rules.html
Deleted: trunk/blogschapines/templates/footer.html
===================================================================
--- trunk/blogschapines/templates/footer.html 2008-08-24 08:02:54 UTC (rev 256)
+++ trunk/blogschapines/templates/footer.html 2008-08-24 08:34:53 UTC (rev 257)
@@ -1,2 +0,0 @@
-Blogs Chapines: El directorio de blogs escritos por guatemaltecos.<br />
-<span>- (C) 2006 <a href='http://jaroche.wordpress.com' class='headlink'>Javier Aroche</a> -</span>
\ No newline at end of file
Deleted: trunk/blogschapines/templates/suggest_rules.html
===================================================================
--- trunk/blogschapines/templates/suggest_rules.html 2008-08-24 08:02:54 UTC (rev 256)
+++ trunk/blogschapines/templates/suggest_rules.html 2008-08-24 08:34:53 UTC (rev 257)
@@ -1,9 +0,0 @@
-<p>Requisitos del Registro:</p>
-<ul>
-<li>Tu sitio debe ser blog, si no es blog NO se listará.</li>
-<li>El blog debe ser escrito por un guatemalteco o hablar como tema principal de Guatemala. Tu blog debe mostrar alguna evidencia que compruebe esta condición.</li>
-<li>Antes de enviar tu solicitud de inclusión, por favor revisa que no esté ya en el directorio.</li>
-<li>Escoge una única categoría para tu blog, y envíalo sólamente una vez.</li>
-<li>No se aceptarán blogs que incumplan con las leyes aplicables.</li>
-<li>Blogs Chapines se reserva el derecho de aprobar, o rechazar tu blog basado en estas condiciones.</li>
-</ul>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-08-24 08:02:44
|
Revision: 256
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=256&view=rev
Author: j_aroche
Date: 2008-08-24 08:02:54 +0000 (Sun, 24 Aug 2008)
Log Message:
-----------
some post title filter
Modified Paths:
--------------
trunk/blogschapines/lib/ping.php
Modified: trunk/blogschapines/lib/ping.php
===================================================================
--- trunk/blogschapines/lib/ping.php 2008-08-24 07:50:49 UTC (rev 255)
+++ trunk/blogschapines/lib/ping.php 2008-08-24 08:02:54 UTC (rev 256)
@@ -65,10 +65,14 @@
else
$date = $entry->get_date('U') ;
-
$title = strip_tags( $entry->get_title() );
- $title = mysql_escape_string(trim($title));
+ if ($title == '')
+ $title = '(Sin título)';
+ else
+ $title = mysql_escape_string(trim($title));
+
+
// ToDo: detect if allow full feeds posts.
$content = post_excerpt( $entry->get_description() );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-08-24 07:50:38
|
Revision: 255
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=255&view=rev
Author: j_aroche
Date: 2008-08-24 07:50:49 +0000 (Sun, 24 Aug 2008)
Log Message:
-----------
request lookup for suggest form
Modified Paths:
--------------
trunk/blogschapines/index.php
Modified: trunk/blogschapines/index.php
===================================================================
--- trunk/blogschapines/index.php 2008-08-24 07:46:06 UTC (rev 254)
+++ trunk/blogschapines/index.php 2008-08-24 07:50:49 UTC (rev 255)
@@ -1,5 +1,3 @@
-// a programadorcito ni comentarios ni nada xDDDD
-// SiRGt /kick j_aroche xDD
<?php
include ('setup.php');
@@ -15,6 +13,11 @@
include (BCPATH.'lib/ping.php');
ping_blog(); // die here
}
+
+ if ( is_suggest() ) {
+ include (BCPATH.'lib/blog-suggest.php');
+ suggest_blog(); // die here.
+ }
if ( is_page() ) {
$page = $bcdb->get_page();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-08-24 07:45:56
|
Revision: 254
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=254&view=rev
Author: j_aroche
Date: 2008-08-24 07:46:06 +0000 (Sun, 24 Aug 2008)
Log Message:
-----------
blog suggest form updated to new engine.
Modified Paths:
--------------
trunk/blogschapines/lib/blog-suggest.php
trunk/blogschapines/lib/query.php
trunk/blogschapines/lib/template-functions.php
Modified: trunk/blogschapines/lib/blog-suggest.php
===================================================================
--- trunk/blogschapines/lib/blog-suggest.php 2008-08-24 05:06:01 UTC (rev 253)
+++ trunk/blogschapines/lib/blog-suggest.php 2008-08-24 07:46:06 UTC (rev 254)
@@ -1,109 +1,107 @@
<?php
-/* BlogsChapines - Directorio de blogs
- Copyright (C) 2,006 Javier Aroche
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-> Autor: Javier Aroche, j_aroche at users dot sourceforge dot net */
+// suggest.php: Form to suggets new blogs to the directory.
+
+// this file should only be included
+//if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false)
+// die();
-// suggest.php: Formulario para sugerir blogs y agregarlos a la tabla de pendientes.
-
-// muestra el formulario de sugerencia de blogs
-function formulario_sugerir ($title='',$url='',$cat=-1,$desc='',$feed='',$autor='', $mail='')
+function suggest_form ($title='',$url='',$cat=-1,$desc='',$feed='',$autor='', $mail='')
{
- global $script_path;
- $rules = Lib_ImportFile("$script_path/templates/suggest_rules.html");
- $ret =
- "\t<h1>Sugerir Nuevo Blog</h1>\n$rules".
- "\t<form action='suggest.php' method='post' id='suggestform'>\n".
+ global $bcdb;
+ $ret = '
+ <form action="'.get_suggest_blog_url().'" method="post" id="suggestform">
+ <p><label for="blog_title">Título del Blog:</label><br />
+ <input type="text" name="blog_title" id="blog_title" value="'.$title.'" size="22" tabindex="1" /></p>
- "\t<p><label for='blog_title'>(*) Título del Blog:</label><br />\n".
- "\t<input type='text' name='blog_title' id='blog_title' value='$title' size='22' tabindex='1' /></p>\n".
+ <p><label for="blog_dir">Dirección del Blog:</label><br />
+ <input type="text" name="blog_dir" id="blog_dir" value="'.$url.'" size="22" tabindex="2" /></p>
- "\t<p><label for='blog_dir'>(*) Dirección del Blog:</label><br />\n".
- "\t<input type='text' name='blog_dir' id='blog_dir' value='$url' size='22' tabindex='2' /></p>\n".
-
- "\t<p><label for='catgr'>Categoría del Blog: </label><br />\n".
- "\t<select tabindex='3' name='catgr' size='1'>";
+ <p><label for="catgr">Categoría del Blog: </label><br />';
- $res = mysql_query("SELECT category_id,categoryName FROM bc_categories ORDER BY categoryName");
- if ($res && mysql_num_rows($res)>0 ) {
- $ret .= "<option value='-1'> -- Elija una categoría --</option>";
- while ($row=mysql_fetch_object($res)) {
- $ret .= "\t\t<option value='$row->category_id' ";
- if ($cat>=0 && $row->category_id==$cat)
- $ret .= "selected='selected' ";
- $ret.=">$row->categoryName</option>\n";
+ $cats = $bcdb->get_categories();
+ if ( !empty($cats) ) {
+ $ret .= '<select tabindex="3" name="catgr" size="1">
+ <option value="-1">-- Elija una categoría --</option>';
+ foreach ($cats as $category) {
+ if ( $category->category_id <= 0) // for special cats
+ continue;
+
+ $ret .= "\t\t<option value=\"$category->category_id\" ";
+ if ($cat>=0 && $category->category_id==$cat)
+ $ret .= 'selected="selected" ';
+ $ret.=">$category->category_name</option>\n";
}
+ $ret .= "\t</select>\n";
}
-
- $ret .=
- "\t</select>\n".
+ $ret .= '
+ <p><label for="blog_desc">Descripción:</label><br />
+ <textarea name="blog_desc" id="blog_desc" rows="5" cols="40" tabindex="4">'.$desc.'</textarea>
- "\t<p><label for='blog_desc'>(*) Descripción:</label><br />\n".
- "\t<textarea name='blog_desc' id='blog_desc' rows='5' cols='35' tabindex='4'>$desc</textarea>\n".
+ <p><label for="feed_dir">Dirección del Feed:</label><br />
+ <input type="text" name="feed_dir" id="feed_dir" value="'.$feed.'" size="22" tabindex="5" /> (si no sabes que es esto, dejalo en blanco)</p>
- "\t<p><label for='feed_dir'>Dirección del Feed: </label><br />\n".
- "\t<input type='text' name='feed_dir' id='feed_dir' value='$feed' size='22' tabindex='5' /> (si no sabes que es esto, dejalo en blanco)</p>\n".
+ <p><label for="blog_autor">Autor:</label><br />
+ <input type="text" name="blog_autor" id="blog_autor" value="'.$autor.'" size="22" tabindex="6" /></p>
- "\t<p><label for='blog_autor'>(*) Autor: </label><br />\n".
- "\t<input type='text' name='blog_autor' id='blog_autor' value='$autor' size='22' tabindex='6' /></p>\n".
+ <p><label for="correo">Correo de Contacto:</label><br />
+ <input type="text" name="correo" id="correo" value="'.$mail.'" size="22" tabindex="7" /> (no será publicado)</p>
- "\t<p><label for='correo'>(*) Correo de Contacto: </label><br />\n".
- "\t<input type='text' name='correo' id='correo' value='$mail' size='22' tabindex='7' /> (no será publicado)</p>\n".
-
- "\t<p><label>Los campos requeridos estan marcados con: (*)</label><br />\n".
- "\t<p><input id='submit' type='submit' value='Enviar' name='send_data' tabindex='8' /></p>\n".
- "\t</form>\n\n";
+ <p><input id="submit" type="submit" value="Enviar" name="send_data" tabindex="8" /></p>
+ </form>';
return $ret;
+}
+
+function list_suggested_blogs()
+{
+ global $bcdb;
+ $blogs = $bcdb->get_suggested_blogs();
+ if ( !empty($blogs) ) {
+ $page->title = 'Blogs sugeridos pendientes de aprobación';
+ $content .= '<ol>';
+ $alt =0;
+ foreach ($blogs as $blog) {
+ $class = $alt!=0?'class="alt"':'';
+ $catname = $bcdb->get_category( $blog->category_id )->category_name;
+
+ $content .=
+ '<li '.$class.'><p><span class="meta">Título:</span> '.$blog->blog_title.' <span class="meta">URL:</span> '.Lib_URLpartial($blog->blog_url)
+ .' <span class="meta">Categoría:</span> '.$catname.'</p>
+ <p class="blog-desc">'.$blog->description.'</p>
+ <p>Sugerido el '. date("d/m/Y",$blog->suggest_date). '</p></li>';
+
+ $alt = !$alt;
+ }
+ $content .= "</ol>\n\n";
+ } else {
+ $page->title = 'Blogs sugeridos pendientes de aprobación';
+ $content = 'No hay blogs pendientes';
+ }
+
+ $page->name= '';
+ $page->body = $content;
+
+ Interface_Page($page);
+ die; // must die here
}
-
- header('Content-type: text/html');
- include ('setup.php');
- include ('interface.php');
-
- mysql_query("SET CHARACTER SET \x91utf8\x92");
-
+
+function suggest_blog()
+{
+ global $bcdb, $config;
$send_data = isset($_REQUEST['send_data'])?true:false;
$list_blogs = isset($_REQUEST['list'])?true:false;
-
- if ($list_blogs) {
- $res = mysql_query("SELECT `feed_id`,`title`, `url`, `desc`,`date`, `CategoryName` FROM `bc_feedsuggest` INNER JOIN `bc_categories` ON `bc_feedsuggest`.`category_id` = `bc_categories`.`category_id` ORDER BY `date` ASC") or die;
- if ( $res && mysql_num_rows($res)>0 ) {
- $output .="<h1>Blogs sugeridos pendientes de aprobación</h1>\n";
- $output .= "<ol>";
- $alt =0;
- while ($row = mysql_fetch_object($res)) {
- $class = $alt!=0?"class=\"alt\"":"";
- $output .= "<li $class><p><strong>Título</strong>: $row->title <strong>URL</strong>: ".Lib_URLpartial($row->url)." <strong>Categoría</strong>: $row->CategoryName</p>\n";
- $output .= "<p>$row->desc</p>";
- $output .= "<p>Sugerido el ". gmdate("d/m/Y",$row->date+$timezone). "</p></li>\n";
-
- $alt = !$alt;
- }
- $output .= "</ol>";
- Interface_Pagina($output,"Blogs pendientes de aprobación");
- } else
- Interface_Pagina("<h1>No hay blogs pendientes.</h1>","Blogs pendientes de aprobación");
- }
+ if ( $list_blogs )
+ list_suggested_blogs();
- if (!$send_data)
- Interface_Pagina(formulario_sugerir(),"Sugerir Blog");
- else {
+ $page->title = "Sugerir nuevo blog al directorio";
+ $page->name = '';
+
+ if (!$send_data) {
+ $page->body = suggest_form($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail);
+ Interface_Page($page);
+ } else {
// obtener los datos
$blog_title = isset($_REQUEST['blog_title'])?strip_tags($_REQUEST['blog_title']):'';
$blog_url = isset($_REQUEST['blog_dir'])?$_REQUEST['blog_dir']:'';
@@ -112,65 +110,91 @@
$blog_feed = isset($_REQUEST['feed_dir'])?$_REQUEST['feed_dir']:'';
$blog_autor = isset($_REQUEST['blog_autor'])?strip_tags($_REQUEST['blog_autor']):'';
$blog_mail = isset($_REQUEST['correo'])?$_REQUEST['correo']:'';
-
- $blog_title = mysql_real_escape_string(Lib_prepare_string($blog_title));
- $blog_desc = mysql_real_escape_string(Lib_prepare_string($blog_desc));
- $blog_autor = mysql_real_escape_string(Lib_prepare_string($blog_autor));
// Campos requridos
- if ($blog_title=='' || $blog_mail=='' || $blog_desc=='' || $blog_autor=='')
- Interface_Pagina("<h2 class=\"error\">Debes llenar los campos obligatorios.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+ if ($blog_title=='' || $blog_mail=='' || $blog_desc=='' || $blog_autor=='') {
+ $page->body = '<h3 class="error">Debes llenar los campos obligatorios.</h3>' . suggest_form($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail);
+ Interface_Page($page);
+ }
- if ($blog_cat==-1)
- Interface_Pagina("<h2 class=\"error\">Favor seleccione una categoría.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+ if ($blog_cat==-1) {
+ $page->body = '<h3 class="error">Favor seleccione una categoría.</h3>'.suggest_form($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail);
+ Interface_Page($page);
+ }
- if (!Lib_isHttpUrl($blog_url))
- Interface_Pagina("<h2 class=\"error\">La dirección del blog no es válida, recuerde incluir el 'http://'.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+ if ( !Lib_isHttpUrl($blog_url) ) {
+ $page->body = '<h3 class="error">La dirección del blog no es válida, recuerde incluir el http://</h3>'.suggest_form($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail);
+ Interface_Page($page);
+ }
// Ya esta registrada esta URL?
$part_url = Lib_URLpartial($blog_url);
- $res = mysql_query("SELECT `title`,`url`,`desc` FROM `bc_feeds` WHERE url LIKE '%$part_url%'");
+ $res = mysql_query("SELECT `blog_title`,`blog_url`,`description` FROM `bc_blogs` WHERE `blog_url` LIKE '%$part_url%'");
if ($res && mysql_num_rows($res) > 0) {
- $output .= "<h2 class=\"error\">La dirección del blog ya fue registrada:</h2>\n <ul>\n";
- while ( $row = mysql_fetch_object($res) ) {
- $output .= "<li>$row->title ($row->url): $row->desc</li>";
+ $blog = mysql_fetch_object($res);
+ if ( strlen( Lib_URLpartial($blog->blog_url) ) == strlen($part_url) ) {
+ $output .= '<h3 class="error">La dirección del blog ya fue registrada:</h3>
+ <ul>
+ <li>'.$blog->blog_title.' ('.$blog->blog_url.'): '.$blog->description.'</li>
+ </ul>';
+ $page->body = $output. suggest_form($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail);
+ Interface_Page($page);
}
- $output .= "</ul>";
- Interface_Pagina("$output".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
}
// Ya fue sugerida esta URL?
- $res = mysql_query("SELECT `title`,`url`,`desc` FROM `bc_feedsuggest` WHERE url LIKE '%$part_url%'");
+ $res = mysql_query("SELECT `blog_title`,`blog_url`,`description` FROM `bc_blogs_suggest` WHERE blog_url LIKE '%$part_url%'");
if ($res && mysql_num_rows($res) > 0) {
- $output .= "<h2 class=\"error\">La dirección del blog ya fue sugerida:</h2>\n <ul>\n";
- while ( $row = mysql_fetch_object($res) ) {
- $output .= "<li>$row->title ($row->url): $row->desc</li>";
+ $output .= '<h3 class="error">La dirección del blog ya fue sugerida:</h3> <ul>';
+ while ( $blog = mysql_fetch_object($res) ) {
+ $output .= "<li>$blog->blog_title ($blog->blog_url): $blog->description</li>";
}
- $output .= "</ul>";
- Interface_Pagina("$output".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+ $output .= '</ul>';
+ $page->body = $output. suggest_form($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail);
+ Interface_Page($page);
}
- // Feed v\xE1lido?
- if ($blog_feed!='' && !Lib_isHttpUrl($blog_feed))
- Interface_Pagina("<h2 class=\"error\">La dirección del feed no es válida.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+ // Feed válido?
+ if ($blog_feed!='' && !Lib_isHttpUrl($blog_feed)) {
+ $page->body = '<h3 class="error">La dirección del feed no es válida.</h3>'.suggest_form($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail);
+ Interface_Page($page);
+ }
- if (!Lib_isEmail($blog_mail))
- Interface_Pagina("<h2 class=\"error\">La dirección de correo no es válida.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+ if (!Lib_isEmail($blog_mail)) {
+ $page->body = '<h3 class="error">La dirección de correo no es válida.</h3>'.suggest_form($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail);
+ Interface_Page($page);
+ }
+
+ $blog_title = mysql_real_escape_string(trim($blog_title));
+ $blog_desc = mysql_real_escape_string(trim($blog_desc));
+ $blog_autor = mysql_real_escape_string(trim($blog_autor));
- $sql = "INSERT INTO bc_feedsuggest(`feed_id`,`category_id`,`url`,`title`,`desc`,`feed_url`,`autor`,`email`,`date`) VALUES (".
- "NULL,$blog_cat,'$blog_url','$blog_title','$blog_desc','$blog_feed','$blog_autor','$blog_mail',".date("U").")";
+ $sql = "INSERT INTO bc_blogs_suggest(`blog_id`,`category_id`,`blog_url`,`blog_title`,`description`,`feed_url`,`blog_author`,`blog_email`,`suggest_date`) VALUES (".
+ "NULL,$blog_cat,'$blog_url','$blog_title','$blog_desc','$blog_feed','$blog_autor','$blog_mail',NOW())";
mysql_query($sql);
+ //mysql_error();
+ //var_dump($sql);
- mail( get_configval('suggest_sendmails'),
- "Nuevo Blog Sugerido - $blog_url",
- "Saludos,\n\nUn nuevo blog ha sido sugerido en ".get_configval('site_title').": \n ".mb_convert_encoding("Título: $blog_title",'ISO-8859-1','HTML-ENTITIES')."\nURL: $blog_url\n".mb_convert_encoding(nl2br("Descripción: $blog_desc"),'ISO-8859-1','HTML-ENTITIES')."\nContacto: $blog_autor ($blog_mail)\n\nFavor revisarlo y ver si se le puede aprobar.\n\nGracias.",
- "From: ".get_configval('site_title')." <".get_configval('suggest_frommail').">\r\n".
- "Reply-To: $blog_mail");
+ mail( $config['suggest_sendto'],
+ 'Nuevo Blog Sugerido - '.$part_url,
+ 'Nuevo blog sugerido en '.$config['site_title'].':
+ Título: '.$blog_title.'
+ URL: '.$blog_url.'
+ Descripción: '.nl2br($blog_desc).'
+ Contacto: '.$blog_autor.' ('.$blog_mail.')',
+ 'From: '.$config['site_title'].' <'.$config['suggest_sendfrom'] .'>
+ Reply-To: '.$blog_mail);
- Interface_Pagina("<h2>Gracias por Colaborar.</h2>El Blog ha sido agregado a la lista de <a href='suggest.php?list'>blogs por aprobar.</a>","Sugerir Blog");
- }
+ $page->body =
+ '<h2>Gracias por Colaborar.</h2>
+ El Blog ha sido agregado a la lista de <a href="'.get_suggest_blog_list_url().'">blogs por aprobar.</a>';
+ Interface_Page($page);
+ }
+
+ die;
+}
?>
\ No newline at end of file
Modified: trunk/blogschapines/lib/query.php
===================================================================
--- trunk/blogschapines/lib/query.php 2008-08-24 05:06:01 UTC (rev 253)
+++ trunk/blogschapines/lib/query.php 2008-08-24 07:46:06 UTC (rev 254)
@@ -22,6 +22,7 @@
var $is_feed;
var $is_ping;
var $is_page;
+ var $is_sugget;
// cache some objetcs here, avoid duplicate queries
var $blogs;
@@ -58,6 +59,7 @@
$this->is_home = false;
$this->is_feed = false;
$this->is_ping = false;
+ $this->is_sugget = false;
$this->is_page = false;
$this->blogs = array();
$this->categories = array();
@@ -92,6 +94,10 @@
$this->is_ping = true;
}
+ if ( isset( $query_vars['suggest'] ) ) {
+ $this->is_suggest = true;
+ }
+
if ( isset( $query_vars['page'] ) ) {
$q['page'] = preg_replace('|[^a-z0-9_.\-\/]|i', '', $query_vars['page'] );
$this->is_page = true;
@@ -149,6 +155,31 @@
return $result;
}
+ function get_suggested_blogs()
+ {
+ $result = array();
+ $numrows = 0;
+
+ $sql = "SELECT * FROM bc_blogs_suggest ORDER BY suggest_date";
+
+ $res = @mysql_query($sql);
+ if ( !$res )
+ return false;
+
+ while ( $blog= mysql_fetch_object($res) ) {
+
+ $blog->blog_date = datetime("U",$blog->blog_date)+$timezone;
+
+ $result[$numrows] = $blog;
+ $numrows++;
+ }
+
+ $this->numrows=$numrows;
+
+ mysql_free_result($res);
+ return $result;
+ }
+
// --- Get the posts using the query vars
function get_posts()
{
@@ -418,8 +449,13 @@
return $bcdb->is_ping;
}
+function is_suggest() {
+ global $bcdb;
+ return $bcdb->is_suggest;
+}
+
function is_page() {
global $bcdb;
return $bcdb->is_page;
}
-?>
+?>
\ No newline at end of file
Modified: trunk/blogschapines/lib/template-functions.php
===================================================================
--- trunk/blogschapines/lib/template-functions.php 2008-08-24 05:06:01 UTC (rev 253)
+++ trunk/blogschapines/lib/template-functions.php 2008-08-24 07:46:06 UTC (rev 254)
@@ -258,4 +258,18 @@
<?=$after?>
<?php endif;
}
+
+function get_suggest_blog_url() {
+ global $config;
+
+ //TODO: manage pretty urls
+ return $config['site_address'] . '/?suggest';
+}
+
+function get_suggest_blog_list_url() {
+ global $config;
+
+ //TODO: manage pretty urls
+ return $config['site_address'] . '/?suggest&list';
+}
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-08-24 05:05:54
|
Revision: 253
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=253&view=rev
Author: j_aroche
Date: 2008-08-24 05:06:01 +0000 (Sun, 24 Aug 2008)
Log Message:
-----------
removed debug config.
Modified Paths:
--------------
trunk/blogschapines/refresh_rss.php
Modified: trunk/blogschapines/refresh_rss.php
===================================================================
--- trunk/blogschapines/refresh_rss.php 2008-07-21 22:07:34 UTC (rev 252)
+++ trunk/blogschapines/refresh_rss.php 2008-08-24 05:06:01 UTC (rev 253)
@@ -5,10 +5,9 @@
include ('setup.php');
include (BCPATH.'lib/ping.php');
- $allfeeds = isset($_REQUEST['allfeeds'])?true:false;
- //$debug = get_configval('site_debug')=='y'?true:false;
+ $allfeeds = isset($_REQUEST['allfeeds'])?true:false;
$pingtime = (int) $config['autoupdate_time'];
- $count = (int) 5;//$config['autoupdate_feeds'];
+ $count = (int) $config['autoupdate_feeds'];
if (!$pingtime || !$count)
die('Bad configuration values');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lr...@us...> - 2008-07-21 22:07:24
|
Revision: 252
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=252&view=rev
Author: lreyes6
Date: 2008-07-21 22:07:34 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
probando escritura en branch (SiRGt es inocente)
Modified Paths:
--------------
trunk/blogschapines/index.php
Modified: trunk/blogschapines/index.php
===================================================================
--- trunk/blogschapines/index.php 2008-07-21 06:52:07 UTC (rev 251)
+++ trunk/blogschapines/index.php 2008-07-21 22:07:34 UTC (rev 252)
@@ -1,3 +1,5 @@
+// a programadorcito ni comentarios ni nada xDDDD
+// SiRGt /kick j_aroche xDD
<?php
include ('setup.php');
@@ -4,24 +6,24 @@
include (BCPATH.'interface.php');
// cargar parametros
- $bcdb->init($_REQUEST);
-
- if ( is_feed() )
- include (BCPATH.'lib/rss.php'); // die here
-
- if ( is_ping() ) {
- include (BCPATH.'lib/ping.php');
- ping_blog(); // die here
+ $bcdb->init($_REQUEST);
+
+ if ( is_feed() )
+ include (BCPATH.'lib/rss.php'); // die here
+
+ if ( is_ping() ) {
+ include (BCPATH.'lib/ping.php');
+ ping_blog(); // die here
}
-
- if ( is_page() ) {
- $page = $bcdb->get_page();
- if ( $page )
- Interface_Page($page);
- else
- Interface_404();
- }
+ if ( is_page() ) {
+ $page = $bcdb->get_page();
+ if ( $page )
+ Interface_Page($page);
+ else
+ Interface_404();
+ }
+
// before query posts, check if should query for blogs
if ( is_categoryblogs() && ($category = $bcdb->get_category()) ) {
$blogs = $bcdb->get_blogs();
@@ -42,4 +44,4 @@
else
Interface_404();
-?>
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-07-21 06:52:07
|
Revision: 251
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=251&view=rev
Author: j_aroche
Date: 2008-07-21 06:52:07 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
suggest.php moved tu /lib/blog-suggest.php
Added Paths:
-----------
trunk/blogschapines/lib/blog-suggest.php
Removed Paths:
-------------
trunk/blogschapines/suggest.php
Copied: trunk/blogschapines/lib/blog-suggest.php (from rev 249, trunk/blogschapines/suggest.php)
===================================================================
--- trunk/blogschapines/lib/blog-suggest.php (rev 0)
+++ trunk/blogschapines/lib/blog-suggest.php 2008-07-21 06:52:07 UTC (rev 251)
@@ -0,0 +1,176 @@
+<?php
+/* BlogsChapines - Directorio de blogs
+ Copyright (C) 2,006 Javier Aroche
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+> Autor: Javier Aroche, j_aroche at users dot sourceforge dot net */
+
+// suggest.php: Formulario para sugerir blogs y agregarlos a la tabla de pendientes.
+
+// muestra el formulario de sugerencia de blogs
+function formulario_sugerir ($title='',$url='',$cat=-1,$desc='',$feed='',$autor='', $mail='')
+{
+ global $script_path;
+ $rules = Lib_ImportFile("$script_path/templates/suggest_rules.html");
+ $ret =
+ "\t<h1>Sugerir Nuevo Blog</h1>\n$rules".
+ "\t<form action='suggest.php' method='post' id='suggestform'>\n".
+
+ "\t<p><label for='blog_title'>(*) Título del Blog:</label><br />\n".
+ "\t<input type='text' name='blog_title' id='blog_title' value='$title' size='22' tabindex='1' /></p>\n".
+
+ "\t<p><label for='blog_dir'>(*) Dirección del Blog:</label><br />\n".
+ "\t<input type='text' name='blog_dir' id='blog_dir' value='$url' size='22' tabindex='2' /></p>\n".
+
+ "\t<p><label for='catgr'>Categoría del Blog: </label><br />\n".
+ "\t<select tabindex='3' name='catgr' size='1'>";
+
+ $res = mysql_query("SELECT category_id,categoryName FROM bc_categories ORDER BY categoryName");
+ if ($res && mysql_num_rows($res)>0 ) {
+ $ret .= "<option value='-1'> -- Elija una categoría --</option>";
+ while ($row=mysql_fetch_object($res)) {
+ $ret .= "\t\t<option value='$row->category_id' ";
+ if ($cat>=0 && $row->category_id==$cat)
+ $ret .= "selected='selected' ";
+ $ret.=">$row->categoryName</option>\n";
+ }
+ }
+
+ $ret .=
+ "\t</select>\n".
+
+ "\t<p><label for='blog_desc'>(*) Descripción:</label><br />\n".
+ "\t<textarea name='blog_desc' id='blog_desc' rows='5' cols='35' tabindex='4'>$desc</textarea>\n".
+
+ "\t<p><label for='feed_dir'>Dirección del Feed: </label><br />\n".
+ "\t<input type='text' name='feed_dir' id='feed_dir' value='$feed' size='22' tabindex='5' /> (si no sabes que es esto, dejalo en blanco)</p>\n".
+
+ "\t<p><label for='blog_autor'>(*) Autor: </label><br />\n".
+ "\t<input type='text' name='blog_autor' id='blog_autor' value='$autor' size='22' tabindex='6' /></p>\n".
+
+ "\t<p><label for='correo'>(*) Correo de Contacto: </label><br />\n".
+ "\t<input type='text' name='correo' id='correo' value='$mail' size='22' tabindex='7' /> (no será publicado)</p>\n".
+
+ "\t<p><label>Los campos requeridos estan marcados con: (*)</label><br />\n".
+ "\t<p><input id='submit' type='submit' value='Enviar' name='send_data' tabindex='8' /></p>\n".
+ "\t</form>\n\n";
+
+ return $ret;
+}
+
+ header('Content-type: text/html');
+ include ('setup.php');
+ include ('interface.php');
+
+ mysql_query("SET CHARACTER SET \x91utf8\x92");
+
+ $send_data = isset($_REQUEST['send_data'])?true:false;
+ $list_blogs = isset($_REQUEST['list'])?true:false;
+
+
+ if ($list_blogs) {
+ $res = mysql_query("SELECT `feed_id`,`title`, `url`, `desc`,`date`, `CategoryName` FROM `bc_feedsuggest` INNER JOIN `bc_categories` ON `bc_feedsuggest`.`category_id` = `bc_categories`.`category_id` ORDER BY `date` ASC") or die;
+ if ( $res && mysql_num_rows($res)>0 ) {
+ $output .="<h1>Blogs sugeridos pendientes de aprobación</h1>\n";
+ $output .= "<ol>";
+ $alt =0;
+ while ($row = mysql_fetch_object($res)) {
+ $class = $alt!=0?"class=\"alt\"":"";
+ $output .= "<li $class><p><strong>Título</strong>: $row->title <strong>URL</strong>: ".Lib_URLpartial($row->url)." <strong>Categoría</strong>: $row->CategoryName</p>\n";
+ $output .= "<p>$row->desc</p>";
+ $output .= "<p>Sugerido el ". gmdate("d/m/Y",$row->date+$timezone). "</p></li>\n";
+
+ $alt = !$alt;
+ }
+ $output .= "</ol>";
+ Interface_Pagina($output,"Blogs pendientes de aprobación");
+ } else
+ Interface_Pagina("<h1>No hay blogs pendientes.</h1>","Blogs pendientes de aprobación");
+ }
+
+ if (!$send_data)
+ Interface_Pagina(formulario_sugerir(),"Sugerir Blog");
+ else {
+ // obtener los datos
+ $blog_title = isset($_REQUEST['blog_title'])?strip_tags($_REQUEST['blog_title']):'';
+ $blog_url = isset($_REQUEST['blog_dir'])?$_REQUEST['blog_dir']:'';
+ $blog_cat = isset($_REQUEST['catgr'])?(int)$_REQUEST['catgr']:0;
+ $blog_desc = isset($_REQUEST['blog_desc'])?strip_tags($_REQUEST['blog_desc']):'';
+ $blog_feed = isset($_REQUEST['feed_dir'])?$_REQUEST['feed_dir']:'';
+ $blog_autor = isset($_REQUEST['blog_autor'])?strip_tags($_REQUEST['blog_autor']):'';
+ $blog_mail = isset($_REQUEST['correo'])?$_REQUEST['correo']:'';
+
+ $blog_title = mysql_real_escape_string(Lib_prepare_string($blog_title));
+ $blog_desc = mysql_real_escape_string(Lib_prepare_string($blog_desc));
+ $blog_autor = mysql_real_escape_string(Lib_prepare_string($blog_autor));
+
+ // Campos requridos
+ if ($blog_title=='' || $blog_mail=='' || $blog_desc=='' || $blog_autor=='')
+ Interface_Pagina("<h2 class=\"error\">Debes llenar los campos obligatorios.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+
+ if ($blog_cat==-1)
+ Interface_Pagina("<h2 class=\"error\">Favor seleccione una categoría.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+
+ if (!Lib_isHttpUrl($blog_url))
+ Interface_Pagina("<h2 class=\"error\">La dirección del blog no es válida, recuerde incluir el 'http://'.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+
+ // Ya esta registrada esta URL?
+ $part_url = Lib_URLpartial($blog_url);
+ $res = mysql_query("SELECT `title`,`url`,`desc` FROM `bc_feeds` WHERE url LIKE '%$part_url%'");
+
+ if ($res && mysql_num_rows($res) > 0) {
+ $output .= "<h2 class=\"error\">La dirección del blog ya fue registrada:</h2>\n <ul>\n";
+ while ( $row = mysql_fetch_object($res) ) {
+ $output .= "<li>$row->title ($row->url): $row->desc</li>";
+ }
+ $output .= "</ul>";
+ Interface_Pagina("$output".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+ }
+
+ // Ya fue sugerida esta URL?
+ $res = mysql_query("SELECT `title`,`url`,`desc` FROM `bc_feedsuggest` WHERE url LIKE '%$part_url%'");
+
+ if ($res && mysql_num_rows($res) > 0) {
+ $output .= "<h2 class=\"error\">La dirección del blog ya fue sugerida:</h2>\n <ul>\n";
+ while ( $row = mysql_fetch_object($res) ) {
+ $output .= "<li>$row->title ($row->url): $row->desc</li>";
+ }
+ $output .= "</ul>";
+ Interface_Pagina("$output".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+ }
+
+
+ // Feed v\xE1lido?
+ if ($blog_feed!='' && !Lib_isHttpUrl($blog_feed))
+ Interface_Pagina("<h2 class=\"error\">La dirección del feed no es válida.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+
+ if (!Lib_isEmail($blog_mail))
+ Interface_Pagina("<h2 class=\"error\">La dirección de correo no es válida.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
+
+ $sql = "INSERT INTO bc_feedsuggest(`feed_id`,`category_id`,`url`,`title`,`desc`,`feed_url`,`autor`,`email`,`date`) VALUES (".
+ "NULL,$blog_cat,'$blog_url','$blog_title','$blog_desc','$blog_feed','$blog_autor','$blog_mail',".date("U").")";
+
+ mysql_query($sql);
+
+ mail( get_configval('suggest_sendmails'),
+ "Nuevo Blog Sugerido - $blog_url",
+ "Saludos,\n\nUn nuevo blog ha sido sugerido en ".get_configval('site_title').": \n ".mb_convert_encoding("Título: $blog_title",'ISO-8859-1','HTML-ENTITIES')."\nURL: $blog_url\n".mb_convert_encoding(nl2br("Descripción: $blog_desc"),'ISO-8859-1','HTML-ENTITIES')."\nContacto: $blog_autor ($blog_mail)\n\nFavor revisarlo y ver si se le puede aprobar.\n\nGracias.",
+ "From: ".get_configval('site_title')." <".get_configval('suggest_frommail').">\r\n".
+ "Reply-To: $blog_mail");
+
+ Interface_Pagina("<h2>Gracias por Colaborar.</h2>El Blog ha sido agregado a la lista de <a href='suggest.php?list'>blogs por aprobar.</a>","Sugerir Blog");
+ }
+?>
\ No newline at end of file
Deleted: trunk/blogschapines/suggest.php
===================================================================
--- trunk/blogschapines/suggest.php 2008-07-21 06:40:09 UTC (rev 250)
+++ trunk/blogschapines/suggest.php 2008-07-21 06:52:07 UTC (rev 251)
@@ -1,176 +0,0 @@
-<?php
-/* BlogsChapines - Directorio de blogs
- Copyright (C) 2,006 Javier Aroche
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-> Autor: Javier Aroche, j_aroche at users dot sourceforge dot net */
-
-// suggest.php: Formulario para sugerir blogs y agregarlos a la tabla de pendientes.
-
-// muestra el formulario de sugerencia de blogs
-function formulario_sugerir ($title='',$url='',$cat=-1,$desc='',$feed='',$autor='', $mail='')
-{
- global $script_path;
- $rules = Lib_ImportFile("$script_path/templates/suggest_rules.html");
- $ret =
- "\t<h1>Sugerir Nuevo Blog</h1>\n$rules".
- "\t<form action='suggest.php' method='post' id='suggestform'>\n".
-
- "\t<p><label for='blog_title'>(*) Título del Blog:</label><br />\n".
- "\t<input type='text' name='blog_title' id='blog_title' value='$title' size='22' tabindex='1' /></p>\n".
-
- "\t<p><label for='blog_dir'>(*) Dirección del Blog:</label><br />\n".
- "\t<input type='text' name='blog_dir' id='blog_dir' value='$url' size='22' tabindex='2' /></p>\n".
-
- "\t<p><label for='catgr'>Categoría del Blog: </label><br />\n".
- "\t<select tabindex='3' name='catgr' size='1'>";
-
- $res = mysql_query("SELECT category_id,categoryName FROM bc_categories ORDER BY categoryName");
- if ($res && mysql_num_rows($res)>0 ) {
- $ret .= "<option value='-1'> -- Elija una categoría --</option>";
- while ($row=mysql_fetch_object($res)) {
- $ret .= "\t\t<option value='$row->category_id' ";
- if ($cat>=0 && $row->category_id==$cat)
- $ret .= "selected='selected' ";
- $ret.=">$row->categoryName</option>\n";
- }
- }
-
- $ret .=
- "\t</select>\n".
-
- "\t<p><label for='blog_desc'>(*) Descripción:</label><br />\n".
- "\t<textarea name='blog_desc' id='blog_desc' rows='5' cols='35' tabindex='4'>$desc</textarea>\n".
-
- "\t<p><label for='feed_dir'>Dirección del Feed: </label><br />\n".
- "\t<input type='text' name='feed_dir' id='feed_dir' value='$feed' size='22' tabindex='5' /> (si no sabes que es esto, dejalo en blanco)</p>\n".
-
- "\t<p><label for='blog_autor'>(*) Autor: </label><br />\n".
- "\t<input type='text' name='blog_autor' id='blog_autor' value='$autor' size='22' tabindex='6' /></p>\n".
-
- "\t<p><label for='correo'>(*) Correo de Contacto: </label><br />\n".
- "\t<input type='text' name='correo' id='correo' value='$mail' size='22' tabindex='7' /> (no será publicado)</p>\n".
-
- "\t<p><label>Los campos requeridos estan marcados con: (*)</label><br />\n".
- "\t<p><input id='submit' type='submit' value='Enviar' name='send_data' tabindex='8' /></p>\n".
- "\t</form>\n\n";
-
- return $ret;
-}
-
- header('Content-type: text/html');
- include ('setup.php');
- include ('interface.php');
-
- mysql_query("SET CHARACTER SET \x91utf8\x92");
-
- $send_data = isset($_REQUEST['send_data'])?true:false;
- $list_blogs = isset($_REQUEST['list'])?true:false;
-
-
- if ($list_blogs) {
- $res = mysql_query("SELECT `feed_id`,`title`, `url`, `desc`,`date`, `CategoryName` FROM `bc_feedsuggest` INNER JOIN `bc_categories` ON `bc_feedsuggest`.`category_id` = `bc_categories`.`category_id` ORDER BY `date` ASC") or die;
- if ( $res && mysql_num_rows($res)>0 ) {
- $output .="<h1>Blogs sugeridos pendientes de aprobación</h1>\n";
- $output .= "<ol>";
- $alt =0;
- while ($row = mysql_fetch_object($res)) {
- $class = $alt!=0?"class=\"alt\"":"";
- $output .= "<li $class><p><strong>Título</strong>: $row->title <strong>URL</strong>: ".Lib_URLpartial($row->url)." <strong>Categoría</strong>: $row->CategoryName</p>\n";
- $output .= "<p>$row->desc</p>";
- $output .= "<p>Sugerido el ". gmdate("d/m/Y",$row->date+$timezone). "</p></li>\n";
-
- $alt = !$alt;
- }
- $output .= "</ol>";
- Interface_Pagina($output,"Blogs pendientes de aprobación");
- } else
- Interface_Pagina("<h1>No hay blogs pendientes.</h1>","Blogs pendientes de aprobación");
- }
-
- if (!$send_data)
- Interface_Pagina(formulario_sugerir(),"Sugerir Blog");
- else {
- // obtener los datos
- $blog_title = isset($_REQUEST['blog_title'])?strip_tags($_REQUEST['blog_title']):'';
- $blog_url = isset($_REQUEST['blog_dir'])?$_REQUEST['blog_dir']:'';
- $blog_cat = isset($_REQUEST['catgr'])?(int)$_REQUEST['catgr']:0;
- $blog_desc = isset($_REQUEST['blog_desc'])?strip_tags($_REQUEST['blog_desc']):'';
- $blog_feed = isset($_REQUEST['feed_dir'])?$_REQUEST['feed_dir']:'';
- $blog_autor = isset($_REQUEST['blog_autor'])?strip_tags($_REQUEST['blog_autor']):'';
- $blog_mail = isset($_REQUEST['correo'])?$_REQUEST['correo']:'';
-
- $blog_title = mysql_real_escape_string(Lib_prepare_string($blog_title));
- $blog_desc = mysql_real_escape_string(Lib_prepare_string($blog_desc));
- $blog_autor = mysql_real_escape_string(Lib_prepare_string($blog_autor));
-
- // Campos requridos
- if ($blog_title=='' || $blog_mail=='' || $blog_desc=='' || $blog_autor=='')
- Interface_Pagina("<h2 class=\"error\">Debes llenar los campos obligatorios.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
-
- if ($blog_cat==-1)
- Interface_Pagina("<h2 class=\"error\">Favor seleccione una categoría.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
-
- if (!Lib_isHttpUrl($blog_url))
- Interface_Pagina("<h2 class=\"error\">La dirección del blog no es válida, recuerde incluir el 'http://'.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
-
- // Ya esta registrada esta URL?
- $part_url = Lib_URLpartial($blog_url);
- $res = mysql_query("SELECT `title`,`url`,`desc` FROM `bc_feeds` WHERE url LIKE '%$part_url%'");
-
- if ($res && mysql_num_rows($res) > 0) {
- $output .= "<h2 class=\"error\">La dirección del blog ya fue registrada:</h2>\n <ul>\n";
- while ( $row = mysql_fetch_object($res) ) {
- $output .= "<li>$row->title ($row->url): $row->desc</li>";
- }
- $output .= "</ul>";
- Interface_Pagina("$output".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
- }
-
- // Ya fue sugerida esta URL?
- $res = mysql_query("SELECT `title`,`url`,`desc` FROM `bc_feedsuggest` WHERE url LIKE '%$part_url%'");
-
- if ($res && mysql_num_rows($res) > 0) {
- $output .= "<h2 class=\"error\">La dirección del blog ya fue sugerida:</h2>\n <ul>\n";
- while ( $row = mysql_fetch_object($res) ) {
- $output .= "<li>$row->title ($row->url): $row->desc</li>";
- }
- $output .= "</ul>";
- Interface_Pagina("$output".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
- }
-
-
- // Feed v\xE1lido?
- if ($blog_feed!='' && !Lib_isHttpUrl($blog_feed))
- Interface_Pagina("<h2 class=\"error\">La dirección del feed no es válida.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
-
- if (!Lib_isEmail($blog_mail))
- Interface_Pagina("<h2 class=\"error\">La dirección de correo no es válida.</h2>".formulario_sugerir($blog_title,$blog_url,$blog_cat,$blog_desc,$blog_feed,$blog_autor,$blog_mail),"Sugerir Blog");
-
- $sql = "INSERT INTO bc_feedsuggest(`feed_id`,`category_id`,`url`,`title`,`desc`,`feed_url`,`autor`,`email`,`date`) VALUES (".
- "NULL,$blog_cat,'$blog_url','$blog_title','$blog_desc','$blog_feed','$blog_autor','$blog_mail',".date("U").")";
-
- mysql_query($sql);
-
- mail( get_configval('suggest_sendmails'),
- "Nuevo Blog Sugerido - $blog_url",
- "Saludos,\n\nUn nuevo blog ha sido sugerido en ".get_configval('site_title').": \n ".mb_convert_encoding("Título: $blog_title",'ISO-8859-1','HTML-ENTITIES')."\nURL: $blog_url\n".mb_convert_encoding(nl2br("Descripción: $blog_desc"),'ISO-8859-1','HTML-ENTITIES')."\nContacto: $blog_autor ($blog_mail)\n\nFavor revisarlo y ver si se le puede aprobar.\n\nGracias.",
- "From: ".get_configval('site_title')." <".get_configval('suggest_frommail').">\r\n".
- "Reply-To: $blog_mail");
-
- Interface_Pagina("<h2>Gracias por Colaborar.</h2>El Blog ha sido agregado a la lista de <a href='suggest.php?list'>blogs por aprobar.</a>","Sugerir Blog");
- }
-?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-07-21 06:40:06
|
Revision: 250
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=250&view=rev
Author: j_aroche
Date: 2008-07-21 06:40:09 +0000 (Mon, 21 Jul 2008)
Log Message:
-----------
Typo error in interface.php
Modified Paths:
--------------
trunk/blogschapines/interface.php
Modified: trunk/blogschapines/interface.php
===================================================================
--- trunk/blogschapines/interface.php 2008-05-13 07:23:46 UTC (rev 249)
+++ trunk/blogschapines/interface.php 2008-07-21 06:40:09 UTC (rev 250)
@@ -275,7 +275,7 @@
function Interface_Error($msg)
{
- header('HTTP/1.1 500 Interal Server Error');
+ header('HTTP/1.1 500 Internal Server Error');
header('Content-type: text/html');
echo "<?xml version='1.0' encoding='UTF-8'?>\n";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-05-13 07:23:41
|
Revision: 249
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=249&view=rev
Author: j_aroche
Date: 2008-05-13 00:23:46 -0700 (Tue, 13 May 2008)
Log Message:
-----------
adding new field 'lastpostid' to table bc_blogsstats.
Modified Paths:
--------------
trunk/blogschapines/install/db_script.sql
Modified: trunk/blogschapines/install/db_script.sql
===================================================================
--- trunk/blogschapines/install/db_script.sql 2008-05-13 07:23:06 UTC (rev 248)
+++ trunk/blogschapines/install/db_script.sql 2008-05-13 07:23:46 UTC (rev 249)
@@ -2,78 +2,79 @@
--
-- --------------------------------------------------------
---
--- Table structure for table `bc_blogs`
---
-
-CREATE TABLE `bc_blogs` (
- `blog_id` int(11) unsigned NOT NULL auto_increment,
- `category_id` int(8) unsigned NOT NULL default '0',
- `feed_url` varchar(255) NOT NULL default '',
- `blog_title` varchar(255) NOT NULL default '',
- `blog_slug` varchar(255) NOT NULL default '',
- `blog_date` datetime NOT NULL default '0000-00-00 00:00:00',
- `description` text NOT NULL,
- `blog_url` varchar(255) NOT NULL default '',
- `blog_author` varchar(64) NOT NULL default '',
- `blog_email` varchar(255) NOT NULL,
- `last_update` datetime NOT NULL default '0000-00-00 00:00:00',
- `lastauto_update` datetime NOT NULL default '0000-00-00 00:00:00',
- `multiple_autors` tinyint(1) NOT NULL default '0',
- `commercial` tinyint(1) NOT NULL default '0',
- `status` enum('active','suspended','disabled') NOT NULL,
- PRIMARY KEY (`blog_id`),
- KEY `blog_title_key` (`blog_title`),
- KEY `blog_url_key` (`blog_url`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+--
+-- Table structure for table `bc_blogs`
+--
+CREATE TABLE `bc_blogs` (
+ `blog_id` int(11) unsigned NOT NULL auto_increment,
+ `category_id` int(8) unsigned NOT NULL default '0',
+ `feed_url` varchar(255) NOT NULL default '',
+ `blog_title` varchar(255) NOT NULL default '',
+ `blog_slug` varchar(255) NOT NULL default '',
+ `blog_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `description` text NOT NULL,
+ `blog_url` varchar(255) NOT NULL default '',
+ `blog_author` varchar(64) NOT NULL default '',
+ `blog_email` varchar(255) NOT NULL,
+ `last_update` datetime NOT NULL default '0000-00-00 00:00:00',
+ `lastauto_update` datetime NOT NULL default '0000-00-00 00:00:00',
+ `multiple_autors` tinyint(1) NOT NULL default '0',
+ `commercial` tinyint(1) NOT NULL default '0',
+ `status` enum('active','suspended','disabled') NOT NULL,
+ PRIMARY KEY (`blog_id`),
+ KEY `blog_title_key` (`blog_title`),
+ KEY `blog_url_key` (`blog_url`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
--
-- Table structure for table `bc_blogsstats`
--
-CREATE TABLE `bc_blogsstats` (
- `blog_id` int(8) unsigned NOT NULL default '0',
- `day` date NOT NULL default '0000-00-00',
- `postcount` int(8) unsigned NOT NULL default '0',
- PRIMARY KEY (`blog_id`,`day`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-
---
--- Table structure for table `bc_blogs_suggest`
---
-
-CREATE TABLE `bc_blogs_suggest` (
- `blog_id` int(11) unsigned NOT NULL auto_increment,
- `category_id` int(8) unsigned NOT NULL default '0',
- `feed_url` varchar(255) NOT NULL default '',
- `blog_title` varchar(255) NOT NULL default '',
- `blog_date` datetime NOT NULL default '0000-00-00 00:00:00',
- `description` text NOT NULL,
- `blog_url` varchar(255) NOT NULL default '',
- `blog_author` varchar(64) NOT NULL default '',
- `blog_email` varchar(255) NOT NULL,
- `suggest_date` datetime NOT NULL default '0000-00-00 00:00:00',
- `multiple_autors` tinyint(1) NOT NULL default '0',
- `commercial` tinyint(1) NOT NULL default '0',
- PRIMARY KEY (`blog_id`),
- KEY `blogsuggest_title_key` (`blog_title`),
- KEY `blogsuggest_url_key` (`blog_url`)
+CREATE TABLE `bc_blogsstats` (
+ `blog_id` int(8) unsigned NOT NULL default '0',
+ `day` date NOT NULL default '0000-00-00',
+ `postcount` int(8) unsigned NOT NULL default '0',
+ `lastpostid` INT(11) unsigned NOT NULL DEFAULT '0';
+ PRIMARY KEY (`blog_id`,`day`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Table structure for table `bc_blogs_suggest`
+--
+
+CREATE TABLE `bc_blogs_suggest` (
+ `blog_id` int(11) unsigned NOT NULL auto_increment,
+ `category_id` int(8) unsigned NOT NULL default '0',
+ `feed_url` varchar(255) NOT NULL default '',
+ `blog_title` varchar(255) NOT NULL default '',
+ `blog_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `description` text NOT NULL,
+ `blog_url` varchar(255) NOT NULL default '',
+ `blog_author` varchar(64) NOT NULL default '',
+ `blog_email` varchar(255) NOT NULL,
+ `suggest_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `multiple_autors` tinyint(1) NOT NULL default '0',
+ `commercial` tinyint(1) NOT NULL default '0',
+ PRIMARY KEY (`blog_id`),
+ KEY `blogsuggest_title_key` (`blog_title`),
+ KEY `blogsuggest_url_key` (`blog_url`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
-- --------------------------------------------------------
--
-- Table structure for table `bc_categories`
--
-CREATE TABLE `bc_categories` (
- `category_id` int(8) unsigned NOT NULL auto_increment,
- `category_name` varchar(255) NOT NULL default '',
- `category_description` text NOT NULL,
- `category_slug` varchar(255) NOT NULL default '',
- `category_count` int(8) unsigned NOT NULL default '0',
- PRIMARY KEY (`category_id`)
+CREATE TABLE `bc_categories` (
+ `category_id` int(8) unsigned NOT NULL auto_increment,
+ `category_name` varchar(255) NOT NULL default '',
+ `category_description` text NOT NULL,
+ `category_slug` varchar(255) NOT NULL default '',
+ `category_count` int(8) unsigned NOT NULL default '0',
+ PRIMARY KEY (`category_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
@@ -106,17 +107,17 @@
-- Table structure for table `bc_posts`
--
-CREATE TABLE `bc_posts` (
- `post_id` int(11) unsigned NOT NULL auto_increment,
- `blog_id` int(11) unsigned NOT NULL default '0',
- `post_title` varchar(255) NOT NULL default '',
- `post_content` text NOT NULL,
- `post_link` text NOT NULL,
- `post_date` datetime NOT NULL default '0000-00-00 00:00:00',
- `md5_hash` varchar(32) NOT NULL default '',
- PRIMARY KEY (`post_id`),
- KEY `feed_key` (`blog_id`),
- KEY `post_date_key` (`post_date`)
+CREATE TABLE `bc_posts` (
+ `post_id` int(11) unsigned NOT NULL auto_increment,
+ `blog_id` int(11) unsigned NOT NULL default '0',
+ `post_title` varchar(255) NOT NULL default '',
+ `post_content` text NOT NULL,
+ `post_link` text NOT NULL,
+ `post_date` datetime NOT NULL default '0000-00-00 00:00:00',
+ `md5_hash` varchar(32) NOT NULL default '',
+ PRIMARY KEY (`post_id`),
+ KEY `feed_key` (`blog_id`),
+ KEY `post_date_key` (`post_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@@ -126,11 +127,11 @@
-- Table structure for table `bc_users`
--
-CREATE TABLE `bc_users` (
- `user_id` mediumint(8) unsigned NOT NULL auto_increment,
- `login` varchar(32) NOT NULL,
- `pwd` varchar(32) NOT NULL,
- `user_name` varchar(96) NOT NULL,
- `session_id` varchar(32) NOT NULL,
- PRIMARY KEY (`user_id`)
+CREATE TABLE `bc_users` (
+ `user_id` mediumint(8) unsigned NOT NULL auto_increment,
+ `login` varchar(32) NOT NULL,
+ `pwd` varchar(32) NOT NULL,
+ `user_name` varchar(96) NOT NULL,
+ `session_id` varchar(32) NOT NULL,
+ PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-05-13 07:23:01
|
Revision: 248
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=248&view=rev
Author: j_aroche
Date: 2008-05-13 00:23:06 -0700 (Tue, 13 May 2008)
Log Message:
-----------
check if the query success
Modified Paths:
--------------
trunk/blogschapines/lib/ping.php
Modified: trunk/blogschapines/lib/ping.php
===================================================================
--- trunk/blogschapines/lib/ping.php 2008-05-13 07:14:20 UTC (rev 247)
+++ trunk/blogschapines/lib/ping.php 2008-05-13 07:23:06 UTC (rev 248)
@@ -99,7 +99,9 @@
$query = "UPDATE bc_blogsstats SET postcount=postcount+1, lastpostid=$lastpost->post_id WHERE blog_id=$blog_id and day='$day' ";
}
- mysql_query($query);
+ $res = mysql_query($query);
+ if ( !$res ) return 0;
+
$nposts = $nposts + 1;
} else {
$sql = 'SELECT post_id FROM bc_posts WHERE blog_id='.$blog_id.' AND DATE(post_date) = "'. $day .'" ORDER BY post_date DESC LIMIT 1';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-05-13 07:14:12
|
Revision: 247
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=247&view=rev
Author: j_aroche
Date: 2008-05-13 00:14:20 -0700 (Tue, 13 May 2008)
Log Message:
-----------
New config variable: 'rss_timeout'
Modified Paths:
--------------
trunk/blogschapines/config-sample.php
Modified: trunk/blogschapines/config-sample.php
===================================================================
--- trunk/blogschapines/config-sample.php 2008-05-13 07:03:42 UTC (rev 246)
+++ trunk/blogschapines/config-sample.php 2008-05-13 07:14:20 UTC (rev 247)
@@ -4,53 +4,55 @@
$dbhost = 'localhost'; // host name or ip address
$dbuser = ''; // username with access
$dbpwd = ''; // user password
-$dbname = ''; // database name
-
-// General configuration
-
-// Website title
-$config['site_title'] = 'Blogs Chapines';
-
-// Website description
-$config['site_desc'] = 'Another blog directory';
-
-// Website URL address, without final slash
-$config['site_address'] = 'http://';
-
-// Maximun number of items/posts to show in every page
-$config['max_items'] = 25;
-
-// Show all blogs posts per day
-$config['site_showallposts'] = 'y';
-
-// GMT Offset in hours
-$config['timezone'] = '-6';
-
-
-// RSS Feed language
-$config['rss_lang'] = 'en';
-
-// Maximun number of posts to show in the feeds
-$config['rss_max_items'] = 25;
-
-// How many feeds to update in every auto update
-$config['autoupdate_feeds'] = 30;
-
-// Minutes to add for the next auto update
-$config['autoupdate_time'] = 60;
-
-// Minutes between manual blogs pings
-$config['ping_time'] = 60;
-
-
-// Mails to send the blog suggest notification
-$config['suggest_sendto'] = '';
-
-// Mail where the blog suggest notification will be send from
-$config['suggest_sendfrom'] = '';
-
-
-// Disable all website? Only if you gonna do some upgrade
-$config['site_disable'] = 'n';
+$dbname = ''; // database name
+// General configuration
+
+// Website title
+$config['site_title'] = 'Blogs Chapines';
+
+// Website description
+$config['site_desc'] = 'Another blog directory';
+
+// Website URL address, without final slash
+$config['site_address'] = 'http://';
+
+// Maximun number of items/posts to show in every page
+$config['max_items'] = 25;
+
+// Show all blogs posts per day
+$config['site_showallposts'] = 'y';
+
+// GMT Offset in hours
+$config['timezone'] = '-6';
+
+
+// RSS Feed language
+$config['rss_lang'] = 'en';
+
+// Maximun number of posts to show in the feeds
+$config['rss_max_items'] = 25;
+
+// How many feeds to update in every auto update
+$config['autoupdate_feeds'] = 30;
+
+// Minutes to add for the next auto update
+$config['autoupdate_time'] = 60;
+
+// Minutes between manual blogs pings
+$config['ping_time'] = 60;
+
+// Seconds to wait for the rss response.
+$config['rss_timeout'] = 5;
+
+// Mails to send the blog suggest notification
+$config['suggest_sendto'] = '';
+
+// Mail where the blog suggest notification will be send from
+$config['suggest_sendfrom'] = '';
+
+
+// Disable all website? Only if you gonna do some upgrade
+$config['site_disable'] = 'n';
+
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-05-13 07:03:35
|
Revision: 246
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=246&view=rev
Author: j_aroche
Date: 2008-05-13 00:03:42 -0700 (Tue, 13 May 2008)
Log Message:
-----------
Wrong variable name.
Modified Paths:
--------------
trunk/blogschapines/setup.php
Modified: trunk/blogschapines/setup.php
===================================================================
--- trunk/blogschapines/setup.php 2008-04-21 01:53:09 UTC (rev 245)
+++ trunk/blogschapines/setup.php 2008-05-13 07:03:42 UTC (rev 246)
@@ -26,7 +26,7 @@
include_once (BCPATH.'lib/query.php');
-$bcdb = new CBcdb($dbhost,$dbuser,$dbclave,$dbname);
+$bcdb = new CBcdb($dbhost,$dbuser,$dbpwd,$dbname);
if ( !$bcdb->connected ) {
include_once (BCPATH .'interface.php');
Interface_Error("Couldn't connect to dabatase.");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-04-21 01:53:03
|
Revision: 245
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=245&view=rev
Author: j_aroche
Date: 2008-04-20 18:53:09 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
Don't show php errors by default
Modified Paths:
--------------
trunk/blogschapines/setup.php
Modified: trunk/blogschapines/setup.php
===================================================================
--- trunk/blogschapines/setup.php 2008-04-21 01:42:45 UTC (rev 244)
+++ trunk/blogschapines/setup.php 2008-04-21 01:53:09 UTC (rev 245)
@@ -3,6 +3,8 @@
// this file should only be included
if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !== false)
die();
+
+error_reporting(0);
define('BCPATH', dirname(__FILE__).'/');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <j_a...@us...> - 2008-04-21 01:42:38
|
Revision: 244
http://blogschapines.svn.sourceforge.net/blogschapines/?rev=244&view=rev
Author: j_aroche
Date: 2008-04-20 18:42:45 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
gmdate() changed to date(), SimplePie uses local time
Modified Paths:
--------------
trunk/blogschapines/interface.php
Modified: trunk/blogschapines/interface.php
===================================================================
--- trunk/blogschapines/interface.php 2008-04-21 01:20:27 UTC (rev 243)
+++ trunk/blogschapines/interface.php 2008-04-21 01:42:45 UTC (rev 244)
@@ -78,7 +78,7 @@
<?php foreach ($posts as $post) : ?>
<div class="article">
- <div class="title"><h2><?=gmdate("d/m/Y",$post->post_date) ?> - <a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h2></div>
+ <div class="title"><h2><?=date("d/m/Y",$post->post_date) ?> - <a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h2></div>
<div class="details">En: <?php blog_permalink($post->blog_id) ?></div>
<div class="body"><?=$post->post_content?></div>
<div class="category">Categoría: <?php blog_category($post->blog_id); ?>
@@ -123,7 +123,7 @@
<?php foreach ($posts as $post) : ?>
<div class="article">
- <div class="title"><h3><?=gmdate("d/m/Y",$post->post_date) ?> - <a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3></div>
+ <div class="title"><h3><?=date("d/m/Y",$post->post_date) ?> - <a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3></div>
<div class="details"></div>
<div class="body"><?=$post->post_content?></div>
</div>
@@ -165,7 +165,7 @@
<?php foreach ($posts as $post) : ?>
<div class="article">
- <div class="title"><h3><?=gmdate("d/m/Y",$post->post_date) ?> - <a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3></div>
+ <div class="title"><h3><?=date("d/m/Y",$post->post_date) ?> - <a href="<?=$post->post_link?>" title="Ver Post"><?=$post->post_title?></a></h3></div>
<div class="details">En: <?php blog_permalink($post->blog_id) ?></div>
<div class="body"><?=$post->post_content?></div>
<div class="category">Categoría: <?php blog_category($post->blog_id); ?>
@@ -326,4 +326,4 @@
<?php
die();
}
-?>
\ No newline at end of file
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|