The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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'))); } 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 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|