function _b_global_comments_edit($options)
	{
		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_global_recent_comments_block.html' : trim( $options[1] );
		$disp_count = empty( $options[2] ) ? '10' : $options[2] ;
		$disp_length = empty( $options[3] ) ? '30' : $options[3] ;
		$date_format = empty( $options[4] ) ? '' : $options[4] ;
		$time_format = empty( $options[5] ) ? '' : $options[5] ;
		$com_select = empty( $options[6] ) ? '0' : $options[6] ;

		$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;

		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
		
		$form  = javascript_check();
		$form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
		$form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES));
		$form .= "<br />";
		$form .= _MB_XP2_COUNT .": <input type='text' size='3' name='options[2]' value='" . $disp_count . "' /><br />\n";
		$form .= _MB_XP2_LENGTH .": <input type='text' size='3' name='options[3]' value='" . $disp_length . "' /><br />\n";
		$form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[4]' value='" . $date_format . "' /><br />\n";
		$form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[5]' value='" . $time_format . "' /><br />\n";
	    $form .= "<br />\n";
	    $form .= comment_type_select('options[6]' , $com_select);


		return $form;
	}
	function _b_global_posts_edit($options)
	{
		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_global_recent_posts_list_block.html' : trim( $options[1] );
		$disp_count = empty( $options[2] ) ? '10' : $options[2] ;
		$disp_red = empty( $options[3] ) ? '1' : $options[3] ;
		$disp_green = empty( $options[4] ) ? '7' : $options[4] ;
		$date_format = empty( $options[5] ) ? '' : $options[5] ;
		$time_format = empty( $options[6] ) ? '' : $options[6] ;
		$Shown_for_each_blog = empty( $options[7] ) ? false : true ;		
		$exclusion_blog = empty( $options[8] ) ? '0' : $options[8] ;

		$mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
		
		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');

		$form  = javascript_check();
		$form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
		$form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES));
		$form .= "<br />\n";	
		$form .= _MB_XP2_COUNT .": <input type='text' size='3' name='options[2]' value='" . $disp_count . "' /><br />\n";
		$form .= _MB_XP2_REDNEW_DAYS .": <input type='text' size='3' name='options[3]' value='" . $disp_red . "' /><br />\n";
		$form .= _MB_XP2_GREENNEW_DAYS .": <input type='text' size='3' name='options[4]' value='" . $disp_green . "' /><br />\n";
		$form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[5]' value='" . $date_format . "' /><br />\n";
		$form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[6]' value='" . $time_format . "' /><br />\n";
		$form .= yes_no_radio_option('options[7]', _MB_XP2_SHOWN_FOR_EACH_BLOG , $Shown_for_each_blog) . "<br />\n";
	    $form .= blog_select('options[8]' , $exclusion_blog,true);

		return $form;
	}
示例#3
0
 function _b_posts_edit($options)
 {
     $mydirname = empty($options[0]) ? 'xpress' : $options[0];
     $this_template = empty($options[1]) ? 'db:' . $mydirname . '_recent_posts_list_block.html' : trim($options[1]);
     $disp_count = empty($options[2]) ? '10' : $options[2];
     $disp_red = empty($options[3]) ? '1' : $options[3];
     $disp_green = empty($options[4]) ? '7' : $options[4];
     $date_format = empty($options[5]) ? '' : $options[5];
     $time_format = empty($options[6]) ? '' : $options[6];
     $tag_select = $options[7];
     $cat_select = empty($options[8]) ? '0' : $options[8];
     $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
     require_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/blocks/block_common.php';
     $form = javascript_check();
     $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
     $form .= block_template_setting($mydirname, 'options[1]', htmlspecialchars($this_template, ENT_QUOTES));
     $form .= "<br />\n";
     $form .= _MB_XP2_COUNT . ": <input type='text' size='3' name='options[2]' value='" . $disp_count . "' /><br />\n";
     $form .= _MB_XP2_REDNEW_DAYS . ": <input type='text' size='3' name='options[3]' value='" . $disp_red . "' /><br />\n";
     $form .= _MB_XP2_GREENNEW_DAYS . ": <input type='text' size='3' name='options[4]' value='" . $disp_green . "' /><br />\n";
     $form .= _MB_XP2_DATE_FORMAT . ": <input type='text' name='options[5]' value='" . $date_format . "' /><br />\n";
     $form .= _MB_XP2_TIME_FORMAT . ": <input type='text' name='options[6]' value='" . $time_format . "' /><br />\n";
     include $mydirpath . '/wp-includes/version.php';
     if (wp_version_compare($wp_version, '>=', '2.3')) {
         $form .= "<br />\n";
         $form .= _MB_XP2_TAGS_SELECT . ": <input type='text' name='options[7]' value='" . $tag_select . "' /><br />\n";
     } else {
         $form .= "<input type='hidden' name='options[7]' value='' /><br />\n";
     }
     $form .= categorie_select('options[8]', $cat_select);
     return $form;
 }
