+ Reply to Thread
Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 56

Thread: We demand an official technical support to hide the phone number !

  1. #21
    Hello All,

    Yes, we can do it of course but you need to create new ticket and we will create it as a small customization.
    Viktor,
    Flynax technical department,
    Best wishes.

  2. #22

    Need this function for my website as well?

    Quote Originally Posted by Wei Hong View Post
    Yes this look great. Can we do that Rudi, Viktor, Mike, Curtis?

    Hi
    I need this click and reveal phone # for my site as well. How much does it cost?

    Thanks
    Azhar

  3. #23
    Hi Rudi,

    For your previous code:
    <script>
    {literal}
    $(document).ready(function(){
    var phones = $('div[id*="phone"] .value a');

    $(phones).each(function(){
    var phone = $(this);
    var default_value = phone.text();
    var chars_to_mask = default_value.length - 4;
    var mask_phone = Array(chars_to_mask + 1).join("*") + default_value.substring(chars_to_mask);

    phone.text(mask_phone).removeAttr('href').toggleCl ass('mask');;
    phone.css('cursor', 'pointer');

    $(phone).filter('.mask').click(function(){
    $(this).text(default_value);
    $(this).attr('href', 'tel:' + default_value).toggleClass('mask');;
    });
    });
    });
    {/literal}
    </script>
    When I click on number it immediately trigger call. How can I make it so first click is reveal phone, then second click will trigger call function?

  4. #24
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Posts
    865
    Hi Wei Hong,

    change:
    Code:
    Only registered members can view the code.
    to:
    Code:
    Only registered members can view the code.

  5. #25
    Quote Originally Posted by Rudi View Post
    Hi Wei Hong,

    change:
    Code:
    Only registered members can view the code.
    to:
    Code:
    Only registered members can view the code.
    Thanks Rudi,

    Works great. )

  6. #26
    Quote Originally Posted by Wei Hong View Post
    Thanks Rudi,

    Works great. )

    How i make this code ?

    i add it in the header or something !
    Last edited by nirvano; March 31, 2018 at 11:43 PM.

  7. #27
    Quote Originally Posted by nirvano View Post
    How i make this code ?

    i add it in the header or something !
    in listing_detail.tpl or sidebar_seller_detail.tpl

  8. #28
    Quote Originally Posted by Rudi View Post
    Hello,

    You can use this code for phone type fields in tpl file:

    Code:
    Only registered members can view the code.
    * where your_field_key is a key of your phone field

    in js file omit <script> and {literal} elements
    Hi Rudi, can you modify the code above for a 'number type' listing field (not phone type) with key 'beru_phone' so that when user input this number: 0123456789. It will show 01-2345-6789 on listing detail page? This is because in another country they have different format.

  9. #29
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Posts
    865
    Hello,

    It can be used like this:

    Code:
    Only registered members can view the code.
    Last edited by Rudi; May 3, 2018 at 07:50 AM.

  10. #30
    Quote Originally Posted by Rudi View Post
    Hello,

    It can be used like this:

    Code:
    Only registered members can view the code.
    Hi Rudi,

    Thank you for your help. But it's weird I think it only works for phone type listing field. Even though I input correct field_key of 'beru_phone,' which is number type listing field, it doesn't change anything.

    This is what i have in listing detail page
    <script>
    {literal}
    $(document).ready(function(){
    var phones = $('div[id*="beru_phone"] .value a');

    $(phones).each(function(){
    var phone = $(this);
    var default_value = phone.text();
    var chars_to_mask = default_value.length - 4;
    var mask_phone = Array(chars_to_mask + 1).join("*") + default_value.substring(chars_to_mask);

    phone.text(mask_phone).removeAttr('href').toggleCl ass('mask');;
    phone.css('cursor', 'pointer');

    $(phone).filter('.mask').click(function(){
    $(this).text(default_value);
    $(this).attr('href', 'tel:' + default_value).toggleClass('mask');;
    });
    });
    });
    {/literal}
    </script>
    {/if}
    Last edited by Wei Hong; May 2, 2018 at 06:14 PM.

+ Reply to Thread