Important security update, please update to Osclass 3.7.4
At Osclass we have changed our Privacy Policy and Terms of Use in order to adapt them to the new General Data Protection Regulation (GDPR). We want you to know what user data we store, what we need them for, and who we share them with in each specific case. Furthermore, we are making it even easier for you to exercise your right to manage your own data.
Our goal is that you enjoy the best possible experience with our website. As the GDPR comes into force, legislation requires us that you grant us permission—both to us and our partners—to store cookies in your browser. Remember you can find more information about what we do with your data by clicking here.
I accept Osclass SL’s Terms of Use and Cookies Policy and grant them permission to manage my data.
Phone: 1234566450
Hi every one,I am using Telephone plugin. It displayQuote Phone: 1234566450. I want to extract the mobile number for make Call/ SMS Button. Please anybody give solution for this.
osc_user_phone_mobile
osc_user_phone
$phone = '';$detail = Modelphone::newInstance()->t_check_value(osc_item_id());if (isset($detail['s_telephone'])) {$phone = $detail['s_telephone'];}
<!-- CALL BUTTON --><?php if (( osc_user_phone_land() == '' ) && ( osc_user_phone_mobile() == '' )) { ?><a href="tel:<?php echo $detail['s_telephone']; ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Call Owner') ; ?></strong></a><?php } else { ?><a href="tel:<?php echo osc_user_phone(); ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Call Owner') ; ?></strong></a><?php } ?><!-- SEND SMS BUTTON --><?php if (( osc_user_phone_land() == '' ) && ( osc_user_phone_mobile() == '' )) { ?><a href="sms:<?php echo $detail['s_telephone']; ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Text Owner') ; ?></strong></a><?php } else { ?><a href="tel:<?php echo osc_user_phone(); ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Text Owner') ; ?></strong></a><?php } ?>
<?php $phone = '';$detail = Modelphone::newInstance()->t_check_value(osc_item_id());if (isset($detail['s_telephone'])) {$phone = $detail['s_telephone'];}?><!-- CALL BUTTON --><?php if (( osc_user_phone_land() == '' ) && ( osc_user_phone_mobile() == '' )) { ?><?php if(!empty($phone)){ ?><a href="tel:<?php echo $phone; ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Call Owner') ; ?></strong></a><?php } ?><?php } else { ?><a href="tel:<?php echo osc_user_phone(); ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Call Owner') ; ?></strong></a><?php } ?><!-- SEND SMS BUTTON --><?php if (( osc_user_phone_land() == '' ) && ( osc_user_phone_mobile() == '' )) { ?><?php if(!empty($phone)){ ?><a href="sms:<?php echo $phone; ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Text Owner') ; ?></strong></a><?php } ?><?php } else { ?><a href="sms:<?php echo osc_user_phone(); ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Text Owner') ; ?></strong></a><?php } ?>
Code: [Select]<?php $phone = '';$detail = Modelphone::newInstance()->t_check_value(osc_item_id());if (isset($detail['s_telephone'])) {$phone = $detail['s_telephone'];}?><!-- CALL BUTTON --><?php if (( osc_user_phone_land() == '' ) && ( osc_user_phone_mobile() == '' )) { ?><?php if(!empty($phone)){ ?><a href="tel:<?php echo $phone; ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Call Owner') ; ?></strong></a><?php } ?><?php } else { ?><a href="tel:<?php echo osc_user_phone(); ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Call Owner') ; ?></strong></a><?php } ?><!-- SEND SMS BUTTON --><?php if (( osc_user_phone_land() == '' ) && ( osc_user_phone_mobile() == '' )) { ?><?php if(!empty($phone)){ ?><a href="sms:<?php echo $phone; ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Text Owner') ; ?></strong></a><?php } ?><?php } else { ?><a href="sms:<?php echo osc_user_phone(); ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Text Owner') ; ?></strong></a><?php } ?>
Quote from: calinbehtuk on September 18, 2017, 11:21:33 amCode: [Select]<?php $phone = '';$detail = Modelphone::newInstance()->t_check_value(osc_item_id());if (isset($detail['s_telephone'])) {$phone = $detail['s_telephone'];}?><!-- CALL BUTTON --><?php if (( osc_user_phone_land() == '' ) && ( osc_user_phone_mobile() == '' )) { ?><?php if(!empty($phone)){ ?><a href="tel:<?php echo $phone; ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Call Owner') ; ?></strong></a><?php } ?><?php } else { ?><a href="tel:<?php echo osc_user_phone(); ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Call Owner') ; ?></strong></a><?php } ?><!-- SEND SMS BUTTON --><?php if (( osc_user_phone_land() == '' ) && ( osc_user_phone_mobile() == '' )) { ?><?php if(!empty($phone)){ ?><a href="sms:<?php echo $phone; ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Text Owner') ; ?></strong></a><?php } ?><?php } else { ?><a href="sms:<?php echo osc_user_phone(); ?>" class="btn btn-primary-custom col-xs-12"><i class="fa fa-phone-o"></i><strong> <?php _e('Text Owner') ; ?></strong></a><?php } ?>Wonderfull!!! Works like a charm.Thanks a lot
@StarprydeIn the area that you want to display the phone, but please take note that the telephone plugin has to be installed on your site and the item has to have a number set with this plugin. The file that is responsible for item page is item.php