1
cjcomm
Installing Custom Module with Flash Slideshow Troubles
  • 2006/1/11 14:02

  • cjcomm

  • Just popping in

  • Posts: 7

  • Since: 2006/1/11


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
le="color: #000000"><?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
le="color: #000000"><?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 <?xml version="1.0" encoding="utf-8"?> <photos> EOD; foreach($images as $key=>$img){ if (strstr($img, "highlight") || strstr($img, "thumb")){ unset($images[$key]); } $filetext .= <<<EOD <photo url="{$img}" /> EOD; $filetext .= "</photos>"; fwrite($handle, $filetext); fclose($handle); } $block['flashdir']=$flash; return $block; }

frontpage_block_flash.html
le="color: #000000"><?php <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"> <!--What to display if Flash not detected--> <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

2
cjcomm
Re: Installing Custom Module with Flash Slideshow Troubles
  • 2006/1/11 19:07

  • cjcomm

  • Just popping in

  • Posts: 7

  • Since: 2006/1/11


Never Mind. I figured it out. I uninstalled the module and reinstalled it. I had to do some other coding in my function to get everything else to work right, but it works now.

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!