[138] | 1 | <?php
|
---|
| 2 | if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
|
---|
| 3 | $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
|
---|
| 4 |
|
---|
| 5 | eval( '
|
---|
| 6 | function b_'.$mydirname.'_enhanced_show($options){
|
---|
| 7 | return _b_enhanced_show($options) ;
|
---|
| 8 | }
|
---|
| 9 | function b_'.$mydirname.'_enhanced_edit($options){
|
---|
| 10 | return _b_enhanced_edit($options) ;
|
---|
| 11 | }
|
---|
| 12 | ' ) ;
|
---|
| 13 |
|
---|
| 14 | if( ! defined( 'XPRESS_TAG_CLOUD_BLOCK_INCLUDED' ) ) {
|
---|
| 15 | define( 'XPRESS_TAG_CLOUD_BLOCK_INCLUDED' , 1 ) ;
|
---|
| 16 |
|
---|
| 17 | function _b_enhanced_edit($options)
|
---|
| 18 | {
|
---|
| 19 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
| 20 | $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_enhanced_block.html' : trim( $options[1] );
|
---|
| 21 | $include_file = empty( $options[2] ) ? '' : $options[2] ;
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 | $form = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
|
---|
| 25 | $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
|
---|
| 26 | $form .= "<br />";
|
---|
| 27 | $form .= _MB_XPRESS_ENHACED_FILE .":<br />\n";
|
---|
| 28 | $form .= ' ' . _MB_XPRESS_FILE_NAME . ": my_<input type='text' name='options[2]' value='" . $include_file . "' />_block.php<br>\n";
|
---|
| 29 | $form .= ' ' . _MB_XPRESS_MAKE_ENHACED_FILE . "<br>\n";
|
---|
| 30 | return $form;
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | function _b_enhanced_show($options)
|
---|
| 34 | {
|
---|
| 35 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
| 36 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
| 37 | $block_function_name = basename( __FILE__ );
|
---|
| 38 |
|
---|
| 39 | require_once $mydirpath.'/include/xpress_block_render.php';
|
---|
| 40 | return xpress_block_render($mydirname,$block_function_name,$options);
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | ?> |
---|