Module : Register

icekev

Joined: 2011-12-20
Posts: 7
Posted: Tue, 2011-12-20 02:13

I was just wondering if there is a way to change the 'URL' to 'Phone'
I tried to giggle around a bit but it seems that it says : Not a valid url. I tried to remove the Validation but it just made that thing to stop to work.

I would like help. Thanks alot

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25968
Posted: Tue, 2011-12-20 02:54

modules/register/controllers/register.php

    $group->input("url")->label(t("URL"))->id("g-url")
      ->rules("valid_url");

Change URL. Then you will have to either remove the rule or add the 'valid_phone' rule.
http://docs.kohanaphp.com/helpers/valid#phone
I have never tested the phone rule so your on your own to implement that.
there might be more validation than that i'm not sure as I have never modified the module before.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
icekev

Joined: 2011-12-20
Posts: 7
Posted: Tue, 2011-12-20 03:16

Thanks alot for your help !
Now where do i add that Valid_phone rule ?
I've been looking around and where in the world do i add it ?

 
icekev

Joined: 2011-12-20
Posts: 7
Posted: Tue, 2011-12-20 04:29

The thing is if i try to put it this way :

Quote:
$group->input("url")->label(t("Phone"))->id("g-url")
->rules("->rules("");

Or simply like this

Quote:
$group->input("url")->label(t("Phone"))->id("g-url");

None of em make it work. And beside, i tried to go directly from the Admin panel and add a phone number at the "URL" spot and it did say 'Well can't accept that, its not a valid url'
So what now ? i need to change the admin thingy too ?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25968
Posted: Tue, 2011-12-20 04:38

I would have thought that
$group->input("url")->label(t("Phone"))->id("g-url");
would have worked. Now where does the user get the warning about the URL?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
icekev

Joined: 2011-12-20
Posts: 7
Posted: Tue, 2011-12-20 04:48

The problem is : There is no warning or anything. It just simply doesn't end the registration.
And what about the admin panel. what do we do with this ?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25968
Posted: Tue, 2011-12-20 04:58
Quote:
And what about the admin panel. what do we do with this ?

The admin -> users page? you want the new phone field there as well?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
icekev

Joined: 2011-12-20
Posts: 7
Posted: Tue, 2011-12-20 05:02

Well i guess. If you change one thing you should change the other one heh ?
I mean maybe thats why its not working.
Do you know which page i have to update for this ?

Thanks ALOT again. Really appreciate this

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25968
Posted: Tue, 2011-12-20 05:08

I guess you need to let us know what the end goal is.
All the files for user registration are in the modules files.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
icekev

Joined: 2011-12-20
Posts: 7
Posted: Tue, 2011-12-20 13:13

Basically i just want people to write down a Phone number instead of a URL.
And the same should be visibile in the user admin panel

Thanks again
Kev

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25968
Posted: Wed, 2011-12-21 02:51

I have tried but don't understand this module much or how the URL is required to follow into the user activation. Perhaps somebody with more time/enthusiasim or knowledge of how the users are created in relation to the URL can step up and help out.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team