hi,

is there a snippet to show the users activity on a custom user_profile.tpl.php ?

greets

Lausch

Comments

sanduhrs’s picture

Assigned: Lausch » sanduhrs
Category: feature » support
Status: Active » Fixed

If you stick to [1] you may use something like

  print theme('user_activity_o_meter', $user->user_activity_index)

In template.php you may define your own themeable function, e.g.

function phptemplate_user_activity_o_meter($index) {
  $output = '
  <div class="user_activity_o_meter" style="width:100%;height:20px;background-color:#C3D9FF;">
    <div style="width:'. $index .'%;height:20px;background-color:#6BBA70;color:white;text-align:center;"></div>
    <div style="margin-top:-20px;text-align:center;">'. $index .'%</div>
  </div>';

  return $output;
}

vg

[1] http://drupal.org/node/35728

Lausch’s picture

many thanks!

it works

greets

Lausch

Anonymous’s picture

Status: Fixed » Closed (fixed)
lainel’s picture

Subscribe

Rosamunda’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

How is option Nº 1 in 6.x?

<?php
  print theme('user_activity_o_meter', $user->user_activity_index)
?>

Thanks!

Rosamunda’s picture

Status: Closed (fixed) » Active