View Single Post
  #725  
Old 09-18-2007, 11:43 AM
JohnBee JohnBee is offline
 
Join Date: Oct 2004
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
  1. editing the .xml file directly(which I prefer) and overwriting the existing installtion or...
  2. 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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01601 seconds
  • Memory Usage 1,779KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete