+ Reply to Thread
Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 31

Thread: 4.1.0 Phonenumber field dont show 0

  1. #21
    I think it will add 0 to all phone numbers ?

    My solution is different, it just shows 0 if user typed it and don't show when didn't type.
    Problem is that when phone number is saved script converts it to integer data type (0123 will be 123) etc. area, code and number itself.
    So number stored in database without 0, my solution is remove conversion to integer.

  2. #22
    Master
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    421
    Hi Mike,

    ok Mike i think your solution is better.
    Can you add your code in this thread for all?

    Best regards
    Steffen

  3. #23
    Ok, sure. Sorry didn't do it already..

    At first list of files and functions to be changed, everywhere changes are the same.

    includes/classes/rlListings.class.php function edit, function add

    includes/classes/rlAccount.class.php function registration, function editAccount

    includes/classes/admin/rlListings.class.php function edit, function add

    So 6 functions, in each function there is code to handle phone field:

    Code:
    Only registered members can view the code.
    you have to remove the (int) modifier so peace of code will be like below


    Code:
    Only registered members can view the code.

    We are sorry for inconveniences, it will be changed in the next update.

  4. #24
    Awsome, thanks Mike!

    Will try it out when i wake up, to tired now

  5. #25
    Confirmed working, thanks a lot Mike!
    Free Advertising at Fyndklippet.se


  6. #26
    Master
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    421
    Thank you Mike!

  7. #27
    Hello all,

    if you want use 0 in code or in number please open file: ftp:includes>>classes>>rlListings.class.php
    find method 'create' and code in at line from ~151 to ~179 :
    PHP Code:
    Only registered members can view the code
    and replace to:

    PHP Code:
    Only registered members can view the code
    then in this file in method 'edit' find code at line from ~451 to ~478:
    PHP Code:
    Only registered members can view the code
    and replace to:

    PHP Code:
    Only registered members can view the code
    Viktor,
    Flynax technical department,
    Best wishes.

  8. #28
    does this work? becouse i have added the code and than i entered user account and updated again the phone numer by adding 0 and after save i see that the 0 is still not saved

  9. #29
    Flynax developer John's Avatar
    Join Date
    Oct 2009
    Posts
    606
    Hello Guys,
    To be honest I don't like Mike's solution because it isn't sql injection protected, here the code:
    PHP Code:
    Only registered members can view the code
    This fix added to 4.2 update.

    John

  10. #30
    well, let's hope that 4.2 will be the lucky number, becouse we had phone field from 4.0 not working properly, we were promissed that 4.1 will fix it and surprise surprise...we talk about 4.2 now.

+ Reply to Thread