1
XOOPS Version:2.0.5.1
Module Name/Version:frontpage 1.0 (custom module)
PHP Version:4.4.0
MySQL Version: 3.23.49
Web Server Software (Apache/IIS/Other): Apache 1.3.29
Operating System: RedHat Linux
Theme you are using: Custom
Custom template: (Yes/No) YES
PHP Debug Messages:Fatal error: Call to a member function on a non-object in /var/www/sandboxes/ccoppenbarger/benlippen/html/modules/system/admin/modulesadmin/main.php on line 357
MySQL Debug Messages: none
Smarty Debug Messages: none
A full description of the issue:
I have created a custom module for customizing the front page of a site. I am using copies of news blocks from the xoopsnews module. No problem there. It's my custom module I'm having trouble with when I'm installing. If I allow a blank block for the flash template, then it will install. Otherwise I get the above Fatal error.
xoops_version.php
$modversion['blocks'][7]['file'] = "frontpage_top.php";
$modversion['blocks'][7]['name'] = "Flash Photo Slideshow";
$modversion['blocks'][7]['description'] = "Flash Photo Slideshow";
$modversion['blocks'][7]['show_func'] = "b_frontpage_flashxml_show";
$modversion['blocks'][7]['options'] = "'/modules/frontpage/flash/bl_photos.swf'|'/var/www/sandboxes/ccoppenbarger/benlippen/html/photos.xml'|'/modules/xoopsgallery/cache/albums/album72'";
$modversion['blocks'][7]['template'] = 'frontpage_block_flash.html';
frontpage_top.php
function b_frontpage_flashxml_show($options){
$block = array();
$flashdir=$options[0];
$xmlfile = $options[1];
$imagedir = $options[2];
$images = glob($imagedir."/*.jpg");
$handle = fopen($xmlfile, "w");
$filetext = <<
EOD;
foreach($images as $key=>$img){
if (strstr($img, "highlight") || strstr($img, "thumb")){
unset($images[$key]);
}
$filetext .= << {$img}" />
EOD;
$filetext .= "";
fwrite($handle, $filetext);
fclose($handle);
}
$block['flashdir']=$flash;
return $block;
}
frontpage_block_flash.html
<object width="500" height="300" type="application/x-shockwave-flash" data="<{$block.flash}>">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="<{$block.flash}>" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<param name="wmode" value="transparent">
<a href="#" onclick="pop('http://www.macromedia.com/go/getflash/');" title="Macromedia Flash plugin is required to view content here and was not detected. To download the plugin, click here.">Macromedia Flash not detected, click here to install.a>object>
I searched for possible answers to this problem, but couldn't find any. Any ideas on why it's failing?
Thanks,
Chris