Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Member Location - Chosen from a Drop Down Menu List. UK Counties and Countries* Details »»
Member Location - Chosen from a Drop Down Menu List. UK Counties and Countries*
Version: 1.00, by Welshy2008 Welshy2008 is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.4 Rating:
Released: 07-13-2010 Last Update: 07-13-2010 Installs: 10
Template Edits
Re-useable Code Code Changes Translations  
No support by the author.

What is it?

I made this small Mod which adds a User Profile Field to to a Member's Posbit (or Posbit_Legacy, should you choose to place it there) called 'Location'.

I have searched the net and compiled a list of UK and Ireland's Counties, and Manually typed them into a "text Document". There are also some of the most popular Countries (worldwide) too. *Should you wish to use the FULL worldwide Country List, please use the text file from my "Country Flags" Mod.

I have set this up as a Non-Compulsory field. The reason that I have done this Mod is that I am stopping Members from manually entering silly names of places/countries, where they aren't even in or from.

By doing it this way, should a member 'Want' to display their loctation, all they have to do is to select theie location from the options that you have added, for them to choose from (drop down menu). If they do not wish to display their location, then all they have to do is to select the first option (blank) and nothing with show - Not even the word 'Location'.


How do I do this?

This really is a simple installation and I have included plenty of Screenshots for you too. As always, before making any template change, I would recommend that you do a 'Back Up' of your forum, and test on a Test Forum, before going Live.

I have made and tested this for the vB4.0.4.


Instructions:


Admin Control Panel (ACP) -> User Profile Field -> Add new user profile field -> Profile Field Type -> Single-Selection Menu (from the drop down menu) -> Press ?Continue?.

Please see image "1 Single-Selection_Menu.JPG", below - for a screenshot of this.


User Profile Field
  • Title: Location
  • Description: Please enter the County that you Currently live in.
  • Profile Field Category: Uncatagorized
  • Options: Please Copy & Past ALL of the contents of the attached "County and Country OPTIONS.txt" file
  • Set Default: Yes, Including a First Blank Option
  • Display Order: (Chosen By You)
  • Field Required: No (I have made this Not Compulsory, to my Members)
  • Field Editable By User: Yes
  • Private Field: No
  • Field Searchable On Members List: Yes
  • Show On Members List: Yes
Optional Output:
  • Allow User to input their own value for this option: No
  • Max length of allowed user input: 100
  • Field Length: 25
  • Regular Expression: Leave this EMPTY
Display Page:
  • Which page displays this option? Edit Profile
SAVE & Note the ?field? number as you need to replace the ?X? with it in the two positions (2) containing ?fieldX?

Please see image "2 USER_PROFILE_FIELD_SCREENSHOT.JPG", Below - for a screenshot of this.


Next, we need to Make a Template change. I use Postbit, and because of which, this is how I have done this Mod. If you use Posbit_Legacy, it will work in there too.


Admin Control Panel (ACP) -> Styles and Templates -> Style Manager -> (style that you use ? Mine is ?Default Style?) -> << >> -> Postbit
Templates -> Postbit (or Postbit _legacy, depending on which one YOU use)

Find:

Code:
                        <vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}:</dt> <dd>{vb:raw post.joindate}</dd></vb:if>

Add Below:

Code:
<!-- Wy Selectable Location in postbit Start -->
<vb:if condition="$post['fieldX']"> <dt>Location:</dt> <dd>{vb:raw post.fieldX}</dd></vb:if>
<!-- Wy Selectable Location in postbit End -->
  • Click "Save".
Please see image "4 Postbit_Screenshot1.JPG", Below - for a screenshot of this.



Please remember to replace the TWO red X's in the code, Above - with the field number from earlier. Please see image "3 Field-Number-Screenshot.JPG", below.


THAT?S IT !

This can be done when a Member Registers and When a Member Edits His or Her Profile.



To view it in your profile: Edit your Profile and choose your ?Location?.

Please Click Installed and Rate the Mod ? Many Thanks.


Support will only be offered to those who have clicked 'Installed'.

Download Now

File Type: txt County and Country OPTIONS.txt (2.1 KB, 77 views)

Screenshots

File Type: jpg 1 Single-Selection_Menu.jpg (34.4 KB, 0 views)
File Type: jpg 2 USER_PROFILE_FIELD_SCREENSHOT.jpg (95.7 KB, 0 views)
File Type: jpg 3 Field-Number-Screenshot.JPG (65.9 KB, 0 views)
File Type: jpg 4 Postbit_Screenshot1.jpg (72.2 KB, 0 views)
File Type: jpg 5.1 Edit_Profile_Screenshot1.jpg (35.4 KB, 0 views)
File Type: jpg 5.2 Edit_Profile_Screenshot2.jpg (46.6 KB, 0 views)
File Type: jpg 6 Postbit_Screensot.JPG (4.3 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 07-16-2010, 03:55 PM
COL NIL SATIS COL NIL SATIS is offline
 
Join Date: Aug 2009
Location: Liverpool UK
Posts: 802
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome !!! Thanks Welshy ,will add this now:up:
Reply With Quote
  #3  
Old 07-16-2010, 03:59 PM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're Welcome Col.
Reply With Quote
  #4  
Old 07-16-2010, 09:13 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would love to have this, but with world countries & states, instead of countries. Is anyone able to provide the text for countries and states?
Reply With Quote
  #5  
Old 07-17-2010, 08:33 AM
Welshy2008's Avatar
Welshy2008 Welshy2008 is offline
 
Join Date: Jul 2008
Location: UK
Posts: 904
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alfa1 View Post
I would love to have this, but with world countries & states, instead of countries. Is anyone able to provide the text for countries and states?
I will be unavailable from 18th - 25th July, I will have a look for you after that date. What Countries are you looking for? (It took me long enough to put this one together )
Reply With Quote
  #6  
Old 07-18-2010, 05:58 PM
COL NIL SATIS COL NIL SATIS is offline
 
Join Date: Aug 2009
Location: Liverpool UK
Posts: 802
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed and it works brilliantly ...top work Welshy thanks for this man
Reply With Quote
  #7  
Old 07-18-2010, 06:25 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Welshy2008 View Post
I will be unavailable from 18th - 25th July, I will have a look for you after that date. What Countries are you looking for? (It took me long enough to put this one together )
I run an international forum and would like my members to select from the drop down, the country they live in. My members come from all over the world, so I am looking for all countries.

There must be a list on the net somewhere, but I have not found it.
Reply With Quote
  #8  
Old 07-18-2010, 10:14 PM
COL NIL SATIS COL NIL SATIS is offline
 
Join Date: Aug 2009
Location: Liverpool UK
Posts: 802
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alfa1 View Post
I run an international forum and would like my members to select from the drop down, the country they live in. My members come from all over the world, so I am looking for all countries.

There must be a list on the net somewhere, but I have not found it.
Will check this out tomorrow man and add a full list if i have time :up:
Reply With Quote
  #9  
Old 07-19-2010, 02:53 AM
jgt58 jgt58 is offline
 
Join Date: May 2010
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yea I have something very similar except with states on www.elitestangs.com/forum
Reply With Quote
  #10  
Old 07-23-2010, 05:49 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This would be great to have.
Reply With Quote
Reply

Thread Tools

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 02:54 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.08165 seconds
  • Memory Usage 2,332KB
  • Queries Executed 24 (?)
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
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (8)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete