Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Real Name in Postbit Details »»
Real Name in Postbit
Version: 1.00, by Mike Gaidin Mike Gaidin is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 05-24-2003 Last Update: Never Installs: 12
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-28-2003, 04:42 AM
ranger2kxlt ranger2kxlt is offline
 
Join Date: Jan 2003
Location: Plano, TX
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #13  
Old 05-28-2003, 04:51 AM
Lethal Lethal is offline
 
Join Date: Feb 2002
Location: PA/USA
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #14  
Old 05-28-2003, 05:26 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #15  
Old 05-28-2003, 05:40 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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, 
Reply With Quote
  #16  
Old 05-28-2003, 05:55 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #17  
Old 05-28-2003, 05:57 AM
ranger2kxlt ranger2kxlt is offline
 
Join Date: Jan 2003
Location: Plano, TX
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #18  
Old 05-28-2003, 06:16 AM
ranger2kxlt ranger2kxlt is offline
 
Join Date: Jan 2003
Location: Plano, TX
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #19  
Old 05-28-2003, 08:00 PM
Mike Gaidin's Avatar
Mike Gaidin Mike Gaidin is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #20  
Old 05-28-2003, 09:39 PM
Ryan Ashbrook's Avatar
Ryan Ashbrook Ryan Ashbrook is offline
 
Join Date: Dec 2002
Location: Cincinnati, Ohio
Posts: 422
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack, thank god it's incredibly small. lol ^^;
Reply With Quote
  #21  
Old 04-07-2007, 05:31 PM
dbirosel dbirosel is offline
 
Join Date: Feb 2007
Location: San Diego
Posts: 587
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i can't find this code in functions.php. how do i get this to work with 3.6.5?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:45 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09098 seconds
  • Memory Usage 2,339KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (13)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete