summaryrefslogtreecommitdiff
path: root/bit_setup_inc.php
blob: a8124f8f4cf4daa2c7257c9520f96665bafd0d67 (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
<?php
/**
 * @author   xing <xing@synapse.plus.com>
 * @version  $Revision: 1.1 $
 * @package  Pigeonholes
 * @subpackage functions
 */
global $gBitSystem, $gBitUser;
$gBitSystem->registerPackage( 'pigeonholes', dirname( __FILE__).'/' );

define( 'PIGEONHOLES_CONTENT_TYPE_GUID', 'pigeonholes' );

if( $gBitSystem->isPackageActive( 'pigeonholes' ) ) {
	$gLibertySystem->registerService( LIBERTY_SERVICE_CATEGORIZATION, PIGEONHOLES_PKG_NAME, array(
		'content_display_function' => 'display_pigeonholes',
		'content_preview_function' => 'pigeonholes_preview_content',
		'content_edit_function' => 'pigeonholes_input_content',
		'content_store_function' => 'pigeonholes_store_content',
		'content_edit_tpl' => 'bitpackage:pigeonholes/pigeonholes_input_inc.tpl',
		'content_view_tpl' => 'bitpackage:pigeonholes/display_members.tpl',
		'content_nav_tpl' => 'bitpackage:pigeonholes/display_paths.tpl',
	) );

	// include service functions
	require_once( PIGEONHOLES_PKG_PATH.'servicefunctions_inc.php' );

	if( $gBitUser->hasPermission( 'bit_p_view_pigeonholes' ) ) {
		$gBitSystem->registerAppMenu( 'pigeonholes', 'Categories', PIGEONHOLES_PKG_URL.'index.php', 'bitpackage:pigeonholes/menu_pigeonholes.tpl', 'Pigeonholes' );
	}
}
?>