summaryrefslogtreecommitdiff
path: root/admin/admin_types.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/admin_types.php')
-rwxr-xr-x[-rw-r--r--]admin/admin_types.php113
1 files changed, 57 insertions, 56 deletions
diff --git a/admin/admin_types.php b/admin/admin_types.php
index 3073b23..44e4a31 100644..100755
--- a/admin/admin_types.php
+++ b/admin/admin_types.php
@@ -1,9 +1,10 @@
<?php
+
// $Header$
require_once '../../kernel/includes/setup_inc.php';
-require_once( ARTICLES_PKG_CLASS_PATH.'BitArticle.php' );
-require_once( ARTICLES_PKG_CLASS_PATH.'BitArticleType.php' );
+use Bitweaver\KernelTools;
+use Bitweaver\Articles\BitArticleType;
// Is package installed and enabled
$gBitSystem->verifyPackage( 'articles' );
@@ -11,60 +12,60 @@ $gBitSystem->verifyPackage( 'articles' );
// Now check permissions to access this page
$gBitSystem->verifyPermission( 'p_articles_admin' );
-$artTypes = array(
- 'use_ratings' => array(
- 'name' => tra( 'Rate' ),
- 'desc' => tra( 'Allow ratings by the author' ),
- ),
- 'show_pre_publ' => array(
- 'name' => tra( 'Show before publish date' ),
- 'desc' => tra( 'non-admins can view before the publish date' ),
- ),
- 'show_post_expire' => array(
- 'name' => tra( 'Show after expire date' ),
- 'desc' => tra( 'non-admins can view after the expire date' ),
- ),
- 'heading_only' => array(
- 'name' => tra( 'Heading only' ),
- 'desc' => tra( 'No article body, heading only' ),
- ),
- 'allow_comments' => array(
- 'name' => tra( 'Comments' ),
- 'desc' => tra( 'Allow comments for this type' ),
- ),
- 'show_image' => array(
- 'name' => tra( 'Show image' ),
- 'desc' => tra( 'Show topic or image' ),
- ),
- 'show_avatar' => array(
- 'name' => tra( 'Show avatar' ),
- 'desc' => tra( 'Show author\'s avatar' ),
- ),
- 'show_author' => array(
- 'name' => tra( 'Show author' ),
- 'desc' => tra( 'Show author\'s name' ),
- ),
- 'show_pubdate' => array(
- 'name' => tra( 'Show publish date' ),
- 'desc' => tra( 'Show publication date' ),
- ),
- 'show_expdate' => array(
- 'name' => tra( 'Show expiration date' ),
- 'desc' => tra( 'Show expiration date' ),
- ),
- 'show_reads' => array(
- 'name' => tra( 'Show reads' ),
- 'desc' => tra( 'Show the number of times an article has been read' ),
- ),
- 'show_size' => array(
- 'name' => tra( 'Show size' ),
- 'desc' => tra( 'Show the size of the article' ),
- ),
- 'creator_edit' => array(
- 'name' => tra( 'Creator can edit' ),
- 'desc' => tra( 'The person who submits an article of this type can edit it' ),
+$artTypes = [
+ 'use_ratings' => [
+ 'name' => KernelTools::tra( 'Rate' ),
+ 'desc' => KernelTools::tra( 'Allow ratings by the author' ),
+ ],
+ 'show_pre_publ' => [
+ 'name' => KernelTools::tra( 'Show before publish date' ),
+ 'desc' => KernelTools::tra( 'non-admins can view before the publish date' ),
+ ],
+ 'show_post_expire' => [
+ 'name' => KernelTools::tra( 'Show after expire date' ),
+ 'desc' => KernelTools::tra( 'non-admins can view after the expire date' ),
+ ],
+ 'heading_only' => [
+ 'name' => KernelTools::tra( 'Heading only' ),
+ 'desc' => KernelTools::tra( 'No article body, heading only' ),
+ ],
+ 'allow_comments' => [
+ 'name' => KernelTools::tra( 'Comments' ),
+ 'desc' => KernelTools::tra( 'Allow comments for this type' ),
+ ],
+ 'show_image' => [
+ 'name' => KernelTools::tra( 'Show image' ),
+ 'desc' => KernelTools::tra( 'Show topic or image' ),
+ ],
+ 'show_avatar' => [
+ 'name' => KernelTools::tra( 'Show avatar' ),
+ 'desc' => KernelTools::tra( 'Show author\'s avatar' ),
+ ],
+ 'show_author' => array(
+ 'name' => KernelTools::tra( 'Show author' ),
+ 'desc' => KernelTools::tra( 'Show author\'s name' ),
),
-);
+ 'show_pubdate' => [
+ 'name' => KernelTools::tra( 'Show publish date' ),
+ 'desc' => KernelTools::tra( 'Show publication date' ),
+ ],
+ 'show_expdate' => [
+ 'name' => KernelTools::tra( 'Show expiration date' ),
+ 'desc' => KernelTools::tra( 'Show expiration date' ),
+ ],
+ 'show_reads' => [
+ 'name' => KernelTools::tra( 'Show reads' ),
+ 'desc' => KernelTools::tra( 'Show the number of times an article has been read' ),
+ ],
+ 'show_size' => [
+ 'name' => KernelTools::tra( 'Show size' ),
+ 'desc' => KernelTools::tra( 'Show the size of the article' ),
+ ],
+ 'creator_edit' => [
+ 'name' => KernelTools::tra( 'Creator can edit' ),
+ 'desc' => KernelTools::tra( 'The person who submits an article of this type can edit it' ),
+ ],
+];
$gBitSmarty->assign( 'artTypes', $artTypes );
$gContent = new BitArticleType( !empty( $_REQUEST['article_type_id'] ) ? $_REQUEST['article_type_id'] : NULL );
@@ -88,4 +89,4 @@ $types = BitArticleType::getTypeList();
$gBitSmarty->assign( 'types', $types );
// Display the template
-$gBitSystem->display( 'bitpackage:articles/admin_types.tpl', tra('Edit Article Types') , array( 'display_mode' => 'admin' ));
+$gBitSystem->display( 'bitpackage:articles/admin_types.tpl', KernelTools::tra('Edit Article Types') , [ 'display_mode' => 'admin' ]);