Log in

View Full Version : Change post count to text permanently?


gnosisprod
10-15-2009, 09:46 PM
I'm not sure if there's a hack out there or not but I want to change the post count for just the administrator account to actual letters and have it display that permanently. How would I go about doing that?

Lynne
10-15-2009, 10:05 PM
Just put a condition around it in the postbit.

<if condition="$post['userid'] == x">
LETTERS
<else />
normal code from postbit
</if>

doa24uk
10-15-2009, 10:11 PM
Just put a condition around it in the postbit.

<if condition="$post['userid'] == x">
LETTERS
<else />
normal code from postbit
</if>


Not sure that's what he meant Lynne...


-------



There is no default way to change numbers to text in php - therefore have a look at this script -->

http://www.gregmaclellan.com/php/numbertotext.phps

Demo here --> http://www.gregmaclellan.com/php/numbertotext.php

Then you'll have to integrate that into VB

Basically, not an easy task if you're not familiar with php....

Unless of course you're simply wanting to take one value ... ie. Post Count = 1211

And PERMANENTLY display Post Count = One Thousand Two Hundred and Eleven

but if you want the text to increment with each post count then the script I provided above is your only answer.

gnosisprod
10-15-2009, 10:33 PM
I meant simply like putting a word or two there with it never changing. Under post count it would say something like 'doesn't matter'.

doa24uk
10-15-2009, 10:34 PM
Oh well Lynne's solution is what you need.

Sorry Lynne :)

gnosisprod
10-15-2009, 10:40 PM
I'm fooling around in the postbit but I'm not sure exactly where to put this.

--------------- Added 1255710669 at 1255710669 ---------------

If someone could point me in the right direction it would be appreciated.

gnosisprod
12-07-2009, 05:30 AM
I'm still having a bit of trouble with this. I'm not sure exactly where to add lynne's code at in the postbit. Am I supposed to edit the code you posted and enter my user id in the 'userid' part and then change my postcount to letters in the vbulletin users setup?

I haven't fooled around with vbulletin too much as you can see :P

ChopSuey
12-07-2009, 06:00 AM
I think theres a mod here that changes it to Roman Numerals, sounds cool.

Lynne
12-07-2009, 02:39 PM
Find the area in the postbit (or postbit_legacy) that you want to modify, then replace with this:
<if condition="$post['userid'] == x">
LETTERS
<else />
normal code from postbit that you wanted to modify
</if>

Change 'x" to the userid of the person you want to just display text for.

gnosisprod
12-07-2009, 06:04 PM
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
$template_hook[postbit_userinfo_right_after_posts]
<if condition="$show['infraction']">

This is the code I've found. I'm thinking that the part I want to modify is:

<div>
$vbphrase[posts]: $post[posts]
</div>

I'm probably doing this wrong. Also I'm not sure if I'm supposed to replace LETTERS with the custom text that I want, and exactly what's supposed to go in the 'normal code from postbit' part.

Lynne
12-07-2009, 06:10 PM
Just replace this:
$vbphrase[posts]: $post[posts]

With this:
<if condition="$post['userid'] == x">
LETTERS
<else />
$vbphrase[posts]: $post[posts]
</if>

I have no idea what "LETTERS" should be as you never said - you just said you want to replace it with "actual letters".

ChopSuey
12-07-2009, 07:47 PM
Wow Lynne posted the same thing three times.

gnosisprod
12-14-2009, 12:48 AM
Very sorry for all of the confusion but this kind of stuff isn't my profession :)

I've now figured it out. For some reason entering my user id didn't work. I had to change it to the number 1. Not sure if that's what was meant by userid in the first place, but it's working now :)