Is it possible do it like that? I mean when you hover mouse over username in posts, it would show that users post count. Now it says title="View profile of ...", but instead of that, it would show "user has made 10 posts" or similar. Dont ask why i need this, i just do :D
I'm sure it's possible, it would just mean a bunch of extra queries to calculate each poster's post count. I'll look around today and see what I can whip up.
Where do you want to display it Owdy? I mean doing it on the MessageIndex would be near trivial as the information is already there. Doing on a user search page would take more changes.
kegobeer there is nothing to calculate, its stored in the members table. Just have to include that in the query and put it in the array.
Edit: Doh just re-read. Ok in the MessageIndex... give me a minute
Edit #2: My mistake, Display not MessageIndex
Ok the title is in Load.php.
Find: (around line 1017)
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '">' . $profile['realName'] . '</a>'
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="User has spammed the board'. $profile['posts'] . ' times">' . $profile['realName'] . '</a>'
Thanks. Works perfectly! :D
Okay, now i have this.
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $profile['realName'] . ' has sended '. $profile['posts'] . ' messages.">' . $profile['realName'] . '</a>',
and it prints 'username has sended 345 messages'. How to ad register date or even better total days logged in to that?
I mean ' username has sended 6576 messages and his been around 465 days now' or similar? :D
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $profile['realName'] . ' has sent '. $profile['posts'] . ' messages and has been around ' . sprintf('%0.1f', (time()-$profile['dateRegistered'])/86400) . '.">' . $profile['realName'] . '</a>',
Perfect!! Thanks! 8)
Oh wait you might want to change '.">' to ' days.">'
Yeah, i use finnish so i have to modify it anyways. Thanks again!
Hmmm, can we remove that one desimal after days? Now it is 123,1 days ago.
Sure, change
sprintf('%0.1f', (time()-$profile['dateRegistered'])/86400) to (int)((time()-$profile['dateRegistered'])/86400) Though of course that means you can get some zero day people :P
Lainaus käyttäjältä: Thantos - helmikuu 19, 2006, 10:21:22 AP
Though of course that means you can get some zero day people :P
You mean those who are just registered?
Yeah