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
  #152  
Old 04-26-2003, 06:15 AM
Hobbes's Avatar
Hobbes Hobbes is offline
 
Join Date: Dec 2002
Location: Cali
Posts: 230
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have one question....heh....i hope this thread is like....still loooked at!!!!

anyway....

the attachment is the Double Post Prevention Hack before I installed

Anime-loo 's Post Redirect Hack.

I was wondering what i would change in the code so that it will show

"Double Posting are we?"

between each post, instead of right after the text like it's doin now....if needed, i'll attach another screenshot of how it looks now....

I hooooppppe someone can answer this *dances*
Reply With Quote
  #153  
Old 04-26-2003, 06:20 AM
Hobbes's Avatar
Hobbes Hobbes is offline
 
Join Date: Dec 2002
Location: Cali
Posts: 230
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

:bunny: well...i'm bored....so i'll show ya how it looks now...


the attachment actually shows

(1) how it was [in the quote]

(2) how it is now [after i installed Anime loo's Post Redirect hack.

heeelp??

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

hmm, i can't really see the sense for this, but all you have to change is this:

PHP Code:
addslashes($lastpost[pagetext] . "\n\n" $message
the string \n\n produces two enters, but you can replace it with everything you want to be between the two posts.
if you left out the \n tags, it will lead to your problem.

if they're in, maybe you have to ask anime about his hack
Reply With Quote
  #155  
Old 04-26-2003, 05:26 PM
Hobbes's Avatar
Hobbes Hobbes is offline
 
Join Date: Dec 2002
Location: Cali
Posts: 230
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*dances*....

THANKS !!!!!!!! \n\n did the trick! w00t!
Reply With Quote
  #156  
Old 04-29-2003, 06:19 PM
Opie Opie is offline
 
Join Date: Aug 2002
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
[i]04-09-03 at 07:23 AM Xenon said this in Post #146

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 [/B]
When I do this I get this error:

Parse error: parse error, unexpected ',' in /home/opie/public_html/forums/newreply.php on line 296

I'm running 2.2.7 if that matters.
Reply With Quote
  #157  
Old 04-29-2003, 09:06 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you have made everything right, there couldn't be such a parse error.

you should check your php syntax on mistakes you have made
Reply With Quote
  #158  
Old 04-30-2003, 07:50 PM
Opie Opie is offline
 
Join Date: Aug 2002
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
if($threadinfo['forumid'], array(10,11,13)) or $lastpost['userid'] != $bbuserinfo['userid'] OR (time() - $lastpost['dateline']) > 3600 OR ($attachmentid and !$foruminfo['moderateattach'])) {

That's what I put and those are valid forum ids, but still the error... weird.
Reply With Quote
  #159  
Old 04-30-2003, 08:02 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

whats wierd?

you clearly forgot half of the codechanges......
why haven't you put the word in_array in your code as i stated?
Reply With Quote
  #160  
Old 05-01-2003, 02:11 AM
Opie Opie is offline
 
Join Date: Aug 2002
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry I don't know too much about php, so instead of array put "in_array" ?

I didn't see where you said put "in_array".
Reply With Quote
  #161  
Old 05-01-2003, 02:45 AM
DigitalDesktops DigitalDesktops is offline
 
Join Date: Mar 2003
Location: Scotland, UK
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

use this code instead, it seems VB took out in_array lol:

[sql]
if(in_array($threadinfo['forumid'], array(x,y,z)) or $lastpost['userid'] != $bbuserinfo['userid'] OR (time() - $lastpost['dateline']) > 3600 OR ($attachmentid and !$foruminfo['moderateattach'])) {
[/sql]
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:51 AM.


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.06044 seconds
  • Memory Usage 2,318KB
  • 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
  • (1)bbcode_code
  • (3)bbcode_php
  • (1)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