![]() |
Is there any hack that will allow me to to add a poster's posts per day (like the one that's shown in the profiles) under the avatar? I think it should be easy, but I know nothing of php yet to figure it out for myself.
|
You can find the variable string used to display that in a template you can reach from your admin panel. Then just copy and paste that in the post-bit template under the advatar somewhere.
|
Actually this does require a code hack. You need to put this block of code:
PHP Code:
Then into the postbit template, add $postsperday. I haven't tested this at all but it should work. |
Just stick $postsperday into the postbit template and you will have what you want since I created the value to be used but don't display it by default.
|
Great! Thanks for your help! :D
|
Quote:
Something like a "user of the day hack" :) I tried it myself but i don't no how to do calculations with fieldvalues in a loop. tia, www.crapforum.nl |
I don't really understand what you are trying to do, but anyhow this code will give you the userid,username,postsperday and posts of the user with the highest posts per day ranking:
Code:
$user=$DB_site->query_first("SELECT userid,username,posts,(posts/((UNIX_TIMESTAMP(NOW())-joindate)/86400)) AS postsperday FROM user ORDER BY postsperday DESC"); |
Thx for giving me some pointers here :)
i've got it working now. you can checkit out on my forum. www.crapforum.nl topright "poster of the day" |
Quote:
functions or other else~~~?? could someone tell me?? |
I want to add this to the memberlist area. However when I do this it shows 0.00 for the posts per day :/
In memberlist.php on the top I added Code:
$jointime = (time() - $userinfo[joindate]) / 86400; // Days Joined Can anyone help :) -Brian |
All times are GMT. The time now is 04:41 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|