vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Profile Enhancements - Enhanced "Location" and "Mobile" Fields in Profile (https://vborg.vbsupport.ru/showthread.php?t=173678)

veenuisthebest 03-20-2008 10:00 PM

Enhanced "Location" and "Mobile" Fields in Profile
 
**************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 !!


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

veenuisthebest 03-22-2008 11:36 PM

hey guys, please click INSTALL if you download !!

I know you liked the Phone and Country list.. :D

GTX2 04-13-2008 09:48 AM

installed ;)
i run a mobile phone discussion forum, for me the phone list is very useful ;)

Shaheen 04-18-2008 07:38 PM

nice hack but what about the members who already have their location .
Do they need to set it again or no ?

veenuisthebest 04-28-2008 06:12 PM

yess.. they have to set it again !! coz you are deleting the default Location field..

Alfa1 06-28-2008 11:10 AM

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.

veenuisthebest 06-28-2008 11:46 AM

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

mpoorrajab 10-22-2009 07:40 PM

Hey.
ty for this great hack https://vborg.vbsupport.ru/external/2009/11/19.gif
but i only want that Part for Cell-Phones.
is there any way?
ty very much https://vborg.vbsupport.ru/external/2009/10/5.gif


All times are GMT. The time now is 07:53 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.01120 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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