Advertisement
NoRC

IPB 3.x Customfield_Generic

Apr 17th, 2012
1,167
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <if test="$f->parsed != ''">
  2. <span class='row_title'>{$f->raw_data['pf_title']}</span>
  3. <div class='row_data'>
  4. <if test="genericIsArray:|:is_array($f->parsed)">
  5. {parse expression="implode( '<br />', $f->parsed )"}
  6. <else />
  7. <if test="mclastseen:|:$f->raw_data['pf_key'] == 'mclastseen'">
  8. {parse date="$f->parsed" format="long" relative="false"}
  9. <else />
  10. <if test="mcgametime:|:$f->raw_data['pf_key'] == 'mcgametime'">
  11. <php>
  12. $time = (int) $f->parsed;
  13. $seconds = $time%60;
  14. $mins = floor($time/60)%60;
  15. $hours = floor($time/60/60)%24;
  16. $days = floor($time/60/60/24);
  17. $playtime = "";
  18. if($days>0){
  19. $playtime .= $days . " Days";
  20. }
  21. if($hours >0){
  22. if($playtime != '')
  23. $playtime .= ", ";
  24. $playtime .= $hours . " Hours";
  25. }
  26. if($mins >0){
  27. if($playtime != '')
  28. $playtime .= ", ";
  29. $playtime .= $mins . " Minutes";
  30. }
  31. if($seconds>0){
  32. if($playtime != '')
  33. $playtime .= ", ";
  34. $playtime .= $seconds . " Seconds";
  35. }
  36. </php>
  37. {$playtime}
  38. <else />
  39. <if test="mcxp:|:$f->raw_data['pf_key'] == 'mcxp'">
  40. {$f->parsed} XP
  41. <else />
  42. <if test="mclifeticks:|:$f->raw_data['pf_key'] == 'mclifeticks'">
  43. <php>
  44. $ticks = (int) $f->parsed;
  45. $daysold = sprintf("%.1f", $ticks / 24000);
  46. </php>
  47. {$daysold} Days Old
  48. <else />
  49. {$f->parsed}
  50. </if>
  51. </if>
  52. </if>
  53. </if>
  54. </if>
  55. </div>
  56. </if>
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement