vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Doublepost = Not counted in user's post count (https://vborg.vbsupport.ru/showthread.php?t=42611)

Austin Dea 08-22-2002 02:30 PM

Doublepost = Not counted in user's post count
 
We all know that sometimes there is a need to post a couple times in a row, whether it be multiple attachments, posting updates, etc. This hack will make it so that the double/triple/whatever post is not added to the user's post count, but still shown and updated in the forum and thread count. I kow at some boards there is a lot of competition in post counts, and although doubleposting is not looked highly upon in most forums, this would ensure that the user isn't getting any benefit out of it. Plus people could use it for bumping topics, etc, etc, etc. This hack will also make it so if that doublepost is deleted, it will not subtract from the user's postcount. Since it was never added in the first place, it shouldn't be a problem ;).

---------------------------------------------------------------------
NOTE: I did use (with permission) the query and if statement from Xenon's Prevent Doubleposting hack.
---------------------------------------------------------------------

This is a simple hack which only involves 2 file edits (editpost.php and newreply.php). And it does work with the QRB =P. If you have any questions, etc, post them here.


DOESN'T WORK.

NTLDR 08-22-2002 02:33 PM

Nice and v.usefull hack, I think I'll have to install this one ;)

DemiNeo0101 08-22-2002 02:35 PM

i like this.
/me clicks install

Austin Dea 08-22-2002 03:35 PM

Aw dangit. Everyone who has installed, please uninstall. It's not counting posts at all for some reason. Let me figure out what's wrong.

Austin Dea 08-22-2002 04:07 PM

Grrr...this doesn't work. Guess I didn't fully test it. Mods either delete this or move it to Help Me Finish.

Sorry guys...

Austin Dea 08-22-2002 07:57 PM

1 Attachment(s)
Ok, here's what I had. If someone could point out to me why no posts were being added or deleted, even if it wasn't a double post, that'd be great.

Xenon 08-22-2002 08:03 PM

as i told ya in my pm your part of editpost.php is wrong:

PHP Code:

$lastpost $DB_site->query_first("SELECT * FROM post WHERE threadid = '$threadid' ORDER BY postid DESC"); 

because the newest post is always the last post of a thread ;)
you must use a query one post before:
PHP Code:

$lastpost $DB_site->query_first("SELECT * FROM post WHERE threadid = '$threadid' AND postid<$postid ORDER BY postid DESC"); 

i think that should be right...

Austin Dea 08-23-2002 02:23 AM

Ok thanks. But it's not adding any posts either...

g-force2k2 08-23-2002 05:20 AM

Austin Dea for the newreply.php fiasco why don't instead of all the other coding (i could be wrong)

just find:

PHP Code:

          ".iif ($foruminfo[countposts],"posts=posts+1,","")." 

and replace it with:

PHP Code:

        ".iif ($foruminfo[countposts],"posts=posts+'".iif($threadinfo[lastposter] == "$bbuserinfo[username]",'0','1')."',","")." 

That should do the trick O_o regards...

g-force2k2

Xenon 08-23-2002 10:16 AM

that's because you also have to use dateline, and so on to see if it's really a double post (meant as spam) or just a post after 5 days...


All times are GMT. The time now is 12:34 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.01443 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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