I have been using this MOD since it was introduced back in the day and it has served out community beautifully. From the start we modified it and I have been carrying the custom code over between releases. I figured someone could benefit from it as well.
The customization produces a doublepost /merged message with time function on a lower key than the default prompt.
Quote:
Vestibulum diam risus, euismod id, tristique sed, mollis vitae, massa. Donec ante nibh, euismod ac, iaculis a, rutrum quis, neque. Donec vel velit. In hac habitasse platea dictumst. Aliquam id nunc sed mi mollis lacinia.
JohnBee added 0 Minutes and 13 Seconds later...
Vestibulum diam risus, euismod id, tristique sed, mollis vitae, massa. Donec ante nibh, euismod ac, iaculis a, rutrum quis, neque. Donec vel velit. In hac habitasse platea dictumst. Aliquam id nunc sed mi mollis lacinia.
|
Customization for this is quite simple, and can be accomplished in two ways.- editing the .xml file directly(which I prefer) and overwriting the existing installtion or...
- editing the installed plugin and keeping the installation.
Method 1. edit the product file product-xenon_prevdoublepost.xml and fine the following line(line 55)
Code:
$doublepost['message'] = $doublepost['pagetext'] . "\n" . $vbulletin->options['xen_dp_spacer'] . "\n" . $post['message'];
and replace with:
Code:
$doublepost['message'] = $doublepost['pagetext'] . "\n\n" . $vbulletin->userinfo['username'] . ' added ' . intval((TIMENOW - $doublepost['dateline'])/60) . ' Minutes and ' . ((TIMENOW - $doublepost['dateline']) % 60). ' Seconds later...' . $vbulletin->options['xen_dp_spacer'] . "\n\n" . $post['message'];
Method 2. Through ACP open: Plugins & Products > Plugin Manager: [Product : Prevent Doubleposts] > Main Doublepost Prevent Engine. and In the Plugin PHP Code window find the following code:
Code:
$doublepost['message'] = $doublepost['pagetext'] . "\n" . $vbulletin->options['xen_dp_spacer'] . "\n" . $post['message'];
and replace with:
Code:
$doublepost['message'] = $doublepost['pagetext'] . "\n\n" . $vbulletin->userinfo['username'] . ' added ' . intval((TIMENOW - $doublepost['dateline'])/60) . ' Minutes and ' . ((TIMENOW - $doublepost['dateline']) % 60). ' Seconds later...' . $vbulletin->options['xen_dp_spacer'] . "\n\n" . $post['message'];
And thats it. Hope this helps someone.