示例#4
0
	function _b_meta_edit($options)
	{
		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_meta_block.html' : trim( $options[1] );
		$wp_link = empty( $options[2] ) ? false : true ;
		$xoops_link = empty( $options[3] ) ? false : true ;
		$post_rss = empty( $options[4] ) ? false : true ;
		$comment_rss = empty( $options[5] ) ? false : true ;
		$post_new = empty( $options[6] ) ? false : true ;
		$admin_edit = empty( $options[7] ) ? false : true ;
		$readme = empty( $options[8] ) ? false : true ;
		$ch_style = empty( $options[9] ) ? false : true ;
		
		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');	

		$form  = javascript_check();
		$form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
		$form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES));
		$form .= "<br />";
		$form .= yes_no_radio_option('options[2]', _MB_XP2_META_WP_LINK , $wp_link) . "<br />\n";
		$form .= yes_no_radio_option('options[3]', _MB_XP2_META_XOOPS_LINK , $xoops_link) . "<br />\n";
		$form .= yes_no_radio_option('options[4]', _MB_XP2_META_POST_RSS , $post_rss) . "<br />\n";
		$form .= yes_no_radio_option('options[5]', _MB_XP2_META_COMMENT_RSS , $comment_rss) . "<br />\n";
		$form .= yes_no_radio_option('options[6]', _MB_XP2_META_POST_NEW , $post_new) . "<br />\n";
		$form .= yes_no_radio_option('options[7]', _MB_XP2_META_ADMIN , $admin_edit) . "<br />\n";
		$form .= yes_no_radio_option('options[8]', _MB_XP2_META_README , $readme) . "<br />\n";
		$form .= yes_no_radio_option('options[9]', _MB_XP2_META_CH_STYLE , $ch_style) . "\n";
	    
		return $form;
	}
 function _b_content_edit($options)
 {
     $mydirname = empty($options[0]) ? 'xpress' : $options[0];
     $this_template = empty($options[1]) ? 'db:' . $mydirname . '_recent_posts_content_block.html' : trim($options[1]);
     $disp_count = $options[2] ? intval($options[2]) : 10;
     $excerpt = empty($options[3]) ? false : true;
     $excerpt_size = $options[4] ? intval($options[4]) : 100;
     $date_format = empty($options[5]) ? '' : $options[5];
     $time_format = empty($options[6]) ? '' : $options[6];
     $tag_select = $options[7];
     $cat_select = empty($options[8]) ? '0' : $options[8];
     $day_select = $options[9] ? intval($options[9]) : 0;
     $day_size = $options[10] ? intval($options[10]) : 0;
     $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
     require_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/blocks/block_common.php';
     $form = javascript_check();
     $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
     $form .= block_template_setting($mydirname, 'options[1]', htmlspecialchars($this_template, ENT_QUOTES));
     $form .= "<br />";
     $form .= _MB_XP2_COUNT . ": <input type='text' size='3' name='options[2]' value='" . $disp_count . "' /><br />\n";
     $form .= yes_no_radio_option('options[3]', _MB_XP2_P_EXCERPT, $excerpt) . "<br />\n";
     $form .= _MB_XP2_P_EXCERPT_SIZE . ": <input type='text' name='options[4]' value='" . $excerpt_size . "' /><br />\n";
     $form .= _MB_XP2_DATE_FORMAT . ": <input type='text' name='options[5]' value='" . $date_format . "' /><br />\n";
     $form .= _MB_XP2_TIME_FORMAT . ": <input type='text' name='options[6]' value='" . $time_format . "' /><br />\n";
     include $mydirpath . '/wp-includes/version.php';
     if (wp_version_compare($wp_version, '>=', '2.3')) {
         $form .= "<br />\n";
         $form .= _MB_XP2_TAGS_SELECT . ": <input type='text' name='options[7]' value='" . $tag_select . "' /><br />\n";
     } else {
         $form .= "<input type='hidden' name='options[7]' value='' /><br />\n";
     }
     $form .= categorie_select('options[8]', $cat_select);
     $form .= "<br />";
     $form .= _MB_XP2_DAY_SELECT . ':' . _MB_XP2_DAY_BETWEEN . '<select name="options[9]">';
     switch ($day_select) {
         case 1:
             $form .= '<option value="0">' . _MB_XP2_NONE . '</option>';
             $form .= '<option value="1" selected>' . _MB_XP2_TODAY . '</option>';
             $form .= '<option value="2">' . _MB_XP2_LATEST . '</option>';
             break;
         case 2:
             $form .= '<option value="0">' . _MB_XP2_NONE . '</option>';
             $form .= '<option value="1">' . _MB_XP2_TODAY . '</option>';
             $form .= '<option value="2" selected>' . _MB_XP2_LATEST . '</option>';
             break;
         default:
             $form .= '<option value="0" selected>' . _MB_XP2_NONE . '</option>';
             $form .= '<option value="1">' . _MB_XP2_TODAY . '</option>';
             $form .= '<option value="2">' . _MB_XP2_LATEST . '</option>';
     }
     $form .= '</select>';
     $form .= ' ' . _MB_XP2_DAYS_AND . " <input type='text' size='2' name='options[10]' value='" . $day_size . "' />" . _MB_XP2_DAYS_AGO . "<br />\n";
     return $form;
 }
