vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Change post count to text permanently? (https://vborg.vbsupport.ru/showthread.php?t=225322)

gnosisprod 10-15-2009 09:46 PM

Change post count to text permanently?
 
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.

HTML Code:

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


doa24uk 10-15-2009 10:11 PM

Quote:

Originally Posted by Lynne (Post 1900574)
Just put a condition around it in the postbit.

HTML Code:

<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 [DATE]1255710669[/DATE] at [TIME]1255710669[/TIME] ---------------

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:
HTML Code:

<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

HTML Code:

<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:

HTML Code:

<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.


All times are GMT. The time now is 02:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01170 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete