summaryrefslogtreecommitdiff
path: root/admin/admin_blogs_inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/admin_blogs_inc.php')
-rwxr-xr-x[-rw-r--r--]admin/admin_blogs_inc.php86
1 files changed, 45 insertions, 41 deletions
diff --git a/admin/admin_blogs_inc.php b/admin/admin_blogs_inc.php
index 0a5f0dc..df116c6 100644..100755
--- a/admin/admin_blogs_inc.php
+++ b/admin/admin_blogs_inc.php
@@ -1,87 +1,93 @@
<?php
// $Header$
+/**
+ * required setup
+ */
+namespace Bitweaver\Blogs;
+use Bitweaver\BitBase;
+
// get a list of blogs for the selection of the home blog
-require_once( BLOGS_PKG_CLASS_PATH.'BitBlog.php' );
+
$blog = new BitBlog();
$listHash['sort_mode'] = 'created_desc';
$blogList = $blog->getList( $listHash );
-$gBitSmarty->assignByRef( 'blogList', $blogList );
+$gBitSmarty->assign( 'blogList', $blogList );
if( !empty( $_REQUEST["set_blog_home"] )) {
- $blog_home = @BitBase::verifyId( $_REQUEST['blog_home'] ) ? $_REQUEST['blog_home'] : NULL;
+ $blog_home = BitBase::verifyId( $_REQUEST['blog_home'] ?? 0 ) ? $_REQUEST['blog_home'] : null;
$gBitSystem->storeConfig( "blog_home", $blog_home, BLOGS_PKG_NAME );
$gBitSmarty->assign( 'blog_home', $blog_home );
}
-$formBlogLists = array(
- "blog_list_title" => array(
+$formBlogLists = [
+ "blog_list_title" => [
'label' => 'Title',
- ),
- "blog_list_description" => array(
+ ],
+ "blog_list_description" => [
'label' => 'Description',
- ),
- "blog_list_created" => array(
+ ],
+ "blog_list_created" => [
'label' => 'Creation date',
- ),
- "blog_list_lastmodif" => array(
+ ],
+ "blog_list_lastmodif" => [
'label' => 'Last modification time',
- ),
- "blog_list_user" => array(
+ ],
+ "blog_list_user" => [
'label' => 'Creator',
'note' => 'The creator of a particular blog.',
- ),
- "blog_list_posts" => array(
+ ],
+ "blog_list_posts" => [
'label' => 'Posts',
'note' => 'Number of posts submitted to any given blog.',
- ),
- "blog_list_visits" => array(
+ ],
+ "blog_list_visits" => [
'label' => 'Visits',
'note' => 'Number of times a given blog has been visited.',
- ),
+ ],
/** @TODO: Add back once activity is implemented
- "blog_list_activity" => array(
+ "blog_list_activity" => [
'label' => 'Activity',
'note' => 'This number is an indication of how active a given blog is. The number is calculated based on god knows what...',
- ),
+ ],
**/
-);
+];
$gBitSmarty->assign( 'formBlogLists',$formBlogLists );
-$formBlogFeatures = array(
- "blog_rankings" => array(
+$formBlogFeatures = [
+ "blog_rankings" => [
'label' => 'Rankings',
'note' => 'Enable the use of rankings based on page hits.',
- ),
- "blog_posts_comments" => array(
+ ],
+ "blog_posts_comments" => [
'label' => 'Blog Post Comments',
'note' => 'Allow the addition of comments to blog posts.',
- ),
- "blog_posts_autosplit" => array(
+ ],
+ "blog_posts_autosplit" => [
'label' => 'Use 2 Text Fields To Auto Split Blog Posts',
'note' => 'Display two text fields when editing a post, for intro and read more sections. Disabling will display one text field and requires use of ...split... to create a read more section',
- ),
- "blog_ajax_more" => array(
+ ],
+ "blog_ajax_more" => [
'label' => 'Ajax Read More',
'note' => 'Ajax the "read more" text inline into the short description lists of posts.',
- ),
- "blog_show_image" => array(
+ ],
+ "blog_show_image" => [
'label' => 'Auto Display Primary Attachment',
'note' => 'Blog posts can automatically display any attachment, typically an image, that is marked as the "Primary Attachment" during editing. This is especially useful for automatically inserting a photograph into a post.',
- ),
- "blog_hide_empty_usr_list" => array(
+ ],
+ "blog_hide_empty_usr_list" => [
'label' => 'Hide empty blog message on user pages',
'note' => 'Enable to hide the "No Records Found" on user\'s blog rolls',
- ),
-);
+ ],
+];
$gBitSmarty->assign( 'formBlogFeatures',$formBlogFeatures );
-$formBlogInputs = array(
- "blog_top_post_count" => array(
+$formBlogInputs = [
+ "blog_top_post_count" => [
'label' => 'Top Post Count',
'note' => 'How many posts per blog in the rankings should be shown.',
- ),
-);
+ ],
+];
$gBitSmarty->assign( 'formBlogInputs', $formBlogInputs );
$processForm = set_tab();
@@ -103,5 +109,3 @@ if( $processForm ) {
$gBitSmarty->assign('blog_list_order', $_REQUEST["blog_list_order"]);
$gBitSmarty->assign('blog_list_user_as', $_REQUEST['blog_list_user_as']);
}
-
-?>