"; $form .= _MB_XPRESS_COUNT .":
"; $form .= _MB_XPRESS_LENGTH .": "; $form .= "

" . _MB_XPRESS_COM_TYPE ; $isAll = (count($selected)==0||empty($selected[0]))?true:false; $form .= "
  
"; // $form .="
"; return $form; } function _b_comments_show($options) { $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; $disp_count = empty( $options[1] ) ? '10' : $options[1] ; $disp_length = empty( $options[2] ) ? '30' : $options[2] ; $selected = array_slice($options,5); // get allowed cats $this_template = empty( $options[6] ) ? 'db:'.$mydirname.'_block_comments.html' : trim( $options[4] ); $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; $myts =& MyTextSanitizer::getInstance(); $this_url = '/modules/'. $mydirname; $call_url = $_SERVER['REQUEST_URI']; $disp_all = in_array('0',$selected); $disp_comment = in_array('1',$selected); $disp_trackback = in_array('2',$selected); $disp_pingback = in_array('3',$selected); $type_select = ''; if (!$disp_all){ if ($disp_comment){ $in_where = "''"; } if ($disp_trackback){ if (empty($in_where)) $in_where = "'trackback' "; else $in_where .= ",'trackback'"; } if ($disp_pingback){ if (empty($in_where)) $in_where = "'pingback' "; else $in_where .= ",'pingback'"; } if (! empty($in_where)){ $type_select = " AND comment_type IN($in_where) "; } } global $wpdb; $block = array( 'mydirname' => $mydirname , 'mod_url' => XOOPS_URL.'/modules/'.$mydirname , ) ; if (!is_null($wpdb)){ $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID WHERE comment_approved = '1' AND post_type = 'post' AND post_status = 'publish' $type_select ORDER BY comment_date_gmt DESC LIMIT $disp_count"); $format = get_settings('date_format') . ' ' . get_settings('time_format'); if ( $comments ) { $output .= '