PDA

View Full Version : setting post title in newreply_post_start


Dr.CustUmz
03-10-2017, 09:22 PM
I am trying to create a default post title for each reply, which will append a variable to the beginning of each respondents reply title.

in newreply_post_start I have tried:

$vbulletin->GPC['title'] = 'CRAP';
$newpost['title'] = 'CRAP';
$title = 'CRAP';

But I am not having any luck.

Another method I was trying was to just remove the title from all replies and add a fake title above the message like so. (also in newreply_post_start)

$beg_html = '<div class="smallfont">';
$end_html = '</div>';
$msg = $vbulletin->GPC['message'];
$vbulletin->GPC['message'] = $beg_html . 'Re:' . $memberinfo['query'] . $end_html . $msg;

I did have better results with this although this method will not allow me to use html disregarding the vB option. Because this method is just adding text to the users post therefore will print the html as text if the usergroup does not have html permission.

The best place for what I am trying to achieve would be as the title though and would prefer it that way. So if anyone could be of assistance I would very much appreciate it =)

I am aware I could use:
$post[title] = 'Re: CRAP - ' . $post[title];
in one of the postbit hooks, but that will change every time the user makes a change and the end goal is to show this is what he had when he made this post, that is why I am trying to place it where I am.

PinkMilk
03-18-2017, 04:39 AM
Not sure if will help but check out fetch_quote_title funtion in functions_newpost.php starts around line 1654, this line in particular:

$posttitle = $threadtitle;

Also have vbulletin options >> Message Posting and Editing Options >> Automatically Quote Post / Thread Title set to yes.

My thinking is you could add whatever your trying to do to the function.