View Full Version : Real Name in Postbit
Mike Gaidin
05-24-2003, 10:00 PM
Tested and installed on vBulletin 2.3.0
Created for vBulletin v2.3.0, but should work in most versions of vBulletin.
ALL CREDIT AND CODING FOR THIS MODIFICATION GO TO BOOFO. I AM JUST RELEASING THIS WITH HIS PERMISSION.
The original request for this hack can be found here...
https://vborg.vbsupport.ru/showthread.php?s=&threadid=53343
What it does is give a forum member the option to enter their real name into their profile options in the USER CP
and have it show up in the postbit if the information was entered. If no name is entered none of the real name info
will show up in the postbit.
Files to edit: (1) functions.php
Templates to edit: (1) postbit
Install time: 1 minute.
I know this is nothing major and most people probably already knew how to do this. Well, I didn't know and with Boofo's help I do now so I want to release this for those who want it and don't know how. :)
Thanks Boofo.
Erwin
05-25-2003, 03:38 AM
Similar to what we have here at vB.org :)
gmarik
05-25-2003, 07:53 AM
Mike, the one I was looking for. Got it rolling...
Chris M
05-25-2003, 09:36 AM
Nice - I have it installed on my forums:)
Satan
msimplay
05-25-2003, 11:52 AM
its another hack that should have been there by default
Mike Gaidin
05-25-2003, 12:55 PM
Today at 12:38 AM Erwin said this in Post #2 (https://vborg.vbsupport.ru/showthread.php?postid=399668#post399668)
Similar to what we have here at vB.org :)
That was my inspiration, Erwin. :) I didn't see it anywhere and I liked the idea.
Logik
05-25-2003, 05:44 PM
all you gotta do is make another profile field.. and include it in the postbit. Or is that what this does? lol i didnt download it.
Good idea
/me clicks install
/me also installs it
Mike Gaidin
05-25-2003, 06:33 PM
Today at 02:44 PM Logik said this in Post #7 (https://vborg.vbsupport.ru/showthread.php?postid=399906#post399906)
all you gotta do is make another profile field.. and include it in the postbit. Or is that what this does? lol i didnt download it.
If you just create a profile field and stick it in the postbit it will still show Real Name: whether a person has a name or not. This was makes it so if a person does not enter their name the Real Name: part won't show in the postbit.
S.Shady
05-25-2003, 07:31 PM
Today at 02:44 PM Logik said this in Post #7 (https://vborg.vbsupport.ru/showthread.php?postid=399906#post399906)
all you gotta do is make another profile field.. and include it in the postbit. Or is that what this does? lol i didnt download it.
I was gonna say this aswell untill i looked at the install and seen exacltly what the file edit did. :)
ranger2kxlt
05-28-2003, 04:42 AM
I made it so i could have it as a template instead... therefor making it easier to edit if i ever needed to.
Hope you dont mind me adding this...
*Note... you need to have installed the hack before adding this.
## in admin/functions.php
Find:
if ($post[fieldX]!="") {
$realname="<smallfont>Name: <b>$post[fieldX]</b></smallfont><br>";
} else {
$realname="";
}
Change to:
if ($post[fieldX]!="") {
eval("\$realname = \"".gettemplate("postbit_realname")."\";");
} else {
$realname="";
}
Now create the template called postbit_realname and add the following:
<smallfont>Name: <b>$post[fieldX]</b></smallfont><br>
I just think the above makes it easier to edit if you ever needed to. Enjoy.
Lethal
05-28-2003, 04:51 AM
I like this, but I also want it to show up in the members profile like here at vb.org. Is that a hack here?
Boofo
05-28-2003, 05:26 AM
Today at 12:42 AM ranger2kxlt said this in Post #11 (https://vborg.vbsupport.ru/showthread.php?postid=400968#post400968)
I made it so i could have it as a template instead... therefor making it easier to edit if i ever needed to.
Hope you dont mind me adding this...
*Note... you need to have installed the hack before adding this.
## in admin/functions.php
Find:
if ($post[fieldX]!="") {
$realname="<smallfont>Name: <b>$post[fieldX]</b></smallfont><br>";
} else {
$realname="";
}
Change to:
if ($post[fieldX]!="") {
eval("\$realname = \"".gettemplate("postbit_realname")."\";");
} else {
$realname="";
}
Now create the template called postbit_realname and add the following:
<smallfont>Name: <b>$post[fieldX]</b></smallfont><br>
I just think the above makes it easier to edit if you ever needed to. Enjoy.
If you do not add the template to the templatesused line, you will create another query doing it this way.
I'm curious, what would you ever need to edit with this? You only have "Name:" to deal with. ;)
Erwin
05-28-2003, 05:40 AM
Today at 03:42 PM ranger2kxlt said this in Post #11 (https://vborg.vbsupport.ru/showthread.php?postid=400968#post400968)
I made it so i could have it as a template instead... therefor making it easier to edit if i ever needed to.
Hope you dont mind me adding this...
*Note... you need to have installed the hack before adding this.
## in admin/functions.php
Find:
if ($post[fieldX]!="") {
$realname="<smallfont>Name: <b>$post[fieldX]</b></smallfont><br>";
} else {
$realname="";
}
Change to:
if ($post[fieldX]!="") {
eval("\$realname = \"".gettemplate("postbit_realname")."\";");
} else {
$realname="";
}
Now create the template called postbit_realname and add the following:
<smallfont>Name: <b>$post[fieldX]</b></smallfont><br>
I just think the above makes it easier to edit if you ever needed to. Enjoy.
If you do that, you are adding 1 extra query to showthread. To save this query, you need to cache that template. Make sure you edit "showthread.php", find:
$templatesused="
And change it to:
$templatesused="postbit_realname,
Boofo
05-28-2003, 05:55 AM
Isn't that what I basically said in this?
If you do not add the template to the templatesused line, you will create another query doing it this way.
ranger2kxlt
05-28-2003, 05:57 AM
Today at 12:51 AM Lethal said this in Post #12 (https://vborg.vbsupport.ru/showthread.php?postid=400971#post400971)
I like this, but I also want it to show up in the members profile like here at vb.org. Is that a hack here?
It will automatically do this.
ranger2kxlt
05-28-2003, 06:16 AM
Today at 01:40 AM Erwin said this in Post #14 (https://vborg.vbsupport.ru/showthread.php?postid=400982#post400982)
If you do that, you are adding 1 extra query to showthread. To save this query, you need to cache that template. Make sure you edit "showthread.php", find:
$templatesused="
And change it to:
$templatesused="postbit_realname,
Thanks i didnt realize that... infact i editted my functions.php and took my things out of templates and cut back on 4 queries... Very nice.
Mike Gaidin
05-28-2003, 08:00 PM
Today at 01:51 AM Lethal said this in Post #12 (https://vborg.vbsupport.ru/showthread.php?postid=400971#post400971)
I like this, but I also want it to show up in the members profile like here at vb.org. Is that a hack here?
There isn't a hack for that. Just make the profile field that is created for this hack viewable in the profile.
Ryan Ashbrook
05-28-2003, 09:39 PM
Nice hack, thank god it's incredibly small. lol ^^;
dbirosel
04-07-2007, 05:31 PM
i can't find this code in functions.php. how do i get this to work with 3.6.5?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.