Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 1183
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Pages - User Conditions?

Started by Faythi, September 08, 2010, 09:56:39 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Faythi

Hi, I'm working on various simple portal pages on my forums. They are set as PHP pages and I'm basically making a media gallery type page. I have a way so you can delete files from the server but I want to do it only if you're an admin. I've tried using conditions with $context['user']['is_admin'] but it doesn't seem to work. I know you can set permissions to view the page, but I want it to be viewable to everyone. I just want a section of the page only to load if you're an admin.

Thanks in advance.

excaliburj

You could try:

global $user_info;
if ($user_info['is_admin'])
{
// code to allow file deletion
}

Faythi

Thanks, what I was looking for =P