Loading


Advertisement:

Author Topic: OSClass telephone number request  (Read 173 times)

embdlabs

  • Newbie
  • *
  • Posts: 10
OSClass telephone number request
« on: August 27, 2017, 03:59:07 pm »
Dear OSclass Team

Thanks for developing such a wonderful platform.

But this PLATFORM is missing very basic part for any search i.e. telephone number.
Without telephone number the very purpose of listings is not fulfilled.
I have checked forums and seems the question is yet to be answered.

Request you to please provide update on this.

Theme used : oswizard

Thanks in advance.

m6mmi

  • Newbie
  • *
  • Posts: 23
Re: OSClass telephone number request
« Reply #1 on: August 27, 2017, 05:18:19 pm »
There are so many ways to achieve this.
1.Telephone plugins from market
2. User field which you can add to sign up form.
3. Custom field when adding listing.
4. Use any aadress field when adding listing just rename it like zip code etc.
Numerous options available :)

_Carlison

  • Full Member
  • ***
  • Posts: 123
Re: OSClass telephone number request
« Reply #2 on: September 05, 2017, 02:24:41 pm »
Hi,
For Telephone number display please use this below code :

Quote
<div class="phone">
            <?php
              $mobile = '';
              if($mobile == '') { $mobile = osc_item_city_area(); }     
              if($mobile == '' && osc_item_user_id() <> 0) { $mobile = $item_user['s_phone_mobile']; }     
              if($mobile == '' && osc_item_user_id() <> 0) { $mobile = $item_user['s_phone_land']; }     
              if($mobile == '') { $mobile = __('No phone number', 'YOUR-THEME-NAME'); }     
            ?>

            <span><i class="fa fa-phone"></i> <?php _e('Phone', 'YOUR-THEME-NAME'); ?></span>
            <div id="phone-show" rel="<?php echo $mobile; ?>" title="<?php _e('Click to show phone number', 'YOUR-THEME-NAME'); ?>">
              <?php
                if(strlen($mobile) > 3 and $mobile <> __('No phone number', 'YOUR-THEME-NAME')) {
                  echo substr($mobile, 0, strlen($mobile) - 3) . 'XXX';
                } else {
                  echo $mobile;
                }
              ?>
             </div>
             <div class="p-desc">(<?php _e('Click to show', 'YOUR-THEME-NAME'); ?>)</div>
          </div>

<script>

  <!-- SHOW PHONE NUMBER ON CLICK -->
  $(document).ready(function(){
    $('#phone-show, .p-desc').click(function(){
      $('#phone-show').text($('#phone-show').attr('rel')).css('font-weight', 'bold');
      $('#phone-show').siblings('.p-desc').fadeOut(200);
    });
  });
</script>

it will help you to display your telephone number on your theme.

Thanks

ezybusy

  • Full Member
  • ***
  • Posts: 193
Re: OSClass telephone number request
« Reply #3 on: September 05, 2017, 10:55:25 pm »
There are so many ways to achieve this.
1.Telephone plugins from market
2. User field which you can add to sign up form.
3. Custom field when adding listing.
4. Use any aadress field when adding listing just rename it like zip code etc.
Numerous options available :)

Its not about the options available to achieve this. Actually, concerns related to telephone number fields at all level should be addressed and included in the main osclass script so that no one would ever need to do any modification to theme files or use plugin to get it working the way it's supposed to.

Something like an option at the admin side to enable or disable telephone field when unregistered user want to publish ads.