Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

Changing the registration parameters

Aloittaja TikkiRo, kesäkuu 05, 2007, 01:23:06 IP

« edellinen - seuraava »

TikkiRo

I've looked through as many of the search pulls for this topic, but still unsure how to do this specifically.  I've a vague notion at one time I learnt how to add in extra fields to the registration page than the generic but what I'm really trying to do now is make one of those in particular a mandatory one.   It's driving me nuts telling people to put in their location in their profile, as few bother to pay heed, and so rather than messing about I'd like to make it an non-optional field for all new registrations.

Can someone maybe do me a walkthrough - I've zilch programming, PHP or other skills, other than basic HTML, but can certainly locate the requisite files and edit if I'm pointed in the right direction?

TIA :D
"Seize life by the throat and strangle it!"

http://tikkiro.wordpress.com - Radical Christianity from a disabled viewpoint.

Oldiesmann

You've already added the location field to the registration form, right?

If so, then making SMF scream at them if they don't enter their location is quite easy ;)

Sources/Subs-Members.php

Find
Koodi (Line 674) [Valitse]
// You may not be allowed to register this email.

Add before that
// Sorry, but you must enter a location...
if(empty($regOptions['location']))
fatal_lang_error('location_required', false);


Then add a $txt['location_required'] string to Modifications.english.php:

$txt['location_required'] = 'Location is required';

(Change that to whatever you want)

That's all there is to it :)
Michael Eshom
Christian Metal Fans

TikkiRo

Oh HOW I wish I'd come asking this on here a year ago!!!  Did do plenty of searches for the answer, but just didn't get too far.   Tks SO much for that - will make my life so much easier on our charity forum  :D.
"Seize life by the throat and strangle it!"

http://tikkiro.wordpress.com - Radical Christianity from a disabled viewpoint.

TikkiRo

Whoops - just discovered that it would seem I haven't set up the Location parameter - no wonder nobody's filling it in!!!

Would you mind firing me a code snippet for that as well?  Truly appreciated.  :)
"Seize life by the throat and strangle it!"

http://tikkiro.wordpress.com - Radical Christianity from a disabled viewpoint.

SleePy

Is this issue solved or do you still require assistance?

I think they are talking about the location mod or similar. So Find that mod and it should be adding it to the registration screen. Then this will work.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: