summaryrefslogtreecommitdiff
path: root/bit_setup_inc.php
blob: ce421b9e97b9d5f41923d3855f07b4a2b21e8168 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
 * @package blogs
 */
global $gBitSystem, $gBitUser, $gBitSmarty;

define( 'LIBERTY_SERVICE_BLOGS', 'blogs' );

$registerHash = array(
	'package_name' => 'blogs',
	'package_path' => dirname( __FILE__ ).'/',
	'homeable' => TRUE,
);
$gBitSystem->registerPackage( $registerHash );

if( $gBitSystem->isPackageActive( 'blogs' ) ) {

	if( $gBitUser->hasPermission( 'p_blogs_view' ) ) {
		$menuHash = array(
			'package_name'       => BLOGS_PKG_NAME,
			'index_url'          => BLOGS_PKG_URL.'index.php',
			'menu_template'      => 'bitpackage:blogs/menu_blogs.tpl',
			'admin_comments_url' => KERNEL_PKG_URL.'admin/index.php?page=blogs',
		);
		$gBitSystem->registerAppMenu( $menuHash );

		$gLibertySystem->registerService( 
			LIBERTY_SERVICE_BLOGS, 
			BLOGS_PKG_NAME, 
			array( 'module_display_function'  => 'blogs_module_display', ), 
			array( 
				'description' => tra( 'A module display service which helps hook in javascript necessary when using the center module on other pages. This is a temporary fix to address a limitation of the rendering order in BitThemes and only applies to blog content.' ),
				'required' => TRUE,
			)
		);
	}

	$gBitSystem->registerNotifyEvent( array( "blog_post" => tra("An entry is posted to a blog") ) );

}