SMF Shop
SMFShop => General SMFShop Discussion => Topic started by: blazin6543 on August 07, 2006, 01:23:59 pm
-
is there a way to allow a membergroup to add and edit items in the shop?
-
No, sorry, not at the moment.
-
Yea its called the admin pannel Anyhow idea there for you daniel
-
I am interested to aply it too. I took this code from the awards mod that its to do that for the permissions, maybe it will help a programer to do it:
<file name="$sourcedir/Admin.php">
<operation>
<search position="before" whitespace="exact"><![CDATA[ isAllowedTo(array('admin_forum', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_boards', 'manage_smileys', 'manage_attachments']]></search>
<add><![CDATA[, 'manage_awards']]></add>
</operation>
</file>
<file name="$sourcedir/Subs.php">
<operation>
<search position="after"><![CDATA[ $context['in_maintenance'] = !empty($maintenance);]]></search>
<add><![CDATA[ $context['allow_admin'] .= allowedTo('manage_awards');
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[ if (!empty($modSettings['modlog_enabled']))
$context['admin_areas']['maintenance']['areas']['view_moderation_log'] = '<a href="' . $scripturl . '?action=modlog">' . $txt['modlog_view'] . '</a>';
}]]></search>
<add><![CDATA[
// Category for admin panel. Pogo Awards
if ((isset($modSettings['admin_areas_other']) && $modSettings['admin_areas_other'] == 1) && allowedTo('manage_awards'))
{
$context['admin_areas']['other']['areas']['awards_admin'] = '<a href="' . $scripturl . '?action=awards">' . $txt['awards'] . '</a>';
}
elseif (!isset($modSettings['admin_areas_other']) || (isset($modSettings['admin_areas_other']) && $modSettings['admin_areas_other'] == 0) && allowedTo('manage_awards'))
{
$context['admin_areas']['awards_admin'] = array(
'title' => $txt['pa_mods'],
'areas' => array(
'awards_admin' => '<a href="' . $scripturl . '?action=awards">' . $txt['awards'] . '</a>',
),
);
}]]></add>
</operation>
</file>