PDA


View Full Version : HTML Page Error


Rob Locke
08-06-2005, 03:30 PM
Hi Guys,

I just added an HTML page in my CMPS and got this error:
Warning: filesize(): Stat failed for http://www.tvshoppingworld.com/html/site/about/about.htm (errno=2 - No such file or directory) in /includes/vba_cmps_include_bottom.php on line 422

Warning: fread(): Length parameter must be greater than 0. in /includes/vba_cmps_include_bottom.php on line 422The file does exist, as it works fine with a PHP page. Any ideas?

Many thanks!

Brian
08-06-2005, 05:28 PM
You need to enter the path to the file instead of the URL.

Rob Locke
08-07-2005, 04:47 PM
Thanks Brian, all sorted out.

Just one other question...how can I make the default page an HTML page? I have changed it to 'file' instead of 'module', but it automatically makes it a PHP page and I want to insert HTML, not PHP?

Thanks again,

Rob.

Brian
08-08-2005, 02:45 PM
If you'll look in your vba_cmps_admin.php file for this code:
case 'chtype_php_file':
page = 'vba_cmps_admin.php?do=editpage&chtype=php_file';
break;


Right above that, add this:
case 'chtype_html_file':
page = 'vba_cmps_admin.php?do=editpage&chtype=html_file';
break;


Then find:
$pagetypes = array(
'' => $vbphrase['please_select_one'],
'chtype_module' => $vbphrase['module'],
'chtype_php_file' => $vbphrase['php_file'],
'chtype_template' => $vbphrase['template'],
'chtype_bb_code' => $vbphrase['bb_code']
);


And replace with this:
$pagetypes = array(
'' => $vbphrase['please_select_one'],
'chtype_module' => $vbphrase['module'],
'chtype_php_file' => $vbphrase['php_file'],
'chtype_html_file' => $vbphrase['html_file'],
'chtype_template' => $vbphrase['template'],
'chtype_bb_code' => $vbphrase['bb_code']
);


That should allow you to change the page type.

Rob Locke
08-08-2005, 03:26 PM
Thanks Brian, it worked a charm. I hope this will be in the next release/update.

Best wishes to you and your super team!

Rob.

Brian
08-08-2005, 03:52 PM
Yes, it will be. An HTML page was just the last type of page added durning the development and apparently I fogot to update that select box to include that type.

Rob Locke
08-08-2005, 04:10 PM
Perfect - always on top of your game! That's why you're so good.

Rob Locke
08-09-2005, 04:23 PM
Hi Brian,

Sorry to bother you yet again, but I just realized there is also no option to 'Add Module' as an HTML file or 'Change Module Type' to an HTML file.

Can you offer the fix for these two CMPS functions too?

Many thanks,

Rob.

Brian
08-10-2005, 04:08 PM
There is no option for HTML modules. The option is there for pages to allow users to easily integrate a HTML page on their server, but I don't really see the point for that for modules when you can just as easily create a template.