示例#6
0
	function _b_archives_edit($options)
	{
		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_archives_block.html' : trim( $options[1] );
		$type = empty( $options[2] ) ? 'monthly' : $options[2] ;
		$limit  = !is_numeric( $options[3] ) ? 0 : $options[3] ;
		$show_post_count = empty( $options[4] ) ? false : true ;		
		$drop_down = empty( $options[5] ) ? false : true ;
		
		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');

		$form  = javascript_check();
		$form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
		$form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES));
		$form .= "<br />";
		$a_month = _MB_XP2_ARC_MONTH ;
		$a_week = _MB_XP2_ARC_WEEK ;		

		$form .= _MB_XP2_ARC_TYPE .": ";
		$form .=  "<select name='options[2]'>";
		if ($type =='yearly')
			$form .=  "<option value='yearly' selected='selected'>". _MB_XP2_ARC_YEAR;
		else
			$form .=  "<option value='yearly'>". _MB_XP2_ARC_YEAR;
		
		if ($type =='monthly')
			$form .=  "<option value='monthly' selected='selected'>". _MB_XP2_ARC_MONTH;
		else
			$form .=  "<option value='monthly'>". _MB_XP2_ARC_MONTH;
		
		if ($type =='weekly')
			$form .=  "<option value='weekly' selected='selected'>". _MB_XP2_ARC_WEEK;
		else
			$form .=  "<option value='weekly'>". _MB_XP2_ARC_WEEK;
		
		if ($type =='daily')
			$form .=  "<option value='daily' selected='selected'>". _MB_XP2_ARC_DAY;
		else
			$form .=  "<option value='daily'>". _MB_XP2_ARC_DAY;

		if ($type =='postbypost')
			$form .=  "<option value='postbypost' selected='selected'>". _MB_XP2_ARC_POST;
		else
			$form .=  "<option value='postbypost'>". _MB_XP2_ARC_POST;

		$form .=  "</select><br/>";
		
		$form .= "<br />" . _MB_XP2_COUNT_ZERO_ALL . "  <input type='text' size='3' name='options[3]' value='" . $limit . "' />";
		$form .= "<br />" . yes_no_radio_option('options[4]', _MB_XP2_SHOW_NUM_OF_POST , $show_post_count);
		$form .= "<br />" . yes_no_radio_option('options[5]', _MB_XP2_SHOW_DROP_DOWN , $drop_down);
//	    $form .="<br /><input type='text' size='60' name='options[5]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
	    
		return $form;
	}
示例#7
0
 function _b_enhanced_edit($options)
 {
     $mydirname = empty($options[0]) ? 'xpress' : $options[0];
     $this_template = empty($options[1]) ? 'db:' . $mydirname . '_enhanced_block.html' : trim($options[1]);
     $include_file = empty($options[2]) ? '' : $options[2];
     require_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/blocks/block_common.php';
     $form = javascript_check();
     $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
     $form .= block_template_setting($mydirname, 'options[1]', htmlspecialchars($this_template, ENT_QUOTES));
     $form .= "<br />";
     $form .= _MB_XP2_ENHACED_FILE . ":<br />\n";
     $form .= '&emsp;' . _MB_XP2_FILE_NAME . ": <b>my_</b><input type='text' name='options[2]' value='" . $include_file . "' /><b>_block.php</b><br>\n";
     $form .= '&emsp;' . _MB_XP2_MAKE_ENHACED_FILE . "<br>\n";
     return $form;
 }
示例#8
0
 function _b_search_edit($options)
 {
     $mydirname = empty($options[0]) ? 'xpress' : $options[0];
     $this_template = empty($options[1]) ? 'db:' . $mydirname . '_search_block.html' : trim($options[1]);
     $disp_count = empty($options[2]) ? '18' : $options[2];
     $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
     require_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/blocks/block_common.php';
     $form = javascript_check();
     $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
     $form .= block_template_setting($mydirname, 'options[1]', htmlspecialchars($this_template, ENT_QUOTES));
     $form .= "<br />";
     $form .= _MB_XP2_SEARCH_LENGTH . ": <input type='text' size='3' name='options[2]' value='" . $disp_count . "' /><br />";
     //	    $form .="<br /><input type='text' size='60' name='options[2]' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
     return $form;
 }
