// ###################### Start fetch_quote_title ####################### // checks the parent post and thread for a title to fill the default title field function fetch_quote_title($parentposttitle, $threadtitle) { global $vboptions, $vbphrase; if ($vboptions['quotetitle']) { if ($parentposttitle != '') { $posttitle = $parentposttitle; } else { $posttitle = $threadtitle; } $posttitle = unhtmlspecialchars($posttitle); if(strstr($posttitle, "Re:")) { list($prefix,$remainder) = split("\(",$posttitle,2); list ($number,$newtitle) = split("\)",$remainder,2); $posttitle = "Re: (". ($number+1) . ") ". $newtitle; } else { $posttitle = "Re:(1)" . $posttitle; } //$posttitle = preg_replace('#^(' . preg_quote($vbphrase['reply_prefix'], '#') . '\s*)+#i', '', $posttitle); return "$posttitle"; } else { return ''; } }
$newpost['title'] = $_POST['title'];
if (!$newpost['title']) { $newpost['title'] = $postinfo['title']; $newpost['title']=fetch_quote_title($newpost['title'], $threadinfo['title']); }
Show Your Support