1
General SMFShop Discussion / How can I restart all the credits?
« on: December 17, 2009, 03:43:46 am »
I what to delite all the credits of my forum to make them 0.00. How can I do it? Do I have to run something in phpmyadmin?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Is there a way that the admin can choose the amount of money a certain person gets? Including him/herself.
Lokitox, muchas gracias por el aporte. Desde hace tiempo que se pediaEstoy para servirlos, tranquilo.
I am to serve them, relaxed
// Referrals Mod
// If they emptied it, don't do referral information
if(!empty($_POST['referredby']))
{
// We may need this
global $context, $sourcedir;
require_once($sourcedir . '/Referrals.php');
// If there was a referrer, is it the same one
if(!empty($context['referrals']) && strtolower($_POST['referredby']) == strtolower($context['referrals']['referred_by_name']))
{
$referrer = (int) $context['referrals']['referred_by_id'];
$regOptions['extra_register_vars']['referred_by'] = $referrer;
$regOptions['extra_register_vars']['referred_on'] = (int) $context['referrals']['referred_timestamp'];
$referral = 1;
}
else
{
// No they changed it, so we've got to find this user
$referrer = checkReferrerExists($_POST['referredby'], 'name');
// Referrer by that name not found, so fatal error and force them to check (its better than ignoring it)
if(empty($referrer))
fatal_lang_error('referrals_referrer_not_found', false);
for the drawing, you would setup a cron or manually run the file to complete the lottery
Could someone tell me how to manually run the file?
Thanks!
Sorry por hablar español pero ocupo saber si hay alguna manera de darle permisos a otro rango que no sea administrador de poder administrar la shop?Pues, por ahora no. Yo he extraido está parte del código del mod "awards" que sirbe exactamente para lo que estas buscando. Si sabes algo de programación tal vez sepas adaptarlo.
<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>
<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>