![]() |
Conditional Question
I have some code here that is added into attachment.php to force users to reply to a thread before they can download the attachment. How can i use a conditional so 2 or 3 of my usergroups can skip this?
Code:
if ( !$vbulletin->db->query_first ( "SELECT postid FROM " . TABLE_PREFIX . "post WHERE userid='".$vbulletin->userinfo[userid]."' AND threadid=$threadinfo[threadid]" ) ) : Thanks in advance. |
Probably something like:
PHP Code:
|
Thanks for helping.. and so quick too ;)
Unfortunatly that produced an error.. Code:
Parse error: syntax error, unexpected '{' in /home/nas04l/n/nzbscene.com/user/htdocs/forum/attachment.php on line 192 PHP Code:
Any other ideas as this has got me baffled. |
Whoops, I needed another parenthesis in there. I corrected my code above.
No, you do not need an endif. Just make sure the curly brackets are around the code. |
It worked! Thankyou very much.
At face value that code looks like it should be x usergroup that should have to use that code instead of x skipping it. Dont really understand that. Thanks again. |
The "!" in front makes the statement say if NOT in that usergroup.
|
All times are GMT. The time now is 09:58 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|