示例#9
0
 function _b_calender_edit($options)
 {
     $mydirname = empty($options[0]) ? 'xpress' : $options[0];
     $this_template = empty($options[1]) ? 'db:' . $mydirname . '_calender_block.html' : trim($options[1]);
     $sun_color = empty($options[2]) ? '#DB0000' : $options[2];
     $sat_color = empty($options[3]) ? '#004D99' : $options[3];
     $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
     require_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/blocks/block_common.php';
     $form = javascript_check();
     $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
     $form .= block_template_setting($mydirname, 'options[1]', htmlspecialchars($this_template, ENT_QUOTES));
     $form .= "<br />";
     $form .= _MB_XP2_SUN_COLOR . ": <input type='text' name='options[2]' value='" . $sun_color . "' /><br />\n";
     $form .= _MB_XP2_SAT_COLOR . ": <input type='text' name='options[3]' value='" . $sat_color . "' /><br />\n";
     return $form;
 }
示例#10
0
 function _b_blog_list_edit($options)
 {
     $mydirname = empty($options[0]) ? 'xpress' : $options[0];
     $this_template = empty($options[1]) ? 'db:' . $mydirname . '_blog_list_block.html' : trim($options[1]);
     $orderby = empty($options[2]) ? 'name' : $options[2];
     $order = empty($options[3]) ? 'ASC' : $options[3];
     require_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/blocks/block_common.php';
     $form = javascript_check();
     $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
     $form .= block_template_setting($mydirname, 'options[1]', htmlspecialchars($this_template, ENT_QUOTES));
     $form .= "<br />";
     $form .= _MB_XP2_BLOG_ORDERBY . ": ";
     $form .= "<select name='options[2]'>";
     if ($orderby == 'name') {
         $form .= "<option value='name' selected='selected'>" . _MB_XP2_BLOG_NAME;
     } else {
         $form .= "<option value='name'>" . _MB_XP2_BLOG_NAME;
     }
     if ($orderby == 'count') {
         $form .= "<option value='count' selected='selected'>" . _MB_XP2_BLOG_COUNT;
     } else {
         $form .= "<option value='count'>" . _MB_XP2_BLOG_COUNT;
     }
     if ($orderby == 'ID') {
         $form .= "<option value='ID' selected='selected'>" . _MB_XP2_BLOG_ID;
     } else {
         $form .= "<option value='ID'>" . _MB_XP2_BLOG_ID;
     }
     $form .= "</select><br/>";
     $form .= _MB_XP2_SORT_ORDER . ": ";
     $form .= "<select name='options[3]'>";
     if ($order == 'ASC') {
         $form .= "<option value='ASC' selected='selected'>" . _MB_XP2_SORT_ASC;
     } else {
         $form .= "<option value='ASC'>" . _MB_XP2_SORT_ASC;
     }
     if ($order == 'DESC') {
         $form .= "<option value='DESC' selected='selected'>" . _MB_XP2_SORT_DESC;
     } else {
         $form .= "<option value='DESC'>" . _MB_XP2_SORT_DESC;
     }
     $form .= "</select><br/>";
     return $form;
 }
示例#11
0
 function _b_authors_edit($options)
 {
     $mydirname = empty($options[0]) ? 'xpress' : $options[0];
     $this_template = empty($options[1]) ? 'db:' . $mydirname . '_authors_block.html' : trim($options[1]);
     $optioncount = empty($options[2]) ? false : true;
     $exclude_admin = empty($options[3]) ? false : true;
     $show_fullname = empty($options[4]) ? false : true;
     $hide_empty = empty($options[5]) ? false : true;
     require_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/blocks/block_common.php';
     $form = javascript_check();
     $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
     $form .= block_template_setting($mydirname, 'options[1]', htmlspecialchars($this_template, ENT_QUOTES));
     $form .= "<br />";
     $form .= yes_no_radio_option('options[2]', _MB_XP2_SHOW_NUM_OF_POST, $optioncount);
     $form .= "<br />" . yes_no_radio_option('options[3]', _MB_XP2_EXCLUEDEADMIN, $exclude_admin);
     $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XP2_SHOW_FULLNAME, $show_fullname);
     $form .= "<br />" . yes_no_radio_option('options[5]', _MB_XP2_HIDE_EMPTY, $hide_empty);
     //	    $form .="<br /><input type='text' size='60' name='options[4]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
     return $form;
 }
