Location on registration

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17137
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Location on registration

Post by DavidIQ »

You're missing an edit in exactly that area. Please go back to the install.xml file and check the very first edit you were to make to that file and you'll find what you're missing.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17137
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Location on registration

Post by DavidIQ »

JohninLA wrote:Where in the template file do I add this?

Thanks!
Open up your styles/prosilver/template/ucp_register.html file and find this (code added by this MOD):

Code: Select all

	<dl>
		<dt><label for="tz">{L_LOCATION}:</label></dt>
		<dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox autowidth" /></dd>
	</dl>
Just add the asterisk (*) to just before {L_LOCATION} and refresh your template.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

syclone
Registered User
Posts: 37
Joined: Sun Oct 24, 2004 12:58 am
Location: Sweden
Contact:

Re: Location on registration

Post by syclone »

DavidIQ wrote:You're missing an edit in exactly that area. Please go back to the install.xml file and check the very first edit you were to make to that file and you'll find what you're missing.
Thanks a million, don't understand how i could miss that doh!!! Must have been in my edit program that i forgot to save before upload. :oops: :oops:
This post may contain misspellings, grammatical errors, disorganized sentence structure, or may entirely lack a coherent theme. These elements are natural to the process of writing, and will only add to the overall beauty of the post / Eric Hjelte

syclone
Registered User
Posts: 37
Joined: Sun Oct 24, 2004 12:58 am
Location: Sweden
Contact:

Re: Location on registration

Post by syclone »

DavidIQ wrote:
JohninLA wrote:Where in the template file do I add this?

Thanks!
Open up your styles/prosilver/template/ucp_register.html file and find this (code added by this MOD):

Code: Select all

	<dl>
		<dt><label for="tz">{L_LOCATION}:</label></dt>
		<dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox autowidth" /></dd>
	</dl>
Just add the asterisk (*) to just before {L_LOCATION} and refresh your template.
Asterisk before the first or second {L_LOCATION} ?
This post may contain misspellings, grammatical errors, disorganized sentence structure, or may entirely lack a coherent theme. These elements are natural to the process of writing, and will only add to the overall beauty of the post / Eric Hjelte

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17137
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Location on registration

Post by DavidIQ »

Look again...there's only one of them there ;)
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

Fridge
Registered User
Posts: 307
Joined: Sat Nov 11, 2006 1:41 am
Location: Rotterdam, The Netherlands
Name: Martin
Contact:

Re: Location on registration

Post by Fridge »

Hi DavidIQ,

Love this handy modification, easy install and working perfect :)

Just a small style remark, i've changed this add a bit so the textbox is the same size as the others in the registration form.

Code: Select all

	<dl>
		<dt><label for="tz">{L_LOCATION}:</label></dt>
		<dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox autowidth" /></dd>
	</dl>
changed to:

Code: Select all

	<dl>
		<dt><label for="tz">{L_LOCATION}:</label></dt>
		<dd><input type="text" name="location" id="location" size="25" maxlength="255" value="{LOCATION}" class="inputbox autowidth" /></dd>
	</dl>

syclone
Registered User
Posts: 37
Joined: Sun Oct 24, 2004 12:58 am
Location: Sweden
Contact:

Re: Location on registration

Post by syclone »

DavidIQ wrote:Look again...there's only one of them there ;)
Doh!!!! :roll: :roll: I'm just an idiot ;) but in my defens......it was 11.54PM last night i posted.
This post may contain misspellings, grammatical errors, disorganized sentence structure, or may entirely lack a coherent theme. These elements are natural to the process of writing, and will only add to the overall beauty of the post / Eric Hjelte

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17137
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Location on registration

Post by DavidIQ »

Fridge wrote:Hi DavidIQ,

Love this handy modification, easy install and working perfect :)

Just a small style remark, i've changed this add a bit so the textbox is the same size as the others in the registration form.

Code: Select all

	<dl>
		<dt><label for="tz">{L_LOCATION}:</label></dt>
		<dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox autowidth" /></dd>
	</dl>
changed to:

Code: Select all

	<dl>
		<dt><label for="tz">{L_LOCATION}:</label></dt>
		<dd><input type="text" name="location" id="location" size="25" maxlength="255" value="{LOCATION}" class="inputbox autowidth" /></dd>
	</dl>
