XPressME Integration Kit

Trac

Changeset 744


Ignore:
Timestamp:
May 18, 2011, 9:07:23 PM (13 years ago)
Author:
toemon
Message:

WPなしでのインストールに対応 Fixed#405

Location:
branches/Ver3.0/xpressme_integration_kit
Files:
10 added
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • branches/Ver3.0/xpressme_integration_kit/admin/index.php

    r735 r744  
    774774$mydirpath = dirname( dirname( __FILE__ ) ) ; 
    775775//require_once($mydirpath.'/wp-config.php'); 
    776          
     776 
    777777require_once '../../../include/cp_header.php' ; 
    778778//require_once '../include/gtickets.php' ; 
     
    795795        exit ; 
    796796} 
     797include_once $mydirpath .'/include/wp_check.php' ; 
    797798 
    798799// beggining of Output 
    799800xoops_cp_header(); 
    800 include( './mymenu.php' ) ; 
    801  
    802 echo " 
    803         <style type=\"text/css\"> 
    804         label,text { 
    805                 display: block; 
    806                 float: left; 
    807                 margin-bottom: 2px; 
    808         } 
    809         label { 
    810                 text-align: right; 
    811                 width: 200px; 
    812                 padding-right: 20px; 
    813         } 
    814         br { 
    815                 clear: left; 
    816         } 
    817         </style> 
    818 "; 
    819  
    820 if (!empty($_POST['submit_report'])) $report = true; else $report = false; 
    821 xpress_sys_info($report); 
    822 xpress_config_from_xoops_view($report); 
    823 xpress_active_plugin_list($report); 
    824 xpress_block_state($report); 
    825 xpress_block_options($report); 
    826 xpress_group_role_state($report); 
    827 admin_check_user_meta_prefix($report); 
    828 xpress_state($report); 
    829 echo '<form method="POST">'."\n"; 
    830 echo '<input type="submit" name="submit_report" value="' . _AM_XP2_SYS_REPORT .' " />'.'&emsp;'; 
    831 echo '<input type="submit" name="submit_normal" value="' . _AM_XP2_SYS_NORMAL .' " />'."<br />\n"; 
    832 echo "</form>\n"; 
    833  
     801if(is_wpdb_installed()){ 
     802        include( './mymenu.php' ) ; 
     803 
     804        echo " 
     805                <style type=\"text/css\"> 
     806                label,text { 
     807                        display: block; 
     808                        float: left; 
     809                        margin-bottom: 2px; 
     810                } 
     811                label { 
     812                        text-align: right; 
     813                        width: 200px; 
     814                        padding-right: 20px; 
     815                } 
     816                br { 
     817                        clear: left; 
     818                } 
     819                </style> 
     820        "; 
     821        if (!empty($_POST['submit_report'])) $report = true; else $report = false; 
     822        xpress_sys_info($report); 
     823        xpress_config_from_xoops_view($report); 
     824        xpress_active_plugin_list($report); 
     825        xpress_block_state($report); 
     826        xpress_block_options($report); 
     827        xpress_group_role_state($report); 
     828        admin_check_user_meta_prefix($report); 
     829        xpress_state($report); 
     830        echo '<form method="POST">'."\n"; 
     831        echo '<input type="submit" name="submit_report" value="' . _AM_XP2_SYS_REPORT .' " />'.'&emsp;'; 
     832        echo '<input type="submit" name="submit_normal" value="' . _AM_XP2_SYS_NORMAL .' " />'."<br />\n"; 
     833        echo "</form>\n"; 
     834} else { 
     835 
     836        include_once $mydirpath .'/include/wp_installer.php' ; 
     837        if (!empty($_POST['submit_install'])) { 
     838                $i_mess = wp_installer($mydirname); 
     839                foreach( $i_mess as $message ) { 
     840                        echo $message ; 
     841                } 
     842 
     843        } else { 
     844                echo '<font size="5" color="#ff0000">'. _AM_XP2_NO_WP. '</font><br /><br />'; 
     845 
     846                if (xp_permission_check($mydirname , $mydirpath)){ 
     847                        echo '<form method="POST">'."\n"; 
     848                        echo '<input type="submit" name="submit_install" value="' . _AM_XP2_WP_INSTALL .' " />'.'&emsp;'; 
     849                        echo "</form>\n"; 
     850                } else { 
     851                        include_once $mydirpath .'/admin/help/wp_install_help.php' ; 
     852                        wp_install_guide(); 
     853                        echo '<form method="POST">'."\n"; 
     854                        echo '<input type="submit" name="submit_recheck" value="' . _AM_XP2_WP_RE_CHK .' " />'.'&emsp;'; 
     855                        echo "</form>\n"; 
     856                } 
     857        } 
     858} 
    834859xoops_cp_footer(); 
    835860 
  • branches/Ver3.0/xpressme_integration_kit/admin/menu.php

    r461 r744  
    4040} 
    4141 
    42  
    43  
    4442$i=0; 
     43include_once $dir_path .'/include/wp_check.php' ; 
    4544$adminmenu[$i]['title'] = _MI_XP2_MENU_SYS_INFO ; 
    4645$adminmenu[$i++]['link'] = "admin/index.php"; 
     46if(is_wpdb_installed()){ 
    4747 
    4848//$adminmenu[$i]['title'] = _MI_XP2_MENU_BLOCK_ADMIN ; 
     
    6060$adminmenu[$i]['title'] = _MI_XP2_TO_UPDATE ; 
    6161$adminmenu[$i++]['link'] = "admin/update.php"; 
    62  
     62} 
    6363?> 
  • branches/Ver3.0/xpressme_integration_kit/class/wpInfo_class.php

    r743 r744  
    99 */ 
    1010class wpInfo { 
     11        var     $mod_dirpath; 
     12        var     $mod_name; 
     13        var $mod_url; 
     14 
     15        var $xoops_Lang; 
     16        var $wp_Lang; 
     17        var $php_version; 
     18        var $mysql_version; 
    1119        // The language of XOOPS is set as Key of the array.  
    1220        // The language of WP is set as Value of the array.  
    13         var $xoops_Lang; 
    14         var $wp_Lang; 
    15          
    1621        var $wp_lang_array = array( 
    17                 'english' => array(  
    18                                 'wp_lang' =>'en', 
    19                                 'wp_site' =>'http://wordpress.org/', 
    20                         ), 
    21                                                                          
    22                 'japanese' => array(  
    23                                 'wp_lang' =>'ja', 
    24                                 'wp_site' =>'http://ja.wordpress.org/', 
    25                         ), 
    26                  
    27                 'ja_utf8' => array(  
    28                                 'wp_lang' =>'ja', 
    29                                 'wp_site' =>'http://ja.wordpress.org/', 
    30                         ), 
    31                  
    32                 'pt-br_utf8' => array(  
    33                                 'wp_lang' =>'en', 
    34                                 'wp_site' =>'http://br.wordpress.org/', 
    35                         ), 
    36                  
     22                'english' =>    'en_US', 
     23                'japanese' =>   'ja', 
     24                'ja_utf8' =>    'ja', 
     25                'pt-br_utf8' => 'pt_BR', 
    3726                // The key(language of XOOPS) of the following lists has not been set yet.  
    3827                'Afrikaans' =>  'af', 
     
    9584        ); 
    9685 
    97         public function get_wpLang($xoops_Lang = 'english')  
    98         { 
    99                 $detect_lang = $this->wp_lang_array[$xoops_Lang]['wp_lang']; 
    100                 if (empty($detect_lang)) return 'en'; 
    101                 return $detect_lang; 
    102         } 
    103         public function get_download_info() 
    104         { 
    105                 $check_url =    'http://api.wordpress.org/core/version-check/1.5/?locale='. $this->wp_lang; 
    106         } 
    107 } 
     86        function wpInfo(){ 
     87                $this->__construct(); 
     88        } 
     89        function __construct() { 
     90                $this->mod_dirpath = dirname(dirname(__FILE__)); 
     91                $this->mod_name = basename(dirname(dirname(__FILE__))); 
     92                $this->mod_url = XOOPS_URL . '/modules/'.$this->mod_name; 
     93                $this->load_lang(); 
     94                $this->xoops_Lang = @$GLOBALS["xoopsConfig"]['language']; 
     95                $this->php_version    = phpversion(); 
     96                $xoopsDB =& Database::getInstance(); 
     97                list($SV) = $xoopsDB->fetchRow($xoopsDB->query('SELECT version()')); 
     98                $this->mysql_version = $SV; 
     99 
     100                $this->get_wpLang(); 
     101        } 
     102        function text_indent($text,$num = 1,$css_option='') 
     103        { 
     104                $ret = ''; 
     105                $px = 24 * $num; 
     106                $ret = '<div style="padding-left:' .$px .'px;'.$css_option.'">'; 
     107                $ret .= $text . '</div>'; 
     108                return $ret; 
     109        } 
     110        public function load_lang() 
     111        { 
     112                $lang = @$GLOBALS["xoopsConfig"]['language']; 
     113 
     114                // language file (modinfo.php) 
     115                if( file_exists( $this->mod_dirpath .'/language/'.$lang.'/admin.php' ) ) { 
     116                        include_once $this->mod_dirpath .'/language/'.$lang.'/admin.php' ; 
     117                } else if( file_exists(  $this->mod_dirpath .'/language/english/admin.php' ) ) { 
     118                        include_once $this->mod_dirpath .'/language/english/admin.php' ; 
     119                } 
     120        } 
     121         
     122        public function get_php_version() 
     123        { 
     124                return $this->php_version; 
     125        } 
     126        public function get_mysql_version() 
     127        { 
     128                return $this->mysql_version; 
     129        } 
     130        public function get_wpLang($xoops_Lang = '')  
     131        { 
     132                if(!empty($xoops_Lang)) $this->xoops_Lang = $xoops_Lang; 
     133                $this->wp_Lang = $this->wp_lang_array[$this->xoops_Lang]; 
     134                if (empty($this->wp_Lang)) $this->wp_Lang =  'en_US'; 
     135                return $this->wp_Lang; 
     136        } 
     137        public function get_mod_image_link($file_name='')  
     138        { 
     139                $link_url = ''; 
     140                if(!empty($file_name)){ 
     141                        if(file_exists($this->mod_dirpath.'/images/'.$file_name)){ 
     142                                $link_url = '<img alt="'.$file_name.'" src="'. $this->mod_url .'/images/'.$file_name.'" title="'.$file_name.'" align=top>'; 
     143                        } 
     144                } 
     145                return $link_url; 
     146        } 
     147 
     148        function is_wpdb_installed(){ 
     149                $prefix_mod = XOOPS_DB_PREFIX .'_' . preg_replace('/wordpress/','wp',$this->mod_name) . '_'; 
     150                $xoopsDB =& Database::getInstance(); 
     151                $sql = "SHOW TABLES LIKE '$prefix_mod%'"; 
     152                if ($result = $xoopsDB->queryf($sql)){ 
     153                        if($xoopsDB->getRowsNum($result))  return true; 
     154                } 
     155                return false; 
     156        } 
     157         
     158        public function is_wp_file_found() 
     159        { 
     160                if (!file_exists($this->mod_dirpath . '/wp-settings.php')){ 
     161                        return false; 
     162                } 
     163                return true; 
     164        } 
     165        public function get_download_info($locale='') 
     166        { 
     167                $sql_version = preg_replace('/[^0-9.].*/', '', $this->mysql_version); 
     168                $php_version = $this->php_version; 
     169                if (empty($locale)) $locale = $this->wp_Lang; 
     170                $url = "http://api.wordpress.org/core/version-check/1.5/?php=" . $php_version . "&locale=" . $locale . "&mysql=" . $sql_version; 
     171 
     172                $handle = @fopen($url,'r'); 
     173                if ($handle) { 
     174                        $ans = array(); 
     175                        $num = 0; 
     176                        $pos = 0; 
     177                while (($buffer = fgets($handle, 4096)) !== false) { 
     178                        $buffer = trim($buffer); 
     179                        if (strlen($buffer) == 0) { 
     180                                $num++; 
     181                                $pos=0; 
     182                        } else { 
     183                                $ans[$num][$pos] = $buffer; 
     184                                $pos++; 
     185                        } 
     186                } 
     187                if (!feof($handle)) { 
     188                        echo "Error: unexpected fgets() fail\n"; 
     189                } 
     190                fclose($handle); 
     191                } 
     192                        $ressponce = $ans[0][0]; 
     193                        $site_url = $ans[0][1]; 
     194                        $download_url = $ans[0][2]; 
     195                        $wp_version = $ans[0][3]; 
     196                        $download_lang = $ans[0][4]; 
     197//                      print_r($ans); 
     198                        if (isset($ans[1])){ 
     199                                $en_download_url = $ans[1][2]; 
     200                        } 
     201                        if ($locale == $download_lang){ 
     202                                $ret = $this->text_indent(sprintf(_AM_XP2_WP_INFO_1,$locale),2); 
     203                                $ret .= $this->text_indent('<a href="'.$download_url.'">' . $download_url .'</a>' ,3); 
     204                                if (!empty($en_download_url)){ 
     205                                        $ret .= $this->text_indent(_AM_XP2_WP_INFO_4,2); 
     206                                        $ret .= $this->text_indent('<a href="'.$en_download_url .'">' . $en_download_url .'</a>' ,3); 
     207                                } 
     208                        } else { 
     209                                $ret = $this->text_indent(sprintf(_AM_XP2_WP_INFO_2,$locale)); 
     210                                $ret .= $this->text_indent(_AM_XP2_WP_INFO_3,2); 
     211                                $ret .= $this->text_indent('<a href="http://codex.wordpress.org/WordPress_in_Your_Language" target="    _blank">WordPress_in_Your_Language</a>' ,3); 
     212                                $ret .= $this->text_indent(_AM_XP2_WP_INFO_4,2); 
     213                                $ret .= $this->text_indent('<a href="'.$download_url.'">' . $download_url .'</a>' ,3); 
     214                        } 
     215                        echo $ret; 
     216                } 
     217        } 
    108218?> 
  • branches/Ver3.0/xpressme_integration_kit/include/add_xpress_process.php

    r733 r744  
    111111        } 
    112112} 
    113  
    114113require_once( dirname( __FILE__ ).'/request_url.php'); 
    115114require_once( dirname( __FILE__ ).'/memory_limit.php'); 
    116115 
    117116$global_session = $_SESSION; 
    118  
    119117if (is_xpress_index_page_call()){ 
     118        require_once( dirname( __FILE__ ).'/wp_check.php'); 
     119        if (!is_wpdb_installed()){ 
     120                include $xoops_config->xoops_root_path ."/header.php"; 
     121                echo "<h2>Wordpress has not been installed yet. </h2>"; 
     122                include $xoops_config->xoops_root_path . '/footer.php'; 
     123                exit(); 
     124        } 
     125 
    120126        //$_SERVER['REQUEST_METHOD'] = 'POST' is 
    121127        //When notifying by a private message, Notification_reserve_send(); 
  • branches/Ver3.0/xpressme_integration_kit/include/oninstall.php

    r733 r744  
    2222{ 
    2323        // transations on module install 
     24        $mydirpath = dirname(dirname(__FILE__)); 
    2425 
    2526        global $ret ; // TODO :-D 
     27        include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/wp_installer.php' ; 
     28        include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/xpress_templates_make.php' ; 
    2629 
    2730        // for Cube 2.1 
     
    3942 
    4043        if( defined( 'XOOPS_CUBE_LEGACY' ) ) { 
    41                 $ret[] = "********************************* Install Log ********************************<br />"; 
     44                $ret[] = "********************************* Template Install Log ********************************<br />"; 
    4245        } else { 
    43                 $ret[] = '<h4 style="border-bottom: 1px dashed rgb(0, 0, 0); text-align: left; margin-bottom: 0px;">Install Log</h4>'; 
     46                $ret[] = '<h4 style="border-bottom: 1px dashed rgb(0, 0, 0); text-align: left; margin-bottom: 0px;">Template Install Log</h4>'; 
    4447    } 
    45  
    46 //xpress 
    47         global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query,$wp_embed; 
    48         global $xoops_config; 
    49                  
    50         define("WP_INSTALLING", true); 
    51          
    52         $site_url= XOOPS_URL."/modules/".$mydirname; 
    53         $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
    54         $path = $mydirpath . '/'; 
    55         $site_name = ucfirst($mydirname) . ' ' . _MI_XP2_NAME; 
    56          
    57 // permission and wordpress files check 
    58         require_once ($path . 'include/pre_check.php'); 
     48    // permission and wordpress files check 
     49/* 
    5950        if(! xp_permission_check($mydirname, $mydirpath)){ 
    6051                if( ! defined( 'XOOPS_CUBE_LEGACY' ) ) { 
     
    6556                return false; 
    6657        } 
     58*/ 
     59        // make templates 
     60        $t_mess = xpress_templates_make($mid,$mydirname); 
     61        $ret = array_merge($ret,$t_mess); 
    6762         
    68 // install WordPress 
    69         if (file_exists($path . 'wp-load.php')) { 
    70                 require_once $path . 'wp-load.php'; 
     63        if( defined( 'XOOPS_CUBE_LEGACY' ) ) { 
     64                $ret[] = "********************************* WordPress Install Log ********************************<br />"; 
    7165        } else { 
    72                 require_once $path . 'wp-config.php'; 
    73         } 
    74         include_once($mydirpath . '/wp-admin/upgrade-functions.php'); 
    75         wp_cache_flush(); 
    76         make_db_current_silent(); 
    77         $ret[] = "The data base of wordpress was made by prefix $table_prefix.<br />"; 
    78          
    79         $option_desc = __('WordPress web address'); 
    80         $wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'siteurl','$site_url', 'yes')");     
    81         $wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'home','$site_url', 'yes')"); 
    82  
    83         populate_options(); 
    84         populate_roles(); 
    85          
    86 // create XPressME table 
    87         $xp_prefix = preg_replace('/wordpress/','wp',$mydirname); 
    88         $views_table = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_views' ; 
    89  
    90         $charset_collate = ''; 
    91         if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) { 
    92                 if ( ! empty($wpdb->charset) ) 
    93                         $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; 
    94                 if ( ! empty($wpdb->collate) ) 
    95                         $charset_collate .= " COLLATE $wpdb->collate"; 
    96         } 
    97         $views_queries ="CREATE TABLE $views_table ( 
    98                 blog_id bigint(20) unsigned NOT NULL default '0', 
    99                 post_id bigint(20) unsigned NOT NULL default '0', 
    100                 post_views bigint(20) unsigned NOT NULL default '0', 
    101                 KEY post_id (post_id) 
    102                 )$charset_collate;"; 
    103         dbDelta($views_queries); 
    104         $ret[] = "$views_table table of XPressME was made.<br />"; 
    105          
    106         $d3forum_link = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_d3forum_link' ; 
    107         $views_queries ="CREATE TABLE $d3forum_link ( 
    108                 comment_ID bigint(20) unsigned NOT NULL default '0', 
    109                 post_id int(10) unsigned NOT NULL default '0' , 
    110                 wp_post_ID bigint(20) unsigned NOT NULL default '0', 
    111                 forum_id bigint(20) unsigned NOT NULL default '0', 
    112                 blog_id bigint(20) unsigned NOT NULL default '0', 
    113                 KEY post_id (post_id) 
    114                 )$charset_collate;"; 
    115         dbDelta($views_queries); 
    116         $ret[] = "$d3forum_link table of XPressME was made.<br />"; 
    117          
    118         $group_role = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_group_role' ; 
    119         $views_queries ="CREATE TABLE $group_role ( 
    120                 groupid smallint(5) unsigned NOT NULL default '0', 
    121                 blog_id bigint(20) unsigned NOT NULL default '0', 
    122                 name varchar(50)  NOT NULL default '' , 
    123                 description text  NOT NULL default '', 
    124                 group_type varchar(50)  NOT NULL default '' , 
    125                 role varchar(20)  NOT NULL default '' , 
    126                 login_all smallint(5) unsigned NOT NULL default '0' , 
    127                 KEY groupid (groupid) 
    128                 )$charset_collate;"; 
    129         dbDelta($views_queries); 
    130         $ret[] = "$group_role table of XPressME was made.<br />"; 
    131          
    132         $notify_reserve = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_notify_reserve' ; 
    133         $queries ="CREATE TABLE $notify_reserve ( 
    134                 notify_reserve_id bigint(20) NOT NULL AUTO_INCREMENT , 
    135                 notify_reserve_status varchar(20)  NOT NULL default '' , 
    136                 category text  NOT NULL default '', 
    137                 item_id bigint(20) unsigned NOT NULL default '0', 
    138                 event varchar(20) NOT NULL default '', 
    139                 extra_tags_arry longtext NOT NULL default '' , 
    140                 user_list_arry longtext NOT NULL default '' , 
    141                 module_id smallint(5) unsigned NOT NULL default '0' , 
    142                 omit_user_id varchar(20) NOT NULL default '' , 
    143                 KEY notify_reserve_id (notify_reserve_id) 
    144                 )TYPE=MyISAM"; 
    145         dbDelta($queries); 
    146         $ret[] = "$notify_reserve table of XPressME was made.<br />"; 
    147  
    148         $sql = "INSERT INTO $group_role (groupid, role) VALUES (1, 'administrator')"; 
    149         $wpdb->query($sql); 
    150          
    151 // make templates 
    152         include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/xpress_templates_make.php' ; 
    153         $t_mess = xpress_templates_make($mid,$mydirname); 
    154          
    155 // Admin User Data write 
    156         // Change uid field 
    157         $wpdb->query("ALTER TABLE $wpdb->posts CHANGE `post_author` `post_author` mediumint(8) NOT NULL DEFAULT '0'"); 
    158         $user_name = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("uname"):'admin'; 
    159         $email = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("email"):'foo@exsample.com'; 
    160         $pass_md5 = is_object($GLOBALS["xoopsUser"])?$GLOBALS["xoopsUser"]->getVar("pass"):''; 
    161          
    162         if (!function_exists('username_exists')){ 
    163                 require_once($mydirpath . '/wp-includes/registration-functions.php'); 
    164         } 
    165         $user_id = username_exists($user_name); 
    166         if ( !$user_id ) { 
    167                 $random_password = 'admin'; 
    168                 $user_id = wp_create_user($user_name, $random_password, $email); 
    169         } else { 
    170                 $random_password = __('User already exists.  Password inherited.'); 
    171         } 
    172  
    173         $user = new WP_User($user_id); 
    174         $user->set_role('administrator'); 
    175         'User ' . $user_name . ' of the administrator was made.'; 
    176         // over write xoops md5 password  
    177         $sql = "UPDATE $wpdb->users SET user_pass ='$pass_md5' WHERE ID = $user_id"; 
    178         $wpdb->query($sql); 
    179         $ret[] = 'The password of XOOPS was copied.<br />'; 
    180          
    181          
    182 // Set Default data 
    183         // make WordPress Default data   
    184         if (function_exists('wp_install_defaults')){ 
    185                 wp_install_defaults($user_id); 
    186         } else { 
    187                 wp_install_old_defaults($user_id); 
    188         } 
    189          
    190         $ret[] = 'The first sample post & comment was written.<br />'; 
    191          
    192         // Rewrite Option for Xpress 
    193         $xoops_config_tbl = XOOPS_DB_PREFIX . '_config' ; 
    194         $sql = "SELECT conf_value FROM  $xoops_config_tbl WHERE `conf_name` = 'default_TZ'"; 
    195         $xoops_default_TZ = $wpdb->get_var($sql); 
    196         update_option('gmt_offset', $xoops_default_TZ);  
    197  
    198         if (WPLANG == 'ja_EUC') { 
    199                 $setup_charset = 'EUC-JP'; 
    200         } elseif(WPLANG == 'ja_SJIS') { 
    201                 $setup_charset = 'Shift_JIS'; 
    202         } else { 
    203                 $setup_charset = 'UTF-8'; 
    204         } 
    205         update_option("blog_charset", $setup_charset); 
    206  
    207         update_option('blogname', $site_name );  
    208         update_option('blogdescription', 'WordPress for XOOPS'); 
    209         update_option("admin_email", $GLOBALS["xoopsConfig"]['adminmail']); 
    210         update_option("ping_sites", "http://rpc.pingomatic.com/\nhttp://ping.xoopsforge.com/"); 
    211         update_option("home", $site_url); 
    212         update_option("siteurl", $site_url); 
    213         update_option("what_to_show", "posts"); 
    214         update_option('default_pingback_flag', 0); 
    215         $ret[] = 'The initial data was written in the data base of wordpress.<br />'; 
    216          
    217         update_option("template", "xpress_default"); 
    218         update_option("stylesheet", "xpress_default"); 
    219         $ret[] = 'The default theme of wordpress was set to xpress_default.<br />'; 
    220 //      update_option('uploads_use_yearmonth_folders', 1); 
    221         update_option('upload_path', 'wp-content/uploads'); 
    222                          
    223 // activate the xpressme plugin 
    224         require_once dirname( __FILE__ ).'/xpress_active_plugin.php'; 
    225         if (xpress_pulugin_activation('xpressme/xpressme.php')){ 
    226                 $ret[] = 'The xpressme plug-in was activated.<br />'; 
    227         } else { 
    228                 $GLOBALS["err_log"][] =  '<span style="color:#ff0000;">failed in the activation of xpressme plug-in.</span><br />'; 
    229                 return false; 
    230         } 
    231  
    232         $ret = array_merge($ret,$t_mess); 
     66                $ret[] = '<h4 style="border-bottom: 1px dashed rgb(0, 0, 0); text-align: left; margin-bottom: 0px;">WordPress Install Log</h4>'; 
     67    } 
     68        // wp install 
     69//      $i_mess = wp_installer($mydirname); 
     70//      $ret = array_merge($ret,$i_mess); 
    23371 
    23472        return true ; 
     
    25492        if( is_array( @$GLOBALS["err_log"] ) ) { 
    25593                foreach( $GLOBALS["err_log"] as $message ) { 
    256                         $log->add( strip_tags($message)) ; 
     94                        $log->add( strip_tags( $message ) ) ; 
    25795                } 
    25896        } 
  • branches/Ver3.0/xpressme_integration_kit/language/english/admin.php

    r737 r744  
    4141        define("_AM_XP2_NG_BLOCK_REMOVE","Remove xoops abnormal block table"); 
    4242        define("_AM_XP2_BLOCK_OR","OR"); 
     43 
     44// WP install 
     45        define("_AM_XP2_NO_WP","WordPress has not been installed yet."); 
     46        define("_AM_XP2_WP_RE_CHK","Check again"); 
     47        define("_AM_XP2_WP_INSTALL","Install WordPress"); 
     48 
     49        define("_AM_XP2_WP_CHK_0","WordPress file"); 
     50        define("_AM_XP2_WP_CHK_1","The file of WordPress is not up-loaded to the module directory."); 
     51        define("_AM_XP2_WP_CHK_2","Get WordPress referring to the following. "); 
     52 
     53        define("_AM_XP2_WP_STEP_1","Step 1: Download of WordPress"); 
     54        define("_AM_XP2_WP_STEP_2","Step 2: Uncompression of WordPress package"); 
     55        define("_AM_XP2_WP_STEP_3","Step 3: File of WordPress is uploaded to youre site"); 
     56        define("_AM_XP2_WP_STEP_4","Step 4: Installation of WordPress"); 
     57 
     58        define("_AM_XP2_WP_INFO_0","The supply origin of WordPress of specified language (%s) was found"); 
     59        define("_AM_XP2_WP_INFO_1","WordPress(%s) in your region can be downloaded from the following links. "); 
     60        define("_AM_XP2_WP_INFO_2","WordPress(%s) in your region was not found. "); 
     61        define("_AM_XP2_WP_INFO_3","You might be able to find information from the following links."); 
     62        define("_AM_XP2_WP_INFO_4","Or, You can download WordPress of an English version from the following links. "); 
     63        define("_AM_XP2_WP_INFO_5","Uncompress the downloaded ZIP package."); 
     64        define("_AM_XP2_WP_INFO_6","You can find \"wordpress\" folder by uncompressing the ZIP package. Upload all files and folders in \"wordpress\" folder to the %s module route by using the FTP client."); 
     65        define("_AM_XP2_WP_INFO_7","(module route: %s)"); 
     66        define("_AM_XP2_WP_INFO_8","Overwrite everything if whether it overwrites is asked. "); 
     67        define("_AM_XP2_WP_INFO_9","Go to the installation of WordPress clicking \"Check again\" after the uploading of WordPress."); 
    4368} 
    4469?> 
  • branches/Ver3.0/xpressme_integration_kit/language/ja_utf8/admin.php

    r737 r744  
    4141        define("_AM_XP2_NG_BLOCK_REMOVE","NGブロックを削除"); 
    4242        define("_AM_XP2_BLOCK_OR","または"); 
     43         
     44// WP install 
     45        define("_AM_XP2_NO_WP","WordPressは未だインストールされていません。"); 
     46        define("_AM_XP2_WP_RE_CHK","再確認"); 
     47        define("_AM_XP2_WP_INSTALL","WordPressをインストール"); 
     48 
     49        define("_AM_XP2_WP_CHK_0","WordPressファイル"); 
     50        define("_AM_XP2_WP_CHK_1","モジュールディレクトリにWordPressのファイルがアップロードされていません。"); 
     51        define("_AM_XP2_WP_CHK_2","以下の方法でWordPressを取得してください。"); 
     52 
     53        define("_AM_XP2_WP_STEP_1","ステップ1: WordPressのダウンロード"); 
     54        define("_AM_XP2_WP_STEP_2","ステップ2: WordPressパッケージの解凍"); 
     55        define("_AM_XP2_WP_STEP_3","ステップ3: WordPressをサイトへアップロード"); 
     56        define("_AM_XP2_WP_STEP_4","ステップ4: WordPressのインストール"); 
     57 
     58        define("_AM_XP2_WP_INFO_0","言語(%s)に対応したWordPressの供給元を発見しました。"); 
     59        define("_AM_XP2_WP_INFO_1","以下のリンクからローカライズされたWordPress(%s)をダウンロードすることができます。"); 
     60        define("_AM_XP2_WP_INFO_2","言語(%s)に対応したWordPressのソースを見つけることができませんでした。"); 
     61        define("_AM_XP2_WP_INFO_3","以下のリンクから情報を見つけることができるかもしれません。"); 
     62        define("_AM_XP2_WP_INFO_4","あるいは、以下のリンクから英語版のWordPressをダウンロードすることもできます。"); 
     63        define("_AM_XP2_WP_INFO_5","ダウンロードしたZIPパッケージを解凍します。"); 
     64        define("_AM_XP2_WP_INFO_6","解凍して出来たwordpressフォルダー内の全てのファイルとフォルダーを、FTPクライアントを使って%sモジュールルートへアップロードします。"); 
     65        define("_AM_XP2_WP_INFO_7","(モジュールルート: %s)"); 
     66        define("_AM_XP2_WP_INFO_8","もし、上書きをするか尋ねられたら、全て上書きを行ってください"); 
     67        define("_AM_XP2_WP_INFO_9","WordPressのアップロードが終わったら「再確認」をクリックしてWordPressのインストールに進んでください。"); 
    4368} 
    4469?> 
  • branches/Ver3.0/xpressme_integration_kit/language/japanese/admin.php

    r737 r744  
    4141        define("_AM_XP2_NG_BLOCK_REMOVE","NG¥Ö¥í¥Ã¥¯¤òºï½ü"); 
    4242        define("_AM_XP2_BLOCK_OR","¤Þ¤¿¤Ï"); 
     43 
     44// WP install 
     45        define("_AM_XP2_NO_WP","WordPress¤Ï̤¤À¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"); 
     46        define("_AM_XP2_WP_RE_CHK","ºÆ³Îǧ"); 
     47        define("_AM_XP2_WP_INSTALL","WordPress¤ò¥¤¥ó¥¹¥È¡¼¥ë"); 
     48 
     49        define("_AM_XP2_WP_CHK_0","WordPress¥Õ¥¡¥¤¥ë"); 
     50        define("_AM_XP2_WP_CHK_1","¥â¥¸¥å¡¼¥ë¥Ç¥£¥ì¥¯¥È¥ê¤ËWordPress¤Î¥Õ¥¡¥¤¥ë¤¬¥¢¥Ã¥×¥í¡¼¥É¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£"); 
     51        define("_AM_XP2_WP_CHK_2","°Ê²¼¤ÎÊýË¡¤ÇWordPress¤ò¼èÆÀ¤·¤Æ¤¯¤À¤µ¤¤¡£"); 
     52 
     53        define("_AM_XP2_WP_STEP_1","¥¹¥Æ¥Ã¥×£±¡§¡¡WordPress¤Î¥À¥¦¥ó¥í¡¼¥É"); 
     54        define("_AM_XP2_WP_STEP_2","¥¹¥Æ¥Ã¥×£²¡§¡¡WordPress¥Ñ¥Ã¥±¡¼¥¸¤Î²òÅà"); 
     55        define("_AM_XP2_WP_STEP_3","¥¹¥Æ¥Ã¥×£³¡§¡¡WordPress¤ò¥µ¥¤¥È¤Ø¥¢¥Ã¥×¥í¡¼¥É"); 
     56        define("_AM_XP2_WP_STEP_4","¥¹¥Æ¥Ã¥×£´¡§¡¡WordPress¤Î¥¤¥ó¥¹¥È¡¼¥ë"); 
     57 
     58        define("_AM_XP2_WP_INFO_0","¸À¸ì(%s)¤ËÂбþ¤·¤¿WordPress¤Î¶¡µë¸µ¤òȯ¸«¤·¤Þ¤·¤¿¡£"); 
     59        define("_AM_XP2_WP_INFO_1","°Ê²¼¤Î¥ê¥ó¥¯¤«¤é¥í¡¼¥«¥é¥¤¥º¤µ¤ì¤¿WordPress(%s)¤ò¥À¥¦¥ó¥í¡¼¥É¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£"); 
     60        define("_AM_XP2_WP_INFO_2","¸À¸ì(%s)¤ËÂбþ¤·¤¿WordPress¤Î¥½¡¼¥¹¤ò¸«¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); 
     61        define("_AM_XP2_WP_INFO_3","°Ê²¼¤Î¥ê¥ó¥¯¤«¤é¾ðÊó¤ò¸«¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£"); 
     62        define("_AM_XP2_WP_INFO_4","¤¢¤ë¤¤¤Ï¡¢°Ê²¼¤Î¥ê¥ó¥¯¤«¤é±Ñ¸ìÈǤÎWordPress¤ò¥À¥¦¥ó¥í¡¼¥É¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£"); 
     63        define("_AM_XP2_WP_INFO_5","¥À¥¦¥ó¥í¡¼¥É¤·¤¿ZIP¥Ñ¥Ã¥±¡¼¥¸¤ò²òÅष¤Þ¤¹¡£"); 
     64        define("_AM_XP2_WP_INFO_6","²òÅष¤Æ½ÐÍ褿wordpress¥Õ¥©¥ë¥À¡¼Æâ¤ÎÁ´¤Æ¤Î¥Õ¥¡¥¤¥ë¤È¥Õ¥©¥ë¥À¡¼¤ò¡¢FTP¥¯¥é¥¤¥¢¥ó¥È¤ò»È¤Ã¤Æ%s¥â¥¸¥å¡¼¥ë¥ë¡¼¥È¤Ø¥¢¥Ã¥×¥í¡¼¥É¤·¤Þ¤¹¡£"); 
     65        define("_AM_XP2_WP_INFO_7","(¥â¥¸¥å¡¼¥ë¥ë¡¼¥È¡§ %s)"); 
     66        define("_AM_XP2_WP_INFO_8","¤â¤·¡¢¾å½ñ¤­¤ò¤¹¤ë¤«¿Ò¤Í¤é¤ì¤¿¤é¡¢Á´¤Æ¾å½ñ¤­¤ò¹Ô¤Ã¤Æ¤¯¤À¤µ¤¤"); 
     67        define("_AM_XP2_WP_INFO_9","WordPress¤Î¥¢¥Ã¥×¥í¡¼¥É¤¬½ª¤ï¤Ã¤¿¤é¡ÖºÆ³Îǧ¡×¤ò¥¯¥ê¥Ã¥¯¤·¤ÆWordPress¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Ë¿Ê¤ó¤Ç¤¯¤À¤µ¤¤¡£"); 
    4368} 
    4469?> 
  • branches/Ver3.0/xpressme_integration_kit/xoops_version.php

    r741 r744  
    8383$modversion['name'] = ucfirst($mydirname) . ' ' . constant('_MI_XP2_NAME') ; 
    8484$modversion['description'] = constant( '_MI_XP2_DESC'); 
    85 $modversion['version'] = "2.40"; 
     85$modversion['version'] = "3.00"; 
    8686$modversion['credits'] = "Wordpress DEV (http://wordpress.org/) XPressME DEV Toemon) (http://ja.xpressme.info) ;"; 
    8787$modversion['author'] = "toemon (http://ja.xpressme.info)"; 
     
    9494 
    9595// status 
    96 $modversion['codename'] = ""; 
     96$modversion['codename'] = "Alpha1"; 
    9797 
    9898// onInstall, onUpdate, onUninstall 
Note: See TracChangeset for help on using the changeset viewer.