vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Prevent Doubleposting (https://vborg.vbsupport.ru/showthread.php?t=59916)

PET 01-17-2004 07:56 PM

QUESTION : Will posting a new post bump the topic ?

I have the last post...wright ? But it have been for about 1 WEEK. So the topic is down. I post a new post...but this HACK will paste my new post intro the old one wright ? But the topic will remain DOWN or it will be BUMPED ? Coz if he remain down, then this hack is not to GOOD.

Xenon 01-17-2004 08:03 PM

:)
thx, lee, in vb2 it was even less to hack, so simple ;)
i use it since a long time now

@PET: you can decide yourself weather it will bump a thread or not.
also you can define a timespan when it's regarded as a real new post or as a dp (the standart is 3600 seconds)

Weasel 01-21-2004 05:01 AM

Xenon your new version introduces some more table_prefix bugs that cause MySQL errors. The problem is that you have to use the AS clause to create an alias so you can use things like post.whatever in the rest of the query without having to put table_prefix all over the place. Here's an example:

PHP Code:

SELECT postidpagetextpost.userid 
FROM 
" . TABLE_PREFIX . "post AS post 

You only need to do this on the SELECT query.

Xenon 01-21-2004 03:46 PM

some more?
i just forgot to add the AS on one line...

damn thing, i hate that table prefix in vb3, just a new trap to fall into when writing up instructions

achtungbaby 02-13-2004 09:07 PM

Excellent hack, very clean not to mention ridiculously quick to install.

Hoffi 03-05-2004 08:49 AM

Good Job. Will Install it later.

Boofo 03-08-2004 09:32 PM

Is there a way to disable this for Admins?

Xenon 03-09-2004 05:32 PM

you just have to edit the condition:

PHP Code:

        if ($type != 'thread' AND $doublepost $DB_site->query_first("
            SELECT postid, pagetext, post.userid 
            FROM " 
TABLE_PREFIX "post AS post
            LEFT JOIN " 
TABLE_PREFIX "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
            WHERE threadid = 
$threadinfo[threadid]
                AND dateline > " 
. (TIMENOW 3600) . "
                AND visible = 1 AND deletionlog.primaryid IS NULL
            ORDER BY dateline DESC 
            LIMIT 1
        "
) AND $doublepost['userid'] == $bbuserinfo['userid']) 

and change for example into:
PHP Code:

        if ($type != 'thread' AND $bbuserinfo['usergroupid'] != AND $doublepost $DB_site->query_first("
            SELECT postid, pagetext, post.userid 
            FROM " 
TABLE_PREFIX "post AS post
            LEFT JOIN " 
TABLE_PREFIX "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
            WHERE threadid = 
$threadinfo[threadid]
                AND dateline > " 
. (TIMENOW 3600) . "
                AND visible = 1 AND deletionlog.primaryid IS NULL
            ORDER BY dateline DESC 
            LIMIT 1
        "
) AND $doublepost['userid'] == $bbuserinfo['userid']) 


Boofo 03-09-2004 05:49 PM

Aha, thank you very much. I was thinking it was in there somewhere but I wasn't sure how to edit it. ;)

Xenon 03-09-2004 06:14 PM

np, you're welcome as always :)


All times are GMT. The time now is 10:37 PM.

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.01245 seconds
  • Memory Usage 1,745KB
  • 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
  • (3)bbcode_php_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