Hello, hopefully someone familiar with PHP can help me with what is likely a very simple question...
I am using the Easy Forms modification to standardize my Classifieds section which has been working great. This modification has a field for "Form Hook: Form Start:" which I am trying to utilize with a conditional to filter who may start a thread in my classifieds section.
I am looking to allow new threads to be posted by users who both:
1) have 30 posts or more
2) have been registered for 30 days or more
I am looking to not allow new threads to be posted by users who either:
1) have less than 30 posts
2) have been registered for less than 30 days
The code I was trying to use (and is incorrect) is:
PHP Code:
if($vbulletin->userinfo['posts'] < 30 OR $vbulletin->userinfo['joindate'] < TIMENOW - (86400 * 30))
{
$errormessage = "You do not have permission to create a thread in the Personal Marketplace because you need a post count of at least 30 and to have been a member for at least 30 days to create a thread here.";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}
My guess is that this is identifying users who have less than 30 posts correctly, but it is identifying users who have been registered for more than 30 days? I am not sure, but it is blocking members who meet both of my desired terms so I know that I have it wrong somewhere.
Can someone take a look and let me know what I have mixed up here? Unfortunately my PHP knowledge is limited so I can't figure it out solo.
Thanks a lot,
Bryan