示例#12
0
 function _b_global_popular_edit($options)
 {
     $mydirname = empty($options[0]) ? 'xpress' : $options[0];
     $this_template = empty($options[1]) ? 'db:' . $mydirname . '_grobal_popular_posts_block.html' : trim($options[1]);
     $disp_count = empty($options[2]) ? '10' : $options[2];
     $show_month_range = empty($options[3]) ? '0' : $options[3];
     $date_format = empty($options[4]) ? '' : $options[4];
     $time_format = empty($options[5]) ? '' : $options[5];
     $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
     require_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/blocks/block_common.php';
     $form = javascript_check();
     $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
     $form .= block_template_setting($mydirname, 'options[1]', htmlspecialchars($this_template, ENT_QUOTES));
     $form .= "<br />\n";
     $form .= _MB_XP2_COUNT . ": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n";
     $form .= _MB_XP2_MONTH_RANGE . ": <input type='text' name='options[3]' value='" . $show_month_range . "' /><br />\n";
     $form .= _MB_XP2_DATE_FORMAT . ": <input type='text' name='options[4]' value='" . $date_format . "' /><br />\n";
     $form .= _MB_XP2_TIME_FORMAT . ": <input type='text' name='options[5]' value='" . $time_format . "' /><br />\n";
     return $form;
 }
示例#13
0
 function _b_tag_cloud_edit($options)
 {
     $mydirname = empty($options[0]) ? 'xpress' : $options[0];
     $this_template = empty($options[1]) ? 'db:' . $mydirname . '_tag_cloud_block.html' : trim($options[1]);
     $smallest = !is_numeric($options[2]) ? 8 : $options[2];
     $largest = !is_numeric($options[3]) ? 22 : $options[3];
     $unit = empty($options[4]) ? 'pt' : $options[4];
     $number = !is_numeric($options[5]) ? 45 : $options[5];
     $format = empty($options[6]) ? 'flat' : $options[6];
     $orderby = empty($options[7]) ? 'name' : $options[7];
     $order = empty($options[8]) ? 'ASC' : $options[8];
     $exclude = is_null($options[9]) ? '' : $options[9];
     $wp_include = is_null($options[10]) ? '' : $options[10];
     require_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/blocks/block_common.php';
     $form = javascript_check();
     $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
     $form .= block_template_setting($mydirname, 'options[1]', htmlspecialchars($this_template, ENT_QUOTES));
     $form .= "<br />";
     $form .= _MB_XP2_CLOUD_SMALLEST . ": <input type='text' size='4' name='options[2]' value='" . $smallest . "' /><br />";
     $form .= _MB_XP2_CLOUD_LARGEST . ": <input type='text' size='4' name='options[3]' value='" . $largest . "' /><br />";
     $form .= _MB_XP2_CLOUD_UNIT . ": ";
     $form .= "<select name='options[4]'>";
     if ($unit == 'pt') {
         $form .= "<option value='pt' selected='selected'>pt";
     } else {
         $form .= "<option value='pt'>pt";
     }
     if ($unit == 'px') {
         $form .= "<option value='px' selected='selected'>px";
     } else {
         $form .= "<option value='px'>px";
     }
     if ($unit == 'em') {
         $form .= "<option value='em' selected='selected'>em";
     } else {
         $form .= "<option value='em'>em";
     }
     if ($unit == '%') {
         $form .= "<option value='%' selected='selected'>%";
     } else {
         $form .= "<option value='%'>%";
     }
     $form .= "</select><br/>";
     $form .= _MB_XP2_CLOUD_NUMBER . ": <input type='text' size='4' name='options[5]' value='" . $number . "' /><br />";
     $form .= _MB_XP2_CLOUD_FORMAT . ": ";
     $form .= "<select name='options[6]'>";
     if ($format == 'flat') {
         $form .= "<option value='flat' selected='selected'>" . _MB_XP2_FLAT;
     } else {
         $form .= "<option value='flat'>" . _MB_XP2_FLAT;
     }
     if ($format == 'list') {
         $form .= "<option value='list' selected='selected'>" . _MB_XP2_LIST;
     } else {
         $form .= "<option value='list'>" . _MB_XP2_LIST;
     }
     $form .= "</select><br/>";
     $form .= _MB_XP2_CLOUD_ORDERBY . ": ";
     $form .= "<select name='options[7]'>";
     if ($orderby == 'name') {
         $form .= "<option value='name' selected='selected'>" . _MB_XP2_TAG_NAME;
     } else {
         $form .= "<option value='name'>" . _MB_XP2_TAG_NAME;
     }
     if ($orderby == 'count') {
         $form .= "<option value='count' selected='selected'>" . _MB_XP2_TAG_COUNT;
     } else {
         $form .= "<option value='count'>" . _MB_XP2_TAG_COUNT;
     }
     $form .= "</select><br/>";
     $form .= _MB_XP2_CLOUD_ORDER . ": ";
     $form .= "<select name='options[8]'>";
     if ($order == 'ASC') {
         $form .= "<option value='ASC' selected='selected'>" . _MB_XP2_SORT_ASC;
     } else {
         $form .= "<option value='ASC'>" . _MB_XP2_SORT_ASC;
     }
     if ($order == 'DESC') {
         $form .= "<option value='DESC' selected='selected'>" . _MB_XP2_SORT_DESC;
     } else {
         $form .= "<option value='DESC'>" . _MB_XP2_SORT_DESC;
     }
     if ($order == 'RAND') {
         $form .= "<option value='RAND' selected='selected'>" . _MB_XP2_RAND;
     } else {
         $form .= "<option value='RAND'>" . _MB_XP2_RAND;
     }
     $form .= "</select><br/>";
     $form .= _MB_XP2_CLOUD_EXCLUDE . ": <input type='text' size='25' name='options[9]' value='" . $exclude . "' /><br />";
     $form .= _MB_XP2_CLOUD_INCLUDE . ": <input type='text' size='25' name='options[10]' value='" . $wp_include . "' /><br />";
     //	    $form .="<br /><input type='text' size='60' name='options[8]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
     return $form;
 }
