vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Prevent Doubleposting (https://vborg.vbsupport.ru/showthread.php?t=59916)

Goodspeed 08-30-2004 05:40 AM

Great hack Xeon! Thank you! Going to install it...

But at first I have a question: what I need to do to switch off double post prevention after some time left? Is it possible to merge posts during appointed time?

Mosh 08-30-2004 07:01 AM

Quote:

Originally Posted by Xenon
very easy, just remove that line:

Code:

AND dateline > " . (TIMENOW - 3600) . "
and that part:
PHP Code:

AND $threadinfo['lastpost'] > TIMENOW 3600 


Xenon,

That worked an absolute treat.

Thanks ever so much for this.

JD. :)

btw. JD clicks Install :)

Xenon 08-30-2004 09:58 AM

@Goodspeed: hmm, i'm not sure if i get what you want.
If you want the merge just within the first xxy hopurse, use the default, if you want the merge whenever there's a doublepost show the code i posted for sinclair.

or do you mean that within 10 minutes no post should be merged, and then during the next hour it should?
everything is possible by changing just the conditions :)

Goodspeed 08-30-2004 04:57 PM

I'm sorry for my english Xenon, still not too good in it :(

Yes, I want to merge posts only during last 10 minutes, after that new post in thread by the same user should appear as new.
What kind of conditions should I change?

And one more question: is it possible to mark added text after merge? For example by adding line: Added by User at some time...

Thank you!

Xenon 08-30-2004 09:05 PM

no prob :)

just replace
Code:

AND dateline > " . (TIMENOW - 3600) . "
with
Code:

AND dateline > " . (TIMENOW - 3600) . " AND dateline < " . (TIMENOW - 600) . "
as well as replace
PHP Code:

AND $threadinfo['lastpost'] > TIMENOW 3600 

with
PHP Code:

AND $threadinfo['lastpost'] > TIMENOW 3600 AND $threadinfo['lastpost'] < TIMENOW 600 

as for the merging text addition:
in
PHP Code:

$post['message'] = $doublepost['pagetext'] . "\n\n" $post['message']; 

replace the "\n\n" with for example:

PHP Code:

$post['message'] = $doublepost['pagetext'] . "\nAdded at " vbdate($vboptions['dateformat'], TIMENOW) . "\n" $post['message']; 


Goodspeed 08-30-2004 09:26 PM

I did everything, checked it twice, but merge not work after those changes.
Now, posts appear one by one without merging.

Update
After couple of tests I understood that is problem in first two changes. I removed them and it works but without 10 min limit.

Addition with update date working GREAT! Thank you very much!

I changed it a little bit: added update time.

PHP Code:

$post['message'] = $doublepost['pagetext'] . "\n\n<strong><i>Added at " vbdate($vboptions['dateformat'], TIMENOW) . ", " vbdate($vboptions['timeformat'], TIMENOW) . "</i></strong>" "\n" $post['message']; 


bjornstrom 09-13-2004 07:00 AM

Works great - thanks a lot /Martin

Snatch 09-13-2004 08:40 AM

What do this hack if the Maximum number of sings per post reached and the Memver must creat an new one to complett the post ?

Xenon 09-13-2004 09:45 AM

since the newest version it checks if the merged post is still a vald one.
If it is, then the post will be merged, if it's not valid anymore (too much chars/images or whatever) it will create a new post just as it would do without the hack :)

HappyPike 09-23-2004 01:38 AM

Looks like a cool hack, Xenon. :) Does it have any impact on forum performance on a large forum?


All times are GMT. The time now is 12:03 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01240 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete