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 = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
|
---|
32 | $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />\n";
|
---|
33 | $form .= "<br />";
|
---|
34 | $form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n";
|
---|
35 | $form .= _MB_XP2_LENGTH .": <input type='text' name='options[3]' value='" . $disp_length . "' /><br />\n";
|
---|
36 | $form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[4]' value='" . $date_format . "' /><br />\n";
|
---|
37 | $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[5]' value='" . $time_format . "' /><br />\n";
|
---|
38 | $form .= "<br />\n";
|
---|
39 | $form .= comment_type_select('options[6]' , $com_select);
|
---|
40 |
|
---|
41 |
|
---|
42 | return $form;
|
---|
43 | }
|
---|
44 |
|
---|
45 | function _b_comments_show($options)
|
---|
46 | {
|
---|
47 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
48 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
49 | $block_function_name = basename( __FILE__ );
|
---|
50 |
|
---|
51 | require_once $mydirpath.'/include/xpress_block_render.php';
|
---|
52 | return xpress_block_render($mydirname,$block_function_name,$options);
|
---|
53 | }
|
---|
54 | }
|
---|
55 | ?> |
---|