Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Rocks-HD on July 24, 2008, 07:30:39 PM

Title: How can I modify the permissions with ftp?
Post by: Rocks-HD on July 24, 2008, 07:30:39 PM
Is there a command that I can put on top of the lines of command to avoid all that the forum can see

Exemple:
if ($context['can_reply'] && !empty($options['display_quick_reply']))

this code show the context for all in the fórum, but If I to implemente a code above this code

IF (allowed = admin)
if ($context['can_reply'] && !empty($options['display_quick_reply']))
{

}
it is a exemple... Anybody can help me?

Sorry for my english
Title: Re: How can I modify the permissions with ftp?
Post by: SlammedDime on July 24, 2008, 09:00:18 PM
if ($context['can_reply'] && !empty($options['display_quick_reply']) && $context['user']['is_admin'])
Title: Re: How can I modify the permissions with ftp?
Post by: Rocks-HD on July 24, 2008, 10:40:21 PM
thanks man

it's very important, but i have more one question

in this case

   setupProfileContext(
      array(
         'member_name', 'real_name', 'date_registered', 'posts', 'lngfile', 'hr',
         'id_group', 'hr',
         'email_address', 'hide_email', 'hr',
         'show_online', 'hr', <<--here
         'passwrd1', 'passwrd2', 'hr',
         'secret_question', 'secret_answer',
      )

how i can make for only staff can see?

I can learn in all context if it's possíble!

thanks again
Title: Re: How can I modify the permissions with ftp?
Post by: SlammedDime on July 24, 2008, 11:15:46 PM
Try this:

$custom = array(
         'member_name', 'real_name', 'date_registered', 'posts', 'lngfile', 'hr',
         'id_group', 'hr',
         'email_address', 'hide_email', 'hr');
$custom = $context['user']['is_admin'] ? array_merge($custom,array(
         'show_online', 'hr')) : $custom;
$custom = array_merge($custom,array(
         'passwrd1', 'passwrd2', 'hr',
         'secret_question', 'secret_answer',
      ));
setupProfileContext($custom);


Also, please see the red colored text in my signature.  I cannot be on this forum 24/7 to offer support.
Title: Re: How can I modify the permissions with ftp?
Post by: Rocks-HD on July 24, 2008, 11:36:19 PM
work vey welll thanks man!  ;)