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
  #122  
Old 02-28-2003, 10:52 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh right, it's in the install file *gg*
(sometimes i forgot what i've already included in the hacks ^^)

PHP Code:
              if ($showeditedby and $lastpost[dateline]<(time()-($noeditedbytime*60))) {
                 
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
              } 
it's in there, so it should show the edited by after 2 minutes with the original code...
be sure you have enabled the showedited by thing..
Reply With Quote
  #123  
Old 03-05-2003, 10:57 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh, sorry, you were right

there was a little bug in it.

i've uploaded a new version, it should work now, also i've optimized the querie a bit, so i think it's good for everyone to install the new version
Reply With Quote
  #124  
Old 03-05-2003, 12:14 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do we get the subject (title) back in the line now? I have this but it doesn't seem to work.

PHP Code:
 $DB_site->query("UPDATE post SET dateline='" time() . "'" $editedbysql ",pagetext='" addslashes($lastpost[pagetext] . "\n\n[b][color=yellow]DOUBLE POSTING FEATURE[/color] - [color=black][size=1]".$title."[/size][/color][/b][color=black][size=1][/size][/color]\n\n".$message)."' WHERE postid=" $lastpost['postid']); 
Reply With Quote
  #125  
Old 03-05-2003, 12:58 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah, it's right it would work normally..

that part hasn't changed in my update, just a part before
Reply With Quote
  #126  
Old 03-05-2003, 01:01 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried it with title and $lastpost[title] and all I get is a black line where the title should be. I'm looking at the old code I had from 6 months ago for this and seeing if I can figure it out.
Reply With Quote
  #127  
Old 03-05-2003, 01:04 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh cool. Thanks Xenon.

I have a question though, I tried making the edited by part the same as it is in editpost.php, which would look like:
PHP Code:
     else {
            
$editedbysql="";
  
if (
$showeditedby and $postinfo[dateline]<(time()-($noeditedbytime*60)) and !($getperms[ismoderator] and !$showeditedbyadmin)) {
    
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
  } 
Except that for some reason it still shows the "Edited by" if I have admins set to not show edited by. I tried it with:
PHP Code:
else {
            
$editedbysql="";
            if (
$bbuserinfo['usergroupid'] == 6) {
               
$editedbysql="";
                     }
            if (
$showeditedby and $lastpost['dateline'] < (time() - ($noeditedbytime 60))) {
               
$editedbysql ",edituserid='$bbuserinfo[userid]',editdate='" time() . "'";
            } 
and that did work (I think, I tested it really quickly), but I want it to work with the setting in vb options in Admin CP. How would I do this?

Thanks.
Reply With Quote
  #128  
Old 03-05-2003, 01:11 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

use that 006:

PHP Code:
else {
            
$editedbysql="";
            if (
$showeditedby and $lastpost['dateline'] < (time() - ($noeditedbytime 60))and !($getperms[ismoderator] and !$showeditedbyadmin))  {
               
$editedbysql ",edituserid='$bbuserinfo[userid]',editdate='" time() . "'";
            } 
Reply With Quote
  #129  
Old 03-05-2003, 01:17 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried that and it shows the "edited by" no matter what I have selected in Admin CP. It's weird.

I have no clue why. :ermm:

Any ideas?
Reply With Quote
  #130  
Old 03-05-2003, 01:19 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry, no idea, it should work...

have you tried it on a post where the edited by wasn't there already, because it won't delete it if it's already ther..
Reply With Quote
  #131  
Old 03-05-2003, 01:20 PM
007's Avatar
007 007 is offline
 
Join Date: Jan 2003
Location: United States
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah I made two new posts and then waited two minutes, then replied to one with "Show Admin Edit" turned on, and one with it turned off, and it showed "edited" both times.
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:55 AM.


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.04732 seconds
  • Memory Usage 2,329KB
  • 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
  • (5)bbcode_php
  • (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