The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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]" ) ) : eval('print_output("' . fetch_template('MARCO1 Cant See Attach') . '");'); endif ; Thanks in advance. |
#2
|
||||
|
||||
Probably something like:
PHP Code:
|
#3
|
|||
|
|||
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. |
#4
|
||||
|
||||
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. |
#5
|
|||
|
|||
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. |
#6
|
||||
|
||||
The "!" in front makes the statement say if NOT in that usergroup.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|