Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Prevent Doubleposting Details »»
Prevent Doubleposting
Version: 1.00, by Xenon Xenon is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-21-2002 Last Update: Never Installs: 92
 
No support by the author.

This is why i really want a Mini-Hack section here, please Chen

What this hack does:
When a User posts to a thread where he already has the lastpost, no new post will be added. The lastpost of him will be edited and the new text is put after his first message.
This would not be done, if he has an attachment in his new post or the old post is older than 1 hour (you can change this timespan yourself )

Known bugs: None

Hope someone can use it, i do

Believe this hack includes just 1!! codehack.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #142  
Old 03-24-2003, 03:27 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, yeah i know that "bug".
but i wasn't sure if it would disturb or not... at least sometimes that could have been the reason for the "doublepost"

for a quickfix use this:

before:
PHP Code:
            $DB_site->query("UPDATE post SET dateline='" time() . "'" $editedbysql ",pagetext='" addslashes($lastpost[pagetext] . "\n\n" $message) . "' WHERE postid=" $lastpost['postid']); 
add this:
PHP Code:
$newmessage $lastpost[pagetext] . "\n\n" $message;
  if (
strlen($newmessage)>$postmaxchars and $postmaxchars!=0) {
    eval(
"standarderror("".gettemplate("error_toolong")."");");
  } 
Reply With Quote
  #143  
Old 03-24-2003, 03:52 PM
yxboom's Avatar
yxboom yxboom is offline
 
Join Date: Jan 2003
Location: The City
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot for the hack and help. On my board the post limit has its reasons cause of too many people making too many points that by the time someone responds they have to deal with 30 points instead of a simple 2-3 point rebuttal so this helps significantly.
Reply With Quote
  #144  
Old 03-24-2003, 09:37 PM
jancarlo jancarlo is offline
 
Join Date: Feb 2003
Location: Italia
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok anche in vb 230

bello script!!!

jancarlo



ok also in vb 230

beautiful script!!!

jancarlo
Reply With Quote
  #145  
Old 03-25-2003, 09:45 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed and works great, should really be default to vB, very awesome hack Xenon

and you're an admin now, add the mini section
Reply With Quote
  #146  
Old 04-09-2003, 03:32 AM
Opie Opie is offline
 
Join Date: Aug 2002
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone let me know how to exclude some forums from the hack? I only want it on a few.

Also a way to stop if from counting points(store hack) if it was a double post?
Reply With Quote
  #147  
Old 04-09-2003, 11:23 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for the storehack i can't help ya, because i don't use it.

i think all you have to do ist to put the add to storpoint part of newreply under the user post count update part.

to exclude forums:
change this:
PHP Code:
if($lastpost['userid'] != $bbuserinfo['userid'] OR (time() - $lastpost['dateline']) > 3600 OR ($attachmentid and !$foruminfo['moderateattach'])) { 
into this:
PHP Code:
if(in_array($threadinfo['forumid'], array(x,y,z)) or $lastpost['userid'] != $bbuserinfo['userid'] OR (time() - $lastpost['dateline']) > 3600 OR ($attachmentid and !$foruminfo['moderateattach'])) { 
and change x,y,z into the forumids you want to exclude
Reply With Quote
  #148  
Old 04-09-2003, 05:49 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is the guy who wrote this (in the message above)

$threadinfor['forumid']

the same guy who got me on the nothing and anything words the other day?

Is this a new variable in vb3?
Reply With Quote
  #149  
Old 04-09-2003, 09:12 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default



mine is just a typing, yours was sensechanging

but yeah i try to convince the devs to add this as a new vb3 var
Reply With Quote
  #150  
Old 04-09-2003, 09:48 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 05:06 PM Xenon said this in Post #148


mine is just a typing, yours was sensechanging


Yes, but I'm allowed to butcher the English language because it is my native language.

Quote:
but yeah i try to convince the devs to add this as a new vb3 var
Great! Then you don't ever have to worry if it is misspelled again huh?
Reply With Quote
  #151  
Old 04-25-2003, 07:47 AM
solent solent is offline
 
Join Date: May 2002
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

small easy and cool hacks by Xenon. this is vey cool as most of the users dunno what the edit button does and most of the times the reply 3-4 times with a newreply instead of editing.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04714 seconds
  • Memory Usage 2,322KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete