1 | <?php
|
---|
2 | if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
|
---|
3 | $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
|
---|
4 |
|
---|
5 | eval( '
|
---|
6 | function b_'.$mydirname.'_comments_show($options){
|
---|
7 | return _b_comments_show($options) ;
|
---|
8 | }
|
---|
9 | function b_'.$mydirname.'_comments_edit($options){
|
---|
10 | return _b_comments_edit($options) ;
|
---|
11 | }
|
---|
12 | ' ) ;
|
---|
13 |
|
---|
14 |
|
---|
15 | if( ! defined( 'XPRESS_COMMENTS_BLOCK_INCLUDED' ) ) {
|
---|
16 | define( 'XPRESS_COMMENTS_BLOCK_INCLUDED' , 1 ) ;
|
---|
17 | function _b_comments_edit($options)
|
---|
18 | {
|
---|
19 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
20 | $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_comments_block.html' : trim( $options[1] );
|
---|
21 | $disp_count = empty( $options[2] ) ? '10' : $options[2] ;
|
---|
22 | $disp_length = empty( $options[3] ) ? '30' : $options[3] ;
|
---|
23 | $date_format = empty( $options[4] ) ? '' : $options[4] ;
|
---|
24 | $time_format = empty( $options[5] ) ? '' : $options[5] ;
|
---|
25 | $com_select = empty( $options[6] ) ? '0' : $options[6] ;
|
---|
26 |
|
---|
27 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
28 |
|
---|
29 | require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
|
---|
30 |
|
---|
31 | $form = javascript_check();
|
---|
32 | $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
|
---|
33 | $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES));
|
---|
34 | $form .= "<br />";
|
---|
35 | $form .= _MB_XP2_COUNT .": <input type='text' size='3' name='options[2]' value='" . $disp_count . "' /><br />\n";
|
---|
36 | $form .= _MB_XP2_LENGTH .": <input type='text' size='3' name='options[3]' value='" . $disp_length . "' /><br />\n";
|
---|
37 | $form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[4]' value='" . $date_format . "' /><br />\n";
|
---|
38 | $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[5]' value='" . $time_format . "' /><br />\n";
|
---|
39 | $form .= "<br />\n";
|
---|
40 | $form .= comment_type_select('options[6]' , $com_select);
|
---|
41 |
|
---|
42 |
|
---|
43 | return $form;
|
---|
44 | }
|
---|
45 |
|
---|
46 | function _b_comments_show($options)
|
---|
47 | {
|
---|
48 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
49 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
50 | $block_function_name = basename( __FILE__ );
|
---|
51 |
|
---|
52 | require_once $mydirpath.'/include/xpress_block_render.php';
|
---|
53 | return xpress_block_render($mydirname,$block_function_name,$options);
|
---|
54 | }
|
---|
55 | }
|
---|
56 | ?> |
---|