[110] | 1 | <?php
|
---|
| 2 | if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
|
---|
| 3 | $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
|
---|
| 4 |
|
---|
| 5 | eval( '
|
---|
| 6 | function b_'.$mydirname.'_authors_show( $options){
|
---|
| 7 | return _b_authors_show($options) ;
|
---|
| 8 | }
|
---|
| 9 | function b_'.$mydirname.'_authors_edit( $options){
|
---|
| 10 | return _b_authors_edit($options) ;
|
---|
| 11 | }
|
---|
| 12 | ' ) ;
|
---|
| 13 |
|
---|
| 14 |
|
---|
| 15 | if( ! defined( 'XPRESS_AUTHORS_BLOCK_INCLUDED' ) ) {
|
---|
| 16 | define( 'XPRESS_AUTHORS_BLOCK_INCLUDED' , 1 ) ;
|
---|
| 17 |
|
---|
| 18 | function _b_authors_edit($options)
|
---|
| 19 | {
|
---|
| 20 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
| 21 | $optioncount = empty( $options[1] ) ? false : true ;
|
---|
| 22 | $exclude_admin = empty( $options[2] ) ? false : true ;
|
---|
| 23 | $show_fullname = empty( $options[3] ) ? false : true ;
|
---|
| 24 | $hide_empty = empty( $options[4] ) ? false : true ;
|
---|
| 25 | $this_template = empty( $options[5] ) ? 'db:'.$mydirname.'_block_authors.html' : trim( $options[5] );
|
---|
| 26 |
|
---|
| 27 | require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
|
---|
| 28 |
|
---|
| 29 | $form = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
|
---|
| 30 | $form .= yes_no_radio_option('options[1]', _MB_XPRESS_SHOW_NUM_OF_POST , $optioncount);
|
---|
| 31 | $form .= "<br />" . yes_no_radio_option('options[2]', _MB_XPRESS_EXCLUEDEADMIN , $exclude_admin);
|
---|
| 32 | $form .= "<br />" . yes_no_radio_option('options[3]', _MB_XPRESS_SHOW_FULLNAME , $show_fullname);
|
---|
| 33 | $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XPRESS_HIDE_EMPTY , $hide_empty);
|
---|
| 34 | // $form .="<br /><input type='text' size='60' name='options[4]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
|
---|
| 35 |
|
---|
| 36 | return $form;
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | function _b_authors_show($options)
|
---|
| 40 | {
|
---|
| 41 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
| 42 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
| 43 | $block_function_name = basename( __FILE__ );
|
---|
| 44 |
|
---|
| 45 | require_once $mydirpath.'/include/xpress_block_render.php';
|
---|
| 46 | return xpress_block_render($mydirname,$block_function_name,$options);
|
---|
| 47 | }
|
---|
| 48 |
|
---|
| 49 |
|
---|
| 50 | }
|
---|
| 51 | ?> |
---|