XPressME Integration Kit

Trac


Ignore:
Timestamp:
Mar 29, 2009, 2:09:34 PM (15 years ago)
Author:
toemon
Message:

デフォルトテーマxpress_defaultの調整 bump Ver0.18
メインメニューにwordPress管理とXPressME設定を追加

File:
1 edited

Legend:

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

    r140 r141  
    128128} 
    129129 
     130function block_cache_refresh()  
     131{  
     132        global $xoops_db;  
     133        $mid = get_xpress_modid();  
     134        $sql = "SELECT bid,options,func_file FROM " . get_xoops_prefix() . "newblocks WHERE mid = $mid";  
     135        $blocks = $xoops_db->get_results($sql);  
     136        $mydirname = get_xpress_dir_name();  
     137        require_once get_xpress_dir_path() . '/include/xpress_block_render.php';  
     138 
     139 
     140        foreach($blocks as $block){  
     141                $func_file = $block->func_file;  
     142                $call_theme_function_name = str_replace(".php", "", $func_file);  
     143                $inc_theme_file_name = str_replace(".php", "", $func_file) . '_theme.php';  
     144                $cache_title = str_replace(".php", "", $func_file);  
     145                $blockID = $block->bid;  
     146                $options = explode("|", $block->options);  
     147 
     148                $block_theme_file = get_block_file_path($mydirname,$inc_theme_file_name);  
     149                require_once $block_theme_file;  
     150                $block_render = $call_theme_function_name($options);            //The block name and the called function name should be assumed to be the same name.                      
     151                $xml['block'] = $block_render;  
     152                $xml['block']['options'] = $block->options;  
     153                xpress_block_cache_write($mydirname,$cache_title. $blockID, $xml);  
     154        }  
     155} 
    130156?> 
Note: See TracChangeset for help on using the changeset viewer.