示例#14
0
	function _b_page_edit($options)
	{
		$mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
		$this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_page_block.html' : trim( $options[1] );
		$sort_column = empty( $options[2] ) ? 'post_title' : $options[2] ;
		$sort_order = empty( $options[3] ) ? 'asc' : $options[3] ;
		$exclude = empty( $options[4] ) ? '' : $options[4] ;
		$exclude_tree = empty( $options[5] ) ? '' : $options[5] ;
		$includes = empty( $options[6] ) ? '' : $options[6] ;
		$depth = !is_numeric( $options[7] ) ? 0 : $options[7] ;
		$child_of = !is_numeric( $options[8] ) ? 0 : $options[8] ;
		$show_date = empty( $options[9] ) ? 'none' : $options[9] ;
		$date_format = empty( $options[10] ) ? '' : $options[10] ;
		$hierarchical = empty( $options[11] ) ? false : true ;
		$meta_key = empty( $options[12] ) ? '' : $options[12] ;
		$meta_value = empty( $options[13] ) ? '' : $options[13] ;

		require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');

		$form  = javascript_check();
		$form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
		$form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES));
		$form .= "<br />";
		$form .= _MB_XP2_PAGE_ORDERBY .": ";
		$form .=  "<select name='options[2]'>";
		
		if ($sort_column =='post_title')
			$form .=  "<option value='post_title' selected='selected'>". _MB_XP2_PAGE_TITLE;
		else
			$form .=  "<option value='post_title'>". _MB_XP2_PAGE_TITLE;
		
		if ($sort_column =='menu_order')
			$form .=  "<option value='menu_order' selected='selected'>". _MB_XP2_PAGE_MENU_ORDER;
		else
			$form .=  "<option value='menu_order'>". _MB_XP2_PAGE_MENU_ORDER;
		
		if ($sort_column =='post_date')
			$form .=  "<option value='post_date' selected='selected'>". _MB_XP2_PAGE_POST_DATE;
		else
			$form .=  "<option value='post_date'>". _MB_XP2_PAGE_POST_DATE;
		
		if ($sort_column =='post_modified')
			$form .=  "<option value='post_modified' selected='selected'>". _MB_XP2_PAGE_POST_MODIFY;
		else
			$form .=  "<option value='post_modified'>". _MB_XP2_PAGE_POST_MODIFY;
		
		if ($sort_column =='ID')
			$form .=  "<option value='ID' selected='selected'>". _MB_XP2_PAGE_ID;
		else
			$form .=  "<option value='ID'>". _MB_XP2_PAGE_ID;
		
		if ($sort_column =='post_author')
			$form .=  "<option value='post_author' selected='selected'>". _MB_XP2_PAGE_AUTHOR;
		else
			$form .=  "<option value='post_author'>". _MB_XP2_PAGE_AUTHOR;
		
		if ($sort_column =='post_name')
			$form .=  "<option value='post_name' selected='selected'>". _MB_XP2_PAGE_SLUG;
		else
			$form .=  "<option value='post_name'>". _MB_XP2_PAGE_SLUG;
		
		$form .=  "</select><br/>";
		
		
		$form .= _MB_XP2_SORT_ORDER .": ";
		$form .=  "<select name='options[3]'>";
		if ($sort_order =='asc')
			$form .=  "<option value='asc' selected='selected'>" . _MB_XP2_SORT_ASC;
		else
			$form .=  "<option value='asc'>" . _MB_XP2_SORT_ASC;
		if ($sort_order =='desc')
			$form .=  "<option value='desc' selected='selected'>" . _MB_XP2_SORT_DESC;
		else
			$form .=  "<option value='desc'>" . _MB_XP2_SORT_DESC;
		$form .=  "</select><br/>\n";
		
		$form .= _MB_XP2_PAGE_EXCLUDE . "  <input type='text' name='options[4]' value='" . $exclude . "' size ='60' /><br />\n";
		$form .= _MB_XP2_PAGE_EXCLUDE_TREE . "  <input type='text' name='options[5]' value='" . $exclude_tree . "' size ='60' /><br />\n";
		$form .= _MB_XP2_PAGE_INCLUDE . "  <input type='text' name='options[6]' value='" . $includes . "' size ='60' /><br />\n";
		$form .= _MB_XP2_PAGE_DEPTH . "  <input type='text' name='options[7]' value='" . $depth . "' size ='8' /><br />";
		$form .= _MB_XP2_PAGE_CHILD_OF . "  <input type='text' name='options[8]' value='" . $child_of . "' size ='8' /><br />";

		$form .= _MB_XP2_SHOW_DATE_SELECT .": ";
		$form .=  "<select name='options[9]'>";
		if ($show_date =='none')
			$form .=  "<option value='none' selected='selected'>" . _MB_XP2_SHOW_DATE_NONE;
		else
			$form .=  "<option value='none'>" . _MB_XP2_SHOW_DATE_NONE;

		if ($show_date =='post_date')
			$form .=  "<option value='post_date' selected='selected'>" . _MB_XP2_SHOW_POST_DATE;
		else
			$form .=  "<option value='post_date'>" . _MB_XP2_SHOW_POST_DATE;

		if ($show_date =='modified')
			$form .=  "<option value='modified' selected='selected'>" . _MB_XP2_SHOW_MODIFY_DATE;
		else
			$form .=  "<option value='modified'>" . _MB_XP2_SHOW_MODIFY_DATE;
		
		$form .=  "</select><br/>\n";

		$form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[10]' value='" . $date_format . "' /><br />\n";
		$form .= yes_no_radio_option('options[11]', _MB_XP2_PAGE_HIERARCHICAL , $hierarchical) . "<br />" ;
		$form .= _MB_XP2_PAGE_META_KEY . "  <input type='text' name='options[12]' value='" . $meta_key . "' size ='40' /><br />\n";
		$form .= _MB_XP2_PAGE_META_VALUE . "  <input type='text' name='options[13]' value='" . $meta_value . "' size ='40' /><br />\n";
    
		return $form;
	}
