Version: 1.00, by Welshy2008
Developer Last Online: Mar 2013
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)
<!-- 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'.
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.