Member Location - Chosen from a Drop Down Menu List. UK Counties and Countries*
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
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 -->
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. THATS 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
County and Country OPTIONS.txt (2.1 KB, 79 downloads) Screenshots |