[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] ;
|
---|
[195] | 21 | $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_authors_block.html' : trim( $options[1] );
|
---|
[120] | 22 | $optioncount = empty( $options[2] ) ? false : true ;
|
---|
| 23 | $exclude_admin = empty( $options[3] ) ? false : true ;
|
---|
| 24 | $show_fullname = empty( $options[4] ) ? false : true ;
|
---|
| 25 | $hide_empty = empty( $options[5] ) ? false : true ;
|
---|
[110] | 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 />";
|
---|
[488] | 30 | $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES));
|
---|
[121] | 31 | $form .= "<br />";
|
---|
[183] | 32 | $form .= yes_no_radio_option('options[2]', _MB_XP2_SHOW_NUM_OF_POST , $optioncount);
|
---|
| 33 | $form .= "<br />" . yes_no_radio_option('options[3]', _MB_XP2_EXCLUEDEADMIN , $exclude_admin);
|
---|
| 34 | $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XP2_SHOW_FULLNAME , $show_fullname);
|
---|
| 35 | $form .= "<br />" . yes_no_radio_option('options[5]', _MB_XP2_HIDE_EMPTY , $hide_empty);
|
---|
[110] | 36 | // $form .="<br /><input type='text' size='60' name='options[4]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
|
---|
| 37 |
|
---|
| 38 | return $form;
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | function _b_authors_show($options)
|
---|
| 42 | {
|
---|
| 43 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
| 44 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
| 45 | $block_function_name = basename( __FILE__ );
|
---|
| 46 |
|
---|
| 47 | require_once $mydirpath.'/include/xpress_block_render.php';
|
---|
| 48 | return xpress_block_render($mydirname,$block_function_name,$options);
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 |
|
---|
| 52 | }
|
---|
| 53 | ?> |
---|