PDA

View Full Version : Um what??


Lethal
05-07-2002, 11:20 AM
I installed the Quote In A Box hack a little bit ago and I was testing the quotes out and when I hit the quote button it goes to the reply page like normal but at the top of the page it says:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /htdocs/www/forums/newreply.php(45) : eval()'d code on line 1

I looked and looked but couldn't find anything wrong. Someone?

Sparkz
05-07-2002, 11:22 AM
Please post lines 40-50 of newreply.php

Looks like you have forgotten something, or made a typo.

Lethal
05-07-2002, 11:44 AM
There's lines 41-51


$postdate=vbdate($dateformat,$postinfo[dateline]);
$posttime=vbdate($timeformat,$postinfo[dateline]);
$pagetext=$postinfo[pagetext];
$pagetext = preg_replace("/(\[quote])(.*)(\[\/quote])/siU", "", $pagetext);
eval("\$message = \"".gettemplate("quotereply",1,0)."\";");
}
}

$threadid=verifyid("thread",$threadid);

$threadinfo=getthreadinfo($threadid);

This is line 45, the one that I think is causing the parse error:
eval("\$message = \"".gettemplate("quotereply",1,0)."\";");




Hope someone can see something wrong.

Sparkz
05-07-2002, 11:53 AM
Try changing

eval("\$message = \"".gettemplate("quotereply",1,0)."\";");

to

eval("\$message = \"".gettemplate('quotereply',1,0)."\";");

Admin
05-07-2002, 12:08 PM
Make sure that in the quotereply template you don't have something like $originalposter[/i], there must be a space between them (or PHP will think it's an array).

Lethal
05-08-2002, 03:07 AM
That was it firefly, I had it like you said:
$originalposter[/i]

Instead of:
$originalposter [/i]

Thanks, now it is fine.