Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Enhanced "Location" and "Mobile" Fields in Profile Details »»
Enhanced "Location" and "Mobile" Fields in Profile
Version: 1.00, by veenuisthebest veenuisthebest is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 3.6.8 Rating:
Released: 03-20-2008 Last Update: 03-20-2008 Installs: 15
DB Changes Template Edits
Re-useable Code  
No support by the author.

**************veenuisthebest*****************
************Visit Tech6.com*****************

Enhanced "Location" and "Mobile" Fields in Profile

Difficulty: Very Easy


Q. What does it do ??

A. Replaces Location Field in Member Profile with a Single Selection Menu with all the country names listed so as to encourage users to fill up the field. Also, adds up a Mobile Field of type Single Selection Menu with almost every Mobile Phone model listed.

Q. Do I need this ??

A. You DEFINATELY should have a menu for Location field as it looks far better than a regular text field. Mobile field is yet up to you, but with this mobile selection menu, you're for sure going to attract your members.


File Changes: 0
Template Edit:
1 if you wish to show these fields in postbit.
0 if you do not wish to show these fields in postbit.


Begins here:-

1. Go to your AdminCP -> User Profile Fields -> User Profile Field Manager and simply delete the default Location Field. Do not worry, we really do not need this.

2. Now, Add New User Profile Field -> Single Selection Menu with following details:-

Title: Location
Description: Where you live
Options: Download Country List here (copy contents as it is)
Set Default: NONE
Display Order: Upto You (usually 1 or 2)
Field Required: No
Field Editable: Yes

..Leave rest as default

3. SAVE.

4. Again, Add New User Profile Field -> Single Selection Menu with following details:-

Title: Phone
Description: Which cell phone model you have
Options: Download Phone List here (copy contents as it is)
Set Default: NONE
Display Order: Upto You
Field Required: No
Field Editable: Yes

..Leave rest as default

5. SAVE.

6. Now, if you wish to show these fields in postbit, go to postbit template, and make the following minor edits:-

For COUNTRY:-

Find:-

Code:
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
Add Under:-

Code:
<!-- Location Display -->
<if condition="$post['fieldX']"><div>$vbphrase[location_perm]: $post[fieldX]</div></if>
<!-- /Location Display -->
Note:- You may find the same line of code right beneath it, simply delete it.


For PHONE:-

Paste the following lines of code below the above mentioned Location Display code:-

Code:
<!-- Phone Display -->
<if condition="$post['fieldX']"><div>Phone: $post[fieldX]</div></if>
<!-- /Phone Display -->

WAIT:- You must set fieldX to the actual field names for both Country and Mobile respectively. For this, go to User Profile Field Manager and notice the Name column.

7. DONE !!!!!!

Now, just go to Edit Profile link on your Forum and you'll find PHONE and LOCATION fields under Additional Information. Fill them up -> Save Changes.


Hope you liked my first mod, simple but useful. I am sure, you are definately going to use this..

Please click INSTALL if you find it useful !!


************************************************** *************************
************************************************** *************************

Show Your Support

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

Comments
  #2  
Old 03-22-2008, 11:36 PM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey guys, please click INSTALL if you download !!

I know you liked the Phone and Country list..
Reply With Quote
  #3  
Old 04-13-2008, 09:48 AM
GTX2 GTX2 is offline
 
Join Date: May 2006
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed
i run a mobile phone discussion forum, for me the phone list is very useful
Reply With Quote
  #4  
Old 04-18-2008, 07:38 PM
Shaheen's Avatar
Shaheen Shaheen is offline
 
Join Date: Nov 2006
Location: Melbourne
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack but what about the members who already have their location .
Do they need to set it again or no ?
Reply With Quote
  #5  
Old 04-28-2008, 06:12 PM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yess.. they have to set it again !! coz you are deleting the default Location field..
Reply With Quote
  #6  
Old 06-28-2008, 11:10 AM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to show the old location value, when a member has not updated the new location field?

This hack doesn't seem to work for profiles and other parts of vbulletin.
Reply With Quote
  #7  
Old 06-28-2008, 11:46 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Is there a way to show the old location value, when a member has not updated the new location field?
Not with this hack atleast, coz you're just creating few profile fields.

Quote:
This hack doesn't seem to work for profiles and other parts of vbulletin.
What other parts ?

It works for me in my profile, posts and all other areas (vb 3.7)
http://tech6.com/member.php?u=1
Reply With Quote
  #8  
Old 10-22-2009, 07:40 PM
mpoorrajab's Avatar
mpoorrajab mpoorrajab is offline
 
Join Date: Mar 2007
Location: Internet
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey.
ty for this great hack
but i only want that Part for Cell-Phones.
is there any way?
ty very much
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 11:16 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.04379 seconds
  • Memory Usage 2,278KB
  • Queries Executed 21 (?)
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
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete