News:

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

Main Menu

Location on reg

Started by Peludo_08, February 20, 2009, 09:22:37 AM

Previous topic - Next topic

Peludo_08

Link to Mod

English:

Well, this modification does the following: Adds a field in the section of the register for writing our location, which will then appear in our profiles


-----------------------------------


Español
Bueno, esta modificacion hace lo siguiente:

Agrega un campo en la seccion del registro para escrivir nuestra ubicacion, que luego aparecera en nuestros perfiles



Compatible with:
Version: SMF 1.1.8
Language: English, Spanish
Author: Peludo_08
Website: http://descargawarez.net
Demo: Click Here





Make a paypal donation:
Mi Foro: http://www.descargawarez.net
Mi Venganza: http://www.mivenganza.com
Mi Web de Videos: http://www.videosplay.net
Venta de Host: http://www.comprahost.net
Otro Foro: http://descargawarez.net
Descarga Premium de RS, MU y mas por 1 sms diario http://www.descargapremium.com

Marcus Forsberg

Nice :P

Swedish translation:

$txt['locationmod'] = 'Vänligen ange stad/land';

Peludo_08

Quote from: Nas on February 22, 2009, 02:40:40 PM
Nice :P

Swedish translation:

$txt['locationmod'] = 'Vänligen ange stad/land';

thanks mate :P
Mi Foro: http://www.descargawarez.net
Mi Venganza: http://www.mivenganza.com
Mi Web de Videos: http://www.videosplay.net
Venta de Host: http://www.comprahost.net
Otro Foro: http://descargawarez.net
Descarga Premium de RS, MU y mas por 1 sms diario http://www.descargapremium.com

Blinker

Hey Peludo

Thanks for this mod, it was just what I needed.

Works on 1.1.10 with an edited package-info.xml file.

Goad

what needs to be added/changed in order to make this a REQUIRED field in order to register?

Joker™

#5
codes removed  ;)
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Matthew K.

@sid, as this mod is not compatible with SMF 2.0, this is not the mod authors issue, and it's not something he is obligated to help you with.

Joker™

but it a very small error .... also i posted here that if error gets solved others can use it

can u help me out to resolve the error ?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Matthew K.

Very small error or not, it's not covered by this mod, so it's not the mod authors issue.

As it's nice to help other people out by posting code, this is the mod authors mod, and it is sometimes not appreciated to give updates, especially from 1.1 to 2.0 as there are many changes.

Labradoodle-360

Joker™

ohhh ok..... if u like i can remove my post ..

thanx for ur direction :D
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Matthew K.

I cannot remove posts, I am just a Support Helper.

I'm not saying the mod author won't help you, but it's not their obligation as this mod is technically not compatible with SMF 2.0.
(And it may not ever be, as in SMF 2.0 RC2 you can add your own fields through the Admin panel)

Labradoodle-360

Joker™

no problem mate ...

i solved it myself ;)

if im allowed can i make edit on above posted codes ??
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Goad

glad you guys figured that out.....any chance helping me with my question?

i want to make this field required upon registration. thanks!

Joker™

u mean a compulsory field ? n for which version ?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Goad

i guess if thats what you call it. this is for smf 1.1.11

Joker™

Here u go bro ;)

in Source/Register.php

Find:
  // You can't register if it's disabled.
   if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 3)
      fatal_lang_error('registration_disabled', false);


Add After
// You can't register without a location...
   if (empty($_POST['locationmod']) || trim($_POST['locationmod']) == '')
      fatal_error('Please Fill Your location.', false);
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Goad

I tried the code above, but even if you fill in the location field on the registration page, it still nags you to fill it in.

in the /themes/default/register.template.php file, i have the following code:


//Show location on reg - Muestra la ubicacion en el reg xD

echo '
<td width="40%">
<b>', $txt[227], ': </b>
<div class="smalltext">',$txt['locationmod'], '</div>
<td><input type="text" name="location" size="30" value="', !empty($context['member']['location']) ? $context['member']['location'] : '', '" /></td>
</tr>';


in the Sources/Register.php file, i have the following code:


// You can't register without a location...
    if (empty($_POST['locationmod']) || trim($_POST['locationmod']) == '')
      fatal_error('Please fill in your location...', false);

Joker™

My mistake ...

Use this code instead of previous one at same place

  // You can't register without a location...
      if (empty($_POST['location']))
         fatal_error('Please fill in your location...', false);


this worked for me on RC2 .... lets see how it goes for u
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

ABCDiamond

I tried to load this on SMF v1.1.11 but get this message:
QuoteInstallations actions for "LocationOnReg":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

I then looked at the manual code, for v 1.1.11 and got:
QuoteSorry, but this modification does not appear to be compatible with the selected version.

Am I right in saying that this will not work with my version ?
Although Goad seems to have it running with 1.1.11 ?

Any other options for me to make having the location set at time of registration.

Thanks

asma

same problem... this mod is not compatible with SMF 1.1.11

Advertisement: