The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Sample:
Total Threads: 1,500 (1.57 Threads Per Day) hi guys.... need help here please...is it posssible to have or show this besides users total thread? like we use to have on the side of our users total post average post per day....that can show to profile page or postbit legacy is there any particular variables or any mod, addons any plugins i might need to make it happen? please appreciate any help or guide on this...tried already to search but no luck ![]() |
#2
|
||||
|
||||
![]()
Find the template (memberinfo_block_statistics), look in the template to find the variable used ($prepared[postsperday]), search in your files to find where 'postsperday' is defined (class_postbit.php and class_userprofile.php) and copy the code to a plugin or whatever you are using that info.
|
#3
|
||||
|
||||
![]()
...using vb3.8.4 here..
thanks a bunch Lynne..as always good to have you here at all times....well actually got no idea about much on this if you can guide assist me more pleaseif its not that much for your time at all... took this code from my both files ...hope its the right one....but no idea now what's the next step... ![]() ![]() class_userprofile.php Code:
* Prepares the User's Posts Per Day * */ function prepare_postsperday() { $jointime = (TIMENOW - $this->userinfo['joindate']) / 86400; // Days Joined if ($jointime < 1) { // User has been a member for less than one day. $postsperday = vb_number_format($this->userinfo['posts']); } else { $postsperday = vb_number_format($this->userinfo['posts'] / $jointime, 2); } $this->prepared['postsperday'] = $postsperday; } /** class_postbit.php Code:
// get join date & posts per day $jointime = (TIMENOW - $this->post['joindate']) / 86400; // Days Joined if ($jointime < 1) { // User has been a member for less than one day. $this->post['postsperday'] = $this->post['posts']; } else { $this->post['postsperday'] = vb_number_format($this->post['posts'] / $jointime, 2); } $this->post['joindate'] = vbdate($this->registry->options['registereddateformat'], $this->post['joindate']); // format posts number |
#4
|
||||
|
||||
![]()
Before you do anything, you need to decide where you are going to use it (what page? what template?), then look in the code and find which hook location is best for you, find that hook location in the code and see what variable names are available for you to use, and then think about taking that code and writing it for use. Until you decide where you are going to use it and what hook is best, you really can't do much else.
|
#5
|
||||
|
||||
![]() Quote:
but really can't figure it out how am i gonna do this ![]() |
#6
|
||||
|
||||
![]()
Those are just templates. Now you need to find where those templates are evaled in the code and pick a hook location prior to them being evaled. If you have your test site in debug mode, then just look at the bottom of the page and see all the hook locations and go into the code and see where they are and if they are a good one for you.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|