示例#15
0
 function _b_category_edit($options)
 {
     $mydirname = empty($options[0]) ? 'xpress' : $options[0];
     $this_template = empty($options[1]) ? 'db:' . $mydirname . '_category_block.html' : trim($options[1]);
     $show_option_all = empty($options[2]) ? '' : $options[2];
     $orderby = empty($options[3]) ? 'name' : $options[3];
     $order = empty($options[4]) ? 'ASC' : $options[4];
     $show_last_updated = empty($options[5]) ? false : true;
     $show_count = empty($options[6]) ? false : true;
     $hide_empty = empty($options[7]) ? false : true;
     $use_desc_for_title = empty($options[8]) ? false : true;
     $exclude = empty($options[9]) ? '' : $options[9];
     $includes = empty($options[10]) ? '' : $options[10];
     $hierarchical = empty($options[11]) ? false : true;
     $depth = !is_numeric($options[12]) ? 0 : $options[12];
     require_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/blocks/block_common.php';
     $form = javascript_check();
     $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
     $form .= block_template_setting($mydirname, 'options[1]', htmlspecialchars($this_template, ENT_QUOTES));
     $form .= "<br />";
     $form .= _MB_XP2_CAT_ALL_STR . "  <input type='text' name='options[2]' value='" . $show_option_all . "' /><br />";
     $form .= _MB_XP2_CAT_ORDERBY . ": ";
     $form .= "<select name='options[3]'>";
     if ($orderby == 'name') {
         $form .= "<option value='name' selected='selected'>" . _MB_XP2_CAT_NAME;
     } else {
         $form .= "<option value='name'>" . _MB_XP2_CAT_NAME;
     }
     if ($orderby == 'count') {
         $form .= "<option value='count' selected='selected'>" . _MB_XP2_CAT_COUNT;
     } else {
         $form .= "<option value='count'>" . _MB_XP2_CAT_COUNT;
     }
     if ($orderby == 'ID') {
         $form .= "<option value='ID' selected='selected'>" . _MB_XP2_CAT_ID;
     } else {
         $form .= "<option value='ID'>" . _MB_XP2_CAT_ID;
     }
     $form .= "</select><br/>";
     $form .= _MB_XP2_SORT_ORDER . ": ";
     $form .= "<select name='options[4]'>";
     if ($order == 'ASC') {
         $form .= "<option value='ASC' selected='selected'>" . _MB_XP2_SORT_ASC;
     } else {
         $form .= "<option value='ASC'>" . _MB_XP2_SORT_ASC;
     }
     if ($order == 'DESC') {
         $form .= "<option value='DESC' selected='selected'>" . _MB_XP2_SORT_DESC;
     } else {
         $form .= "<option value='DESC'>" . _MB_XP2_SORT_DESC;
     }
     $form .= "</select><br/>";
     $form .= yes_no_radio_option('options[5]', _MB_XP2_SHOW_LAST_UPDATE, $show_last_updated) . "<br />";
     $form .= yes_no_radio_option('options[6]', _MB_XP2_SHOW_NUM_OF_POST, $show_count) . "<br />";
     $form .= yes_no_radio_option('options[7]', _MB_XP2_CAT_HIDE_EMPTY, $hide_empty) . "<br />";
     $form .= yes_no_radio_option('options[8]', _MB_XP2_DESC_FOR_TITLE, $use_desc_for_title) . "<br />";
     $form .= _MB_XP2_CAT_EXCLUDE . "  <input type='text' name='options[9]' value='" . $exclude . "' size ='60' /><br />";
     $form .= _MB_XP2_CAT_INCLUDE . "  <input type='text' name='options[10]' value='" . $includes . "' size ='60' /><br />";
     $form .= yes_no_radio_option('options[11]', _MB_XP2_CAT_HIERARCHICAL, $hierarchical) . "<br />";
     $form .= _MB_XP2_CAT_DEPTH . "  <input type='text' name='options[12]' value='" . $depth . "' size ='8' /><br />";
     return $form;
 }
