1 | <?php
|
---|
2 | if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
|
---|
3 | $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
|
---|
4 |
|
---|
5 | eval( '
|
---|
6 | function b_'.$mydirname.'_meta_show($options){
|
---|
7 | return _b_meta_show($options) ;
|
---|
8 | }
|
---|
9 | function b_'.$mydirname.'_meta_edit($options){
|
---|
10 | return _b_meta_edit($options) ;
|
---|
11 | }
|
---|
12 | ' ) ;
|
---|
13 |
|
---|
14 | if( ! defined( 'XPRESS_META_BLOCK_INCLUDED' ) ) {
|
---|
15 | define( 'XPRESS_META_BLOCK_INCLUDED' , 1 ) ;
|
---|
16 |
|
---|
17 | function _b_meta_edit($options)
|
---|
18 | {
|
---|
19 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
20 | $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_meta_block.html' : trim( $options[1] );
|
---|
21 | $wp_link = empty( $options[2] ) ? false : true ;
|
---|
22 | $xoops_link = empty( $options[3] ) ? false : true ;
|
---|
23 | $post_rss = empty( $options[4] ) ? false : true ;
|
---|
24 | $comment_rss = empty( $options[5] ) ? false : true ;
|
---|
25 | $post_new = empty( $options[6] ) ? false : true ;
|
---|
26 | $admin_edit = empty( $options[7] ) ? false : true ;
|
---|
27 | $readme = empty( $options[8] ) ? false : true ;
|
---|
28 | $ch_style = empty( $options[9] ) ? false : true ;
|
---|
29 |
|
---|
30 | require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
|
---|
31 |
|
---|
32 | $form = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
|
---|
33 | $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES));
|
---|
34 | $form .= "<br />";
|
---|
35 | $form .= yes_no_radio_option('options[2]', _MB_XP2_META_WP_LINK , $wp_link) . "<br />\n";
|
---|
36 | $form .= yes_no_radio_option('options[3]', _MB_XP2_META_XOOPS_LINK , $xoops_link) . "<br />\n";
|
---|
37 | $form .= yes_no_radio_option('options[4]', _MB_XP2_META_POST_RSS , $post_rss) . "<br />\n";
|
---|
38 | $form .= yes_no_radio_option('options[5]', _MB_XP2_META_COMMENT_RSS , $comment_rss) . "<br />\n";
|
---|
39 | $form .= yes_no_radio_option('options[6]', _MB_XP2_META_POST_NEW , $post_new) . "<br />\n";
|
---|
40 | $form .= yes_no_radio_option('options[7]', _MB_XP2_META_ADMIN , $admin_edit) . "<br />\n";
|
---|
41 | $form .= yes_no_radio_option('options[8]', _MB_XP2_META_README , $readme) . "<br />\n";
|
---|
42 | $form .= yes_no_radio_option('options[9]', _MB_XP2_META_CH_STYLE , $ch_style) . "\n";
|
---|
43 |
|
---|
44 | return $form;
|
---|
45 | }
|
---|
46 |
|
---|
47 | function _b_meta_show($options)
|
---|
48 | {
|
---|
49 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
50 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
51 | $block_function_name = basename( __FILE__ );
|
---|
52 |
|
---|
53 | require_once $mydirpath.'/include/xpress_block_render.php';
|
---|
54 | return xpress_block_render($mydirname,$block_function_name,$options);
|
---|
55 | }
|
---|
56 | }
|
---|
57 |
|
---|
58 | ?> |
---|