summaryrefslogtreecommitdiff
path: root/my.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2006-02-03 19:17:26 +0000
committerChristian Fowler <spider@viovio.com>2006-02-03 19:17:26 +0000
commitdc471e8defa4b80a060605b8f4f9fa6aeefa7cce (patch)
tree2133fd7c65922fcf56f545cfb6b41843ce778473 /my.php
parentd1c9ab2229fd7082fd7500f5458a31876e23f2ac (diff)
downloadusers-dc471e8defa4b80a060605b8f4f9fa6aeefa7cce.tar.gz
users-dc471e8defa4b80a060605b8f4f9fa6aeefa7cce.tar.bz2
users-dc471e8defa4b80a060605b8f4f9fa6aeefa7cce.zip
add permissions and proper handling for edit+view of user homepages and user lists, add user content listing option
Diffstat (limited to 'my.php')
-rw-r--r--my.php59
1 files changed, 31 insertions, 28 deletions
diff --git a/my.php b/my.php
index d570964..10803eb 100644
--- a/my.php
+++ b/my.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/my.php,v 1.11 2006/01/31 16:00:30 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/my.php,v 1.12 2006/02/03 19:17:26 spiderr Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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
*
- * $Id: my.php,v 1.11 2006/01/31 16:00:30 spiderr Exp $
+ * $Id: my.php,v 1.12 2006/02/03 19:17:26 spiderr Exp $
* @package users
* @subpackage functions
*/
@@ -29,34 +29,37 @@ if( !empty( $gBitSystem->mPrefs['custom_user_fields'] ) ) {
$gBitSmarty->assign('customFields', $customFields);
}
-// some content specific offsets and pagination settings
-if( !empty( $_REQUEST['sort_mode'] ) ) {
- $content_sort_mode = $_REQUEST['sort_mode'];
- $gBitSmarty->assign( 'sort_mode', $content_sort_mode );
+if( $gBitSystem->isFeatureActive( 'display_users_content_list' ) ) {
+vd( 'yo' );
+ // some content specific offsets and pagination settings
+ if( !empty( $_REQUEST['sort_mode'] ) ) {
+ $content_sort_mode = $_REQUEST['sort_mode'];
+ $gBitSmarty->assign( 'sort_mode', $content_sort_mode );
+ }
+
+ $max_content = $gBitSystem->mPrefs['maxRecords'];
+ $offset_content = !empty( $_REQUEST['offset'] ) ? $_REQUEST['offset'] : 0;
+ $gBitSmarty->assign( 'curPage', $page = !empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : 1 );
+ $offset_content = ( $page - 1 ) * $gBitSystem->mPrefs['maxRecords'];
+
+ // set the user_id to only display content viewing user
+ $_REQUEST['user_id'] = $gBitUser->mUserId;
+
+ // now that we have all the offsets, we can get the content list
+ include_once( LIBERTY_PKG_PATH.'get_content_list_inc.php' );
+
+ // calculate page number
+ $numPages = ceil( $contentList['cant'] / $gBitSystem->mPrefs['maxRecords'] );
+ $gBitSmarty->assign( 'numPages', $numPages );
+
+ //$gBitSmarty->assign_by_ref('offset', $offset);
+ $gBitSmarty->assign( 'contentSelect', $contentSelect );
+ $gBitSmarty->assign( 'contentTypes', $contentTypes );
+ $gBitSmarty->assign( 'contentList', $contentList['data'] );
+ $gBitSmarty->assign( 'contentCount', $contentList['cant'] );
+ // end of content listing
}
-$max_content = $gBitSystem->mPrefs['maxRecords'];
-$offset_content = !empty( $_REQUEST['offset'] ) ? $_REQUEST['offset'] : 0;
-$gBitSmarty->assign( 'curPage', $page = !empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : 1 );
-$offset_content = ( $page - 1 ) * $gBitSystem->mPrefs['maxRecords'];
-
-// set the user_id to only display content viewing user
-$_REQUEST['user_id'] = $gBitUser->mUserId;
-
-// now that we have all the offsets, we can get the content list
-include_once( LIBERTY_PKG_PATH.'get_content_list_inc.php' );
-
-// calculate page number
-$numPages = ceil( $contentList['cant'] / $gBitSystem->mPrefs['maxRecords'] );
-$gBitSmarty->assign( 'numPages', $numPages );
-
-//$gBitSmarty->assign_by_ref('offset', $offset);
-$gBitSmarty->assign( 'contentSelect', $contentSelect );
-$gBitSmarty->assign( 'contentTypes', $contentTypes );
-$gBitSmarty->assign( 'contentList', $contentList['data'] );
-$gBitSmarty->assign( 'contentCount', $contentList['cant'] );
-// end of content listing
-
$gBitSystem->display( 'bitpackage:users/my_bitweaver.tpl', 'My '.$gBitSystem->getPreference( 'siteTitle' ) );
?>