示例#16
0
    function _b_widget_edit($options)
    {
        $mydirname = empty($options[0]) ? 'xpress' : $options[0];
        $this_template = empty($options[1]) ? 'db:' . $mydirname . '_widget_block.html' : trim($options[1]);
        $title_show = empty($options[2]) ? false : true;
        $widget_select = empty($options[3]) ? '' : $options[3];
        $selected = explode(',', $widget_select);
        $wp_prefix = preg_replace('/wordpress/', 'wp', $mydirname) . '_';
        $xoopsDB =& Database::getInstance();
        $myts =& MyTextSanitizer::getInstance();
        $db_xpress_options = $xoopsDB->prefix($wp_prefix . 'options');
        $query = "SELECT option_value FROM {$db_xpress_options} WHERE option_name = 'sidebars_widgets' LIMIT 1";
        $res = $xoopsDB->query($query, 0, 0);
        if ($res !== false) {
            $row = $xoopsDB->fetchArray($res);
            $sidebars_widgets = @unserialize($row['option_value']);
        }
        if (!isset($sidebars_widgets['array_version'])) {
            $sidebars_widgets['array_version'] = 1;
        }
        require_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/blocks/block_common.php';
        $form = javascript_check();
        $form .= "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n";
        $form .= block_template_setting($mydirname, 'options[1]', htmlspecialchars($this_template, ENT_QUOTES));
        $form .= "<br />" . yes_no_radio_option('options[2]', _MB_XP2_WIDGET_TITLE_SHOW, $title_show);
        $form .= "<br />";
        $form .= _MB_XP2_SELECT_WIDGET . ":<br />\n";
        $form .= "<input type='hidden' name='options[3]' value='{$widget_select}' />\n";
        $select = "&nbsp;&nbsp;&nbsp;<select name='widget_sel' multiple=\"multiple\" onclick=\"WidgetSelect()\">\n";
        $found = false;
        foreach ((array) $sidebars_widgets as $index => $sidebar) {
            if (is_array($sidebar)) {
                $sidebar_id = $index;
                foreach ((array) $sidebar as $i => $name) {
                    $found = true;
                    $widget = strtolower($name);
                    $widget_str = $sidebar_id . '::' . $widget;
                    if (in_array($widget_str, $selected)) {
                        $select .= "<option value='" . $widget_str . "' selected='selected'>" . $widget_str;
                    } else {
                        $select .= "<option value='" . $widget_str . "'>" . $widget_str;
                    }
                }
            }
        }
        $select .= "</select><br/>\n";
        $select .= '
<script type="text/javascript">
    function WidgetSelect(){
        var idx=new Array();
        var sel=document.forms["blockform"].elements["widget_sel"].options;
        for(var i=0, n=0; i<sel.length; i++){
            if(sel[i].selected){ idx[n++]=sel[i].value; }
        }
        if(idx.length>0){
        	document.forms["blockform"].elements["options[3]"].value = idx;
		}
    }
</script>
';
        if ($found) {
            $form = $form . $select;
        } else {
            $form = $form . "&nbsp;&nbsp;&nbsp;" . _MB_XP2_NO_WIDGET;
        }
        return $form;
    }