XPressME Integration Kit

Trac


Ignore:
Timestamp:
Dec 26, 2008, 12:15:54 AM (15 years ago)
Author:
toemon
Message:

WordPress管理画面からXOOPSデータベースへのアクセス  #50 実装

xpressmeプラグインにより
XOOPS管理外(WordPress管理下)から$xoops_db(wpdbクラス)にてアクセス可能にしました。

コメントブロックのキャッシュへの書き込みを、WordPressのイベント(変更・追加・削除)へ書き込むよにしました。

このためコメントブロックのshow_function側からはキャッシュへの書き込みを削除してあります。

  

File:
1 edited

Legend:

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

    r32 r46  
    99*/ 
    1010require_once('xpressme_class.php'); 
     11require_once dirname( __FILE__ ).'/include/custom_functions.php' ; 
     12 
     13 
    1114$xpessme = new XPressME_Class(); 
     15 
     16 
     17$xoops_db = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST); 
     18$xoops_db->prefix = get_xoops_prefix(); 
     19$xoops_db->tables = array('modules', 'newblocks', 'users'); 
     20 
    1221 
    1322add_action('admin_menu', array(&$xpessme, 'add_option_page')); 
     
    1726        remove_action( 'pre_post_update', 'wp_save_post_revision' );                    // Not Save Post Revision 
    1827} 
     28add_action("comment_post",      "block_cache_refresh"); 
     29add_action("edit_comment",      "block_cache_refresh"); 
     30add_action("delete_comment","block_cache_refresh"); 
     31add_action("delete_post",       "block_cache_refresh"); 
     32add_action("publish_post",      "block_cache_refresh"); 
     33add_action("edit_post",         "block_cache_refresh"); 
     34add_action("private_to_published",      "block_cache_refresh"); 
     35add_action("wp_set_comment_status" , "block_cache_refresh"); 
     36 
    1937//require_once('../include/custom_functions.php'); 
    20 require_once dirname( __FILE__ ).'/include/custom_functions.php' ; 
    2138?> 
Note: See TracChangeset for help on using the changeset viewer.