XPressME Integration Kit

Trac

Changeset 104


Ignore:
Timestamp:
Mar 13, 2009, 10:25:32 PM (15 years ago)
Author:
toemon
Message:

D3Forumコメント統合の途中 とりあえずD3Forum側からWP側への同期の部分だけ完了。
WPからD3フォーラム側への同期はバグ・エラーあり

Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/plugins/xpressme/include/xpress_common_functions.php

    r100 r104  
    44        require_once dirname(dirname(dirname(dirname(dirname( __FILE__ ))))) .'/include/config_from_xoops.class.php' ; 
    55        $xoops_config = new ConfigFromXoops; 
     6} 
     7 
     8function get_xoops_config($config_name,$module_dir){ 
     9        global $xoops_db; 
     10         
     11        $modules_db = get_xoops_prefix() . 'modules'; 
     12        $config_db = get_xoops_prefix() . 'config'; 
     13 
     14        $moduleID = $xoops_db->get_var("SELECT mid FROM $modules_db WHERE dirname = '$module_dir'"); 
     15        if (empty($moduleID)) return null; 
     16        $conf_value = $xoops_db->get_var("SELECT conf_value FROM $config_db WHERE (conf_modid = $moduleID) AND (conf_name = '$config_name')"); 
     17        if (empty($conf_value)) return null; 
     18        return  $conf_value; 
    619} 
    720 
     
    3144        global $xoops_config; 
    3245        $ret =$xoops_config->xoops_db_prefix . '_'; 
     46        return $ret; 
     47} 
     48 
     49function get_xoops_trust_path() 
     50{ 
     51        global $xoops_config; 
     52        $ret =$xoops_config->xoops_trust_path; 
    3353        return $ret; 
    3454} 
     
    6282        return $wp_db_version; 
    6383} 
     84 
     85function is_xpress_mobile() 
     86{ 
     87        //ktai_style 
     88        if (function_exists('is_ktai')){ 
     89                if (is_ktai()) { 
     90 //                     $file_path = $GLOBALS['xoopsModuleConfig']["ktai_style_tmpdir"] . '/comments.php'; 
     91                        return true; 
     92                } 
     93        } 
     94         
     95        //mobg 
     96        if (function_exists('is_mobile')) { 
     97                if (is_mobile()){ 
     98                        return true; 
     99                } 
     100        } 
     101        if ( 
     102          preg_match("/DoCoMo/", $_SERVER['HTTP_USER_AGENT']) || 
     103          preg_match("/softbank/", $_SERVER['HTTP_USER_AGENT']) || 
     104          preg_match("/vodafone/", $_SERVER['HTTP_USER_AGENT']) || 
     105          preg_match("/J-PHONE/", $_SERVER['HTTP_USER_AGENT']) || 
     106          preg_match("/UP\.Browser/", $_SERVER['HTTP_USER_AGENT']) || 
     107          preg_match("/ASTEL/", $_SERVER['HTTP_USER_AGENT']) || 
     108          preg_match("/PDXGW/", $_SERVER['HTTP_USER_AGENT']) 
     109        )  
     110        { 
     111                return true; 
     112        } else { 
     113                return false; 
     114        } 
     115         
     116} 
     117 
    64118 
    65119function is_block_cache_found($block_name) 
  • trunk/wp-content/plugins/xpressme/xpressme.php

    r96 r104  
    5454//require_once('../include/custom_functions.php'); 
    5555 
     56//D3Forum Comment Integration 
     57if ($XPressME->is_use_d3forum){ 
     58        require_once dirname( __FILE__ ).'/include/d3forum_comment_synchro.php' ; 
     59        add_action("comment_post",      "onaction_comment_post"); 
     60        add_action("edit_comment",      "onaction_edit_comment"); 
     61        add_action("delete_comment","onaction_delete_comment"); 
     62        add_action("delete_post",       "onaction_delete_post"); 
     63        add_action("wp_set_comment_status" , "onaction_comment_apobe"); 
     64         
     65         
     66        add_filter('comments_template', "disp_d3forum_comments" ); 
     67 
     68} 
     69 
     70 
    5671// SQL debug windows 
    5772add_filter('query', array(&$XPressME, 'xpress_sql_debug')); 
  • trunk/wp-content/plugins/xpressme/xpressme_class.php

    r99 r104  
    477477                } 
    478478        }        
     479         
     480        function set_d3forum_external_link_format() 
     481        { 
     482                global $xoops_db; 
     483/*              var $is_use_d3forum; 
     484                var $d3forum_module_dir; 
     485                var $d3forum_forum_id; 
     486                var $d3forum_external_link_format; 
     487                if ($this->$is_use_d3forum){ 
     488                        $content = ''; 
     489                        $content .= '<html><head><meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />'; 
     490                        $content .= '<meta http-equiv="content-language" content="'._LANGCODE.'" />' ; 
     491                        $content .= '<title>XPressME SQL DEBUG</title>' ; 
     492                        $content .= '</head><body>'; 
     493                        $content .= $GLOBALS['XPress_SQL_Query']; 
     494                        $content .= '<div style="text-align:center;"><input class="formButton" value="CLOSE" type="button" onclick="javascript:window.close();" /></div></body></html>'; 
     495 
     496                        echo '<script type="text/javascript"> 
     497                                <!--// 
     498                                xpress_debug_window = window.open("", "xpress_debug", "width=680 , height=600 ,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no"); 
     499                                xpress_debug_window.document.clear(); 
     500                                xpress_debug_window.focus(); 
     501                                '; 
     502                        $lines = preg_split("/(\r\n|\r|\n)( *)/", $content); 
     503                        foreach ($lines as $line) { 
     504                                echo 'xpress_debug_window.document.writeln("'.str_replace('"', '\"', $line).'");'; 
     505                        } 
     506                        echo ' 
     507                                xpress_debug_window.document.close(); 
     508                                //--> 
     509                        </script>'; 
     510                } 
     511*/ 
     512        }        
    479513 
    480514} 
  • trunk/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php

    r95 r104  
    9494                                $item_no++; 
    9595                        } 
    96                         $block['data_count'] = $item_no;  //xml unserialise error 
     96                        $block['data_count'] = $item_no; 
    9797                } 
    9898        } 
Note: See TracChangeset for help on using the changeset viewer.