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)

CrazyLady 04-03-2005 03:45 PM

Quote:

Originally Posted by Xenon
3) nope, but in this thread you can find the instructions to exclude them :)

I read the entire thread... those instructions were for an earlier version I believe.. I can't find the code to replace?

JohnBee 04-14-2005 11:05 AM

I saw a similar hack on another forum software and when the user would add
additional text to a post...

JohnBee 04-14-2005 11:06 AM

*user posted 2 minutes later

It would put something like that between them.
Is it possible to do that with this hack also?

Xenon 04-14-2005 07:16 PM

post seperator can be whatever you want it to be, that's why i added that one into the option array :)

JohnBee 04-14-2005 09:19 PM

Yes I saw that, but im stuck on the time display thingy :P

I'm not much of a code so I guess I'm asking what code I would stick
there to produce that :)

If you could tell me that I would be one happy camper :D
I just read that getting the times in there would require much modification
I have a phpbb hack that does this and there code is HUGE in comparisson
and many table queries where logs /records are created, obviously to
manage or calculate times bewteen merges.

anyways, if someone could show me how to get the users name
into the line I would be happy.

ex: *JohnBee has added shortly after...

Marco van Herwaarden 04-15-2005 05:49 AM

In your includes/functions_newpost.php, find the following:

PHP Code:

            // we are here, so we may have a doublepost -> do more exact checkings
            
$doublepost $DB_site->query_first("
                SELECT postid, pagetext, post.title, post.userid, post.attach 

and replace by:
PHP Code:

            // we are here, so we may have a doublepost -> do more exact checkings
            
$doublepost $DB_site->query_first("
                SELECT postid, pagetext, post.title, post.userid, post.attach, post.dateline AS dateline 

Then find:
PHP Code:

                $post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . $post['message']; 

and replace by:
PHP Code:

                $post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . "$bbuserinfo[username] posted " . ((TIMENOW $doublepost[dateline]) / 60) . " minutes later:\n" $post['message']; 

I don't have this hack installed and i didn't test the above example. So test this first on a testboard.

JohnBee 04-15-2005 11:03 AM

WOW!

Dude it works!:thumbsup:
I needs a little formating but WOW! this is exactly like the phpBB hack except its
1000 lines shorter LMAO!

One thing that I noticed is it posts a highly accurate time stamp :)
like *User posted 1.222343424 mins later.

it doesnt do it all the time but quite often.

WHat kind of text formating can I apply to this, I didn't t see any html in the
newpost.php anywheres so im assuming it uses something else, I noticed the
/n is a cr equivalent or something, so I will research it, I want to make it
smaller and dark blue...

once again thank you for your great support everyone ;)

Marco van Herwaarden 04-15-2005 11:27 AM

Change:
PHP Code:

((TIMENOW $doublepost[dateline]) / 60

To:
PHP Code:

intval((TIMENOW $doublepost[dateline]) / 60


JohnBee 04-15-2005 12:00 PM

Thank you MarcoH64

The fixed the .2122223332 problem, it seems of of round it off to the minute.
is there a way to round it off to the min.second ?

ex: *User has posted 1 minutes 42 seconds later

or *User has posted 1.23 minutes later

either or would work nicely :)

Marco van Herwaarden 04-15-2005 12:39 PM

Ok, change that line to:
PHP Code:

$post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . "$bbuserinfo[username] has posted " intval((TIMENOW $doublepost[dateline]) / 60) . " minutes " intval((TIMENOW $doublepost[dateline]) % 60). " seconds later:\n" $post['message']; 

Or:
PHP Code:

$post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . "$bbuserinfo[username] posted " round(((TIMENOW $doublepost[dateline]) / 60), 2) . " minutes later:\n" $post['message']; 



All times are GMT. The time now is 01:35 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.01488 seconds
  • Memory Usage 1,761KB
  • 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
  • (8)bbcode_php_printable
  • (1)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