PDA

View Full Version : error when trying to quote


snyx
10-22-2002, 08:17 PM
when I try to quote someone on my site I get this error, and no quote on my reply page..

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/form-kao/public_html/board/newreply.php(47) : eval()'d code on line 1

here is the hunk of code from line 25-64
// check for valid thread or post //line25

if (isset($postid)) {
$postid=verifyid("post",$postid,0);
if ($postid!=0) {
$postinfo=getpostinfo($postid);
$threadid=$postinfo[threadid];
if ($postinfo[userid]==0) {
$originalposter=$postinfo[username];
} else {
$getusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$postinfo[userid]'");
$originalposter=$getusername[username];
}
$originalposter = unhtmlspecialchars( $originalposter );

if ($postinfo[title]!="") {
$title="Re: ".unhtmlspecialchars($postinfo[title]);
}
$postdate=vbdate($dateformat,$postinfo[dateline]);
$posttime=vbdate($timeformat,$postinfo[dateline]);
$pagetext=$postinfo[pagetext];
$pagetext = trim(preg_replace("/(\[quote])(.*)(\[\/quote])/siU", "", $pagetext));
eval("\$message = \"".gettemplate("quotereply",1,0)."\";");
}
} //line49

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

$threadinfo=getthreadinfo($threadid);

if (!$threadinfo[visible]) {
$idname="thread";
eval("standarderror(\"".gettemplate("error_invalidid")."\");");
}
if (!$threadinfo[open]) {
if (!ismoderator($threadinfo[forumid],"canopenclose")) {
eval("standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
exit;
}
} //line64

thanks guys!
-myles

N9ne
10-22-2002, 08:31 PM
In newreply.php check to see you have no white spaces in front of <? and after ?>

snyx
10-23-2002, 01:10 AM
no, there isnt any..

N9ne
10-23-2002, 04:19 PM
Hmm...not sure what the white space error is, but it says line 1, have you checked to see if line one is the same as in the vb standard newreply.php file?

snyx
10-24-2002, 02:30 PM
its all the same!?

snyx
10-26-2002, 09:49 PM
someone PLEASE here! :(

snyx
10-29-2002, 06:07 PM
hello!? :(

Erwin
10-29-2002, 07:19 PM
What hacks have you installed in your newreply.php? Does quoting work with an unhacked newreply.php?

snyx
10-29-2002, 09:49 PM
I have slowly started to work my way back thru the hacks I have installed, but still nothing..

Erwin
10-29-2002, 09:52 PM
If your newreply.php works without hacks, and is not working with a hack, you have installed a hack wrongly. No one can tell you where the error is without going through the whole of your newreply.php file and looking at all your hacks. Which hacks did you install?

snyx
10-29-2002, 11:55 PM
here are a few..