I am having a hard time trying to figure out how to get Post Counts to show on Forum Posts. It shows on Profile page but not in the Forum Posts. I have the boxed checked X Public field, content shown on profile page and on member list pages. But on your demonstration site it shows post counts on Forum Posts.. How is this done? Thanks

Comments

liam mcdermott’s picture

Status: Active » Postponed (maintainer needs more info)

Have you seen the User Stats documentation? User Stats needs a bit of theming work, or grab and install a copy of Advanced Forum. :)

Mathews_1’s picture

I've just glanced at the documentation. I will print it off today and read it today at work. I already have advance forum installed.

liam mcdermott’s picture

Advanced Forum comes with themes that make use of User Stats already. If you've followed the instructions for Advanced Forums you shouldn't have to do anything extra to get User Stats working.

Not that reading the User Stats documentation would be a waste of time, you'll gain some valuable information on theme authoring. However, my guess is that you've installed Advanced Forum, but not followed the documentation for it yet. :)

Mathews_1’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Yes I did gain some valuable information by reading the User Stats documentation. Even though I am not looking to do any theme authoring myself it was interesting to read. I have had my forum up for a while with advance forum being installed since I started it. I was looking to install some additional features for the Forum; it is a Family Forum I have for our Family Geneology. I try not to change to many things since its up and running so nothing will get screwed up. I have been using the naked theme since I started it because it fits best with the theme of my site. If changing the theme from naked to one of the other themes will get the user post count shown in the forum post then that is what I will try...

michelle’s picture

@Liam - Feel free to toss AF questions to my queue. I don't want the integration to be a burden on you.

@Mathews_1 - All the AF styles have the variable in them. Make sure you're using the version of US that has the author pane hook in it and clear your cache.

Michelle

liam mcdermott’s picture

@Liam - Feel free to toss AF questions to my queue. I don't want the integration to be a burden on you.

Thanks, and likewise for any User Stats issues in Advanced Forum's queue. :)

About this issue: I don't mind helping when not 100% sure what the user is trying to do, or the issue is blurred.

michelle’s picture

Well, hopefully this issue will go away once there's stable releases of everything. My modules are just in a bad state right now as I scramble to get everything working together.

Michelle

Mathews_1’s picture

I don't mean to bother anybody. I'm sure you all get tired of being asked newb questions and I don't like asking them. I try and keep from doing any kind of code changing, I can do it but don't like to. I'm not having problems with either of the modules AF or User Posts. What I was trying to do was get it to where the users total post count shows up underneath the user picture in the Forum posts. I think that made since. Just like on your demonstration site it shows users total post count in their Forum Posts underneath your picture. I don't know if that is a User stats question or an AF question? If I started the post in the wrong module I apologize. I'm using AF version 6.x-1.0-alpha16 if that helps Michelle.

michelle’s picture

Status: Closed (fixed) » Active

The post count is coming from user stats. The AP integration code gives you these to variables in the author pane template:

* - $user_stats_posts: Number of posts from user stats module.
* - $user_stats_ip: IP address from user stats module.

So you need a version of user stats that has the integration code and you need to clear your cache after installing it because alpha 16 still has the caching problem.

Michelle

Mathews_1’s picture

After playing with it some more I added the code

Post count: print user_stats_get_stats('post_count', $node->uid);

to the node-forum.tpl.php file per user documentation. My entire code in the node-form.tpl.php file looks like this:

    $account = user_load(array('uid'=>$node->uid));
print $node->title;

if ($submitted):
print t('Posted !date', array('!date' => format_date($node->created)));
endif;

print $node->body;

print $links;

Post count: print user_stats_get_stats('post_count', $node->uid);

It didn't change anything in my forum posts. The only thing it shows is the username, user picture, joined, and whether user is online/offline in the forum post. I'm not for sure what I need to do to get the user total post count to show in forum posts. I attached the entire file for you to see if I did it wrong. The only thing I can see is the Post Count: looks out of place in the code but I have no idea for sure. I also have cleared my cache.

michelle’s picture

Why did you add that to node-forum.tpl.php? Aren't you using AF? Did I miss something somewhere?

Michelle

Mathews_1’s picture

I thought I had downloaded the correct version of User Stats that has the integration code in it. It still wasnt working so I started playing with the code to see if it would add the total post count.

Mathews_1’s picture

I went back to the .dev version

Mathews_1’s picture

Michelle,

Thank You very much for your help. It is very much appreciated, especially when you have better things to do. I went back in and changed the node-forum.tpl.php back to original and completely removed user stats from my site and reinstalled .dev version and it is now working. I apologize for all the posts on this subject..Your work on AF module is very much appreciated along with the User stats module developer. I just wanted to say Thank You...

michelle’s picture

Status: Active » Fixed

Yay, glad you got it working. :) BTW, node-forum.tpl.php is not used with AF. That's why you had me confused.

Michelle

Status: Fixed » Closed (fixed)

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