summaryrefslogtreecommitdiff
path: root/bit_setup_inc.php
blob: 5b3bc54a61d610be95f5d2cd50cb679dc00ec882 (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
41
42
43
44
45
46
<?php
global $gBitSystem, $gBitThemes;

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

if( $gBitSystem->isPackageActive( 'boards' ) ) {
	$menuHash = array(
		'package_name'  => BOARDS_PKG_NAME,
		'index_url'     => BOARDS_PKG_URL.'index.php',
		'menu_template' => 'bitpackage:boards/menu_boards.tpl',
	);
	$gBitSystem->registerAppMenu( $menuHash );

	require_once( BOARDS_PKG_PATH.'BitBoard.php' );
	require_once( BOARDS_PKG_PATH.'BitBoardTopic.php' );

	$registerArray = array(
		'content_display_function' => 'boards_content_display',
		'content_preview_function' => 'boards_content_edit',
		'content_edit_function' => 'boards_content_edit',
		'content_store_function' => 'boards_content_store',
		'content_expunge_function' => 'boards_content_expunge',
//		'content_view_tpl' => 'bitpackage:boards/service_view_boards.tpl',
		'content_icon_tpl' => 'bitpackage:boards/boards_service_icons.tpl',
		'content_list_sql_function' => 'boards_content_list_sql',
	);

	if ( !$gBitSystem->isFeatureActive( 'boards_hide_edit_tpl' ) &&
		 !$gBitSystem->isFeatureActive( 'boards_link_by_pigeonholes' ) ) {
		$registerArray['content_edit_mini_tpl'] = 'bitpackage:boards/boards_edit_mini_inc.tpl';
	}

	$gLibertySystem->registerService( LIBERTY_SERVICE_FORUMS, BOARDS_PKG_NAME, $registerArray );

	function boards_get_topic_comment( $pThreadForwardSequence ) {
		return( intval( substr( $pThreadForwardSequence, 0, 9 ) ) );
	}

	$gBitThemes->loadCss(BOARDS_PKG_PATH.'styles/boards.css');
}
?>