Customizing SMF > Modifications and Packages
Medal Honor For Years
booch_21:
--- Quote from: Kirsten07734 on June 10, 2012, 12:20:05 AM ---Nice mod. Would be great to have options on date setting, such as using a text abbreviation for the month (8 JAN 2006) or allowing admin to set the order either DD/MM/YYYY or MM/DD/YYYY.
--- End quote ---
I changed mine in Display.php on the line: $userRegistered = date("d/m/Y",$timeDays); //Date of the register to below:
--- Code: ---function countYearsSinceReg($id)
{
global $smcFunc, $modSettings, $memberContext;
$id_mem = (int) $id;
$userRegistered = 0;
$cantStars = 0;
$countYearsSinceReg = array();
if(!empty($id_mem))
{
loadMemberContext($id_mem);
$timeDays = $memberContext[$id_mem]['registered_timestamp'];
$userRegistered = date("m/d/Y",$timeDays); //Date of the register
$cantStars = (date("Y") - date("Y",$timeDays)); //One medal for one year.
if (!empty($modSettings['mhfyenabled']))
$countYearsSinceReg['userRegistered'] = !empty($userRegistered) ? $userRegistered : '';
if (!empty($modSettings['mhfyenabledimgs']))
$countYearsSinceReg['cantStars'] = !empty($cantStars) ? $cantStars : '';
}
return $countYearsSinceReg;
}
--- End code ---
eladio:
nice mod... but ..
how to show medal for each 5 year?
ocmdiaz714:
Can I change the display from year to month?
Tien:
It is nice. But some of my forum members are not contributing posts. I feel that it is unfair to those who have contributed and receiving a medal a year later with those who never contribute a single post. Possible to add in how minimum how many posts or karma points a member must scored in order to receive the yearly medal?
Lean:
Sorry, SSimple Team not supported in English language at the moment.
In SMFSimple.com We are looking for partners with this language to provide better support to all.
Thanks for understanding.
Navigation
[0] Message Index
[*] Previous page
Go to full version