• Welcome to Simple Machines Community Forum. Please login or sign up.

Bridge registration username and display name

Started by German_AC, June 11, 2009, 11:11:09 PM

Previous topic - Next topic

German_AC

Hi, is there possible to only ask for username in the registration form? People gets confused withe display and username. I'm using smf 1.1.9 an mambo 4.6.5.

The reason I use bridge registration is because I want people to register in mambo, not in smf forum.

Thanks



Artificial intelligence is not a rival for natural stupidity.

Orstio

Sure.  Just remove this from smf_registration.html.php:

  } else if (form.name.value == "") {
   alert("', html_entity_decode(T_('Please enter your name.')), '");


  </tr><tr>
   <td width="30%">', T_('Display Name:'), ' *</td>
   <td colspan="3"><input type="text" name="name" size="40" value="" class="inputbox" /></td>

German_AC

Thanks for the quick reply Orstio. I done what you just said, the input box dissapear but when I submit registration it still saying "Please enter your name", and returns to previews screen.



Artificial intelligence is not a rival for natural stupidity.

Orstio


German_AC

Yes, removed de first piece, and comented with <!-- --> the second. The second works, cause is no longer input box for display name, but when I click on "Send registration" a pop up with "Please enter your name" show up and registration fails



Artificial intelligence is not a rival for natural stupidity.

Orstio

Did you remove this piece:

  } else if (form.name.value == "") {
   alert("', html_entity_decode(T_('Please enter your name.')), '");


Or this piece?

  } else if (form.username.value == "") {
   alert("', html_entity_decode(T_('Please enter a user name.')), '");

German_AC

The first one, which I supposed to be the "display name".

Take a look:

// do field validation

if (form.agree.checked == false  && form.agree.value != "not_required") {

alert("', html_entity_decode(T_('Debes acceptar los terminos.')), '");

} else if (form.username.value == "") {

alert("', html_entity_decode(T_('Ingresa un nombre de usuario.')), '");

} else if (r.exec(form.username.value) || form.username.value.length < 3) {

alert("', printf( html_entity_decode(T_("Ingresa un %s valido. Sin espacios, mas de %d caracteres y usando solo caracteres 0-9,a-z, o A-Z")), html_entity_decode(T_('Ingresa un nombre de usuario.')), 2 ), '");

} else if (form.email.value == "") {

alert("', html_entity_decode(T_('Ingresa una direccion de e-mail valida.')), '");





Artificial intelligence is not a rival for natural stupidity.

Orstio

OK, maybe we're looking in the wrong place.

In smf_registration.php, find this:

$row = new mosUser($database);

Add this immediately after:

$_POST['name']=$_POST['username'];

German_AC

Excelent man!!!! It works perfect! Thank you very much!

The only thing I'm still dealing with is the messages during registration, they appears in english I can't find the way to translate them to spanish. I tried changing registration.po and registration.pot but nothing happens.



Artificial intelligence is not a rival for natural stupidity.

Orstio

The bridge uses these constants as the email template, if it helps any:

_USEND_MSG_ACTIVATE
_USEND_MSG
_SEND_SUB
_ASEND_MSG

Advertisement: