vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Real Name in Postbit (https://vborg.vbsupport.ru/showthread.php?t=53353)

Mike Gaidin 05-24-2003 10:00 PM

Real Name in Postbit
 
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/showthrea...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

Quote:

Today at 12:38 AM Erwin said this in Post #2
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.

Dan 05-25-2003 06:28 PM

Good idea

/me clicks install

/me also installs it

Mike Gaidin 05-25-2003 06:33 PM

Quote:

Today at 02:44 PM Logik said this in Post #7
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

Quote:

Today at 02:44 PM Logik said this in Post #7
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:
PHP Code:

if ($post[fieldX]!="") {
            
$realname="<smallfont>Name: <b>$post[fieldX]</b></smallfont><br>";
        } else {
            
$realname="";
        } 

Change to:
PHP Code:

if ($post[fieldX]!="") {
            eval(
"\$realname = \"".gettemplate("postbit_realname")."\";");
        } else {
            
$realname="";
        } 


Now create the template called postbit_realname and add the following:

PHP Code:

<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

Quote:

Today at 12:42 AM ranger2kxlt said this in Post #11
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:
PHP Code:

if ($post[fieldX]!="") {
            
$realname="<smallfont>Name: <b>$post[fieldX]</b></smallfont><br>";
        } else {
            
$realname="";
        } 

Change to:
PHP Code:

if ($post[fieldX]!="") {
            eval(
"\$realname = \"".gettemplate("postbit_realname")."\";");
        } else {
            
$realname="";
        } 


Now create the template called postbit_realname and add the following:

PHP Code:

<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

Quote:

Today at 03:42 PM ranger2kxlt said this in Post #11
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:
PHP Code:

if ($post[fieldX]!="") {
            
$realname="<smallfont>Name: <b>$post[fieldX]</b></smallfont><br>";
        } else {
            
$realname="";
        } 

Change to:
PHP Code:

if ($post[fieldX]!="") {
            eval(
"\$realname = \"".gettemplate("postbit_realname")."\";");
        } else {
            
$realname="";
        } 


Now create the template called postbit_realname and add the following:

PHP Code:

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

PHP Code:


$templatesused
=


And change it to:

PHP Code:


$templatesused
="postbit_realname, 


Boofo 05-28-2003 05:55 AM

Isn't that what I basically said in this?

Quote:

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

Quote:

Today at 12:51 AM Lethal said this in Post #12
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

Quote:

Today at 01:40 AM Erwin said this in Post #14
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:

PHP Code:


$templatesused
=


And change it to:

PHP Code:


$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

Quote:

Today at 01:51 AM Lethal said this in Post #12
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?


All times are GMT. The time now is 05:18 AM.

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.01213 seconds
  • Memory Usage 1,789KB
  • 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
  • (13)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete