diff --git a/0.3/functions.php b/0.3/functions.php index ad2bcb9..54001a5 100755 --- a/0.3/functions.php +++ b/0.3/functions.php @@ -71,9 +71,9 @@ SITE_TITLE="'. $sitename .'" SITE_DESCRIPTION="Site original : '. $sitename .'" SITE_URL="'. $siteurl .'" FEED_URL="'. $rssurl .'" -ARTICLES_PER_PAGE="5" +ARTICLES_PER_PAGE="'. getArticlesPerPage( $type ) .'" UPDATE_INTERVAL="'. getInterval( $type ) .'" -UPDATE_TIMEOUT="30"') ) +UPDATE_TIMEOUT="'. getTimeout( $type ) .'"') ) $error[] = "Impossible d'écrire le fichier vvb.ini"; fclose($fp); } @@ -83,6 +83,17 @@ UPDATE_TIMEOUT="30"') ) return $error; } +function getArticlesPerPage( $type ) { + switch( $type ) { + case 'microblog': + return 20; + case 'shaarli': + return 20; + default: + return 5; + } +} + function getInterval( $type ) { switch( $type ) { case 'microblog': @@ -94,6 +105,17 @@ function getInterval( $type ) { } } +function getTimeout( $type ) { + switch( $type ) { + case 'microblog': + return 30; + case 'shaarli': + return 30; + default: + return 30; + } +} + function updateType($siteurl) { if( strpos($siteurl, 'twitter.com') !== FALSE ) { return array('type' => 'microblog', 'name' => 'twitter'); diff --git a/0.3/index.php b/0.3/index.php index 5cb89ed..5d33fd5 100755 --- a/0.3/index.php +++ b/0.3/index.php @@ -1,4 +1,6 @@