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)

Xenon 08-23-2002 11:28 AM

from a quick delete hack i think? ^^

yes replace both ;)

Boofo 08-23-2002 11:30 AM

I think that is the hack. :) Now, that leaves the newreply code. :)

Boofo 08-23-2002 11:46 AM

Xenon, do I need to add the following to the code that you gave me the other day to turn off Double Posting Prevention for this in the editpost, too?

Code:

!$stopdoublepost ||
The code for the editpost.php seems to work fine. It incremented my postcount by one for the first post and stayed the same on all the doubleposts. When I deleted them, the count only went down by one. All this was done without adding anything to the newreply.php file at all (because I wasn't sure what code to add). I guess I don't understand why it works that way but it apparently does. :) Do I still need to add any code to the newreply.php then? And will having any attachments to the first post in a double post make any difference?

g-force2k2 08-23-2002 01:53 PM

Xenon to me any post after another is double posting ;) doesn't matter about the dateline to me... but thats just my opinion...

okay here's another scenario...

Run the query ::
PHP Code:

ALTER TABLE thread ADD lastposterid int(10NOT NULL DEFAULT '0' 

open newreply.php

find:

PHP Code:

          $DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
        } else {
          
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount=replycount+1,lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'"); 

replace with:

PHP Code:

          $DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='".addslashes($postusername)."', lastposterid='$postuserid' WHERE threadid='$threadid'");
        } else {
          
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount=replycount+1,lastposter='".addslashes($postusername)."', lastposterid='$postuserid' WHERE threadid='$threadid'"); 

find:

PHP Code:

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

replace with:

PHP Code:

          ".iif ($foruminfo[countposts],"posts=posts+'".iff($threadinfo[lastposterid] == "$bbuserinfo[userid]" AND ((time() - $threadinfo[lastpost]) / 86400) > 5,'0','1')."' ,","")." 

haven't tested the code... but it may work ;) regards...

g-force2k2

Austin Dea 08-23-2002 02:03 PM

O_O....

I had no idea I was so far off >_<...

Xenon 08-23-2002 05:39 PM

boofo: yes i think you have to add this ;)

g-force: what about two posts but every post has an attachment in it? ;)

that's why i have so much if-clauses ;)

but without attachments it'll work perfect, so at my forums i could use this code :)

Boofo 08-23-2002 06:00 PM

ok, I will need to add what now? I am confused. I need to add the stopdoublepost to the editpost lines (both of them)? And what about newreply.php? Which code do I need to add there? And it will take care of attachment problems? Sorry to sound so stupid on this one but I want to make SURE I have it right. (After all, we both know what happens when I mess up...i.e. the time thing yesterday?) :)

Xenon 08-23-2002 06:12 PM

add the stopdoublepost everywhere...

no the modification from g-force won't take care of attachments...
or let's say also two posts just with different attachments are called doublepost for him, so yes it'll work ;)

Boofo 08-23-2002 06:16 PM

Ok, so is there a way around the attachment issue in Double posting? Maybe have it so it won't allow attachments when it double posts or something? Should I use his code for the newreply then or do we still need anything in the newreply file?

Austin Dea 08-23-2002 06:17 PM

I tried g-force's thing and when I submit a rpely in the qrb is says something about an uncdefined funtion iif(), but then when I refresh or go back and do it again it works...


All times are GMT. The time now is 01:45 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.00998 seconds
  • Memory Usage 1,750KB
  • 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
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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