View Full Version : vB Portal Ruined me!!!
Xyphen
01-23-2003, 07:16 PM
Just kiddin, i got a little error cuz of vB Portal, I installed vb portal on vb2.2.9, and when I try to edit a post or something, it gives this error..
Parse error: parse error in /home/darkani/public_html/otakuo/forums/editpost.php on line 249
Please help!!
Line 249 says:
$title=censortext($title);
JulianD
01-23-2003, 07:24 PM
there should be something wrong with some lines before that.
Double check the instructions, or ask for support over phpportals.com
Xyphen
01-23-2003, 07:28 PM
I can't ask for support from phpportals, i am not a premium member, can't anyone help here?
NTLDR
01-23-2003, 07:43 PM
IIRC they will give you *Limited* support there, which is why JulianD told you to post there.
what are the lines surrounding that code?
Xyphen
01-24-2003, 12:26 AM
// check attachment status
// keep, delete, update
if (trim($attachmentaction)=="delete") {
$attachmentsql=",attachmentid=0";
$DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
updatethreadcount($threadinfo[threadid]);
}
if (trim($attachmentaction)=="new") {
// sort attachement
if (is_array($HTTP_POST_FILES)) {
$attachment = $HTTP_POST_FILES['attachment']['tmp_name'];
$attachment_name = $HTTP_POST_FILES['attachment']['name'];
$attachment_size = $HTTP_POST_FILES['attachment']['size'];
}
if (trim($attachment)!="none" and trim($attachment)!="" and trim($attachment_name)!="") {
$attachmentid=acceptupload($foruminfo[moderateattach]);
$attachmentsql=",attachmentid='$attachmentid'";
$DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]");
}
}
}
// remove sessionhash from urls:
$message = stripsession($message)
$title=censortext($title);
$message=censortext($message);
if (strlen($message)>$postmaxchars and $postmaxchars!=0) {
eval("standarderror(\"".gettemplate("error_toolong")."\");");
}
// find out if first post
$getpost=$DB_site->query_first("SELECT postid FROM post WHERE threadid=$threadinfo[threadid] ORDER BY dateline LIMIT 1");
if ($getpost[postid]==$postid) {
$isfirst=1;
} else {
$isfirst=0;
}
if ($isfirst and $title!="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."', iconid=".intval($iconid)." WHERE threadid=$threadinfo[threadid]");
//$title="";
}
if ($email) {
if (!$checkid=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE userid=$postinfo[userid] AND threadid=$threadinfo[threadid]")) {
$DB_site->query("INSERT INTO subscribethread (subscribethreadid,userid,threadid) VALUES (NULL,$postinfo[userid],$threadinfo[threadid])");
} // else : already subscribed, so no need to do that again
} else {
if ($checkid=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE userid=$postinfo[userid] AND threadid=$threadinfo[threadid]")) {
$DB_site->query("DELETE FROM subscribethread WHERE userid=$postinfo[userid] AND threadid=$threadinfo[threadid]");
} // else : already unsubscribed, so no need to unsubscribe
}
Line 249, which is the error line, is:
$title=censortext($title);
Xyphen
01-24-2003, 12:57 AM
A new error just came!!!
In the moderators Control Panel, This error shows up:
Parse error: parse error in /home/darkani/public_html/otakuo/forums/mod/moderate.php on line 35
JulianD
01-24-2003, 01:01 AM
Replace
$message = stripsession($message)
with this:
$message = stripsession($message);
For the mod cp error, try to do the same and see if you're missing a ; in the early lines.
Xyphen
01-24-2003, 01:18 AM
Yes, Julian, its fixed!! THNX MAN, I am such an dumb@$$ not to read the code -_-!!
One more thing, I fixed the error in moderate.php. Here is what to do,
Find 1 of 2:
makelabelcode("<b>Located in:</b>","<a href=\"../forumdisplay.php?s=$session[sessionhash]&forumid=$thread[forumid]\" target="_blank">$thread[forumtitle]</a>");
Replace with:
makelabelcode("<b>Located in:</b>","<a href=\"../forumdisplay.php?s=$session[sessionhash]&forumid=$thread[forumid]\" target=\"_blank\">$thread[forumtitle]</a>");
Find 2 of 2:
makelabelcode("<b>Located in:</b>","<a href=\"../forumdisplay.php?s=$session[sessionhash]&forumid=$post[forumid]\" target="_blank">$post[forumtitle]</a>");
Replace With:
makelabelcode("<b>Located in:</b>","<a href=\"../forumdisplay.php?s=$session[sessionhash]&forumid=$post[forumid]\" target=\"_blank\">$post[forumtitle]</a>");
I hope that was the fix, at least I think that was the fix, also, This was no error in vb portal, thats the way vb2.2.9 came, someone should post this at vbulletin.com or something. Thx you guys, I fixed all the errors!!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.