Page 1 of 1

Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_F

Posted: Thu Aug 10, 2006 11:29 am
by paultje
Hello I try to find this on the forum but I cannot find anything about this problem. I had a own plugin and that worked fine untill now. The code of my plugin is:

?php # $Id: serendipity_plugin_nieuwsbrief.php,v 1.11 2005/08/01 18:20:06 garvinhicking Exp $

@define('NIEUWSBRIEF_TITLE', 'Nieuwsbrief');


class serendipity_plugin_nieuwsbrief extends serendipity_plugin
{
var $title = NIEUWSBRIEF_TITLE;

function introspect(&$propbag)
{
$propbag->add('name', Nieuwsbrief);
$propbag->add('description', ColorScanNieuwsbrief);
$propbag->add('stackable', true);
$propbag->add('author', 'Paul');
$propbag->add('version', '1.0');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
'php' => '4.1.0'
));
$propbag->add('groups', array('FRONTEND_VIEWS'));
$propbag->add('configuration', array('title'));
}

function introspect_config_item($name, &$propbag)
{
switch($name) {
case 'title':
$propbag->add('type', 'string');
$propbag->add('name', Nieuwsbrief);
$propbag->add('description', TITLE);
$propbag->add('default', Nieuwsbrief);
break;
}
return true;
}

function generate_content(&$title) {
global $serendipity;

$title = 'Nieuwsbrief';
include ('http://www.colorscan.nl:81/weblog/phpne ... r/form.php');
}
?>

And now I get the error in my serendpity_admin page by Sidebar plugins this error Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in D:\WWW\WEBROOT\weblog\plugins\serendipity_plugin_nieuwsbrief\serendipity_plugin_nieuwsbrief.php on line 41

I don't know what to change, hopefully can someone help me!

Thx.

Paul

Re: Parse error: parse error, expecting `T_OLD_FUNCTION' or

Posted: Thu Aug 10, 2006 2:23 pm
by garvinhicking
Hi!

Your plugin seesm to be missing a last closing "}", that closes the "class {" you have opened.

Regards,
Garvin

Posted: Fri Aug 11, 2006 2:56 pm
by paultje
thx! I placed the } tag below the var $title and it works!!!

:lol: :lol: :D :)