XPressME Integration Kit

Trac


Ignore:
Timestamp:
Mar 3, 2009, 8:33:23 PM (15 years ago)
Author:
toemon
Message:

XOOPS mainfile.phpのdefine文を事前に読み取りwp-config.phpのDB接続関係を生成することにより、XOOPSシステムを必要なときだけ呼び出す仕組みを作る。
およびイベント通知関係の修正(まだゲストのアクセス権限がないと駄目)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/xpress_block_render.php

    r89 r95  
    6262        function get_block_stylesheet_url($mydirname) 
    6363        { 
    64                 $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
     64                global $xoops_config; 
     65                $mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname; 
    6566                $select_theme = get_xpress_theme_name($mydirname); 
    6667                $style_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/blocks/style.css'; 
    6768                if (file_exists($style_file)) 
    68                         return XOOPS_URL . '/modules/' .$mydirname . '/wp-content/themes/' . $select_theme . '/blocks/style.css'; 
     69                        return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/' . $select_theme . '/blocks/style.css'; 
    6970                else     
    70                         return XOOPS_URL . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/style.css'; 
     71                        return $xoops_config->xoops_url . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/style.css'; 
    7172        } 
    7273 
     
    8889        function get_block_file_path($mydirname,$file_name) 
    8990        { 
    90                 $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
     91                global $xoops_config; 
     92                $mydirpath = $xoops_config->xoops_root_path . '/modules/' . $mydirname; 
    9193                $select_theme = get_xpress_theme_name($mydirname); 
    9294                $block_file = $mydirpath . '/wp-content/themes/' . $select_theme . '/blocks/' . $file_name; 
    9395 
    9496                if (!file_exists($block_file)) 
    95                         $block_file =  XOOPS_ROOT_PATH . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/' . $file_name; 
     97                        $block_file =  $xoops_config->xoops_root_path . '/modules/' .$mydirname . '/wp-content/themes/xpress_default/blocks/' . $file_name; 
    9698                return $block_file; 
    9799        } 
Note: See TracChangeset for help on using the changeset viewer.