The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Letter counter
First of all, I want to apologize for my horrible English.
Now, my request. Alongside the post counter, I want a letter counter for my postbit template. Well, I'm not good at this stuff, that's why I'm posting a request, but I believe it shouldn't be too hard to do. A new column in the post table, one in the user table, some changes to newreply.php, newthread.php, showthread.php and probably member.php. Hm. It's probably hard to count the letters in existing posts, but maybe someone can come up with an addition to the "Update Counters" thingie. Anyone interested? |
#2
|
||||
|
||||
you can try that:
open functions.php find: PHP Code:
PHP Code:
|
#3
|
|||
|
|||
Hmm. Haven't tried it yet, but it seems surprisingly simple.
My explanation was probably too inaccurate. I want a letter counter for all posts a member has written, not just the current one. Well, going to try that now. |
#4
|
|||
|
|||
Nope, that's not what I'm looking for. Amazing nonetheless.
|
#5
|
||||
|
||||
ah ok, missunderstood...
yes you're right then you have to add a field to user-table called letters then open newreply.php and newthread.php find: PHP Code:
PHP Code:
|
#6
|
|||
|
|||
Hmm ... and editpost.php?
|
#7
|
||||
|
||||
that's a bit more complicated...
also if you want to get all old posts involved... at first open editpost find this: PHP Code:
PHP Code:
Code:
<input type="hidden" name="postlen" value="$postinfo[len]"> Code:
<input type="hidden" name="postid" value="$postid"> after PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
#8
|
|||
|
|||
*starts implementing*
|
#9
|
||||
|
||||
this is interesting...
*bookmarks thread* - miSt |
#10
|
||||
|
||||
If you are trying to calculate the total number of characters a user posted to your board, maybe you can find this easier to adopt. Basically 1 SQL query can calculate it easily:
SELECT SUM(LENGTH(pagetext)) FROM `post` WHERE userid=X You can integrate it to vb like: PHP Code:
One obvious advantage of making a dynamic query is that the number returned will be always up to date after message editing, deleting etc. Enjoy.. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|