summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-06-22 06:26:20 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-06-22 06:26:20 +0000
commit4f982b73d8269a2dd1e4e935745c7d2143b58b7d (patch)
tree3b2fe858ee42507130633d1774c318789425398f /index.php
parenta3e9705fc2270e6bdc928313f90e2b24e004464b (diff)
downloadblogs-4f982b73d8269a2dd1e4e935745c7d2143b58b7d.tar.gz
blogs-4f982b73d8269a2dd1e4e935745c7d2143b58b7d.tar.bz2
blogs-4f982b73d8269a2dd1e4e935745c7d2143b58b7d.zip
fix home blog setting in admin and make use of it when visiting blogs. this could potentially change the way blogs/index.php displays depending on your settings
Diffstat (limited to 'index.php')
-rw-r--r--index.php32
1 files changed, 10 insertions, 22 deletions
diff --git a/index.php b/index.php
index d23b689..b68ea76 100644
--- a/index.php
+++ b/index.php
@@ -1,32 +1,20 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/index.php,v 1.11 2007/06/15 18:53:17 squareing Exp $
-
- * @package blogss
- * @subpackage functions
- */
-// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
-// All Rights Reserved. See copyright.txt for details and a complete list of authors.
-// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/index.php,v 1.12 2007/06/22 06:26:19 squareing Exp $
/**
* required setup
*/
require_once( '../bit_setup_inc.php' );
-// Is package installed and enabled
-$gBitSystem->verifyPackage( 'blogs' );
-
-// Now check permissions to access this page
-$gBitSystem->verifyPermission( 'p_blogs_view' );
-
-require_once( BLOGS_PKG_PATH.'lookup_blog_inc.php');
-
-$gBitSmarty->assign( 'showEmpty', TRUE );
-
-// Display the template
-$gDefaultCenter = 'bitpackage:blogs/center_list_blog_posts.tpl';
-$gBitSmarty->assign_by_ref( 'gDefaultCenter', $gDefaultCenter );
+if( !@BitBase::verifyId( $_REQUEST['blog_id'] ) && $gBitSystem->isFeatureActive( 'blog_home' )) {
+ $_REQUEST['blog_id'] = $gBitSystem->getConfig( 'blog_home' );
+}
-$gBitSystem->display( 'bitpackage:kernel/dynamic.tpl', 'List Blog Posts' );
+// if we have a blog_id, we display the correct blog - otherwise we simply display recent posts
+if( @BitBase::verifyId( $_REQUEST['blog_id'] )) {
+ include_once( BLOGS_PKG_PATH.'display_bitblog_inc.php' );
+} else {
+ include_once( BLOGS_PKG_PATH.'recent_posts.php' );
+}
?>