vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Putting Real Name in Postbit? (https://vborg.vbsupport.ru/showthread.php?t=94570)

Joe Gronlund 08-18-2005 04:51 PM

Putting Real Name in Postbit?
 
How do i go about putting the real name field in postbit?
Also is there a way to search for posts, just with images in them?

Thanks for any help you can provide..

Joe

Chris_D 08-18-2005 05:02 PM

Wrong forum mate...

I'm pretty sure there's a hack you can download for this anyway, I'll have a look.

Joe Gronlund 08-18-2005 05:22 PM

Quote:

Originally Posted by Chris_D
Wrong forum mate...

I'm pretty sure there's a hack you can download for this anyway, I'll have a look.

Hmm, i searched for real name hack, got alot of results, but no hack.. :ermm:

Chris_D 08-18-2005 05:29 PM

This forum uses it.

Looks like there's a field in the profile where a user can specify their real name. It can also be prompted on registration. I guess if you look at the postbit template, and try and work out from there how people's locations get shown then you could turn it into a Real Name hack yourself.

If I spent 3 hours on it a novice like myself might be able to work it out :p If I get time I'll have a look.

Joe Gronlund 08-18-2005 05:38 PM

Ok thanks,, appreciate it :)

Joe

Chris_D 08-18-2005 05:49 PM

Actually, that's so easy it's unbelievable. I just did it :)

I don't know if it can be done with hooks or plugins or whatever (I don't know how to make them) but it can be done with a template edit.

1) Go to AdminCP > User Profile Manager > Add New User Profile Field > Single Line Text Box and Set the options as follows:

Title: Real Name
Description: Enter your Real Name here
(might as well leave all the other options default)

2) Click on Save and when you get taken to the User Profile Manager, make a note of what name it's been given (field5, field6, field7 etc.)

3) Go to Languages & Phrases > Phrase Manager > Add New Phrase > Set this up as follows:

Phrase Type: Global
Product: vBulletin
Varname: real_name
Test: Real Name

Click on Save

4) Go to Styles & Templates > Style Manager > Select Edit Templates from the All Style Options drop-down box > Find the postbit template > Look for:

PHP Code:

<if condition="$post['field2']">
<
div>$vbphrase[location_perm]: $post[field2]</div>
</if> 

Below this add the following:

PHP Code:

<if condition="$post['fieldX']">
<
div>$vbphrase[real_name]: $post[fieldX]</div>
</if> 

Where X is whatever number in the Profile Field Manager (e.g. field5 or field6 etc.

Then all you need to do is save!

Job's a good-un.

EDIT: You might also want to do the same for postbit_legacy template as well.

Joe Gronlund 08-18-2005 07:20 PM

Looks good,, thanks :)

I will do it later tonight..

Chris_D 08-22-2005 08:05 PM

Did you get this working Joe?

Boofo 08-22-2005 08:26 PM

It works. It's the same thing I used on 3.0, too. ;)

amykhar 08-22-2005 08:30 PM

Yep. Vbulletin.org has been using it here since I suggested it ages ago :D


All times are GMT. The time now is 06:54 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.01028 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_php_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