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)

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 01:32 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.01431 seconds
  • Memory Usage 1,773KB
  • 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
  • (6)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