The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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.
|
#2
|
||||
|
||||
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.
|
#3
|
||||
|
||||
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. |
#4
|
||||
|
||||
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.
|
#5
|
||||
|
||||
Great! Thanks for your help!
|
#6
|
|||
|
|||
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 |
#7
|
||||
|
||||
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"); |
#8
|
|||
|
|||
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" |
#9
|
||||
|
||||
Quote:
functions or other else~~~?? could someone tell me?? |
#10
|
|||
|
|||
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 if ($jointime < 1) { // User has been a member for less than one day. $postsperday = "$userinfo[posts]"; } else { $postsperday = sprintf("%.2f",($userinfo[posts] / $jointime)); } Can anyone help -Brian |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|