Page 1 of 1

Include cutenews php

Posted: Mon 13. Jun 2005, 21:24
by rsantifort
Cutenews PHP script is a free news system. I am trying to use it because 1.2.3 DEV has no news features in it.

phpwsms is stored in serverroot/cms
cutephp is stored in serverroot/nieuws

Am am trying to use the [PHP] ..... [/PHP] replacement tag to use

[PHP]$static = TRUE;[/PHP]
[PHP]$template = "Headlines";[/PHP]
[PHP]include("../nieuws/show_news.php");[/PHP]
[PHP]$number = "1";[/PHP]
[PHP]include("../nieuws/show_news.php");[/PHP]

This errors I get!

Warning: file(./data/comments.txt): failed to open stream: No such file or directory in /srv/sis2004/www/www.waterbalkon.nl/nieuws/inc/functions.inc.php on line 229

Warning: Invalid argument supplied for foreach() in /srv/sis2004/www/www.waterbalkon.nl/nieuws/inc/functions.inc.php on line 231
Test
testnieuws :laughing:
13 Jun 2005 by Webmaster Waterbalkon.nl
Read More ... comments (0)




Warning: file(./data/comments.txt): failed to open stream: No such file or directory in /srv/sis2004/www/www.waterbalkon.nl/nieuws/inc/functions.inc.php on line 229

Warning: Invalid argument supplied for foreach() in /srv/sis2004/www/www.waterbalkon.nl/nieuws/inc/functions.inc.php on line 231
Welcome to CuteNews
This is just a test article to verify that you installed the script successfully :smile:
19 Jul 2004 by Admin
comments (0)






Warning: file(./data/comments.txt): failed to open stream: No such file or directory in /srv/sis2004/www/www.waterbalkon.nl/nieuws/inc/functions.inc.php on line 229

Warning: Invalid argument supplied for foreach() in /srv/sis2004/www/www.waterbalkon.nl/nieuws/inc/functions.inc.php on line 231

Warning: file(./data/comments.txt): failed to open stream: No such file or directory in /srv/sis2004/www/www.waterbalkon.nl/nieuws/inc/functions.inc.php on line 229

Warning: Invalid argument supplied for foreach() in /srv/sis2004/www/www.waterbalkon.nl/nieuws/inc/functions.inc.php on line 231

Can someone help who also uses cutenews

Posted: Mon 13. Jun 2005, 21:58
by Pappnase
hello

i would say you have a path problem!

Posted: Tue 14. Jun 2005, 01:11
by soundsational
If you still have problems, here is what to do. To not confuse your path between both cms application. You should have phpWCMS on server root directory and CuteNews in a subfolder.

An example:

phpwsms is stored in serverroot/ (not in a subfolder as you have done)
cutephp is stored in serverroot/nieuws (Keep this in a subfolder like you have done)


Code: Select all

$static = TRUE; 
$template = "Headlines";
include("nieuws/show_news.php");
$number = "1";
include("nieuws/show_news.php");
You might even want to include this bit of code at the top of each page before you define your HTML doctype (or in the template(s) in phpwcms):


Code: Select all

<?PHP

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Path to the CuteNews directory (to make the includng easier)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
$path = ".";

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  This is a fix if register_globals is turned off
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
if(!$PHP_SELF){
	if($HTTP_POST_VARS) 	{extract($HTTP_POST_VARS, EXTR_PREFIX_SAME, "post_");}
	if($HTTP_GET_VARS)  	{extract($HTTP_GET_VARS, EXTR_PREFIX_SAME, "get_");}
	if($HTTP_COOKIE_VARS)	{extract($HTTP_COOKIE_VARS, EXTR_PREFIX_SAME, "cookie_");}
	if($HTTP_ENV_VARS)	 	{extract($HTTP_ENV_VARS, EXTR_PREFIX_SAME, "env_");}
}
if($PHP_SELF == ""){ $PHP_SELF = $HTTP_SERVER_VARS[PHP_SELF]; }

?>
Hope that helps.

S