The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I created a new page on my foru that allows any visitor to upload a picture.
However, I only want registered users to be able to upload photots. Is there a way I can accomplish this? |
|
#2
|
|||
|
|||
|
group permissions, also guests should never be allowed to upload anything ever
|
|
#3
|
|||
|
|||
|
How can I make that images on that page public but only set the uploading feature for members?
|
|
#4
|
|||
|
|||
|
How did you create that page? If you used templates, you can do this:
Code:
<vb:if condition="$bbuserinfo[userid] != 0"> // This part shown to members only </vb:if> If your processupload.php script includes global.php, then you would also want to do something like this at the beginning (after including global.php): Code:
if ($vbulletin->userinfo['userid'] == 0)
{
print_no_permission();
}
because you don't want to depend on the fact that the html page doesn't include the upload form. |
|
#5
|
|||
|
|||
|
Quote:
Code:
<vb:if condition="$bbuserinfo[userid] != 0"> // This part shown to members only </vb:if> EDIT::::: I figured it out! Thanks so much. How can i code it so that only user that are not logged in will see a message like "You must be logged in to post pictures" Is there a library of VB codes? |
|
#6
|
|||
|
|||
|
Quote:
You could do this: Code:
<vb:if condition="$bbuserinfo[userid] != 0"> // upload form code goes here <vb:else /> You must be logged in to post pictures. </vb:if> I don't think there is any complete documentation of things you can check in 'if' conditions. While there are some that are generally useful (like the $bbuserinfo array), you pretty much have to refer to the vb code to know exactly what you can do. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|