I thought about that. If I ever have a reason to resubmit this I'll make that change. Thanks :)
syclone wrote:Doh!!!! :roll: :roll: I'm just an idiot ;) but in my defens......it was 11.54PM last night i posted.
:lol: It's ok...happens to all of us.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

JohninLA
Registered User
Posts: 207
Joined: Thu Oct 10, 2002 1:14 pm
Location: Los Angeles, CA

Re: Location on registration

Post by JohninLA »

DavidIQ wrote:
JohninLA wrote:Where in the template file do I add this?

Thanks!
Open up your styles/prosilver/template/ucp_register.html file and find this (code added by this MOD):

Code: Select all

	<dl>
		<dt><label for="tz">{L_LOCATION}:</label></dt>
		<dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox autowidth" /></dd>
	</dl>
Just add the asterisk (*) to just before {L_LOCATION} and refresh your template.
Thank you for this info. I knew it would be in the template file, but I tried adding it in the name="location" field, which didn't work. I appreciate the help.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17137
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Location on registration

Post by DavidIQ »

Just change this:

Code: Select all

{L_LOCATION}
to this:

Code: Select all

*{L_LOCATION}
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

outerphilly
Registered User
Posts: 9
Joined: Wed Mar 25, 2009 12:05 am

Re: Location on registration

Post by outerphilly »

I just installed this MOD and it works great!! Thank you very much for posting this!!

PaulW
Registered User
Posts: 29
Joined: Sun Sep 15, 2002 2:45 am
Location: Norton, Ohio
Contact:

Custom Profile Approach

Post by PaulW »

Instead of making the change to .../template/ucp_register.html as suggested, I took the custom profile field approach. [All changes to the .php files were made as per the mod.] That way I didn't need to make the same change to all the templates I am using. As a result, the location is stored in profile_fields_data.pf_location. Since I already had locations stored in the standard location field in the Control Panel, I needed to copy the location data from users.user_from to profile_fields_data.pf_location. Here's two SQL queires that I used in phpMyAdmin (Obviously, run query 1 before query 2):

Query 1. Copy the field contents:

Code: Select all

UPDATE `users` INNER JOIN `profile_fields_data` ON `users`.`user_id` = `profile_fields_data`.`user_id` SET `profile_fields_data`.`pf_location` = `users`.`user_from`;
Query 2. Delete the contents from user.usr_from:

Code: Select all

UPDATE `users` SET `users`.`user_from` = NULL;
Note: If you called your custom profile field something other than location, such as 'customlocation', the profile field references above will be 'pf_customlocation' (or pf_whateveryounamedit).

I then wanted to remove the default Location field from the Control Panel, so I ended up editing the templates after all. Searched for something that looks like:

Code: Select all

	<dl>
		<dt><label for="location">{L_LOCATION}:</label></dt>
		<dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox" /></dd>
	</dl>
and comment it out, like so:

Code: Select all

<!-- Remove Location from template when installing "Location on Registration" MOD	
	<dl>
		<dt><label for="location">{L_LOCATION}:</label></dt>
		<dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox" /></dd>
	</dl>
-->
The mod works great! Thanks to DavidIQ for his hard work.

User avatar
zackpack
Registered User
Posts: 114
Joined: Fri Apr 25, 2008 1:40 am

Re: Location on registration

Post by zackpack »

hi!
i've installed this mod and it's working fine,but i want to put a * in the registration form near "location", so users knows what is required.
thanks

PaulW
Registered User
Posts: 29
Joined: Sun Sep 15, 2002 2:45 am
Location: Norton, Ohio
Contact:

Re: Location on registration

Post by PaulW »

If you take the "custom field" approach I outlined above, you can set the field to "Required", which will add the asterisk (*). You can also add instructional text to include along with the prompt.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17137
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Location on registration

Post by DavidIQ »

DavidIQ wrote:Open up your styles/prosilver/template/ucp_register.html file and find this (code added by this MOD):

Code: Select all

	<dl>
		<dt><label for="tz">{L_LOCATION}:</label></dt>
		<dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox autowidth" /></dd>
	</dl>
Just add the asterisk (*) to just before {L_LOCATION} and refresh your template.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

Locked

Return to “[3.0.x] MOD Database Releases”