News:

Wondering if this will always be free?  See why free is better.

Main Menu

Disable signatures so only a admin can edit

Started by DarkAvernus, August 12, 2007, 05:00:30 PM

Previous topic - Next topic

DarkAvernus

Hey i was wondering is it possible to disable users from making their own signatures  so they can only be edited by an admin    and if so    how would i go about it step by step.   thanks heaps
   

codenaught

Still need help with this?

You can disable others from editing signatures by editing Sources/Profile.php:

Find:

$profile_strings = array(
'websiteUrl', 'websiteTitle',
'AIM', 'YIM',
'location', 'birthdate',
'timeFormat',
'buddy_list',
'pm_ignore_list',
'smileySet',
'signature', 'personalText', 'avatar',
);


Change to:

$profile_strings = array(
'websiteUrl', 'websiteTitle',
'AIM', 'YIM',
'location', 'birthdate',
'timeFormat',
'buddy_list',
'pm_ignore_list',
'smileySet',
'personalText', 'avatar',
);

if ($user_info['is_admin'])
$profile_strings[] = 'signature';


Then you can add a check to make sure to only show the signature box if the user is admin.

Themes/default/Profile.template.php:

Find:

// Show the signature box.
echo '


Change to:

if ($context['user']['is_admin'])
{
// Show the signature box.
echo '


Then find:

// Website details.
echo '


Change to:

}
// Website details.
echo '

Dev Consultant
Former SMF Doc Coordinator

Advertisement: