Changeset 451 for branches/XPressMU/xpressme_integration_kit
- Timestamp:
- Nov 20, 2009, 2:52:16 PM (15 years ago)
- Location:
- branches/XPressMU/xpressme_integration_kit
- Files:
-
- 1 added
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/XPressMU/xpressme_integration_kit/blocks/block_common.php
r63 r451 18 18 endif; 19 19 20 if(!function_exists(" dropdown_cats_options")):21 function dropdown_cats_options($sort_column = 'ID', $sort_order = 'asc', $selected=array())20 if(!function_exists("categorie_select")): 21 function categorie_select($option_name = '',$value='',$row_num=0 ,$sort_column = 'ID', $sort_order = 'asc') 22 22 { 23 23 $mydirpath = dirname(dirname(__FILE__)); … … 30 30 $xoopsDB =& Database::getInstance(); 31 31 $myts =& MyTextSanitizer::getInstance(); 32 $selected = is_array($selected)?$selected:array($selected); 32 $selected = explode(',' , $value); 33 $isAll = (count($selected)==0||empty($selected[0]))?true:false; 33 34 $sort_column = 'cat_'.$sort_column; 35 if (empty($row_num)) $size = ''; else $size = 'size="' . $row_num . '"'; 34 36 include $mydirpath.'/wp-includes/version.php'; 35 37 if ($wp_db_version < 6124) { … … 53 55 } 54 56 $res = $xoopsDB->query($query, 0, 0); 57 $option = "\t<option value=\"0\" "; 58 if ($isAll) $option .= " selected=\"selected\""; 59 $option .= ">"._MB_XP2_ALL ."</option>\n"; 60 55 61 if ($res !== false){ 56 62 while($row = $xoopsDB->fetchArray($res)){ 57 63 $cat_name = $row['cat_name']; 58 64 $cat_ID = $row['cat_ID']; 59 echo"\t<option value=\"".$cat_ID."\"";65 $option .= "\t<option value=\"".$cat_ID."\""; 60 66 if (in_array($cat_ID, $selected)) 61 echo' selected="selected"';62 echo'>';63 echo$myts->htmlspecialchars($cat_name);64 echo"</option>\n";67 $option .= ' selected="selected"'; 68 $option .= '>'; 69 $option .= $myts->htmlspecialchars($cat_name); 70 $option .= "</option>\n"; 65 71 } 66 72 } 67 return; 73 $output = _MB_XP2_CATS_SELECT ."<br />\n"; 74 $output .= "<input type='hidden' name='$option_name' value='$value' />\n"; 75 $output .= ' <select name="categorie" '.$size.' multiple="multiple" onclick="CatSelect()">' ."\n"; 76 $output .= $option; 77 $output .= '</select><br />'; 78 $output .= ' 79 <script type="text/javascript"> 80 function CatSelect(){ 81 var idx=new Array(); 82 var sel=document.forms["blockform"].elements["categorie"].options; 83 for(var i=0, n=0; i<sel.length; i++){ 84 if(sel[i].selected){ idx[n++]=sel[i].value; } 85 } 86 if(idx.length>0){ 87 document.forms["blockform"].elements["' .$option_name . '"].value = idx; 88 } 89 } 90 </script> 91 '; 92 93 return $output; 94 95 } 96 endif; 97 98 if(!function_exists("comment_type_select")): 99 function comment_type_select($option_name = '',$value='') 100 { 101 $selected = explode(',' , $value); 102 $isAll = (count($selected)==0||empty($selected[0]))?true:false; 103 104 $option = "<option value=\"0\" "; 105 if ($isAll) $form .= " selected=\"selected\""; 106 $option .= ">"._MB_XP2_ALL ."</option>"; 107 108 $option .= "<option value=\"1\" "; 109 if (in_array(1, $selected)) 110 $option .= " selected=\"selected\""; 111 $option .= ">"._MB_XP2_COMMENT ."</option>"; 112 113 $option .= "<option value=\"2\" "; 114 if (in_array(2, $selected)) 115 $option .= " selected=\"selected\""; 116 $option .= ">"._MB_XP2_TRUCKBACK ."</option>"; 117 118 $option .= "<option value=\"3\" "; 119 if (in_array(3, $selected)) 120 $option .= " selected=\"selected\""; 121 $option .= ">"._MB_XP2_PINGBACK ."</option>"; 122 123 $output = _MB_XP2_COM_TYPE . "<br />\n"; 124 $output .= "<input type='hidden' name='$option_name' value='$value' />\n"; 125 $output .= ' <select name="com_type" multiple="multiple" onclick="ComTypeSelect()">' ."\n"; 126 $output .= $option; 127 $output .= '</select><br />'; 128 $output .= ' 129 <script type="text/javascript"> 130 function ComTypeSelect(){ 131 var idx=new Array(); 132 var sel=document.forms["blockform"].elements["com_type"].options; 133 for(var i=0, n=0; i<sel.length; i++){ 134 if(sel[i].selected){ idx[n++]=sel[i].value; } 135 } 136 if(idx.length>0){ 137 document.forms["blockform"].elements["' .$option_name . '"].value = idx; 138 } 139 } 140 </script> 141 '; 142 143 return $output; 144 68 145 } 69 146 endif; 70 147 71 148 72 73 149 ?> -
branches/XPressMU/xpressme_integration_kit/blocks/popular_posts_block.php
r365 r451 23 23 $time_format = empty( $options[5] ) ? '' : $options[5] ; 24 24 $tag_select = $options[6] ; 25 $ selected = array_slice($options, 7); // get allowed cats25 $cat_select = empty( $options[7] ) ? '0' : $options[7] ; 26 26 27 27 $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; … … 44 44 } 45 45 46 $form .= _MB_XP2_CATS_SELECT ."<br />\n"; 47 $isAll = (count($selected)==0||empty($selected[0]))?true:false; 48 $form .= " <select name=\"options[]\" multiple=\"multiple\">"; 49 $form .= "<option value=\"0\" "; 50 if ($isAll) $form .= " selected=\"selected\""; 51 $form .= ">"._MB_XP2_ALL ."</option>"; 52 ob_start(); 53 dropdown_cats_options('ID','asc',$selected); 54 $list_str = ob_get_contents(); 55 ob_end_clean(); 56 $form .= $list_str. "</select><br />"; 57 // $form .="<br /><input type='text' size='60' name='options[5]' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />"; 58 46 $form .= categorie_select('options[7]' , $cat_select); 59 47 return $form; 60 48 } -
branches/XPressMU/xpressme_integration_kit/blocks/recent_comments_block.php
r232 r451 23 23 $date_format = empty( $options[4] ) ? '' : $options[4] ; 24 24 $time_format = empty( $options[5] ) ? '' : $options[5] ; 25 $selected = array_slice($options,6); // get allowed cats25 $com_select = empty( $options[6] ) ? '0' : $options[6] ; 26 26 27 27 $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; … … 37 37 $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[5]' value='" . $time_format . "' /><br />\n"; 38 38 $form .= "<br />\n"; 39 $form .= _MB_XP2_COM_TYPE . "<br />\n"; 40 $isAll = (count($selected)==0||empty($selected[0]))?true:false; 41 $form .= " <select name=\"options[]\" multiple=\"multiple\">"; 42 $form .= "<option value=\"0\" "; 43 if ($isAll) $form .= " selected=\"selected\""; 44 $form .= ">"._MB_XP2_ALL ."</option>"; 45 46 $form .= "<option value=\"1\" "; 47 if (in_array(1, $selected)) 48 $form .= " selected=\"selected\""; 49 $form .= ">"._MB_XP2_COMMENT ."</option>"; 50 51 $form .= "<option value=\"2\" "; 52 if (in_array(2, $selected)) 53 $form .= " selected=\"selected\""; 54 $form .= ">"._MB_XP2_TRUCKBACK ."</option>"; 55 56 $form .= "<option value=\"3\" "; 57 if (in_array(3, $selected)) 58 $form .= " selected=\"selected\""; 59 $form .= ">"._MB_XP2_PINGBACK ."</option>"; 60 $form .= "</select><br />"; 61 // $form .="<br /><input type='text' size='60' name='options[5]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />"; 39 $form .= comment_type_select('options[6]' , $com_select); 62 40 63 41 -
branches/XPressMU/xpressme_integration_kit/blocks/recent_posts_content_block.php
r425 r451 19 19 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 20 20 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] ); 21 $d ay_select = ($options[2])?intval($options[2]):0;22 $ day_size = ($options[3])?intval($options[3]):0;23 $ disp_count = ($options[4])?intval($options[4]):10;24 $ excerpt = empty( $options[5] ) ? false : true;25 $ excerpt_size = ($options[6])?intval($options[6]):100;26 $ date_format = empty( $options[7] ) ? '' :$options[7] ;27 $ time_format = empty( $options[8] ) ? '' : $options[8] ;28 $ tag_select = $options[9];29 $selected = array_slice($options,10); // get allowed cats21 $disp_count = ($options[2])?intval($options[2]):10; 22 $excerpt = empty( $options[3] ) ? false : true ; 23 $excerpt_size = ($options[4])?intval($options[4]):100; 24 $date_format = empty( $options[5] ) ? '' : $options[5] ; 25 $time_format = empty( $options[6] ) ? '' : $options[6] ; 26 $tag_select = $options[7] ; 27 $cat_select = empty( $options[8] ) ? '0' : $options[8] ; 28 $day_select = ($options[9])?intval($options[9]):0; 29 $day_size = ($options[10])?intval($options[10]):0; 30 30 31 31 $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; … … 35 35 $form = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n"; 36 36 $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 37 $form .= "<br />"; 38 $form .= _MB_XP2_DAY_SELECT . ':' . _MB_XP2_DAY_BETWEEN . '<select name="options[2]">'; 37 $form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n"; 38 $form .= yes_no_radio_option('options[3]', _MB_XP2_P_EXCERPT , $excerpt) . "<br />\n"; 39 $form .= _MB_XP2_P_EXCERPT_SIZE .": <input type='text' name='options[4]' value='" . $excerpt_size . "' /><br />\n"; 40 $form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[5]' value='" . $date_format . "' /><br />\n"; 41 $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[6]' value='" . $time_format . "' /><br />\n"; 42 43 include $mydirpath .'/wp-includes/version.php' ; 44 if (wp_version_compare($wp_version, '>=','2.3')){ 45 $form .= "<br />\n"; 46 $form .= _MB_XP2_TAGS_SELECT .": <input type='text' name='options[7]' value='" . $tag_select . "' /><br />\n"; 47 } else { 48 $form .= "<input type='hidden' name='options[7]' value='' /><br />\n"; 49 } 50 51 $form .= categorie_select('options[8]' , $cat_select); 52 53 $form .= "<br />"; 54 $form .= _MB_XP2_DAY_SELECT . ':' . _MB_XP2_DAY_BETWEEN . '<select name="options[9]">'; 39 55 switch ($day_select){ 40 56 case 1: 41 57 $form .= '<option value="0">' . _MB_XP2_NONE . '</option>'; 42 58 $form .= '<option value="1" selected>'. _MB_XP2_TODAY . '</option>'; 43 $form .= '<option value="2">' . _MB_XP2_LA STES. '</option>';59 $form .= '<option value="2">' . _MB_XP2_LATEST . '</option>'; 44 60 break; 45 61 case 2: 46 62 $form .= '<option value="0">' . _MB_XP2_NONE . '</option>'; 47 63 $form .= '<option value="1">'. _MB_XP2_TODAY . '</option>'; 48 $form .= '<option value="2" selected>' . _MB_XP2_LA STES. '</option>';64 $form .= '<option value="2" selected>' . _MB_XP2_LATEST . '</option>'; 49 65 break; 50 66 default : 51 67 $form .= '<option value="0" selected>' . _MB_XP2_NONE . '</option>'; 52 68 $form .= '<option value="1">'. _MB_XP2_TODAY . '</option>'; 53 $form .= '<option value="2">' . _MB_XP2_LA STES. '</option>';69 $form .= '<option value="2">' . _MB_XP2_LATEST . '</option>'; 54 70 } 55 71 $form .= '</select>'; 56 72 57 $form .= ' ' . _MB_XP2_DAYS_AND . " <input type='text' size='2' name='options[3]' value='" . $day_size . "' />" . _MB_XP2_DAYS_AGO . "<br />\n"; 58 59 $form .= _MB_XP2_COUNT .": <input type='text' name='options[4]' value='" . $disp_count . "' /><br />\n"; 60 $form .= yes_no_radio_option('options[5]', _MB_XP2_P_EXCERPT , $excerpt) . "<br />\n"; 61 $form .= _MB_XP2_P_EXCERPT_SIZE .": <input type='text' name='options[6]' value='" . $excerpt_size . "' /><br />\n"; 62 $form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[7]' value='" . $date_format . "' /><br />\n"; 63 $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[8]' value='" . $time_format . "' /><br />\n"; 64 65 include $mydirpath .'/wp-includes/version.php' ; 66 if (wp_version_compare($wp_version, '>=','2.3')){ 67 $form .= "<br />\n"; 68 $form .= _MB_XP2_TAGS_SELECT .": <input type='text' name='options[9]' value='" . $tag_select . "' /><br />\n"; 69 } else { 70 $form .= "<input type='hidden' name='options[9]' value='' /><br />\n"; 71 } 72 73 $form .= _MB_XP2_CATS_SELECT ."<br />\n"; 74 $isAll = (count($selected)==0||empty($selected[0]))?true:false; 75 $form .= " <select name=\"options[]\" multiple=\"multiple\">\n"; 76 $form .= "\t<option value=\"0\" "; 77 if ($isAll) $form .= " selected=\"selected\""; 78 $form .= ">"._MB_XP2_ALL ."</option>\n"; 79 ob_start(); 80 dropdown_cats_options('ID','asc',$selected); 81 $list_str = ob_get_contents(); 82 ob_end_clean(); 83 $form .= $list_str. "</select><br />\n"; 84 85 // $form .="<br /><input type='text' size='60' name='options[11]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />"; 73 $form .= ' ' . _MB_XP2_DAYS_AND . " <input type='text' size='2' name='options[10]' value='" . $day_size . "' />" . _MB_XP2_DAYS_AGO . "<br />\n"; 86 74 87 75 return $form; -
branches/XPressMU/xpressme_integration_kit/blocks/recent_posts_list_block.php
r365 r451 24 24 $time_format = empty( $options[6] ) ? '' : $options[6] ; 25 25 $tag_select = $options[7] ; 26 $ selected = array_slice($options,8); // get allowed cats26 $cat_select = empty( $options[8] ) ? '0' : $options[8] ; 27 27 28 28 $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; … … 47 47 } 48 48 49 $form .= _MB_XP2_CATS_SELECT ."<br />\n"; 50 $isAll = (count($selected)==0||empty($selected[0]))?true:false; 51 $form .= " <select name=\"options[]\" multiple=\"multiple\">\n"; 52 $form .= "\t<option value=\"0\" "; 53 if ($isAll) $form .= " selected=\"selected\""; 54 $form .= ">"._MB_XP2_ALL ."</option>\n"; 55 ob_start(); 56 dropdown_cats_options('ID','asc',$selected); 57 $list_str = ob_get_contents(); 58 ob_end_clean(); 59 $form .= $list_str. "</select><br />\n"; 60 61 // $form .="<br /><input type='text' size='60' name='options[5]' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />"; 49 $form .= categorie_select('options[8]' , $cat_select); 62 50 63 51 return $form; -
branches/XPressMU/xpressme_integration_kit/blocks/widget_block.php
r339 r451 20 20 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_widget_block.html' : trim( $options[1] ); 21 21 $title_show = empty( $options[2] ) ? false : true ; 22 $selected = array_slice($options,3); // get allowed cats 22 $widget_select = empty( $options[3] ) ? '' : $options[3] ; 23 24 $selected = explode(',' , $widget_select); 23 25 24 26 if ($mydirname == 'wordpress'){ … … 48 50 $form .= "<br />"; 49 51 $form .= _MB_XP2_SELECT_WIDGET .":<br />\n"; 50 $select = " <select name='options[]' multiple=\"multiple\">\n"; 52 $form .= "<input type='hidden' name='options[3]' value='$widget_select' />\n"; 53 54 $select = " <select name='widget_sel' multiple=\"multiple\" onclick=\"WidgetSelect()\">\n"; 51 55 $found = false; 52 56 foreach ( (array) $sidebars_widgets as $index => $sidebar ){ … … 67 71 68 72 $select .= "</select><br/>\n"; 73 $select .= ' 74 <script type="text/javascript"> 75 function WidgetSelect(){ 76 var idx=new Array(); 77 var sel=document.forms["blockform"].elements["widget_sel"].options; 78 for(var i=0, n=0; i<sel.length; i++){ 79 if(sel[i].selected){ idx[n++]=sel[i].value; } 80 } 81 if(idx.length>0){ 82 document.forms["blockform"].elements["options[3]"].value = idx; 83 } 84 } 85 </script> 86 '; 87 69 88 if ($found){ 70 89 $form = $form . $select; -
branches/XPressMU/xpressme_integration_kit/class/check_blocks_class.php
r300 r451 218 218 $option_arr_2 = explode( '|', $block_obj->getVar('options', 'n') ); 219 219 220 $excludes_block = array( 'widget_block.php','popular_posts_block.php','recent_comments_block.php','recent_posts_content_block.php','recent_posts_list_block.php');220 $excludes_block = array(); 221 221 222 222 if (in_array($info['file'],$excludes_block)){ -
branches/XPressMU/xpressme_integration_kit/include/add_xpress_process.php
r421 r451 14 14 15 15 require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php. 16 unset($offset); 16 17 require_once(ABSPATH.'wp-settings.php'); 17 18 if (!is_object($xoopsUser)){ // before login auth cookie clear -
branches/XPressMU/xpressme_integration_kit/include/xpress_block_render.php
r406 r451 137 137 } 138 138 139 function get_block_file_path($mydirname,$file_name)140 {141 global $xoops_config;142 $mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname;143 $select_theme = get_xpress_theme_name($mydirname);144 $block_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/blocks/' . $file_name;145 146 if (!file_exists($block_file))147 $block_file = $xoops_config->xoops_root_path . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/' . $file_name;148 return $block_file;149 }150 139 151 140 function xpress_block_cache_found($mydirname,$block_name) … … 184 173 if (strstr($call_url,$this_url)){ 185 174 $block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name); 186 require_once $block_theme_file ;175 require_once $block_theme_file['file_path']; 187 176 $block = $call_theme_function_name($options); //The block name and the called function name should be assumed to be the same name. 177 if (!empty($block_theme_file['error'])) 178 $block['err_message'] = $block_theme_file['error']; 188 179 } else { 189 180 if (xpress_block_cache_found($mydirname,$cache_title. $blockID)){ … … 227 218 228 219 $block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name); 229 require_once $block_theme_file ;220 require_once $block_theme_file['file_path']; 230 221 $render = $call_theme_function_name($options); //The block name and the called function name should be assumed to be the same name. 231 222 $render_array['block'] = $render; 232 223 $render_array['block']['options'] = $block->options; 224 if (!empty($block_theme_file['error'])) 225 $render_array['block']['err_message'] = $block_theme_file['error']; 233 226 if (xpress_block_cache_found($mydirname,$cache_title. $blockID)){ 234 227 $render_serialize = xpress_XML_serialize($render_array); … … 295 288 } 296 289 } 297 290 298 291 } 299 292 ?> -
branches/XPressMU/xpressme_integration_kit/include/xpress_breadcrumbs.php
r59 r451 1 1 <?php 2 function get_breadcrumbs(){ 2 3 // $xoops_breadcrumbs[0] = array( 'name' => get_bloginfo('description') , 'url' => get_settings('home')); 3 4 $xoops_breadcrumbs[0] = array( 'name' => get_bloginfo('name') , 'url' => get_settings('home')); … … 46 47 } 47 48 } 48 $xoopsTpl->assign('xoops_breadcrumbs', $xoops_breadcrumbs); 49 return $xoops_breadcrumbs; 50 } 49 51 ?> -
branches/XPressMU/xpressme_integration_kit/include/xpress_render.php
r422 r451 11 11 12 12 $pattern = "<head[^>]*?>(.*)<\/head>"; 13 preg_match("/".$pattern."/s", $body_cut, $head_matches); 14 $head_str = $head_matches[1]; 15 13 $head_str = ''; 14 if (preg_match("/".$pattern."/s", $body_cut, $head_matches)){ 15 $head_str = $head_matches[1]; 16 } 16 17 $pattern = '<head[^>]*?>'; 17 18 $head_str = preg_replace("/".$pattern."/s" , '' , $head_str); … … 51 52 { 52 53 $pattern = '<title[^>]*?>(.*)<\s*\/\s*title\s*>'; 53 preg_match("/".$pattern."/i", $contents, $head_matches); 54 $title_str = $head_matches[1]; 54 $title_str = ''; 55 if (preg_match("/".$pattern."/i", $contents, $head_matches)){ 56 $title_str = $head_matches[1]; 57 } 55 58 return $title_str; 56 59 } … … 59 62 { 60 63 $pattern = '<\s*meta\s+name\s*=\s*["\']' . $name . '["\']\s*content\s*=\s*[\'"](.*)[\'"]\s*\/\s*>'; 61 preg_match("/".$pattern."/i", $contents, $head_matches); 62 $meta = $head_matches[1]; 64 $meta = ''; 65 if (preg_match("/".$pattern."/i", $contents, $head_matches)){ 66 $meta = @$head_matches[1]; 67 } 63 68 return $meta; 64 69 } … … 89 94 $xpess_config = new XPressME_Class(); 90 95 $pattern = "<body[^>]*?>(.*)<\/body>"; 91 preg_match("/".$pattern."/s", $contents, $body_matches); 92 $body = $body_matches[1]; 93 96 $body = ''; 97 if(preg_match("/".$pattern."/s", $contents, $body_matches)){ 98 $body = $body_matches[1]; 99 } 94 100 if (!$xpess_config->is_theme_sidebar_disp){ 95 101 $side_panel = get_sidebar_rander(); … … 151 157 152 158 require_once( ABSPATH .'/include/xpress_breadcrumbs.php' ); 153 159 $xoops_breadcrumbs = get_breadcrumbs(); 160 154 161 xpress_remake_global_for_permlink(); 155 162 $mydirname = basename(dirname(dirname(__FILE__))); 156 163 include $xoops_config->xoops_root_path ."/header.php"; 164 $xoopsTpl->assign('xoops_breadcrumbs', $xoops_breadcrumbs); 157 165 $xoopsTpl->assign('xoops_module_header', get_xpress_module_header($contents)); 158 166 $page_title = $GLOBALS["xoopsModule"]->getVar("name"). ' »'. get_xpress_title($contents); … … 216 224 $xpress_data['body_contents'] = get_body($contents); 217 225 // used $GLOBALS. becose xpress_left_arrow_post_link() and xpress_right_arrow_post_link() is other loop in this position 218 $xpress_data['left_post_link'] = $GLOBALS['left_arrow_post_link'];219 $xpress_data['right_post_link'] = $GLOBALS['right_arrow_post_link'];226 $xpress_data['left_post_link'] = @$GLOBALS['left_arrow_post_link']; 227 $xpress_data['right_post_link'] = @$GLOBALS['right_arrow_post_link']; 220 228 $xpress_data['left_posts_link'] = str_replace('«','',xpress_left_arrow_posts_link('echo=0')); 221 229 $xpress_data['right_posts_link'] = str_replace('»','',xpress_right_arrow_posts_link('echo=0')); -
branches/XPressMU/xpressme_integration_kit/language/english/blocks.php
r425 r451 43 43 define("_MB_XP2_NONE","None"); 44 44 define("_MB_XP2_TODAY","Today"); 45 define("_MB_XP2_LA STES","Lastes");45 define("_MB_XP2_LATEST","Latest"); 46 46 define("_MB_XP2_DAY_BETWEEN","Between"); 47 47 define("_MB_XP2_DAYS_AND","and"); -
branches/XPressMU/xpressme_integration_kit/language/ja_utf8/blocks.php
r425 r451 43 43 define("_MB_XP2_NONE","なし"); 44 44 define("_MB_XP2_TODAY","本日の投稿"); 45 define("_MB_XP2_LA STES","最新の投稿");45 define("_MB_XP2_LATEST","最新の投稿"); 46 46 define("_MB_XP2_DAY_BETWEEN",""); 47 47 define("_MB_XP2_DAYS_AND","から"); -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php
r428 r451 792 792 793 793 $week_begins = intval(get_option('start_of_week')); 794 $head_pattrn = '<thead>\s*<tr>\s*(<th[^>]*> .*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*(<th[^>]*>.*<\/th>)\s*<\/tr>\s*<\/thead>';794 $head_pattrn = '<thead>\s*<tr>\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*(<th[^>]*>[^<]*<\/th>)\s*<\/tr>\s*<\/thead>'; 795 795 if(preg_match('/'. $head_pattrn . '/s' ,$calendar,$head_match)){ 796 796 $sun_index = 1 - $week_begins; -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
r389 r451 365 365 } 366 366 367 function get_block_file_path($mydirname,$file_name) 368 { 369 global $xoops_config, $xpress_config; 370 $mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname; 371 $select_theme = xpress_ThemeTemplate(get_xpress_theme_name($mydirname)); 372 $xpress_default_theme = 'xpress_default'; 373 $select_block = '/wp-content/themes/' . $select_theme . '/blocks/' . $file_name; 374 $default_block = '/wp-content/themes/xpress_default/blocks/' . $file_name; 375 $select_block_path = $mydirpath . $select_block; 376 $default_block_path = $mydirpath . $default_block; 377 378 $block_file_data = array(); 379 $block_file_data['file_path'] = $default_block_path; 380 $block_file_data['error'] = ''; 381 382 if($select_theme != $xpress_default_theme){ 383 if (file_exists($select_block_path)){ 384 $select_block_version = get_block_version($select_block_path); 385 $default_block_version = get_block_version($default_block_path); 386 if (version_compare($select_block_version,$default_block_version, "<")){ 387 $block_file_data['file_path'] = $default_block_path; 388 if ($xpress_config->is_block_error_display){ 389 $error_str = '<div style="color:red">'; 390 $error_str .= sprintf(__('Block file %1$s is an old version %2$s.<br />used block file %3$s of new version %4$s.','xpressme'),$select_block,$select_block_version,$default_block,$default_block_version); 391 $error_str .= '</div>'; 392 $block_file_data['error'] = $error_str; 393 } 394 } else { 395 $block_file_data['file_path'] = $select_block_path; 396 $block_file_data['error'] = ''; 397 } 398 } 399 } 400 return $block_file_data; 401 } 402 403 function get_block_version($file_path = ''){ 404 $array_file = file($file_path); 405 $pattern = '^[\s|\/]*[B|b]lock\s+[V|v]ersion\s*[:|;]\s*([0-9|.]*)'; 406 $version = '0.1'; 407 if (empty($file_path)) return $version; 408 if (!file_exists($file_path)) return $version; 409 if (count($array_file) > 5) $file_count = 5; else $file_count = count($array_file); 410 for ($i = 0 ; $i < $file_count ; $i++){ 411 if (preg_match('/' . $pattern . '/' ,$array_file[$i],$matchs)){ 412 $version = $matchs[1]; 413 break; 414 } 415 } 416 return $version; 417 } 418 367 419 ?> -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/language/xpressme-ja.po
r406 r451 8 8 "Project-Id-Version: XPressME Plugin\n" 9 9 "Report-Msgid-Bugs-To: \n" 10 "POT-Creation-Date: 2009-1 0-06 21:59+0900\n"11 "PO-Revision-Date: 2009-1 0-06 22:00+0900\n"10 "POT-Creation-Date: 2009-11-20 12:51+0900\n" 11 "PO-Revision-Date: 2009-11-20 12:51+0900\n" 12 12 "Last-Translator: toemon <info@toemon.com>\n" 13 13 "Language-Team: toemon <info@toemon.com>\n" … … 23 23 "X-Poedit-SearchPath-0: .\n" 24 24 25 #: xpressme.php: 3325 #: xpressme.php:59 26 26 msgid "Display Settings" 27 27 msgstr "表示設定" 28 28 29 #: xpressme.php: 3429 #: xpressme.php:60 30 30 msgid "Integration Settings" 31 31 msgstr "統合設定" 32 32 33 #: xpressme.php: 3533 #: xpressme.php:61 34 34 msgid "Other Settings" 35 35 msgstr "その他の設定" 36 36 37 #: xpressme.php: 3737 #: xpressme.php:63 38 38 msgid "Upgrade" 39 39 msgstr "アップグレード" 40 40 41 #: xpressme.php: 3841 #: xpressme.php:64 42 42 msgid "to Modules Admin" 43 43 msgstr "モジュール管理へ" 44 44 45 #: xpressme.php:1 3845 #: xpressme.php:164 46 46 msgid "XPressME Display Setting" 47 47 msgstr "XPressME 表示設定" 48 48 49 #: xpressme.php:1 4449 #: xpressme.php:170 50 50 msgid "Thema Sidebar Display" 51 51 msgstr "テーマ表示時にサイドバー表示する。" 52 52 53 #: xpressme.php:1 4554 #: xpressme.php:2 3555 #: xpressme.php:2 4156 #: xpressme.php:2 4657 #: xpressme.php:2 5258 #: xpressme_class.php:2 8359 #: xpressme_class.php: 29960 #: xpressme_class.php:4 3161 #: xpressme_class.php:4 4253 #: xpressme.php:171 54 #: xpressme.php:263 55 #: xpressme.php:269 56 #: xpressme.php:274 57 #: xpressme.php:280 58 #: xpressme_class.php:296 59 #: xpressme_class.php:314 60 #: xpressme_class.php:445 61 #: xpressme_class.php:456 62 62 msgid "YES" 63 63 msgstr "はい" 64 64 65 #: xpressme.php:1 4666 #: xpressme.php:2 3667 #: xpressme.php:2 4268 #: xpressme.php:2 4769 #: xpressme.php:2 5370 #: xpressme_class.php:2 8471 #: xpressme_class.php:3 0072 #: xpressme_class.php:4 3273 #: xpressme_class.php:4 4365 #: xpressme.php:172 66 #: xpressme.php:264 67 #: xpressme.php:270 68 #: xpressme.php:275 69 #: xpressme.php:281 70 #: xpressme_class.php:297 71 #: xpressme_class.php:315 72 #: xpressme_class.php:446 73 #: xpressme_class.php:457 74 74 msgid "NO" 75 75 msgstr "いいえ" 76 76 77 #: xpressme.php:1 5578 #: xpressme.php:2 0479 #: xpressme.php:2 5877 #: xpressme.php:181 78 #: xpressme.php:232 79 #: xpressme.php:291 80 80 msgid "Update Config" 81 81 msgstr "更新" 82 82 83 #: xpressme.php:1 5684 #: xpressme.php:2 0585 #: xpressme.php:2 5983 #: xpressme.php:182 84 #: xpressme.php:233 85 #: xpressme.php:292 86 86 msgid "Preset Config" 87 87 msgstr "プリセット" 88 88 89 #: xpressme.php: 18889 #: xpressme.php:214 90 90 msgid "XPressME Integration Setting" 91 91 msgstr "XPressME 統合設定" 92 92 93 #: xpressme.php: 19393 #: xpressme.php:218 94 94 msgid "Media Upload Base Path" 95 95 msgstr "メディアアップロードのベースパス設定" 96 96 97 #: xpressme.php: 19497 #: xpressme.php:222 98 98 msgid "Use XOOPS UPLOAD PATH" 99 99 msgstr "XOOPSのアップロードパスを使用する。" 100 100 101 #: xpressme.php: 195101 #: xpressme.php:223 102 102 msgid "USE WordPress BASE_PATH" 103 103 msgstr "WordPressのベースパスを使用する。" 104 104 105 #: xpressme.php:2 29105 #: xpressme.php:257 106 106 msgid "XPressME Other Setting" 107 107 msgstr "XPressME その他の設定" 108 108 109 #: xpressme.php:2 34109 #: xpressme.php:262 110 110 msgid "The change tracking of the post is preserved" 111 111 msgstr "投稿の変更履歴を有効にする。" 112 112 113 #: xpressme.php:2 40113 #: xpressme.php:268 114 114 msgid "Select Multi user mode" 115 115 msgstr "マルチユーザーモードを選択" 116 116 117 #: xpressme.php:2 45117 #: xpressme.php:273 118 118 msgid "Is the posts author views counted?" 119 119 msgstr "投稿者の閲覧をカウントしますか?" 120 120 121 #: xpressme.php:2 51121 #: xpressme.php:279 122 122 msgid "Is SQL debugging window displayed?" 123 123 msgstr "SQLデバッグウィンドを表示しますか?" 124 124 125 #: xpressme.php:275 126 msgid "XPressME Upgrade" 127 msgstr "XPressME アップグレード" 128 129 #: xpressme.php:289 130 #, php-format 131 msgid "You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href=\"%2$s\">stay updated</a>." 132 msgstr "お使いの XPressME Integration Kit は開発版 (%1$s) です。すばらしい ! どうぞ<a href=\"%2$s\">最新版を使い続けてください</a>。" 133 134 #: xpressme.php:293 135 msgid "There is a new version of XPressME Integration Kit available for upgrade" 136 msgstr "新しいバージョンの XPressME Integration Kit にアップグレードが可能です" 137 138 #: xpressme.php:296 139 #, php-format 140 msgid "You can upgrade to version %s download the package and install it manually:" 141 msgstr "バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。" 142 143 #: xpressme.php:299 144 #, php-format 145 msgid "Download %s" 146 msgstr "%s をダウンロード" 147 148 #: xpressme.php:302 149 msgid "You have the latest version of XPressME Integration Kit. You do not need to upgrade" 150 msgstr "最新バージョンの XPressME Integration Kit をご利用中です。アップグレードの必要はありません。" 151 152 #: xpressme.php:306 153 #, php-format 154 msgid "There is no response from <a href=\"%s\">version check API</a> now. sorry, please confirm it after." 155 msgstr "現在、<a href=\"%s\">version check API</a>からのレスポンスがありません。 申し訳ありませんが、しばらく後で確認してください。" 156 157 #: xpressme.php:425 158 #, php-format 159 msgid "XPressME Integration Kit Version %1$s is available! <a href=\"%2$s\">Please update now</a>." 160 msgstr "XPressME Integration Kit Version %1$s が利用可能です ! <a href=\"%2$s\">アップデートしてください</a>。" 161 162 #: xpressme.php:427 163 #, php-format 164 msgid "XPressME Integration Kit Version %1$s is available! Please notify the site administrator." 165 msgstr "XPressME Integration Kit Version %1$s が利用可能です ! サイト管理者に連絡してください。" 166 167 #: xpressme_class.php:55 168 #: xpressme_class.php:232 125 #: xpressme.php:284 126 msgid "Select warning display of block file version check" 127 msgstr "ブロックファイルのバージョンチェック時における警告表示" 128 129 #: xpressme.php:285 130 msgid "Do display" 131 msgstr "表示する" 132 133 #: xpressme.php:286 134 msgid "Do not display" 135 msgstr "表示しない" 136 137 #: xpressme_class.php:61 138 #: xpressme_class.php:243 169 139 msgid "Older Post" 170 140 msgstr "前の投稿へ" 171 141 172 #: xpressme_class.php: 56173 #: xpressme_class.php:2 35142 #: xpressme_class.php:62 143 #: xpressme_class.php:246 174 144 msgid "Newer Post" 175 145 msgstr "次の投稿へ" 176 146 177 #: xpressme_class.php: 58178 #: xpressme_class.php:2 38147 #: xpressme_class.php:64 148 #: xpressme_class.php:249 179 149 msgid "Older Entries" 180 150 msgstr "前ページへ" 181 151 182 #: xpressme_class.php: 59183 #: xpressme_class.php:2 41152 #: xpressme_class.php:65 153 #: xpressme_class.php:252 184 154 msgid "Newer Entries" 185 155 msgstr "次ページへ" 186 156 187 #: xpressme_class.php:7 3188 #: xpressme_class.php: 74189 #: xpressme_class.php:2 44157 #: xpressme_class.php:79 158 #: xpressme_class.php:80 159 #: xpressme_class.php:255 190 160 msgid "Read the rest of this entry »" 191 161 msgstr "この投稿の続きを読む »" 192 162 193 #: xpressme_class.php:3 42163 #: xpressme_class.php:356 194 164 msgid "Single Post Navi Setting" 195 165 msgstr "シングルポストナビの設定" 196 166 197 #: xpressme_class.php:3 47198 #: xpressme_class.php: 392167 #: xpressme_class.php:361 168 #: xpressme_class.php:406 199 169 msgid "Adjustment of Navi link display position" 200 170 msgstr "リンクの表示位置設定" 201 171 202 #: xpressme_class.php:3 50172 #: xpressme_class.php:364 203 173 msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right" 204 174 msgstr "以前の記事へのリンクを左に、より新しい記事へのリンクを右に表示" 205 175 206 #: xpressme_class.php:3 51176 #: xpressme_class.php:365 207 177 msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right" 208 178 msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示" 209 179 210 #: xpressme_class.php:3 57180 #: xpressme_class.php:371 211 181 msgid "Select Display name of PostNavi Link" 212 182 msgstr "表示するリンクテキストを選択" 213 183 214 #: xpressme_class.php:3 60184 #: xpressme_class.php:374 215 185 msgid "Title of post" 216 186 msgstr "投稿記事のタイトルを表示" 217 187 218 #: xpressme_class.php:3 61188 #: xpressme_class.php:375 219 189 msgid "Title of Navi" 220 190 msgstr "ナビタイトルを表示" 221 191 222 #: xpressme_class.php:3 67192 #: xpressme_class.php:381 223 193 msgid "Display Navi Title of Old Post Link" 224 194 msgstr "古い記事へのナビタイトルを設定" 225 195 226 #: xpressme_class.php:3 74196 #: xpressme_class.php:388 227 197 msgid "Display Navi Title of Newer Post Link" 228 198 msgstr "より新しい記事へのナビタイトルを設定" 229 199 230 #: xpressme_class.php: 387200 #: xpressme_class.php:401 231 201 msgid "Posts List Page Navi Setting" 232 202 msgstr "ポストリストページナビの設定" 233 203 234 #: xpressme_class.php: 395204 #: xpressme_class.php:409 235 205 msgid "'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right" 236 206 msgstr "古いページへのリンクを左に、より新しいページへのリンクを右に表示" 237 207 238 #: xpressme_class.php: 396208 #: xpressme_class.php:410 239 209 msgid "'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right" 240 210 msgstr "より新しいページへのリンクを左に、古いページへのリンクを右に表示" 241 211 242 #: xpressme_class.php:4 02212 #: xpressme_class.php:416 243 213 msgid "Display Navi Title of Old Page Link" 244 214 msgstr "古いページへのナビタイトルを設定" 245 215 246 #: xpressme_class.php:4 09216 #: xpressme_class.php:423 247 217 msgid "Display Navi Title of Newer Page Link" 248 218 msgstr "より新しいページへのナビタイトルを設定" 249 219 250 #: xpressme_class.php:4 22220 #: xpressme_class.php:436 251 221 msgid "Dashboard feed Display Setting" 252 222 msgstr "ダッシュボード フィード表示設定" 253 223 254 #: xpressme_class.php:4 28224 #: xpressme_class.php:442 255 225 msgid "Display XPressMe Integration Kit Blog" 256 226 msgstr "XPressME Integration Kit ブログを表示する。" 257 227 258 #: xpressme_class.php:4 39228 #: xpressme_class.php:453 259 229 msgid "Display XPressMe Integration Kit Forum" 260 230 msgstr "XPressME Integration Kit フォーラムを表示する。" 261 231 262 #: xpressme_class.php:4 56232 #: xpressme_class.php:471 263 233 msgid "Role Setting at Login" 264 234 msgstr "ログイン時の権限設定" 265 235 266 #: xpressme_class.php:4 59236 #: xpressme_class.php:474 267 237 msgid "XOOPS Groupe" 268 238 msgstr "XOOPSグループ名" 269 239 270 #: xpressme_class.php:4 59240 #: xpressme_class.php:474 271 241 msgid "WordPress Role" 272 242 msgstr "WordPressでの権限" 273 243 274 #: xpressme_class.php:4 59244 #: xpressme_class.php:474 275 245 msgid "Role is set at each login" 276 246 msgstr "ログイン時、常に権限を更新する" 277 247 278 #: xpressme_class.php: 485279 #: xpressme_class.php: 489280 #: xpressme_class.php: 492248 #: xpressme_class.php:500 249 #: xpressme_class.php:504 250 #: xpressme_class.php:507 281 251 msgid "Default Role of WordPress" 282 252 msgstr "WordPressのデフォルト権限" 283 253 284 #: xpressme_class.php: 486285 #: xpressme_class.php: 490286 #: xpressme_class.php: 493254 #: xpressme_class.php:501 255 #: xpressme_class.php:505 256 #: xpressme_class.php:508 287 257 msgid "Group User Doesn't Register" 288 258 msgstr "ユーザ登録しない" 289 259 290 #: xpressme_class.php:524 260 #: xpressme_class.php:521 261 msgid "Only the Admin can set Group Role Setting" 262 msgstr "管理者だけがグループ権限を設定できます。" 263 264 #: xpressme_class.php:541 291 265 msgid "WordPress MU cannot integrate the comments." 292 266 msgstr "WordPress MUはコメント統合できません。" 293 267 294 #: xpressme_class.php:5 26268 #: xpressme_class.php:543 295 269 msgid "Do Not Comment Integration." 296 270 msgstr "コメント統合しません。" 297 271 298 #: xpressme_class.php:5 61272 #: xpressme_class.php:578 299 273 msgid "Comment integration with D3Forum" 300 274 msgstr "D3Forumとのコメント統合" 301 275 302 #: xpressme_class.php:5 63276 #: xpressme_class.php:580 303 277 msgid "Select the forum of D3Forum that does the comment integration from the following lists." 304 278 msgstr "以下のリストからコメント統合をするD3Forumのフォーラムを選択してください。" 305 279 306 #: xpressme_class.php:5 68280 #: xpressme_class.php:585 307 281 msgid "Select the Type of display of D3Forum comment." 308 282 msgstr "D3Forumの表示タイプを選択" 309 283 310 #: xpressme_class.php:5 70311 #: xpressme_class.php:5 73284 #: xpressme_class.php:587 285 #: xpressme_class.php:590 312 286 msgid "Flat" 313 287 msgstr "フラット" 314 288 315 #: xpressme_class.php:5 71316 #: xpressme_class.php:5 74289 #: xpressme_class.php:588 290 #: xpressme_class.php:591 317 291 msgid "Threaded" 318 292 msgstr "スレッド" 319 293 320 #: xpressme_class.php:5 77294 #: xpressme_class.php:594 321 295 msgid "Select the order of display of D3Forum comment." 322 296 msgstr "D3Forumコメントの表示順を選択" 323 297 324 #: xpressme_class.php:5 79325 #: xpressme_class.php:5 82298 #: xpressme_class.php:596 299 #: xpressme_class.php:599 326 300 msgid "DESC" 327 301 msgstr "降順" 328 302 329 #: xpressme_class.php:5 80330 #: xpressme_class.php: 583303 #: xpressme_class.php:597 304 #: xpressme_class.php:600 331 305 msgid "ASC" 332 306 msgstr "昇順" 333 307 334 #: xpressme_class.php: 586308 #: xpressme_class.php:603 335 309 msgid "Number of displays of D3Forum comments." 336 310 msgstr "D3Forumのコメント表示数" 337 311 338 #: xpressme_class.php: 589312 #: xpressme_class.php:606 339 313 msgid "The import and the export between Wordpress Comments and the D3Forum Posts can be done. " 340 314 msgstr "WordPressコメントとD3Forumポスト間の一括転送(エクスポート・インポート)" 341 315 342 #: xpressme_class.php: 590316 #: xpressme_class.php:607 343 317 msgid "Export to D3Forum" 344 318 msgstr "D3Forumへ一括エクスポート" 345 319 346 #: xpressme_class.php: 591320 #: xpressme_class.php:608 347 321 msgid "Import from D3Forum" 348 322 msgstr "D3Forumから一括インポート" 349 323 350 #: xpressme_class.php:6 04324 #: xpressme_class.php:621 351 325 msgid "Contents Excerpt Setting" 352 326 msgstr "記事抜粋の設定" 353 327 354 #: xpressme_class.php:6 09328 #: xpressme_class.php:626 355 329 msgid "Is the excerpt display done with the archive of contents?" 356 330 msgstr "記事のアーカイブで抜粋表示を行いますか?" 357 331 358 #: xpressme_class.php:6 16332 #: xpressme_class.php:633 359 333 msgid "When ASCII character more than the set ratio is included, it is judged ASCII contents. " 360 334 msgstr "ASCII文字が含まれる比率が設定された値より大きい場合、ASCII文字コンテンツと判断します。" 361 335 362 #: xpressme_class.php:6 23336 #: xpressme_class.php:640 363 337 msgid "Excerpt length of word for ASCII contents" 364 338 msgstr "ASCIIコンテンツの抜粋単語数" 365 339 366 #: xpressme_class.php:6 30340 #: xpressme_class.php:647 367 341 msgid "Excerpt length of character for multibyte contents" 368 342 msgstr "マルチバイトコンテンツの抜粋文字数" 369 343 370 #: xpressme_class.php:6 37344 #: xpressme_class.php:654 371 345 msgid "This text is displayed in the link that reads contents not excerpted.(Is not displayed for the blank.)" 372 346 msgstr "抜粋されていないコンテンツを読むためのリンクに表示されるテキスト(空白の場合リンクを表示しません)" 373 347 374 #: xpressme_class.php:6 44348 #: xpressme_class.php:661 375 349 msgid "This text is displayed in the link that more tag (<!--more-->). " 376 350 msgstr "more タグ (<!--more-->)のリンクに表示されるテキスト" 377 351 378 #: xpressme_class.php:6 56352 #: xpressme_class.php:673 379 353 msgid "Display Mode Setting" 380 354 msgstr "表示モード設定" 381 355 382 #: xpressme_class.php:6 59356 #: xpressme_class.php:676 383 357 msgid "Select the XPressME Display Mode." 384 358 msgstr "XPressMEの表示モードの選択" 385 359 386 #: xpressme_class.php:6 64360 #: xpressme_class.php:681 387 361 msgid "Xoops Mode" 388 362 msgstr "XOOPSモード" 389 363 390 #: xpressme_class.php:6 68364 #: xpressme_class.php:685 391 365 msgid "WordPress Mode" 392 366 msgstr "WordPressモード" 393 367 394 #: xpressme_class.php:6 72368 #: xpressme_class.php:689 395 369 msgid "User select" 396 370 msgstr "ユーザによる選択" 397 371 398 #: xpressme_class.php:6 77372 #: xpressme_class.php:694 399 373 msgid "Select the theme used in the XOOPS Mode." 400 374 msgstr "XOOPSモードで使用するテーマを選択" 401 375 402 #: xpressme_class.php:6 82376 #: xpressme_class.php:699 403 377 msgid "Use WordPress Selected Themes" 404 378 msgstr "WordPressで選択したテーマを使う" 405 379 406 #: xpressme_class.php:7 00380 #: xpressme_class.php:717 407 381 msgid "Header Meta Option" 408 382 msgstr "ヘッダメタ オプション" 409 383 410 #: xpressme_class.php:7 05384 #: xpressme_class.php:722 411 385 msgid "Select the Header keyword." 412 386 msgstr "ヘッダで使用するキーワードの選択" 413 387 414 #: xpressme_class.php:7 10388 #: xpressme_class.php:727 415 389 msgid "Xoops KeyWord" 416 390 msgstr "XOOPSのキーワード" 417 391 418 #: xpressme_class.php:7 13392 #: xpressme_class.php:730 419 393 msgid "WordPress KeyWord" 420 394 msgstr "WordPressのキーワード" 421 395 422 #: xpressme_class.php:7 16396 #: xpressme_class.php:733 423 397 msgid "WordPress & Xoops KeyWord" 424 398 msgstr "WordPressjとXOOPSのキーワード" 425 399 426 #: xpressme_class.php:7 22400 #: xpressme_class.php:739 427 401 msgid "Select the Header Description." 428 402 msgstr "ヘッダで使用するディスクリプション(説明)の選択" 429 403 430 #: xpressme_class.php:7 27404 #: xpressme_class.php:744 431 405 msgid "Xoops Description" 432 406 msgstr "XOOPSのディスクリプション" 433 407 434 #: xpressme_class.php:7 30408 #: xpressme_class.php:747 435 409 msgid "WordPress Description" 436 410 msgstr "WordPressのディスクリプション" 437 411 438 #: xpressme_class.php:7 33412 #: xpressme_class.php:750 439 413 msgid "WordPress & Xoops Description" 440 414 msgstr "WordPressとXOOPSのディスクリプション" 441 415 442 #: xpressme_class.php:7 39416 #: xpressme_class.php:756 443 417 msgid "Select the Header Robots Index." 444 418 msgstr "ヘッダで使用するロボットインデックスの選択" 445 419 446 #: xpressme_class.php:7 44420 #: xpressme_class.php:761 447 421 msgid "Xoops Robots Index" 448 422 msgstr "XOOPSのロボットインデックス" 449 423 450 #: xpressme_class.php:7 47424 #: xpressme_class.php:764 451 425 msgid "WordPress Robots Index" 452 426 msgstr "WordPressのロボットインデックス" 453 427 454 #: xpressme_class.php:7 76428 #: xpressme_class.php:793 455 429 #, php-format 456 430 msgid "Unable to create directory %s. Is its parent directory writable by the server?" 457 431 msgstr "%s ディレクトリーが作成できません。サーバーの親ディレクトリー書き込み権限があるか確認くださいr?" 458 432 433 #: xpressme_widget_class.php:17 434 msgid "XPressME User Menu Widget" 435 msgstr "XPressME ユーザメニュー ウィジェット" 436 437 #: xpressme_widget_class.php:19 438 msgid "XPressME MENU" 439 msgstr "XPressME メニュー" 440 441 #: xpressme_widget_class.php:143 442 #: xpressme_widget_class.php:195 443 #: xpressme_widget_class.php:200 444 #: xpressme_widget_class.php:205 445 msgid "Link" 446 msgstr "リンク" 447 448 #: xpressme_widget_class.php:144 449 #: xpressme_widget_class.php:160 450 msgid "Site Home" 451 msgstr "サイトホーム" 452 453 #: xpressme_widget_class.php:145 454 #: xpressme_widget_class.php:165 455 msgid "Add New" 456 msgstr "新規投稿" 457 458 #: xpressme_widget_class.php:146 459 #: xpressme_widget_class.php:170 460 msgid "User Profile" 461 msgstr "ユーザプロファイル" 462 463 #: xpressme_widget_class.php:147 464 #: xpressme_widget_class.php:176 465 msgid "WordPress Admin" 466 msgstr "WordPress管理" 467 468 #: xpressme_widget_class.php:148 469 #: xpressme_widget_class.php:181 470 msgid "Module Admin" 471 msgstr "モジュール管理" 472 473 #: xpressme_widget_class.php:149 474 #: xpressme_widget_class.php:186 475 msgid "XPressME Setting" 476 msgstr "XPressME設定" 477 478 #: xpressme_widget_class.php:150 479 msgid "Display Mode Select" 480 msgstr "表示モード選択" 481 482 #: xpressme_widget_class.php:152 483 #: xpressme_widget_class.php:171 484 msgid "Auto Setting" 485 msgstr "自動設定" 486 487 #: xpressme_widget_class.php:157 488 msgid "User Menu" 489 msgstr "ユーザメニュー" 490 491 #: xpressme_widget_class.php:245 492 msgid "Title:" 493 msgstr "タイトル:" 494 459 495 #: include/custom_functions.php:74 460 496 #, php-format … … 463 499 464 500 #: include/custom_functions.php:429 465 #: include/custom_functions.php:45 4501 #: include/custom_functions.php:459 466 502 #, php-format 467 503 msgid "views :%d" 468 504 msgstr "閲覧数 :%d" 469 505 470 #: include/custom_functions.php:6 08506 #: include/custom_functions.php:623 471 507 msgid "Main" 472 508 msgstr "メイン" 473 509 474 #: include/custom_functions.php:6 11510 #: include/custom_functions.php:626 475 511 #, php-format 476 512 msgid "Archive for the ‘%s’ Category" 477 513 msgstr "カテゴリー ‘%s’ のアーカイブ" 478 514 479 #: include/custom_functions.php:6 14515 #: include/custom_functions.php:629 480 516 #, php-format 481 517 msgid "Posts Tagged ‘%s’" 482 518 msgstr "‘%s’ タグのついている投稿" 483 519 484 #: include/custom_functions.php:6 17520 #: include/custom_functions.php:632 485 521 #, php-format 486 522 msgid "Archive for %s|Daily archive page" 487 523 msgstr "%sの日別アーカイブ" 488 524 489 #: include/custom_functions.php:6 17525 #: include/custom_functions.php:632 490 526 msgid "F jS, Y" 491 527 msgstr "Y年n月j日" 492 528 493 #: include/custom_functions.php:6 19529 #: include/custom_functions.php:634 494 530 #, php-format 495 531 msgid "Archive for %s|Monthly archive page" 496 532 msgstr "%sの月別アーカイブ" 497 533 498 #: include/custom_functions.php:6 19534 #: include/custom_functions.php:634 499 535 msgid "F, Y" 500 536 msgstr "Y年n月" 501 537 502 #: include/custom_functions.php:6 21538 #: include/custom_functions.php:636 503 539 #, php-format 504 540 msgid "Archive for %s|Yearly archive page" 505 541 msgstr "%sの年別アーカイブ " 506 542 507 #: include/custom_functions.php:6 21543 #: include/custom_functions.php:636 508 544 msgid "Y" 509 545 msgstr "Y年" 510 546 511 #: include/custom_functions.php:6 24547 #: include/custom_functions.php:639 512 548 #, php-format 513 549 msgid "Archive for the ‘%s’ Author" 514 550 msgstr "投稿者 ‘%s’ のアーカイブ" 515 551 516 #: include/custom_functions.php:6 27552 #: include/custom_functions.php:642 517 553 #, php-format 518 554 msgid "Search Results of word ‘%s’" 519 555 msgstr "‘%s’ の検索結果" 520 556 521 #: include/custom_functions.php:6 33522 #: include/custom_functions.php:6 35557 #: include/custom_functions.php:648 558 #: include/custom_functions.php:650 523 559 #, php-format 524 560 msgid "Article of %s" 525 561 msgstr "%sの記事" 526 562 527 #: include/custom_functions.php:6 57563 #: include/custom_functions.php:672 528 564 #, php-format 529 565 msgid "From %1$s on site %2$s" 530 566 msgstr "サイト %2$s の %1$s より" 531 567 532 #: include/custom_functions.php:6 78568 #: include/custom_functions.php:693 533 569 msgid "No Trackback/Pingback" 534 570 msgstr "トラックバック・ピンバックはありません" 535 571 536 #: include/custom_functions.php:6 79572 #: include/custom_functions.php:694 537 573 msgid "One Trackback/Pingback" 538 574 msgstr "トラックバック・ピンバック 1 件" 539 575 540 #: include/custom_functions.php:6 80576 #: include/custom_functions.php:695 541 577 msgid "% TrackBack/Pingback" 542 578 msgstr "トラックバック・ピンバック % 件" … … 584 620 msgstr "WordPressモードへ切替" 585 621 622 #: include/xpress_common_functions.php:390 623 #, php-format 624 msgid "Block file %1$s is an old version %2$s.<br />used block file %3$s of new version %4$s." 625 msgstr "ブロックファイル %1$s は古いバージョン %2$s の為、<br /> 新しいバージョン %4$s のブロックファイル %3$s を使用します。" 626 627 #: include/xpress_upgrade.php:13 628 msgid "XPressME Upgrade" 629 msgstr "XPressME アップグレード" 630 631 #: include/xpress_upgrade.php:28 632 #, php-format 633 msgid "You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href=\"%2$s\">stay updated</a>." 634 msgstr "お使いの XPressME Integration Kit は開発版 (%1$s) です。すばらしい ! どうぞ<a href=\"%2$s\">最新版を使い続けてください</a>。" 635 636 #: include/xpress_upgrade.php:32 637 msgid "There is a new version of XPressME Integration Kit available for upgrade" 638 msgstr "新しいバージョンの XPressME Integration Kit にアップグレードが可能です" 639 640 #: include/xpress_upgrade.php:35 641 #, php-format 642 msgid "You can upgrade to version %s download the package and install it manually:" 643 msgstr "バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。" 644 645 #: include/xpress_upgrade.php:38 646 #: include/xpress_upgrade.php:61 647 #, php-format 648 msgid "Download %s" 649 msgstr "%s をダウンロード" 650 651 #: include/xpress_upgrade.php:43 652 #, php-format 653 msgid "You can download the differential file from version %s to %s and upgrade it manually:" 654 msgstr "バージョン%sから%sへの差分ファイルをダウンロードし、手動でアップグレードすることができます:" 655 656 #: include/xpress_upgrade.php:46 657 #, php-format 658 msgid "Download differential file for %s" 659 msgstr "%sの差分ファイルをダウンロード" 660 661 #: include/xpress_upgrade.php:50 662 msgid "You have the latest version of XPressME Integration Kit. You do not need to upgrade" 663 msgstr "最新バージョンの XPressME Integration Kit をご利用中です。アップグレードの必要はありません。" 664 665 #: include/xpress_upgrade.php:58 666 #, php-format 667 msgid "You can use the development version %s download the package and install it manually:" 668 msgstr "開発バージョン %s のパッケージを手動でダウンロードしてインストールすることができます。" 669 670 #: include/xpress_upgrade.php:67 671 #, php-format 672 msgid "There is no response from <a href=\"%s\">version check API</a> now. sorry, please confirm it after." 673 msgstr "現在、<a href=\"%s\">version check API</a>からのレスポンスがありません。 申し訳ありませんが、しばらく後で確認してください。" 674 675 #: include/xpress_upgrade.php:212 676 #, php-format 677 msgid "XPressME Integration Kit Version %1$s is available! <a href=\"%2$s\">Please update now</a>." 678 msgstr "XPressME Integration Kit Version %1$s が利用可能です ! <a href=\"%2$s\">アップデートしてください</a>。" 679 680 #: include/xpress_upgrade.php:214 681 #, php-format 682 msgid "XPressME Integration Kit Version %1$s is available! Please notify the site administrator." 683 msgstr "XPressME Integration Kit Version %1$s が利用可能です ! サイト管理者に連絡してください。" 684 685 #~ msgid "Title" 686 #~ msgstr "タイトル" 687 #~ msgid "URL" 688 #~ msgstr "URL" 586 689 #~ msgid "more" 587 690 #~ msgstr "続きを読む" -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
r413 r451 22 22 require_once dirname( __FILE__ ).'/include/functions_for_wp_old.php' ; 23 23 24 if (!is_wordpress_style() && ( !empty($xpress_config->theme_select) || $xpress_config->theme_select != 'use_wordpress_select') ){ 25 add_filter('stylesheet', 'xpress_Stylesheet'); 26 add_filter('template', 'xpress_ThemeTemplate'); 27 } 28 function xpress_Stylesheet($stylesheet) { 29 global $xpress_config; 30 $theme = $xpress_config->theme_select; 31 $theme = get_theme($theme); 32 33 if (empty($theme)) { 34 return $stylesheet; 35 } 36 return $theme['Stylesheet']; 37 } 38 39 function xpress_ThemeTemplate($template) { 40 global $xpress_config; 41 $theme = $xpress_config->theme_select; 42 $theme = get_theme($theme); 43 44 if (empty($theme)) { 45 return $template; 46 } 47 return $theme['Template']; 48 } 49 24 50 function my_plugin_menu() 25 51 { … … 190 216 echo '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n" ; 191 217 echo '<table class="form-table">'."\n"; 218 $upload_title = __('Media Upload Base Path','xpressme'); 219 if($xoops_config->is_wpmu) $upload_title = $upload_title . '(WPMU is not select)'; 192 220 echo $xpress_config->yes_no_radio_option('is_use_xoops_upload_path', 193 __('Media Upload Base Path','xpressme'),221 $upload_title, 194 222 __('Use XOOPS UPLOAD PATH','xpressme'), 195 __('USE WordPress BASE_PATH','xpressme') 196 );197 198 echo $xpress_config->groupe_role_option();199 223 __('USE WordPress BASE_PATH','xpressme'), 224 $xoops_config->is_wpmu 225 ); 226 $lock = ($xoops_config->module_url != get_bloginfo('url')); 227 echo $xpress_config->groupe_role_option($lock); 200 228 echo $xpress_config->d3forum_option($do_message); 201 229 echo "</table>\n"; … … 253 281 __('NO','xpressme') 254 282 ); 283 echo $xpress_config->yes_no_radio_option('is_block_error_display', 284 __('Select warning display of block file version check','xpressme'), 285 __('Do display','xpressme'), 286 __('Do not display','xpressme') 287 ); 255 288 echo "</table>\n"; 256 289 … … 264 297 } 265 298 266 function upgrade_page() 267 { 268 global $xoops_config,$xpress_config; 269 270 $xpress_version = $xoops_config->module_version . $xoops_config->module_codename; 271 $check_url = "http://ja1.xpressme.info/version_check/?version=$xpress_version"; 272 273 echo '<div class="wrap">'."\n"; 274 echo '<div id="icon-options-general" class="icon32"><br /></div>'."\n"; 275 echo '<h2>' . __('XPressME Upgrade', 'xpressme') . "</h2><br>\n"; 276 277 if(get_xpress_latest_version()){ 278 $latest = get_option('xpressme_latest_version'); 279 if ($latest) { 280 $site_url=$latest['url']; 281 $package=$latest['package']; 282 $latest_version=$latest['latest_version']; 283 $check_time=$latest['check_time']; 284 } 285 286 287 if (version_compare($xpress_version, $latest_version, '>')){ 288 echo '<h3 class="response">'; 289 printf(__('You are using a XPressME Integration Kit development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.', 'xpressme') , $xpress_version , $site_url); 290 echo '</h3>'; 291 292 } else if (version_compare($xpress_version, $latest_version, '<')) { 293 echo '<h3 class="response">'. __('There is a new version of XPressME Integration Kit available for upgrade', 'xpressme') . '</h3>'; 294 echo '<p>'; 295 // printf(__('You can upgrade to version %s automatically or download the package and install it manually:'),$latest_version); 296 printf(__('You can upgrade to version %s download the package and install it manually:', 'xpressme'),$latest_version); 297 echo '</p>'; 298 echo '<a class="button" href="' . $package . '">'; 299 printf(__('Download %s', 'xpressme') , $latest_version); 300 echo '</a>'; 301 } else { 302 echo '<h3 class="response">'. __('You have the latest version of XPressME Integration Kit. You do not need to upgrade', 'xpressme') . '</h3>'; 303 } 304 } else { 305 echo '<h3 class="response">'; 306 printf(__('There is no response from <a href="%s">version check API</a> now. sorry, please confirm it after.', 'xpressme'),$check_url); 307 echo "</div>\n"; 308 } 309 } 310 311 function xp_remote_get($url, $headers = ""){ 312 global $xoops_config; 313 $xpress_version = $xoops_config->module_version . $xoops_config->module_codename; 314 315 require_once( $xoops_config->module_path . '/wp-includes/class-snoopy.php'); 316 317 // Snoopy is an HTTP client in PHP 318 $client = new Snoopy(); 319 $client->agent = 'XPressME/' . $xpress_version; 320 $client->read_timeout = 2; 321 if (is_array($headers) ) { 322 $client->rawheaders = $headers; 323 } 324 325 @$client->fetch($url); 326 $response['response']['code'] = $client->status; 327 $response['body'] = $client->results; 328 return $response; 329 return $client; 330 331 } 332 333 function get_xpress_latest_version(){ 334 global $wp_version, $wpdb, $wp_local_package; 335 global $xoops_config; 336 337 $xpress_version = $xoops_config->module_version . $xoops_config->module_codename; 338 339 $check_url = "http://ja.xpressme.info/version_check/?version=$xpress_version"; 340 $request_options = array( 341 'timeout' => 3, 342 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) 343 ); 344 345 if (! function_exists('wp_remote_get')) { 346 $response = xp_remote_get($check_url); 347 348 if (empty($response['body'])) return false; 349 } else { 350 351 $response = wp_remote_get($check_url, $request_options); 352 353 if ( is_wp_error( $response ) ) 354 return false; 355 } 356 if ( 200 != $response['response']['code'] ) 357 return false; 358 $body = trim( $response['body'] ); 359 $body = str_replace(array("\r\n", "\r"), "\n", $body); 360 $returns = explode("\n", $body); 361 $response = $returns[0]; 362 if ( isset( $returns[1] ) ) 363 $url = clean_url( $returns[1] ); 364 if ( isset( $returns[2] ) ) 365 $package = clean_url( $returns[2] ); 366 if ( isset( $returns[3] ) ) 367 $latest_version = $returns[3]; 368 369 $write_options = array ( 370 'url' => $url , 371 'package' => $package , 372 'latest_version' => $latest_version , 373 'check_time' => time() 374 ); 375 376 $latest_version = get_option('xpressme_latest_version'); 377 if (!$latest_version) { 378 add_option('xpressme_latest_version', $write_options); 379 } else { 380 update_option('xpressme_latest_version', $write_options); 381 } 382 return true; 383 } 384 385 function xpress_update_check() { 386 if ( defined('WP_INSTALLING') ) 387 return; 388 global $pagenow; 389 390 $php_query_string = $_SERVER['QUERY_STRING']; 391 392 if ( 'admin.php' == $pagenow && 'page=upgrade_page' == $php_query_string) 393 return; 394 395 global $wp_version, $wpdb, $wp_local_package; 396 global $xoops_config; 397 398 $php_query_string = $_SERVER['QUERY_STRING']; 399 $xpress_version = $xoops_config->module_version . $xoops_config->module_codename; 400 401 $latest = get_option('xpressme_latest_version'); 402 if (!$latest ) { 403 get_xpress_latest_version(); 404 $latest = get_option('xpressme_latest_version'); 405 } 406 407 if ($latest) { 408 $next_check = $latest['check_time'] + (60*60*24); 409 $now_time = time(); 410 if ($next_check < $now_time ){ 411 get_xpress_latest_version(); 412 $latest = get_option('xpressme_latest_version'); 413 } 414 } 415 416 if ($latest) { 417 $url=$latest['url']; 418 $package=$latest['package']; 419 $latest_version=$latest['latest_version']; 420 $check_time=$latest['check_time']; 421 $upgrade_page = $xoops_config->module_url . "/wp-admin/admin.php?page=upgrade_page"; 422 423 if (version_compare($xpress_version, $latest_version, '<')) { 424 if ( current_user_can('manage_options') ){ 425 $msg = sprintf( __('XPressME Integration Kit Version %1$s is available! <a href="%2$s">Please update now</a>.', 'xpressme'), $latest_version, $upgrade_page ); 426 } else { 427 $msg = sprintf( __('XPressME Integration Kit Version %1$s is available! Please notify the site administrator.', 'xpressme'), $latest_version ); 428 } 429 echo "<div id='update-nag'>$msg </div>"; 430 } 431 } 432 } 433 299 include_once dirname( __FILE__ ).'/include/xpress_upgrade.php' ; 434 300 add_action( 'admin_notices', 'xpress_update_check', 3 ); 435 301 436 302 include_once dirname( __FILE__ ).'/include/dashboard_feed.php' ; 437 303 304 include_once dirname( __FILE__ ).'/xpressme_widget_class.php' ; 305 438 306 ?> -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
r406 r451 36 36 var $is_dashboard_forum_disp; 37 37 var $theme_select; 38 var $is_block_error_display; 38 39 //constructor 39 40 function XPressME_Class() … … 86 87 $this->is_dashboard_forum_disp = true; 87 88 $this->theme_select = 'use_wordpress_select'; 89 $this->is_block_error_display = true; 88 90 } 89 91 … … 143 145 'is_dashboard_blog_disp' => $this->is_dashboard_blog_disp, 144 146 'is_dashboard_forum_disp' => $this->is_dashboard_forum_disp, 145 'theme_select' => $this->theme_select 147 'theme_select' => $this->theme_select, 148 'is_block_error_display' => $this->is_block_error_display 146 149 ); 147 150 if ($mode == 'add_new') { -
branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_widget_class.php
r406 r451 16 16 function XPress_Menu_Widget(){ 17 17 $widget_ops = array('classname' => 'widget_xpress', 'description' => __( "XPressME User Menu Widget") ); 18 $control_ops = array('width' => 400, 'height' => 300);18 $control_ops = array('width' => 600, 'height' => 300); 19 19 $this->WP_Widget('XPress_Menu', __('XPressME MENU'), $widget_ops, $control_ops); 20 20 } … … 26 26 function widget($args, $instance){ 27 27 global $xpress_config,$xoops_config; 28 global $current_user; 28 29 29 30 extract($args); … … 38 39 39 40 # Make the XPressME MENU widget 41 $menu = array(); 42 for($i = 0; $i < 10; $i++) { 43 $menu[$i]['Type'] = $instance['Type_' . $i]; 44 $menu[$i]['Title'] = $instance['Title_' . $i]; 45 $menu[$i]['URL'] = $instance['URL_' . $i]; 46 $menu[$i]['Visible'] = $instance['Visible_' . $i]; 47 $menu[$i]['Weight'] = $instance['Weight_' . $i]; 48 } 40 49 echo '<ul>'; 41 50 for($i = 0; $i < 10; $i++) { 42 $link_name = $instance['name' . $i]; 43 $link_url = $instance['link' . $i]; 44 if (!empty($link_name)) echo '<li><a href="' . $link_url . '">' . $link_name . '</a></li>'; 51 $type = $menu[$i]['Type']; 52 if ($menu[$i]['Visible'] && !empty($menu[$i]['Title']) ){ 53 switch($type){ 54 case 0: 55 case 1: 56 echo '<li><a href="' . $menu[$i]['URL'] . '">' . $menu[$i]['Title'] . '</a></li>'; 57 break; 58 case 2: // Add New 59 if (is_user_logged_in()){ 60 if ($current_user->user_level > 0){ 61 if (xpress_is_wp_version('<','2.1') ){ 62 echo '<li><a href="'.get_settings('siteurl').'/wp-admin/post.php" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 63 } else { 64 echo '<li><a href="'.get_settings('siteurl').'/wp-admin/post-new.php" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 65 } 66 } 67 } 68 break; 69 case 3: // User Profile 70 if (is_user_logged_in()) { 71 echo '<li><a href="'.get_settings('siteurl').'/wp-admin/profile.php" title="' . $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 72 } 73 break; 74 case 4: // WordPress Admin 75 if (is_user_logged_in()){ 76 if ($current_user->user_level > 7){ 77 echo '<li><a href="'.get_settings('siteurl').'/wp-admin/" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 78 } 79 } 80 break; 81 case 5: // Module Admin 82 if($GLOBALS["xoopsUserIsAdmin"]){ 83 echo '<li><a href="'.get_settings('siteurl').'/admin/index.php" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 84 } 85 break; 86 case 6: // XPressME Setting 87 if (is_user_logged_in()){ 88 if ($current_user->user_level > 7){ 89 echo '<li><a href="'.get_settings('siteurl').'/wp-admin/admin.php?page=xpressme\\xpressme.php" title="'. $menu[$i]['Title'] .'">'. $menu[$i]['Title'] .'</a></li>'; 90 } 91 } 92 break; 93 case 7: // Display Mode Select 94 if ($xpress_config->viewer_type == 'user_select'){ 95 echo disp_mode_set(); 96 } 97 break; 98 default: 99 } 100 } 45 101 } 102 46 103 echo '</ul>'; 47 104 # After the widget … … 58 115 59 116 for($i = 0; $i < 10; $i++) { 60 $instance['name'. $i] = strip_tags(stripslashes($new_instance['name'. $i])); 61 $instance['link' . $i] = strip_tags(stripslashes($new_instance['link'. $i])); 117 $instance['Type_'. $i] = strip_tags(stripslashes($new_instance['Type_'. $i])); 118 $instance['Title_' . $i] = strip_tags(stripslashes($new_instance['Title_'. $i])); 119 if ($instance['Type_'. $i] < 2){ 120 $instance['URL_' . $i] = strip_tags(stripslashes($new_instance['URL_'. $i])); 121 } else { 122 $instance['URL_' . $i] = ''; 123 } 124 $instance['Visible_' . $i] = strip_tags(stripslashes($new_instance['Visible_'. $i])); 62 125 } 63 126 … … 71 134 function form($instance){ 72 135 global $xpress_config,$xoops_config; 136 137 if (xpress_is_wp_version('<','2.1') ){ 138 $addnew = get_settings('siteurl').'/wp-admin/post.php'; 139 } else { 140 $addnew = get_settings('siteurl').'/wp-admin/post-new.php'; 141 } 142 $type = array(); 143 $type[0] = __('Link', 'xpressme'); 144 $type[1] = __('Site Home', 'xpressme'); 145 $type[2] = __('Add New', 'xpressme'); 146 $type[3] = __('User Profile', 'xpressme'); 147 $type[4] = __('WordPress Admin', 'xpressme'); 148 $type[5] = __('Module Admin', 'xpressme'); 149 $type[6] = __('XPressME Setting', 'xpressme'); 150 $type[7] = __('Display Mode Select', 'xpressme'); 151 152 $auto_setting = __('Auto Setting', 'xpressme'); 153 73 154 //Defaults 74 155 $instance = wp_parse_args( (array) $instance, 75 156 array( 76 'title'=> __('User Menu'), 77 'name0' => __('Site Home'), 78 'link0' => $xoops_config->xoops_url, 79 'name1' => '', 80 'link1' => '', 81 'name2' => '', 82 'link2' => '', 83 'name3' => '', 84 'link3' => '', 85 'name4' => '', 86 'link4' => '', 87 'name5' => '', 88 'link5' => '', 89 'name6' => '', 90 'link6' => '', 91 'name7' => '', 92 'link7' => '', 93 'name8' => '', 94 'link8' => '', 95 'name9' => '', 96 'link9' => '' 157 'title'=> __('User Menu', 'xpressme'), 158 159 'Type_0' =>1 , 160 'Title_0' => __('Site Home', 'xpressme'), 161 'URL_0' => get_xoops_url(), 162 'Visible_0' => 1, 163 164 'Type_1' =>2 , 165 'Title_1' => __('Add New', 'xpressme'), 166 'URL_1' => $auto_setting, 167 'Visible_1' => 1, 168 169 'Type_2' =>3 , 170 'Title_2' => __('User Profile', 'xpressme'), 171 'URL_2' => __('Auto Setting', 'xpressme'), 172 'Visible_2' => 1, 173 174 'Weight_2' => 3, 175 'Type_3' =>4 , 176 'Title_3' => __('WordPress Admin', 'xpressme'), 177 'URL_3' => $auto_setting, 178 'Visible_3' => 1, 179 180 'Type_4' =>5 , 181 'Title_4' => __('Module Admin', 'xpressme'), 182 'URL_4' => $auto_setting, 183 'Visible_4' => 1, 184 185 'Type_5' =>6 , 186 'Title_5' => __('XPressME Setting', 'xpressme'), 187 'URL_5' => $auto_setting, 188 'Visible_5' => 1, 189 190 'Type_6' =>7 , 191 'Title_6' => $auto_setting, 192 'URL_6' => $auto_setting, 193 'Visible_6' => 1, 194 'Type_7' =>0 , 195 'Title_7' => __('Link', 'xpressme'), 196 'URL_7' => '', 197 'Visible_7' => 0, 198 199 'Type_8' =>0 , 200 'Title_8' => __('Link', 'xpressme'), 201 'URL_8' => '', 202 'Visible_8' => 0, 203 204 'Type_9' =>0 , 205 'Title_9' => __('Link', 'xpressme'), 206 'URL_9' => '', 207 'Visible_9' => 0, 97 208 ) ); 98 99 $title = htmlspecialchars($instance['title']); 209 210 echo ' 211 <script type="text/javascript"> 212 function TypeSelect(type_id,title_id,url_id){ 213 var type=document.getElementById(type_id); 214 var title=document.getElementById(title_id); 215 var link_url=document.getElementById(url_id); 216 var auto_set = \''. $auto_setting .'\'; 217 title.value = type[type.value].text; 218 if(type.value > 1){ 219 link_url.value = auto_set; 220 link_url.disabled = true; 221 link_url.style.backgroundColor = \'transparent\'; 222 } else { 223 if (link_url.value == auto_set) link_url.value = \'\'; 224 link_url.disabled = false; 225 link_url.style.backgroundColor = \'#FFFFEE\'; 226 } 227 if(type.value == 1){ 228 link_url.value = \''.get_xoops_url() . '\'; 229 } 230 if(type.value == 7){ 231 title.value = auto_set; 232 title.disabled = true; 233 title.style.backgroundColor = \'transparent\'; 234 } else { 235 if (title.value == auto_set) title.value = \'\'; 236 title.disabled = false; 237 title.style.backgroundColor = \'#FFFFEE\'; 238 } 239 240 } 241 </script>'; 100 242 101 243 // Output the options 102 244 echo '<p><label for="' . $this->get_field_name('title') . '">'. "\n"; 103 echo __('Title:') . '<input style="width: 200px;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>'. "\n"; 104 echo '<label>' . __('Title') . '</label>' . '<label style="margin-left:120px;">' . __('URL') . '</label>' . "\n"; 245 echo __('Title:') . '<input style="width: 200px;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $instance['title'] . '" /></label></p>'. "\n"; 246 echo " 247 <table width='100%' class='outer' cellpadding='4' cellspacing='1' border=\"1\" bordercolor=\"#888888\"> 248 <tr valign='middle' align='center' style=\"background-color:#2E323B;color:#FFFFFF\"> 249 <th width='10%'>Type</th> 250 <th width='15%'>Title</th> 251 <th width='10%'>URL</th> 252 <th width='10px'>Visible</th> 253 </tr> 254 "; 105 255 for($i = 0; $i < 10; $i++) { 106 echo '<p><input style="width: 100px;" id="' . $this->get_field_id('name' . $i) . '" name="' . $this->get_field_name('name' . $i) . '" type="text" value="' . $instance['name'. $i] . '" />:'. "\n"; 107 echo '<input style="width: 280px;" id="' . $this->get_field_id('link' . $i) . '" name="' . $this->get_field_name('link' . $i) . '" type="text" value="' . $instance['link'. $i] . '" /></p>'. "\n"; 256 $even = $i % 2; 257 if ($even) { 258 $back_color = ' style="background-color:#E3E3E3"'; 259 } else { 260 $back_color = ' style="background-color:#F5F5F5"'; 261 } 262 $text_back_color = ' style="background-color:#FFFFEE"'; 263 echo "<tr $back_color>"; 264 265 $select_arg = "'" . $this->get_field_id('Type_' . $i) . "','" . $this->get_field_id('Title_' . $i) . "','" . $this->get_field_id('URL_' . $i) . "'"; 266 echo '<th><select id="' . $this->get_field_id('Type_' . $i) . '" name="' . $this->get_field_name('Type_' . $i) . '" ' .$back_color . 'onchange="TypeSelect(' . $select_arg . ')">'; 267 for ($j = 0; $j < 8; $j++) { 268 if ($instance['Type_'. $i] == $j) $select = ' selected="selected"'; else $select = ''; 269 echo '<option ' . $select . 'value="'. $j . '">' . $type[$j] . '</option>'; 270 } 271 echo '</select></th>'; 272 273 if ($instance['Type_'. $i] == 7) { 274 $title_disible = 'disabled=disabled'; 275 $title_back_color = $back_color; 276 $title_value = $auto_setting; 277 278 } else { 279 $title_disible = ''; 280 $title_back_color = $text_back_color; 281 $title_value = $instance['Title_'. $i]; 282 } 283 echo '<th style="padding:2px"><input size="24" id="' . $this->get_field_id('Title_' . $i) . '" name="' . $this->get_field_name('Title_' . $i) . '" type="text" value="' . $title_value . '" ' .$title_back_color . $title_disible . '/></th>'. "\n"; 284 if ($instance['Type_'. $i] > 1) { 285 $url_disible = 'disabled=disabled'; 286 $url_back_color = $back_color; 287 $url_value = $auto_setting; 288 } else { 289 $url_disible = ''; 290 $url_back_color = $text_back_color; 291 $url_value = $instance['URL_'. $i]; 292 } 293 echo '<th style="padding:2px"><input size="40" id="' . $this->get_field_id('URL_' . $i) . '" name="' . $this->get_field_name('URL_' . $i) . '" type="text" value="' . $url_value . '" ' .$url_back_color . $url_disible . '/></th>'. "\n"; 294 if ($instance['Visible_'. $i]) $check = ' checked="checked"'; else $check = ''; 295 echo '<th><input size="4" id="' . $this->get_field_id('Visible_' . $i) . '" name="' . $this->get_field_name('Visible_' . $i) . '" type="checkbox" value="1"' . $check . ' /></th>'. "\n"; 296 echo '</tr>'; 108 297 } 298 echo '</table>'; 109 299 } 110 300 -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/archives_block_theme.php
r125 r451 1 1 <?php 2 // Block Version: 1.0 2 3 function archives_block($options) 3 4 { -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/authors_block_theme.php
r360 r451 1 1 <?php 2 // Block Version: 1.0 2 3 function authors_block($options) 3 4 { -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/calender_block_theme.php
r272 r451 1 1 <?php 2 // Block Version: 1.0 2 3 function calender_block($options) 3 4 { -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/category_block_theme.php
r362 r451 1 1 <?php 2 2 // Block Version: 1.0 3 3 function category_block($options) 4 4 { -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/enhanced_block_theme.php
r138 r451 1 1 <?php 2 // Block Version: 1.0 2 3 function enhanced_block($options) 3 4 { -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/meta_block_theme.php
r360 r451 1 1 <?php 2 // Block Version: 1.0 2 3 function meta_block($options) 3 4 { -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/page_block_theme.php
r360 r451 1 1 <?php 2 2 // Block Version: 1.0 3 3 function page_block($options) 4 4 { -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php
r418 r451 1 1 <?php 2 // Block Version: 1.0 2 3 function popular_posts_block($options) 3 4 { … … 9 10 $time_format = empty( $options[5] ) ? '' : $options[5] ; 10 11 $tag_select = $options[6] ; 11 $selected = array_slice($options, 7); // get allowed cats 12 $cat_select = empty( $options[7] ) ? '0' : $options[7] ; 13 14 $selected = explode(',' , $cat_select); 12 15 13 16 $mydirpath = get_xpress_dir_path(); … … 15 18 if (empty($date_format)) $date_format = get_settings('date_format'); 16 19 if (empty($time_format)) $time_format = get_settings('time_format'); 17 if (array_search(0,$selected)===0) { 18 $cat_select = false; 19 }else { 20 $cat_select = true; 21 } 22 $cat_id = implode(',',$selected); 20 if (array_search(0,$selected)===0) $cat_select = 0; 21 22 $cat_select; 23 23 $block = array(); 24 24 $item_no = 0; … … 58 58 59 59 if ($cat_select) { 60 $where .= " AND ($term_taxonomy.term_id IN ($cat_ id))";60 $where .= " AND ($term_taxonomy.term_id IN ($cat_select))"; 61 61 } 62 62 … … 75 75 76 76 if ($cat_select) { 77 $where .= " AND ($post2cat_tb.category_id IN ($cat_ id))";77 $where .= " AND ($post2cat_tb.category_id IN ($cat_select))"; 78 78 } 79 79 } -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php
r360 r451 1 1 <?php 2 //if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; 3 2 // Block Version: 1.0 4 3 function recent_comments_block($options) 5 4 { … … 10 9 $date_format = empty( $options[4] ) ? '' : $options[4] ; 11 10 $time_format = empty( $options[5] ) ? '' : $options[5] ; 12 $selected = array_slice($options,6); // get allowed cats 11 $com_select = empty( $options[6] ) ? '0' : $options[6] ; 12 13 $selected = explode(',' , $com_select); 13 14 14 15 $mydirpath = get_xpress_dir_path(); -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php
r425 r451 1 1 <?php 2 //if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; 3 2 // Block Version: 1.0 4 3 function recent_posts_content_block($options) 5 4 { 6 5 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 7 6 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_recent_posts_content_block.html' : trim( $options[1] ); 8 $day_select = ($options[2])?intval($options[2]):0; 9 $day_size = ($options[3])?intval($options[3]):0; 10 $disp_count = ($options[4])?intval($options[4]):10; 11 $excerpt = empty( $options[5] ) ? false : true ; 12 $excerpt_size = ($options[6])?intval($options[6]):100; 13 $date_format = empty( $options[7] ) ? '' : $options[7] ; 14 $time_format = empty( $options[8] ) ? '' : $options[8] ; 15 $tag_select = $options[9] ; 16 $selected = array_slice($options,10); // get allowed cats 17 7 $disp_count = ($options[2])?intval($options[2]):10; 8 $excerpt = empty( $options[3] ) ? false : true ; 9 $excerpt_size = ($options[4])?intval($options[4]):100; 10 $date_format = empty( $options[5] ) ? '' : $options[5] ; 11 $time_format = empty( $options[6] ) ? '' : $options[6] ; 12 $tag_select = $options[7] ; 13 $cat_select = empty( $options[8] ) ? '0' : $options[8] ; 14 $day_select = ($options[9])?intval($options[9]):0; 15 $day_size = ($options[10])?intval($options[10]):0; 16 17 $selected = explode(',' , $cat_select); 18 18 19 $mydirpath = get_xpress_dir_path(); 19 20 … … 21 22 if (empty($time_format)) $time_format = get_settings('time_format'); 22 23 if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 23 24 if (array_search(0,$selected)===0) $cat_select = 0; 25 24 26 $selected_author_id = xpress_selected_author_id('echo=0'); 25 27 if (!empty($selected_author_id)){ … … 37 39 if (!is_null($wpdb)){ 38 40 $wp_query->in_the_loop = true; //for use the_tags() in multi lopp 39 if (array_search(0,$selected)===0) { 41 if ($cat_select) { 42 $r = new WP_Query($author_where . $tag_where ."cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 43 } else { 40 44 $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 41 } else {42 $cat_id = implode(',',$selected);43 $r = new WP_Query($author_where . $tag_where ."cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");44 45 } 45 46 while($r->have_posts()){ … … 52 53 if ($day_select == 2){ 53 54 $post_date = mktime (0, 0, 0, get_the_time("m"), get_the_time("d"), get_the_time("Y")); 54 if (empty($la stes_date)) $lastes_date = $post_date;55 $base_date = $la stes_date - $between_days;55 if (empty($latest_date)) $latest_date = $post_date; 56 $base_date = $latest_date - $between_days; 56 57 if ($post_date < $base_date) continue; 57 58 } -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php
r272 r451 1 1 <?php 2 // Block Version: 1.0 2 3 function recent_posts_list_block($options) 3 4 { … … 10 11 $time_format = empty( $options[6] ) ? '' : $options[6] ; 11 12 $tag_select = $options[7] ; 12 $selected = array_slice($options,8); // get allowed cats 13 $cat_select = empty( $options[8] ) ? '0' : $options[8] ; 14 15 $selected = explode(',' , $cat_select); 13 16 14 17 $mydirpath = get_xpress_dir_path(); … … 17 20 if (empty($time_format)) $time_format = get_settings('time_format'); 18 21 if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 22 if (array_search(0,$selected)===0) $cat_select = 0; 19 23 20 24 $selected_author_id = xpress_selected_author_id('echo=0'); … … 30 34 if (!is_null($wpdb)){ 31 35 $wp_query->in_the_loop = true; //for use the_tags() in multi lopp 32 if (array_search(0,$selected)===0) { 36 if ($cat_select) { 37 $r = new WP_Query($author_where . $tag_where . "cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 38 } else { 33 39 $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 34 35 } else {36 $cat_id = implode(',',$selected);37 $r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");38 40 } 39 41 while($r->have_posts()){ -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/search_block_theme.php
r121 r451 1 1 <?php 2 2 // Block Version: 1.0 3 3 function search_block($options) 4 4 { -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/sidebar_block_theme.php
r254 r451 1 1 <?php 2 // Block Version: 1.0 2 3 function sidebar_block($options) 3 4 { -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/tag_cloud_block_theme.php
r252 r451 1 1 <?php 2 // Block Version: 1.0 2 3 function tag_cloud_block($options) 3 4 { -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/widget_block_theme.php
r339 r451 1 1 <?php 2 // Block Version: 1.0 2 3 function widget_block($options) 3 4 { … … 5 6 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_block_widget.html' : trim( $options[1] ); 6 7 $title_show = empty( $options[2] ) ? false : true ; 7 $selected = array_slice($options,3); // get allowed cats 8 $widget_select = empty( $options[3] ) ? '' : $options[3] ; 9 10 $selected = explode(',' , $widget_select); 8 11 9 12 $output = ''; -
branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/style.css
r383 r451 456 456 text-align: right; 457 457 font-size: 9pt; 458 background-color: #fff; 458 459 } 459 460 … … 462 463 text-align: left; 463 464 font-size: 9pt; 465 background-color: #fff; 464 466 } 465 467 … … 467 469 display: block; 468 470 text-decoration: none; 471 font-weight: bold; 472 font-size: 14px; 473 background-color: #ddd; 469 474 } 470 475 -
branches/XPressMU/xpressme_integration_kit/xoops_version.php
r425 r451 47 47 48 48 // status 49 $modversion['codename'] = " Bata2(r425)";49 $modversion['codename'] = "RC1"; 50 50 51 51 // onInstall, onUpdate, onUninstall … … 144 144 'edit_func' => "b_". $mydirname . "_content_edit" , 145 145 'template' => '' , 146 'options' => $mydirname. '|| 0|0|10|0|100||||0' ,146 'options' => $mydirname. '||10|0|100||||0|0|0' , 147 147 'can_clone' => true , 148 148 'func_num' => $b_no, … … 291 291 'show_func' => "b_". $mydirname . "_widget_show" , 292 292 'edit_func' => "b_". $mydirname . "_widget_edit" , 293 'options' => $mydirname. '||1 ' ,293 'options' => $mydirname. '||1|' , 294 294 'can_clone' => true , 295 295 'func_num' => $b_no,
Note: See TracChangeset
for help on using the changeset viewer.