Advertisement:

Author Topic: Customised Proifile Summary  (Read 1536 times)

Offline shins

  • Newbie
  • *
  • Posts: 1
Customised Proifile Summary
« on: April 14, 2012, 11:33:53 PM »
I am after  a customised profile summary since i am running a minecraft server and wish to show stats on each player for example like the below image



All the information is pulled from the database and populated into these fields I have the code for doing so in IPB and Xenofro but not for Simple Machines. I am not sure what file in SMF i need to edit or if its more complicated than adding a chunk of code into a tpl file like most forums use.

Any help would be appreciated

Code for the IPB May help you with the idea

Code: [Select]
<if test="$f->parsed != ''">
<span class='row_title'>{$f->raw_data['pf_title']}</span>
<div class='row_data'>
<if test="genericIsArray:|:is_array($f->parsed)">
{parse expression="implode( '<br />', $f->parsed )"}
<else />
        <if test="mclastseen:|:$f->raw_data['pf_key'] == 'mclastseen'">
{parse date="$f->parsed" format="long" relative="false"}
<else />
<if test="mcgametime:|:$f->raw_data['pf_key'] == 'mcgametime'">
                                        <php>
                                        $time = (int) $f->parsed;
$seconds = $time%60;
$mins = floor($time/60)%60;
$hours = floor($time/60/60)%24;
$days = floor($time/60/60/24);
$playtime = "";
if($days>0){
$playtime .= $days . " Days";
}
if($hours >0){
if($playtime != '')
$playtime .= ", ";
$playtime .= $hours . " Hours";
}
if($mins >0){
if($playtime != '')
$playtime .= ", ";
$playtime .= $mins . " Minutes";
}
if($seconds>0){
if($playtime != '')
$playtime .= ", ";
$playtime .= $seconds . " Seconds";
}
                                        </php>
{$playtime}
<else />
<if test="mcxp:|:$f->raw_data['pf_key'] == 'mcxp'">
{$f->parsed} XP
<else />
<if test="mclifeticks:|:$f->raw_data['pf_key'] == 'mclifeticks'">
<php>
$ticks = (int) $f->parsed;
$daysold = sprintf("%.1f", $ticks / 24000);
</php>
{$daysold} Days Old
<else />
        {$f->parsed}
</if>
</if>
</if>
</if>
</if>
</div>