XPressME Integration Kit

Trac


Ignore:
Timestamp:
Dec 15, 2009, 4:52:57 PM (15 years ago)
Author:
toemon
Message:

開発ベースにVer2.2をマージ

Location:
branches/XPressMU/xpressme_integration_kit
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • branches/XPressMU/xpressme_integration_kit/admin/menu.php

    r300 r488  
    5858$adminmenu[$i++]['link'] = "index.php"; 
    5959 
     60$adminmenu[$i]['title'] = _MI_XP2_TO_UPDATE ; 
     61$adminmenu[$i++]['link'] = "admin/update.php"; 
    6062 
    6163?> 
  • branches/XPressMU/xpressme_integration_kit/blocks/archives_block.php

    r232 r488  
    2828 
    2929                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; 
    30             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
     30                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    3131                $form .= "<br />"; 
    3232                $a_month = _MB_XP2_ARC_MONTH ; 
     
    6262                $form .=  "</select><br/>"; 
    6363                 
    64                 $form .= "<br />" . _MB_XP2_COUNT_ZERO_ALL . "  <input type='text' name='options[3]' value='" . $limit . "' />"; 
     64                $form .= "<br />" . _MB_XP2_COUNT_ZERO_ALL . "  <input type='text' size='3' name='options[3]' value='" . $limit . "' />"; 
    6565                $form .= "<br />" . yes_no_radio_option('options[4]', _MB_XP2_SHOW_NUM_OF_POST , $show_post_count); 
    6666                $form .= "<br />" . yes_no_radio_option('options[5]', _MB_XP2_SHOW_DROP_DOWN , $drop_down); 
  • branches/XPressMU/xpressme_integration_kit/blocks/authors_block.php

    r232 r488  
    2828                         
    2929                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; 
    30             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
     30                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    3131                $form .= "<br />"; 
    3232                $form .= yes_no_radio_option('options[2]', _MB_XP2_SHOW_NUM_OF_POST , $optioncount); 
  • branches/XPressMU/xpressme_integration_kit/blocks/block_common.php

    r451 r488  
    103103 
    104104    $option = "<option value=\"0\" "; 
    105     if ($isAll) $form .= " selected=\"selected\""; 
     105    if ($isAll) $option .= " selected=\"selected\""; 
    106106    $option .= ">"._MB_XP2_ALL ."</option>"; 
    107107 
     
    146146endif; 
    147147 
     148if(!function_exists("block_template_setting")): 
     149function block_template_setting($mydirname,$option_name = '',$value='') 
     150{ 
     151        $temp_parm = explode(':' , $value); 
     152        if (empty($temp_parm[1])) { 
     153                $filename=$temp_parm[0]; 
     154                $temp_type = 'db'; 
     155        } else  { 
     156                $filename=$temp_parm[1]; 
     157                $temp_type = $temp_parm[0]; 
     158        } 
     159 
     160        $none_prefix_filename = ''; 
     161        $pattern = '^' . $mydirname . '_(.*).html'; 
     162        if (preg_match('/' . $pattern . '/' , $filename, $match)){ // file prefix check 
     163                $none_prefix_filename = $match[1]; 
     164        } 
     165         
     166        $output = _MB_XP2_THISTEMPLATE . "\n"; 
     167        $output .=      '<input type="hidden" size="50" name="' . $option_name . '" value="' . $value .'"/>' . "\n"; 
     168    $output .= '&nbsp;<select name="template_type" onclick="Template_Make()">' ."\n"; 
     169        switch ($temp_type){ 
     170                case 'db': 
     171                case 'DB': 
     172                        $output .=  '<option value="0" selected="selected">db</option>'; 
     173                        $output .=  '<option value="1">file</option>'; 
     174                        break; 
     175                default: 
     176                        $output .=  '<option value="0">db</option>'; 
     177                        $output .=  '<option value="1" selected="selected">file</option>'; 
     178        } 
     179        $output .= '</select>'; 
     180        $output .= '<b>:'.$mydirname . '_</b>'; 
     181        $output .= '<input type="text" size="30" name="none_prefix_file" value="'. $none_prefix_filename. '"  onChange="Template_Make()"/><b>.html</b><br />'; 
     182    $output .= ' 
     183<script type="text/javascript"> 
     184        function Template_Make(){ 
     185                var type_element = document.getElementsByName("template_type").item(0); 
     186                var name_element = document.getElementsByName("none_prefix_file").item(0); 
     187                var real_element = document.getElementsByName("' .$option_name . '").item(0); 
     188 
     189                var file_name = "' . $mydirname . '_" + name_element.value + ".html"; 
     190                if (type_element.value ==0) var tmp_type = "db:"; else var tmp_type = "file:"; 
     191                real_element.value = tmp_type + file_name; 
     192        } 
     193</script> 
     194'; 
     195     
     196    return $output; 
     197 
     198} 
     199endif; 
    148200 
    149201?> 
  • branches/XPressMU/xpressme_integration_kit/blocks/calender_block.php

    r232 r488  
    2626 
    2727                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n"; 
    28             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
     28                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    2929                $form .= "<br />"; 
    3030                $form .= _MB_XP2_SUN_COLOR .": <input type='text' name='options[2]' value='" . $sun_color . "' /><br />\n"; 
  • branches/XPressMU/xpressme_integration_kit/blocks/category_block.php

    r232 r488  
    3434                require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');         
    3535 
    36                 $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' />"; 
    37             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
     36                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; 
     37                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    3838                $form .= "<br />"; 
    3939                $form .= _MB_XP2_CAT_ALL_STR . "  <input type='text' name='options[2]' value='" . $show_option_all . "' /><br />"; 
  • branches/XPressMU/xpressme_integration_kit/blocks/enhanced_block.php

    r232 r488  
    1919                $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 
    2020                $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_enhanced_block.html' : trim( $options[1] ); 
     21            $form .= _MB_XP2_THISTEMPLATE . "<input type='text' size='50' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
    2122                $include_file = empty( $options[2] ) ? '' : $options[2] ; 
    2223                 
     24                require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php'); 
    2325 
    2426                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; 
    25             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
     27                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    2628                $form .= "<br />"; 
    2729                $form .= _MB_XP2_ENHACED_FILE .":<br />\n"; 
    28                 $form .= '&emsp;' . _MB_XP2_FILE_NAME . ": my_<input type='text' name='options[2]' value='" . $include_file . "' />_block.php<br>\n"; 
     30                $form .= '&emsp;' . _MB_XP2_FILE_NAME . ": <b>my_</b><input type='text' name='options[2]' value='" . $include_file . "' /><b>_block.php</b><br>\n"; 
    2931                $form .= '&emsp;' . _MB_XP2_MAKE_ENHACED_FILE . "<br>\n"; 
    3032                return $form; 
  • branches/XPressMU/xpressme_integration_kit/blocks/meta_block.php

    r232 r488  
    3131 
    3232                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; 
    33             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
     33                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    3434                $form .= "<br />"; 
    3535                $form .= yes_no_radio_option('options[2]', _MB_XP2_META_WP_LINK , $wp_link) . "<br />\n"; 
  • branches/XPressMU/xpressme_integration_kit/blocks/page_block.php

    r386 r488  
    3535 
    3636                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; 
    37             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
     37                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    3838                $form .= "<br />"; 
    3939                $form .= _MB_XP2_PAGE_ORDERBY .": "; 
  • branches/XPressMU/xpressme_integration_kit/blocks/popular_posts_block.php

    r451 r488  
    2828                 
    2929                require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php'); 
    30  
    3130                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n"; 
    32             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />\n"; 
     31                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    3332                $form .= "<br />\n"; 
    3433                $form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
  • branches/XPressMU/xpressme_integration_kit/blocks/recent_comments_block.php

    r451 r488  
    3030                 
    3131                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n"; 
    32             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />\n"; 
     32                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    3333                $form .= "<br />"; 
    34                 $form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
    35                 $form .= _MB_XP2_LENGTH .": <input type='text' name='options[3]' value='" . $disp_length . "' /><br />\n"; 
     34                $form .= _MB_XP2_COUNT .": <input type='text' size='3' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
     35                $form .= _MB_XP2_LENGTH .": <input type='text' size='3' name='options[3]' value='" . $disp_length . "' /><br />\n"; 
    3636                $form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[4]' value='" . $date_format . "' /><br />\n"; 
    3737                $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[5]' value='" . $time_format . "' /><br />\n"; 
  • branches/XPressMU/xpressme_integration_kit/blocks/recent_posts_content_block.php

    r451 r488  
    3434                 
    3535                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n"; 
    36             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
    37                 $form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
     36                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
     37                $form .= "<br />"; 
     38                $form .= _MB_XP2_COUNT .": <input type='text' size='3' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
    3839                $form .= yes_no_radio_option('options[3]', _MB_XP2_P_EXCERPT , $excerpt) . "<br />\n"; 
    3940                $form .= _MB_XP2_P_EXCERPT_SIZE .": <input type='text' name='options[4]' value='" . $excerpt_size . "' /><br />\n"; 
  • branches/XPressMU/xpressme_integration_kit/blocks/recent_posts_list_block.php

    r451 r488  
    3131 
    3232                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />\n"; 
    33             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />\n"; 
     33                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    3434                $form .= "<br />\n";     
    35                 $form .= _MB_XP2_COUNT .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
    36                 $form .= _MB_XP2_REDNEW_DAYS .": <input type='text' name='options[3]' value='" . $disp_red . "' /><br />\n"; 
    37                 $form .= _MB_XP2_GREENNEW_DAYS .": <input type='text' name='options[4]' value='" . $disp_green . "' /><br />\n"; 
     35                $form .= _MB_XP2_COUNT .": <input type='text' size='3' name='options[2]' value='" . $disp_count . "' /><br />\n"; 
     36                $form .= _MB_XP2_REDNEW_DAYS .": <input type='text' size='3' name='options[3]' value='" . $disp_red . "' /><br />\n"; 
     37                $form .= _MB_XP2_GREENNEW_DAYS .": <input type='text' size='3' name='options[4]' value='" . $disp_green . "' /><br />\n"; 
    3838                $form .= _MB_XP2_DATE_FORMAT .": <input type='text' name='options[5]' value='" . $date_format . "' /><br />\n"; 
    3939                $form .= _MB_XP2_TIME_FORMAT .": <input type='text' name='options[6]' value='" . $time_format . "' /><br />\n"; 
  • branches/XPressMU/xpressme_integration_kit/blocks/search_block.php

    r232 r488  
    2525                 
    2626                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; 
    27             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
     27                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    2828                $form .= "<br />";               
    29                 $form .= _MB_XP2_SEARCH_LENGTH .": <input type='text' name='options[2]' value='" . $disp_count . "' /><br />"; 
     29                $form .= _MB_XP2_SEARCH_LENGTH .": <input type='text' size='3' name='options[2]' value='" . $disp_count . "' /><br />"; 
    3030//          $form .="<br /><input type='text' size='60' name='options[2]' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />"; 
    3131 
  • branches/XPressMU/xpressme_integration_kit/blocks/tag_cloud_block.php

    r232 r488  
    3232 
    3333                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; 
    34             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
     34                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    3535                $form .= "<br />"; 
    3636                $form .= _MB_XP2_CLOUD_SMALLEST .": <input type='text' size='4' name='options[2]' value='" . $smallest . "' /><br />"; 
  • branches/XPressMU/xpressme_integration_kit/blocks/widget_block.php

    r451 r488  
    4646 
    4747                $form  = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />"; 
    48             $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />"; 
     48                $form .= block_template_setting($mydirname,'options[1]',htmlspecialchars($this_template,ENT_QUOTES)); 
    4949                $form .= "<br />" . yes_no_radio_option('options[2]', _MB_XP2_WIDGET_TITLE_SHOW , $title_show); 
    5050                $form .= "<br />"; 
  • branches/XPressMU/xpressme_integration_kit/include/add_xpress_process.php

    r451 r488  
    77} 
    88 
     9function safe_site_url(){ 
     10        global $xoops_config; 
     11         
     12        if (is_xpress_index_page_call()){ 
     13                $siteurl = get_option('siteurl'); 
     14                $home = get_option('home'); 
     15                $module_url = $xoops_config->module_url; 
     16                $module_name = $xoops_config->module_name; 
     17                $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 
     18                $guess_url = preg_replace('|/' . $module_name . '/.*|i', '/' . $module_name, $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); 
     19 
     20                if(strcmp($siteurl,$module_url) !== 0) { 
     21                        if (!@fclose(@fopen($siteurl . '/xoops_version.php', "r"))){ 
     22                                update_option('siteurl' , $module_url); 
     23                        } 
     24                } 
     25 
     26                if(strcmp($guess_ur,$home) !== 0) { 
     27                        if (@fclose(@fopen($guess_url . '/xoops_version.php', "r"))){ 
     28                                update_option('home' , $guess_url); 
     29                        } 
     30                } 
     31        } 
     32} 
     33 
    934require_once( dirname( __FILE__ ).'/request_url.php'); 
    1035if (is_xpress_index_page_call()){ 
     36        //$_SERVER['REQUEST_METHOD'] = 'POST' is 
    1137        //When notifying by a private message, Notification_reserve_send(); 
    1238        //it is evaded that the data base becomes read-only as a result of the check on the referrer and the method.  
     39        $request_method =  (isset($_SERVER['REQUEST_METHOD'])) ? $_SERVER['REQUEST_METHOD'] : ''; 
    1340        $_SERVER['REQUEST_METHOD'] = 'POST'; 
     41        require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php.  
     42        $_SERVER['REQUEST_METHOD'] = $request_method; 
     43         
     44        unset($offset);         //This Trap is provides the case where $offset is defined on the XOOPS side. 
     45        require_once(ABSPATH.'wp-settings.php'); 
     46         
     47        //When it is not possible to connect it correctly at site home URL on the WordPress side,  
     48        //URL is corrected based on accessed URL.  
     49        safe_site_url(); 
    1450 
    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); 
    17         require_once(ABSPATH.'wp-settings.php'); 
    1851        if (!is_object($xoopsUser)){    // before login auth cookie clear 
    1952                wp_logout(); 
  • branches/XPressMU/xpressme_integration_kit/include/general_functions.php

    r423 r488  
    126126                $table_list = array(); 
    127127                $ret = array(); 
     128                $pattern = $wp_prefix . $table_name . '|' . $wp_prefix . '[0-9]*_' . $table_name; 
     129 
    128130                if (!empty($wp_prefix) && !empty($table_name)){ 
    129131                        $sql = "SHOW TABLES LIKE '" . $wp_prefix  . '%' . $table_name . "'"; 
     
    132134                                if($result = $xoopsDB->queryF($sql)){ 
    133135                                        while($row = $xoopsDB->fetchRow($result)){ 
    134                                                 $table_list[] = $row[0]; 
     136                                                if(preg_match('/' . $pattern . '/' , $row[0])){ 
     137                                                        $table_list[] = $row[0]; 
     138                                                } 
    135139                                        } 
    136140                                } 
     
    138142                                $rows = $xoops_db->get_results($sql, ARRAY_N); 
    139143                                foreach ($rows as $row){ 
    140                                         $table_list[] = $row[0]; 
     144                                        if(preg_match('/' . $pattern . '/' , $row[0])){ 
     145                                                $table_list[] = $row[0]; 
     146                                        } 
    141147                                } 
    142148                        }                        
  • branches/XPressMU/xpressme_integration_kit/include/oninstall.php

    r428 r488  
    4545 
    4646//xpress 
    47         global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query; 
     47        global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query,$wp_embed; 
    4848        global $xoops_config; 
    4949                 
  • branches/XPressMU/xpressme_integration_kit/include/onupdate.php

    r428 r488  
    4242        $site_url= XOOPS_URL."/modules/".$mydirname; 
    4343        xpress_put_siteurl($mydirname,$site_url); 
    44         xpress_put_home($mydirname,$site_url); 
    45  
     44        $home = get_xpress_option($mydirname,'home'); 
     45        $home_check = 'home option is right'; 
     46        if (strcmp($site_url,$home) !== 0 ){ 
     47                if (!@fclose(@fopen($home . '/xoops_version.php', "r"))){ 
     48                        xpress_put_home($mydirname,$site_url); 
     49                        $home_check = 'Change home option $home to $site_url'; 
     50                } 
     51        } 
     52        $msgs[] = $home_check; 
    4653// XPressME orignal table update 
    4754        $t_mess = xpress_table_make($module , $mydirname); 
     
    5057// make templates 
    5158        include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/xpress_templates_make.php' ; 
     59        $mod_version = $module->getVar('version') ; 
     60 
     61        $t_mess = xpress_clean_templates_file($mydirname,$mod_version); 
     62        $msgs = array_merge($msgs,$t_mess); 
     63         
    5264        $t_mess = xpress_templates_make($mid,$mydirname); 
    53          
    5465        $msgs = array_merge($msgs,$t_mess); 
    5566 
     
    97108endif; 
    98109 
     110if( ! function_exists( 'get_xpress_option' ) ) { 
     111        function get_xpress_option($mydirname,$option_name){ 
     112                global $xoopsModule; 
     113                $wp_prefix = $mydirname; 
     114                if ($wp_prefix == 'wordpress'){ 
     115                        $wp_prefix = 'wp'; 
     116                } 
     117                $xoopsDB =& Database::getInstance(); 
     118                $option_table = $xoopsDB->prefix($wp_prefix . '_options'); 
     119 
     120                $sql = "SELECT option_value FROM $option_table WHERE option_name = '" . $option_name . "'"; 
     121                 
     122                $result =  $xoopsDB->query($sql, 0, 0); 
     123                if ($xoopsDB->getRowsNum($result)  > 0){ 
     124                        $row = $xoopsDB->fetchArray($result); 
     125                        return $row['option_value']; 
     126                } 
     127                return 0; 
     128        } 
     129} 
    99130 
    100131if( ! function_exists( 'xpress_message_append_onupdate' ) ) : 
     
    190221                        $db->queryF( $queries ) ; 
    191222                        $msgs[] = "$views_table  ADD blog_id ."; 
     223                } 
     224                 
     225                // The table is repaired. 
     226                $non_blogid_sql ="SELECT * FROM $views_table WHERE blog_id IS NULL OR blog_id < 1"; 
     227                $non_blogid_res = $db->query($non_blogid_sql, 0, 0); 
     228                while($row = $db->fetchArray($non_blogid_res)){ 
     229                        $total_view = $row['post_views']; 
     230                        $post_id = $row['post_id']; 
     231                        $new_blogid_sql ="SELECT SUM(post_views) as post_views_sum FROM $views_table WHERE post_id = $post_id AND blog_id = 1 GROUP BY post_id"; 
     232                        $new_blogid_res = $db->query($new_blogid_sql, 0, 0); 
     233                        if ($db->getRowsNum($new_blogid_res)  > 0){ 
     234                                $new_row = $db->fetchArray($new_blogid_res); 
     235                                $total_view = $total_view + $new_row['post_views_sum']; 
     236                                $del_sql = "DELETE FROM $views_table WHERE post_id = $post_id AND blog_id = 1"; 
     237                                $db->queryF( $del_sql ) ; 
     238                        } 
     239                        $update_sql = "UPDATE $views_table SET post_views = $total_view , blog_id = 1 WHERE post_id = $post_id AND (blog_id IS NULL OR blog_id < 1)"; 
     240                        $db->queryF( $update_sql ) ; 
    192241                } 
    193242        } 
  • branches/XPressMU/xpressme_integration_kit/include/set_cash_cookie_path.php

    r232 r488  
    88 */ 
    99if ( !defined('USER_COOKIE') ) 
    10         define('USER_COOKIE', $modname . 'user_' . $hash); 
     10        define('USER_COOKIE', 'wordpress_' . $modname . '_user_' . $hash); 
    1111 
    1212/** 
     
    1515 */ 
    1616if ( !defined('PASS_COOKIE') ) 
    17         define('PASS_COOKIE', $modname . 'pass_' . $hash); 
     17        define('PASS_COOKIE', 'wordpress_' . $modname . '_pass_' . $hash); 
    1818 
    1919/** 
     
    2222 */ 
    2323if ( !defined('AUTH_COOKIE') ) 
    24         define('AUTH_COOKIE', $modname . '_auth_' . $hash); 
     24        define('AUTH_COOKIE', 'wordpress_' . $modname . '_auth_' . $hash); 
    2525 
    2626/** 
     
    2929 */ 
    3030if ( !defined('SECURE_AUTH_COOKIE') ) 
    31         define('SECURE_AUTH_COOKIE', $modname . '_sec_' . $hash); 
     31        define('SECURE_AUTH_COOKIE', 'wordpress_' . $modname . '_sec_' . $hash); 
    3232 
    3333/** 
     
    3636 */ 
    3737if ( !defined('LOGGED_IN_COOKIE') ) 
    38         define('LOGGED_IN_COOKIE', $modname . '_logged_in_' . $hash); 
     38        define('LOGGED_IN_COOKIE', 'wordpress_' . $modname . '_logged_in_' . $hash); 
    3939 
    4040/** 
     
    4343 */ 
    4444if ( !defined('TEST_COOKIE') ) 
    45         define('TEST_COOKIE', $modname . '_test_cookie'); 
     45        define('TEST_COOKIE', 'wordpress_' . $modname . '_test_cookie'); 
    4646 
    4747/** 
  • branches/XPressMU/xpressme_integration_kit/include/xpress_block_render.php

    r451 r488  
    2929                        $ret = @xpress_XML_unserialize($xml_data); 
    3030                        if (strstr($xml_data, '<?xml version="1.0" encoding="EUC-JP" ?>') !== false){ 
    31                                 $ans = mb_convert_variables('EUC-JP' , 'UTF-8', &$ret); 
     31                                if (version_compare(PHP_VERSION, '5.0.0', '>')) { 
     32                                        $ans = mb_convert_variables('EUC-JP' , 'UTF-8', &$ret); //xpress_XML_unserialize() Return UTF-8 at PHP5 
     33                                } 
    3234                        } 
    3335                        return $ret; 
     
    5254                        } 
    5355                        return $block_id; 
     56        } 
     57 
     58        function get_block_mid($mydirname) 
     59        { 
     60                        $xoopsDB =& Database::getInstance(); 
     61                        $modules_tbl = $xoopsDB->prefix('modules');      
     62 
     63                        $sql = "SELECT mid FROM $modules_tbl WHERE dirname = '$mydirname'"; 
     64                        $result =  $xoopsDB->query($sql, 0, 0); 
     65                        if ($xoopsDB->getRowsNum($result)  > 0){ 
     66                                $row = $xoopsDB->fetchArray($result); 
     67                                $mid = $row['mid']; 
     68                        } 
     69                        return $mid; 
    5470        } 
    5571 
     
    160176        function xpress_block_render($mydirname,$block_function_name,$options) 
    161177        { 
    162                 global $wpdb; 
     178                global $wpdb,$xoops_config; 
    163179                $func_file = $block_function_name; 
    164180                $call_theme_function_name = str_replace(".php", "", $block_function_name); 
     
    167183                $blockID =get_block_id($mydirname,$func_file,$options);          
    168184 
    169                 $this_url = '/modules/'. $mydirname; 
     185                $this_block_url = '/' . $mydirname . '/'; 
    170186                $call_url = $_SERVER['REQUEST_URI']; 
    171187                 
    172188                xpress_block_css_set($mydirname); 
    173                 if (strstr($call_url,$this_url)){                        
     189                if (strstr($call_url , $this_block_url) !== false){ 
    174190                        $block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name); 
    175191                        require_once $block_theme_file['file_path']; 
     
    185201                        } 
    186202                } 
    187  
    188                 $templates_file = 'db:'.$mydirname. '_' . str_replace(".php", ".html", $block_function_name); 
     203                $temp_option = explode(':' , $options[1]); 
     204                 
     205                if (isset($temp_option[1])) { 
     206                        $templates_file = $temp_option[1]; 
     207                } else { 
     208                        $templates_file = 'db:'.$mydirname. '_' . str_replace(".php", ".html", $block_function_name); 
     209                } 
     210                 
    189211                $tpl =& new XoopsTpl() ; 
     212                $tpl->template_dir = $xoops_config->module_path . '/templates'; 
     213                if (!$tpl->template_exists($templates_file)){ 
     214                        $src_file_path = $xoops_config->module_path . '/templates/' .$mydirname. '_' . str_replace(".php", ".html", $block_function_name); 
     215                        $templates_file = add_xpress_tpl($mydirname,$templates_file,$src_file_path); 
     216                } 
    190217                $tpl->assign( 'block' , $block ) ; 
    191218                $ret['content'] = $tpl->fetch( $templates_file ) ; 
    192219                return $ret ; 
     220        } 
     221         
     222        function add_xpress_tpl($mydirname,$templates='',$src_file_path){ 
     223                global $wpdb,$xoops_config , $xoops_db; 
     224                 
     225                $mid = get_block_mid($mydirname); 
     226 
     227                $temp_parm = explode(':' , $templates); 
     228                if (empty($temp_parm[1])) { 
     229                        $filename=$temp_parm[0]; 
     230                        $type = 'db'; 
     231                } else  { 
     232                        $filename=$temp_parm[1]; 
     233                        $type = $temp_parm[0]; 
     234                } 
     235                $temp_file_path = $xoops_config->module_path . '/templates/'. $filename; 
     236                $pattern = '^' . $mydirname . '_'; 
     237                if (preg_match('/' . $pattern . '/' , $filename, $match)){ // file prefix check 
     238                        if (!file_exists($temp_file_path)){             // Repetition check 
     239                                if (file_exists($src_file_path)){       // source file check 
     240                                        $rcd = copy($src_file_path, $temp_file_path); 
     241                                } 
     242                        } 
     243                        return  'file:' . $filename; 
     244                } 
     245                return $templates; 
    193246        } 
    194247         
     
    243296        { 
    244297                global $xoops_db,$xoops_config; 
     298                 
    245299                $mid = get_xpress_modid(); 
    246300                $sql = "SELECT bid,options,func_file FROM " . get_xoops_prefix() . "newblocks WHERE mid = $mid AND visible = 1"; 
     
    260314        if ($dh = opendir($cache_dir)) { 
    261315            while (($file = readdir($dh)) !== false) { 
    262                 if (preg_match('/^' . preg_quote($mydirname) . '/', $file)) { 
     316                if (preg_match('/^' . preg_quote($mydirname) . '_/', $file)) { 
    263317                        if(! preg_match('/' . $pattern . '/', $file)) { 
    264318                        unlink($cache_dir.$file); 
     
    287341                        return $xu_row['conf_value']; 
    288342                } 
    289         } 
    290          
     343        }        
    291344}        
    292345?> 
  • branches/XPressMU/xpressme_integration_kit/include/xpress_templates_make.php

    r384 r488  
    77        $tplfile_handler =& xoops_gethandler( 'tplfile' ) ; 
    88        $tpl_path = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/templates' ; 
     9         
     10        //copy  template file from source 
    911        if( $handler = @opendir( $tpl_path . '/source/' ) ) { 
    1012                while( ( $file = readdir( $handler ) ) !== false ) { 
     
    2628                                        $msgs[] = '<span style="color:#ff0000;">ERROR: Could not copy template <b>'.htmlspecialchars($target_file_name).'</b> from ' . htmlspecialchars($file). '(check templates directory permision (777))</span><br />'; 
    2729                                }                                        
    28                                 $tplfile =& $tplfile_handler->create() ; 
    29                                 if ($rcd) { 
    30                                         $mtime = intval( @filemtime( $target_file_path ) ) ; 
    31                                         $tplfile->setVar( 'tpl_source' , file_get_contents( $target_file_path ) , true ) ; 
    32                                 } else { 
    33                                         $mtime = intval( @filemtime( $file_path ) ) ; 
    34                                         $tplfile->setVar( 'tpl_source' , file_get_contents( $file_path ) , true ) ; 
    35                                 } 
    36  
    37                                 $tplfile->setVar( 'tpl_refid' , $mid ) ; 
    38                                 $tplfile->setVar( 'tpl_tplset' , 'default' ) ; 
    39                                 $tplfile->setVar( 'tpl_file' , $target_file_name ) ; 
    40                                 $tplfile->setVar( 'tpl_desc' , '' , true ) ; 
    41                                 $tplfile->setVar( 'tpl_module' , $mydirname ) ; 
    42                                 $tplfile->setVar( 'tpl_lastmodified' , $mtime ) ; 
    43                                 $tplfile->setVar( 'tpl_lastimported' , 0 ) ; 
    44                                 $tplfile->setVar( 'tpl_type' , 'module' ) ; 
    45                                 if( ! $tplfile_handler->insert( $tplfile ) ) { 
    46                                         $msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($target_file_name).'</b> to the database.</span><br />'; 
    47                                 } else { 
    48                                         $tplid = $tplfile->getVar( 'tpl_id' ) ; 
    49                                         $msgs[] = 'Template <b>'.htmlspecialchars($target_file_name) .'</b> added to the database. (ID: <b>'.$tplid.'</b>)<br />'; 
    50                                         // generate compiled file 
    51                                         include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ; 
    52                                         include_once XOOPS_ROOT_PATH.'/class/template.php' ; 
    53                                         if( ! xoops_template_touch( $tplid ) ) { 
    54                                                 $msgs[] = '<span style="color:#ff0000;">ERROR: Failed compiling template <b>'.htmlspecialchars($target_file_name).'</b>.</span><br />'; 
    55                                         } else { 
    56                                                 $msgs[] = 'Template <b>'.htmlspecialchars($target_file_name).'</b> compiled.</span><br />'; 
    57                                         } 
     30                        } 
     31                } 
     32                closedir( $handler ) ; 
     33        } 
     34         
     35        // template added to the database. 
     36        if( $handler = @opendir( $tpl_path . '/' ) ) { 
     37                while( ( $file = readdir( $handler ) ) !== false ) { 
     38                        if( substr( $file , 0 , 1 ) == '.' ) continue ; 
     39                        $file_path = $tpl_path . '/' . $file ; 
     40                        $file_name = $file ; 
     41                        $pattern = '^' . $mydirname . '_'; 
     42                        if (preg_match('/' . $pattern . '/' , $file_name, $match)){ 
     43                                if( is_file( $file_path ) ) { 
     44                                        $msgs[] = xpress_create_db_template($file_name,$file_path,$mydirname,$mid); 
    5845                                } 
    5946                        } 
     
    6148                closedir( $handler ) ; 
    6249        } 
     50         
    6351        include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ; 
    6452        include_once XOOPS_ROOT_PATH.'/class/template.php' ; 
     
    6856} 
    6957 
     58function xpress_create_db_template($file_name,$file_path,$mydirname,$mid){ 
     59        if( is_file( $file_path ) ) { 
     60                $tplfile_handler =& xoops_gethandler( 'tplfile' ) ; 
     61                $tplfile =& $tplfile_handler->create() ; 
     62                $mtime = intval( @filemtime( $file_path ) ) ; 
     63                $tplfile->setVar( 'tpl_source' , file_get_contents( $file_path ) , true ) ; 
     64                $tplfile->setVar( 'tpl_refid' , $mid ) ; 
     65                $tplfile->setVar( 'tpl_tplset' , 'default' ) ; 
     66                $tplfile->setVar( 'tpl_file' ,  $file_name ) ; 
     67                $tplfile->setVar( 'tpl_desc' , '' , true ) ; 
     68                $tplfile->setVar( 'tpl_module' , $mydirname ) ; 
     69                $tplfile->setVar( 'tpl_lastmodified' , $mtime ) ; 
     70                $tplfile->setVar( 'tpl_lastimported' , 0 ) ; 
     71                $tplfile->setVar( 'tpl_type' , 'module' ) ; 
     72                if( ! $tplfile_handler->insert( $tplfile ) ) { 
     73                        $msg = '<span style="color:#ff0000;">ERROR: Template Could not added to the database. <b>'.htmlspecialchars($file_name).'</b> to the database.</span><br />'; 
     74                } else { 
     75                        $tplid = $tplfile->getVar( 'tpl_id' ) ; 
     76                        $msg = 'Template <b>'.htmlspecialchars($file_name) .'</b> added to the database. (ID: <b>'.$tplid.'</b>)<br />'; 
     77                        // generate compiled file 
     78                        include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php' ; 
     79                        include_once XOOPS_ROOT_PATH.'/class/template.php' ; 
     80                        if( ! xoops_template_touch( $tplid ) ) { 
     81                                $msg = '<span style="color:#ff0000;">ERROR: Failed compiling template <b>'.htmlspecialchars($file_name).'</b>.</span><br />'; 
     82                        } else { 
     83                                $msg = 'Template <b>'.htmlspecialchars($file_name).'</b> compiled.</span><br />'; 
     84                        } 
     85                } 
     86        } 
     87        return $msg; 
     88} 
    7089 
    7190function is_template($file_name){ 
     
    96115} 
    97116 
     117function xpress_clean_templates_file($mydirname,$mod_version) 
     118{ 
     119        $tpl_path = XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/templates/' ; 
     120        $msgs = array(); 
     121        if( $handler = @opendir( $tpl_path) ) { 
     122                while( ( $file = readdir( $handler ) ) !== false ) { 
     123                        if( substr( $file , 0 , 1 ) == '.' ) continue ; 
     124                        if ( strcmp($file,'source')==0 ) continue ; 
     125                        if ( strcmp($file,'index.html')==0 ) continue ; 
     126                        $target_file_path = $tpl_path . $file; 
     127                        if (is_dir($target_file_path)){ 
     128                                rmDirectory($target_file_path); 
     129                                $msgs[] = 'Template <b>'.htmlspecialchars($file).'</b> directory deleted.</span><br />'; 
     130                        } else { 
     131                                if ($mod_version >= 200){ 
     132                                        $pattern = '^' . $mydirname . '_'; 
     133                                        if (preg_match('/' . $pattern . '/' , $file, $match))  continue ; 
     134                                } 
     135                                $rcd = @unlink($target_file_path); 
     136                                $msgs[] = 'Template <b>'.htmlspecialchars($file).'</b> file deleted.</span><br />'; 
     137                        } 
     138                } 
     139                closedir( $handler ) ; 
     140        } 
     141        return $msgs; 
     142} 
     143 
     144function rmDirectory($dir){ 
     145        if ($handle = opendir("$dir")){ 
     146                while (false !== ($item = readdir($handle))){ 
     147                        if ($item != "." && $item != ".."){ 
     148                                if (is_dir("$dir/$item")){ 
     149                                        rmDirectory("$dir/$item"); 
     150                                }else{ 
     151                                        unlink("$dir/$item"); 
     152                                } 
     153                        } 
     154                } 
     155                closedir($handle); 
     156                rmdir($dir); 
     157        } 
     158} 
    98159 
    99160?> 
  • branches/XPressMU/xpressme_integration_kit/language/english/blocks.php

    r451 r488  
    2626        define("_MB_XP2_LIST","List"); 
    2727        define("_MB_XP2_FILE_NAME","Files Name"); 
     28        define("_MB_XP2_THISTEMPLATE","Template"); 
    2829         
    2930// recent comment block  
     
    107108         
    108109// Categorie 
    109         define("_MB_XP2_CAT_ALL_STR","All categories link Display Title. (blank is not displayj"); 
     110        define("_MB_XP2_CAT_ALL_STR","All categories link Display Title. (blank is not display)"); 
    110111        define("_MB_XP2_CAT_ORDERBY","Order of the categories"); 
    111112        define("_MB_XP2_CAT_NAME","name"); 
  • branches/XPressMU/xpressme_integration_kit/language/english/modinfo.php

    r387 r488  
    2222        define("_MI_XP2_MENU_XPRESS","XPressME Setting"); 
    2323        define("_MI_XP2_MENU_TO_MODULE","to Modules"); 
     24        define("_MI_XP2_TO_UPDATE","Update"); 
    2425 
    2526        // Module Config 
  • branches/XPressMU/xpressme_integration_kit/language/ja_utf8/blocks.php

    r451 r488  
    2626        define("_MB_XP2_LIST","リスト"); 
    2727        define("_MB_XP2_FILE_NAME","ファイル名"); 
     28        define("_MB_XP2_THISTEMPLATE","このブロックのテンプレート"); 
    2829         
    2930// recent comment block  
  • branches/XPressMU/xpressme_integration_kit/language/ja_utf8/modinfo.php

    r387 r488  
    2222        define("_MI_XP2_MENU_XPRESS","XPressME設定"); 
    2323        define("_MI_XP2_MENU_TO_MODULE","モジュールへ"); 
     24        define("_MI_XP2_TO_UPDATE","アップデート"); 
    2425 
    2526        // Module Config 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php

    r451 r488  
    9595 
    9696        $output = ''; 
    97         $author_cookie = get_xpress_dir_name() . "_select_author" ; 
     97        $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 
    9898        if (!empty($_COOKIE[$author_cookie])){ 
    9999                $uid = intval($_COOKIE[$author_cookie]); 
     
    115115        extract( $r ); 
    116116        $output = ''; 
    117         $author_cookie = get_xpress_dir_name() . "_select_author" ; 
     117        $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 
    118118        if (!empty($_COOKIE[$author_cookie])){ 
    119119                $output = intval($_COOKIE[$author_cookie]); 
     
    161161        $xpress_codename = $xoops_config->module_codename; 
    162162        if ($no_link){ 
    163                 $output = 'XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename); 
    164163                if ($xoops_config->is_wpmu) { 
     164                        $output = 'XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename); 
    165165                        $output .= '(included WordPress MU ' . $wpmu_version. ')'; 
    166166                } else { 
     167                        $output = 'XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename); 
    167168                        if (strstr($wp_version,'ME')){ 
    168169                                $output .= '(included WordPress ' . $wp_version . ')'; 
     
    172173                } 
    173174        } else { 
    174                 $output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>'; 
    175175                if ($xoops_config->is_wpmu) { 
     176                        $output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressMU Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>'; 
    176177                        $output .= '(included <a href="http://mu.wordpress.org/" title="Powered by WordPress"'." target='_blank'". '>WordPress MU ' . $wpmu_version . '</a>)'; 
    177178                } else { 
     179                        $output = '<a href="http://ja.xpressme.info"'. " target='_blank'" . '>XPressME Ver.' . sprintf('%.2f %s',$xpress_version,$xpress_codename) .'</a>'; 
    178180                        if (strstr($wp_version,'ME')){ 
    179181                                $output .= '(included <a href="http://wpme.sourceforge.jp/" title="Powered by WordPress"'." target='_blank'". '>WordPress ' . $wp_version . '</a>)'; 
     
    467469} 
    468470 
    469 function set_post_views_count(&$content) { 
     471function set_post_views_count($content) { 
    470472        if ( empty($_GET["feed"]) &&  empty($GLOBALS["feed"]) && empty($GLOBALS["doing_trackback"]) && empty($GLOBALS["doing_rss"]) && empty($_POST) && is_single() ){ 
    471473                post_views_counting(); 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp_old.php

    r378 r488  
    190190 
    191191endif;  // Under WP2.5 
     192 
     193// Under WP2.7 
     194if (version_compare($xoops_config->wp_version,'2.6', '<')) : 
     195        /** 
     196         * Guess the URL for the site. 
     197         * 
     198         * Will remove wp-admin links to retrieve only return URLs not in the wp-admin 
     199         * directory. 
     200         * 
     201         * @since 2.6.0 
     202         * 
     203         * @return string 
     204         */ 
     205        function wp_guess_url() { 
     206        if ( defined('WP_SITEURL') && '' != WP_SITEURL ) { 
     207                $url = WP_SITEURL; 
     208        } else { 
     209                $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 
     210                $url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 
     211        } 
     212        return $url; 
     213} 
     214endif;  // Under WP2.6 
    192215 
    193216// Under WP2.7 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php

    r452 r488  
    242242        if (is_admin()) return $query_vars; 
    243243         
    244         $author_cookie = get_xpress_dir_name() . "_select_author" ; 
     244        $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 
    245245        if(xpress_is_multi_user()){ 
    246246                if (!empty($_GET)){ 
     
    290290} 
    291291 
    292 function xpress_query_filter(&$query) 
     292function xpress_query_filter($query) 
    293293{ 
    294294        if (is_admin()) return $query; 
    295295 
    296         $author_cookie = get_xpress_dir_name() . "_select_author" ; 
     296        $author_cookie = 'select_' . get_xpress_dir_name() . "_author" ; 
    297297         
    298298        if (strpos($query,'SELECT') === false)  return $query; 
     
    357357} 
    358358 
    359 function safe_site_url_filter($site_url){ 
    360         global $xoops_config; 
    361         if (!$xoops_config->is_wpmu){ 
    362                 if ($site_url != get_xpress_url()) $site_url = get_xpress_url(); 
    363         } 
    364         return $site_url; 
    365 } 
    366  
    367359function get_block_file_path($mydirname,$file_name) 
    368360{ 
  • branches/XPressMU/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php

    r451 r488  
    7171} 
    7272add_action("wp_meta" , "wp_meta_add_xpress_menu");                      // add xpress menu  in wp_meta 
    73          
    74 //Site URL check 
    75 add_filter('option_home',                       "safe_site_url_filter"); 
    76 add_filter('option_siteurl',            "safe_site_url_filter"); 
    77          
    7873 
    7974//XOOPS Bloack Cache Refresh 
     
    301296 
    302297include_once dirname( __FILE__ ).'/include/dashboard_feed.php' ; 
    303  
    304 include_once dirname( __FILE__ ).'/xpressme_widget_class.php' ; 
    305  
     298if(xpress_is_wp_version('>=','2.8')){ 
     299        include_once dirname( __FILE__ ).'/xpressme_widget_class.php' ; 
     300} 
    306301?> 
  • branches/XPressMU/xpressme_integration_kit/xoops_version.php

    r451 r488  
    4747 
    4848// status 
    49 $modversion['codename'] = "RC1"; 
     49$modversion['codename'] = ""; 
    5050 
    5151// onInstall, onUpdate, onUninstall 
Note: See TracChangeset for help on using the changeset viewer.