vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Have posted today (https://vborg.vbsupport.ru/showthread.php?t=105094)

Cyricx 01-11-2006 07:35 PM

Have posted today
 
So, I'm driving myself nutz trying to figure out how to do this.

I have a SUPER old forum, been around for 3 years or so.

I like the theory of the posts per day thing, but after this long, theres alot of users that went MIA for a few months here or there, and are now at the point where it would take them an inexorbant amount of posting to get to any reasonable minimum posts per day setting.

So a thought I have is to come up with a check to see if they posted today. That way I don't penalize them for being MIA in the past and just encourage them to participate from here on.

I figure I'll need to run something like

Code:

$getposts = $db->query_read("SELECT dateline FROM " . TABLE_PREFIX . "post WHERE userid = '" . $vbulletin->userinfo['userid'] . "' ORDER BY dateline DESC");

But I have no clue what I could do with the dateline from there.

I'm thinking someway to compare it with todays date like an

Code:

$countposts = 0;
while ($postsinfo = $db->fetch_array($getposts))
{
if ($postinfo['dateline'] > {todays date})
{
$countposts++;
}
}
 
if ($countposts == 0)
{
        eval(standard_error(fetch_error('must_post')));
}

I don't know... I'm completely guessing here.

The only thing I can't figure out to even try this is the $postinfo['dateline'] > {todays date} part :(

Anyone have any ideas? or if I'm doing something bassackwards could you point me to a better way? :)

Thanks!

Wow... I was going about it the hard way :)

Found a thread with the answer hehe

https://vborg.vbsupport.ru/showthread.php?t=96380

Post #22 has the way to go :)


All times are GMT. The time now is 02:08 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.02015 seconds
  • Memory Usage 1,709KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete