The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Posts Per Day in POSTBIT
Can someone tell me how to add Posts Per Day in POSTBIT, just under "Posts" ? I need to know the code and exactly where to put it in POSTBIT. Thanks.
|
#3
|
|||
|
|||
Yes I did. At vBulletin.com too. All the suggestions found are for vBulletin 3 only. And indeed I was able to display the info when we were with vBulletin 3. But not with vBulletin 4.
|
#4
|
||||
|
||||
Did you try to convert the mod to vb4 at all? It should only be a matter of changing the template and template rendering, I would think. (I'm also surprised it doesn't already exist because I thought I saw it.)
|
#5
|
||||
|
||||
I'm not up with rendering stuff in vb4 properly but you can use (untested) this kind of query and use the hook postbit_complete in a plugin
PHP Code:
|
Благодарность от: | ||
CAG CheechDogg |
#6
|
||||
|
||||
@ Simon - how about adding it to postbit_legacy?
|
#7
|
||||
|
||||
It would be the same, you're simply using the variable $mpsts, like I said I don't know whether you can use that variable raw in vb4 or not (i'm sure Lynne will chip in (please!!)), also remember I haven't tested it, I just wrote it in notepad and plopped it in here
I should of also said you should use $mpsts = round($jd/$mpostdays['posts'] (that shouldn't be a smiley it should be ; followed be )) instead of $mpsts = $jd/$mpostdays['posts']; |
#8
|
|||
|
|||
Where do I put it in postbit_legacy ?
|
#9
|
|||
|
|||
I hope you don't mind if I add a few suggestions: the post author's posts and joindate (joindateline) are already available, so you don't need a query. You could use the template hook postbit_userinfo_right_after_posts so that you don't need to edit the template. So maybe something like this (using postbit_display_complete):
Code:
if (($days = round((TIMENOW-$post['joindateline']) / 86400)) <= 0) { $days = 1; } $ppd = round($post['posts'] / $days, 2); $template_hook['postbit_userinfo_right_after_posts'] .= "<dt>Posts Per Day</dt><dd>$ppd</dd>"; There is a phrase that says "Posts Per Day" but it isn't loaded for the showthread page, so if you need phrases or would rather use one, you'd have to load the 'user' phrases, or just create a new phrase using the 'postbit' phrase type. |
2 благодарности(ей) от: | ||
CAG CheechDogg, Simon Lloyd |
#10
|
||||
|
||||
It's a plugin so it doesn't go in a template
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|