Firefox PHP

if admin...

Posted by artisites 
if admin...
March 21, 2011 10:16AM
What is the syntax for showing messages only if logged in as an admin user?

I want to show some links only to an admin user, and I want to restrict attachments to admin users...

Have tried searching the forums but can't find anything :(
Re: if admin...
March 21, 2011 11:19AM
What are the "messages" that you are talking about? Posts in a forum, some custom message, something else?

In the templates, you can use the following construction to only show part of the template to admin users:
{IF USER->admin}
  ... some template code ...
{/IF}

What does "restrict attachments" do? Is that about adding attachments, reading attachments or both? If you are talking about adding attachments, then you can configure the forum to not allow adding attachments to anonymous and registered users. An administrator user will still be able to add an attachment, when the forum is configured to contain attachments.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: if admin...
March 23, 2011 01:45PM
The messages are hard coded links, that should work fine.

That's exactly what I'm after with attachments - I just tried to add an attachment do they require an addon?
Re: if admin...
March 23, 2011 02:05PM
No, attachments are a built-in feature. Just make sure that you allow more than 0 (zero) attachments in the settings for the forum. The attachment settings can be found at the bottom of the settings page for a forum.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login