The Arcive of vBulletin Modifications Site. |
|
Reply Count addon for "In Reply to" hack by WetWired Details »»
|
|||||||||||||||||||||||||||
|
Reply Count addon for "In Reply to" hack by WetWired
Developer Last Online: Nov 2013
Original hack can be found here:
https://vborg.vbsupport.ru/showthrea...956#post475956 What my addon does is to place an incremental number in the "Re:" section of the post title. For example, if I posted a post called "Test Post", the first reply would be "Re(1): Test Post". The second would be "Re (2): Test Post" and so on. If a reply is made to "Re (1): Test Post", that reply becomes "Re (2) : Test Post" First, install the WetWired's hack. Then, In includes/functions_newpost.php Find the function fetch_quote_title Replace the entire function with: Code:
// ###################### 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 '';
}
}
Code:
$newpost['title'] = $_POST['title']; Code:
if (!$newpost['title'])
{
$newpost['title'] = $postinfo['title'];
$newpost['title']=fetch_quote_title($newpost['title'], $threadinfo['title']);
}
Show Your Support
|
|||||||||||||||||||||||||||
![]() |
|
|