vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Prevent Doubleposting (https://vborg.vbsupport.ru/showthread.php?t=40145)

Xenon 03-24-2003 03:27 PM

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")."\");");
  } 


yxboom 03-24-2003 03:52 PM

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.

jancarlo 03-24-2003 09:37 PM

ok anche in vb 230 :)

bello script!!! :D

jancarlo



ok also in vb 230:)

beautiful script!!! :D

jancarlo

sabret00the 03-25-2003 09:45 AM

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

and you're an admin now, add the mini section ;)

Opie 04-09-2003 03:32 AM

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?

Xenon 04-09-2003 11:23 AM

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

Boofo 04-09-2003 05:49 PM

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? ;) :p

Is this a new variable in vb3? ;)

Xenon 04-09-2003 09:12 PM

:p

mine is just a typing, yours was sensechanging :p ;)

but yeah i try to convince the devs to add this as a new vb3 var ;)

Boofo 04-09-2003 09:48 PM

Quote:

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

mine is just a typing, yours was sensechanging :p ;)



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? ;)

solent 04-25-2003 07:47 AM

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.


All times are GMT. The time now is 07:21 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.01478 seconds
  • Memory Usage 1,749KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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