Only post count?

fumbling - February 20, 2009 - 18:37
Project:User Stats
Version:6.x-1.0-alpha3
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Went ahead and loaded alpha3 for now and was able to get Post Count to display on user profiles. On the User Stats settings page, it mentions Login Count as well, but I haven't been able to get that to surface on user profiles. Also, how do I get the other items on this list to surface on user profiles:

days registered;
join date;
days since last login;
days since last post;
post count;
login count;
user online/offline;
IP address;

Thanks for any help.

#1

Liam McDermott - February 21, 2009 - 18:32
Status:active» postponed (maintainer needs more info)

This could be tricky: how are you getting the data into the profile, via the Profile Kit module, your own theme, or something else?

#2

fumbling - February 23, 2009 - 15:52

Thanks. I'm getting post count, login date and "member since" data on the profile now as well, so getting really close. What I don't see that I would really like to have is the presence data (user on/offline). I'm just using the core Profile module, and the Pixture Reloaded theme. Does that help?

#3

Liam McDermott - February 23, 2009 - 21:52

Cool, so you're theming the profile page yourself.

I wrote some documentation on putting stats into themes. See: http://www.apaddedcell.com/an-introduction-user-stats-module-drupal

There's a section on creating an online/offline indicator. Here are the code samples:

<p>Online: <?php print (user_stats_get_stats('online', $node->uid) ? 'yes' : 'no'); ?></p>

and using images:

<img alt="User is <?php print (user_stats_get_stats('online', $node->uid) ? 'online' : 'offline'); ?>" src="<?php print base_path() . path_to_theme() .'/'. (user_stats_get_stats('online', $node->uid) ? 'online.png' : 'offline.png'); ?>" />

These examples are using the $node object, so you'll need to change $node->uid to arg(1), or something like that. But then, you probably know that already, since you've got some of the stats working already. :)

#4

fumbling - February 24, 2009 - 14:56

Hi Liam - thanks of all this help. I should mention though that I haven't done anything to the theme to make the stats show up thus far. They simply showed up after I went to the User stats settings pages and tweaked the settings, as well as paid a visit to the User Management >> Profile page and (I think) made a couple changes in the "Add new field" list.

Having said that, we are transitioning to our own theme so I'll give this to our themer so he can look at baking it in and get presence and everything working.

Either way, would you suggest that we use Node Profile rather than core Profile to best talk to your module? I was strongly considering making that change anyway.

Thanks!

#5

Liam McDermott - February 24, 2009 - 18:25
Status:postponed (maintainer needs more info)» fixed

I actually haven't used User Stats on a profile, so am not the best person to ask! :)

Having said that, profiles as nodes really do seem like a good idea, and I would expect it to be the easiest way to get User Stats into your profiles, yes.

#6

fumbling - February 25, 2009 - 17:30

Thanks!

#7

System Message - March 11, 2009 - 17:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.