Hello, I've installed protector v3 (works fine), altsys (works fine), d3pipes:
installed as instruction said, when I'm in admin area I can only see normal admin menu ( left icons, header ) but there is no d3pipes options, also I can access "preferences":
.../modules/system/admin.php?fct=preferences&op=showmod&mod=XX
I've also "fixed the incompatibility", here is debug message from: modules/d3pipes/admin/index.php?page=clipping
Warning: filemtime() [function.filemtime]: stat failed for /modules/altsys/templates/altsys_inc_mymenu.html in file /class/smarty/xoops_plugins/resource.db.php line 32
Warning: fopen(/modules/d3pipes/templates/d3pipes_admin_clipping.html) [function.fopen]: failed to open stream: No such file or directory in file /class/smarty/xoops_plugins/resource.db.php line 18
Warning: filesize() [function.filesize]: stat failed for /modules/d3pipes/templates/d3pipes_admin_clipping.html in file /class/smarty/xoops_plugins/resource.db.php line 19
Warning: fread(): supplied argument is not a valid stream resource in file /class/smarty/xoops_plugins/resource.db.php line 19
Warning: fclose(): supplied argument is not a valid stream resource in file /class/smarty/xoops_plugins/resource.db.php line 20
Warning: filemtime() [function.filemtime]: stat failed for /modules/d3pipes/templates/d3pipes_admin_clipping.html in file /class/smarty/xoops_plugins/resource.db.php line 32
hi kurak_bu.
Quote:
I've also "fixed the incompatibility", here is debug message from: modules/d3pipes/admin/index.php?page=clipping
Warning: filemtime() [function.filemtime]: stat failed for /modules/altsys/templates/altsys_inc_mymenu.html in file /class/smarty/xoops_plugins/resource.db.php line 32
(snip)
It looks the BUG still exists on your system.
- fix /class/smarty/xoops_plugins/resource.db.php
- clear templates_c/
- update the module
Here is my resource.db.php:
<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* File: resource.db.php
* Type: resource
* Name: db
* Purpose: Fetches templates from a database
* -------------------------------------------------------------
*/
function smarty_resource_db_source($tpl_name, &$tpl_source, &$smarty) {
if ( !$tpl = smarty_resource_db_tplinfo( $tpl_name ) ) {
return false;
}
if ( is_object( $tpl ) ) {
$tpl_source = $tpl->getVar( 'tpl_source', 'n' );
} else {
$fp = fopen( $tpl, 'r' );
$tpl_source = fread( $fp, filesize( $tpl ) );
fclose( $fp );
}
return true;
}
function smarty_resource_db_timestamp($tpl_name, &$tpl_timestamp, &$smarty) {
if ( !$tpl = smarty_resource_db_tplinfo( $tpl_name ) ) {
return false;
}
if ( is_object( $tpl ) ) {
$tpl_timestamp = $tpl->getVar( 'tpl_lastmodified', 'n' );
} else {
$tpl_timestamp = filemtime( $tpl );
}
return true;
}
function smarty_resource_db_secure($tpl_name, &$smarty)
{
// assume all templates are secure
return true;
}
function smarty_resource_db_trusted($tpl_name, &$smarty)
{
// not used for templates
}
function smarty_resource_db_tplinfo( $tpl_name ) {
static $cache = array();
global $xoopsConfig;
if ( isset( $cache[$tpl_name] ) ) {
return $cache[$tpl_name];
}
$tplset = $xoopsConfig['template_set'];
$theme = isset( $xoopsConfig['theme_set'] ) ? $xoopsConfig['theme_set'] : 'default';
$tplfile_handler =& xoops_gethandler('tplfile');
// If we're not using the "default" template set, then get the templates from the DB
if ( $tplset != "default" ) {
$tplobj = $tplfile_handler->find( $tplset, null, null, null, $tpl_name, true);
if ( count( $tplobj ) ) {
return $cache[$tpl_name] = $tplobj[0];
}
}
// If we'using the default tplset, get the template from the filesystem
$tplobj = $tplfile_handler->find( "default", null, null, null, $tpl_name, true);
if ( !count( $tplobj ) ) {
return $cache[$tpl_name] = false;
}
$tplobj = $tplobj[0];
$module = $tplobj->getVar( 'tpl_module', 'n' );
$type = $tplobj->getVar( 'tpl_type', 'n' );
$blockpath = ( $type == 'block' ) ? 'blocks/' : '';
// First, check for an overloaded version within the theme folder
$filepath = XOOPS_THEME_PATH . "/$theme/modules/$module/$blockpath$tpl_name";
if ( !file_exists( $filepath ) ) {
// If no custom version exists, get the tpl from its default location
$filepath = XOOPS_ROOT_PATH . "/modules/$module/templates/$blockpath$tpl_name";
if ( !file_exists( $filepath ) ) {
$tplobj = $tplfile_handler->find( $tplset, null, null, null, $tpl_name, true);
if ( count( $tplobj ) ) {
return $cache[$tpl_name] = $tplobj[0];
}
}
}
return $cache[$tpl_name] = $filepath;
}
?>
I've followed your tips, but nothing has changed.
Debug:
Warning: filemtime() [function.filemtime]: stat failed for /modules/altsys/templates/altsys_inc_mymenu.html in file /class/smarty/xoops_plugins/resource.db.php line 32
Warning: fopen(/modules/d3pipes/templates/d3pipes_admin_clipping.html) [function.fopen]: failed to open stream: No such file or directory in file /class/smarty/xoops_plugins/resource.db.php line 18
Warning: filesize() [function.filesize]: stat failed for /modules/d3pipes/templates/d3pipes_admin_clipping.html in file /class/smarty/xoops_plugins/resource.db.php line 19
Warning: fread(): supplied argument is not a valid stream resource in file /class/smarty/xoops_plugins/resource.db.php line 19
Warning: fclose(): supplied argument is not a valid stream resource in file /class/smarty/xoops_plugins/resource.db.php line 20
Warning: filemtime() [function.filemtime]: stat failed for /modules/d3pipes/templates/d3pipes_admin_clipping.html in file /class/smarty/xoops_plugins/resource.db.php line 32
Thank you for your reply
hi kuraku_bu.
The file looks fine.
Check this.
- The resource.db.php exists under class/smarty/xoops_plugins/ of your SERVER.
(not class/smarty/plugins/)
- Have you deleted all files under templates_c/ of your SERVER?
Anyway, I have to make some codes avoid it for 2.0.16 users.
# I don't foresee this version of XOOPS are spreaded many users.
# I myself recommend all XOOPSers to use "2.0.16a-JP" which is the real stable version.
Certainly, if you use a template set other than default, the trouble can occur.
Then, I've fixed the patch.
read again:
http://xoops.peak.ne.jp/md/news/index.php?page=article&storyid=354
Try the latest version of d3pipes.
Anyway, I recommend you to patch resource.db.php with a new way.