This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Anonymous

  • ****
  • 200 posts
hide phone no. for guest on listing page.
« on: June 18, 2017, 08:20:53 PM »
hi,

I  want to hide phone no. for guest users. only log in users can able to see phone no.
 I have attached a pic. where guest users can see phone no, by clicking on show phone, (in mobile view)/
in 720px width it is already included, unfortunately is user login ???? condition is not implemented on item.php

I wish that, I can restrict phone no for gest users on item.php,


please let me know the module of code so that I can implement it in my item.php...
Innovation is change that unlocks new value  ;)

*

MB Themes

Re: hide phone no. for guest on listing page.
« Reply #1 on: June 18, 2017, 11:43:04 PM »
@Anonymous
Some functions may not be available at mobile.
Block for mobile phone starts with:
Code: [Select]
<div class="phone<?php if(!$mobile_found) { ?> no-number<?php ?>">
or
Code: [Select]
<span class="bot"><?php echo substr($mobile0strlen($mobile) - 4) . 'xxxx'?></span>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Anonymous

  • ****
  • 200 posts
Re: hide phone no. for guest on listing page.
« Reply #2 on: June 20, 2017, 06:41:43 AM »
thanks ..
code not working;
btw my problem solve through below chunk of code,
   <?php if($mobile_found) { ?>
                        <a href="#" class="phone-show" data-item-id="<?php echo osc_item_id();


:)
Innovation is change that unlocks new value  ;)

Marked as best answer by Anonymous on June 20, 2017, 09:25:08 AM
*

MB Themes

Re: hide phone no. for guest on listing page.
« Reply #3 on: June 20, 2017, 08:23:21 AM »
@Anonymous
You could get a solution also modifying variable $mobile_found, adding condition:
Code: [Select]
<?php
  
if(!osc_is_web_user_logged_in()) {
    
$mobile_found false;
  }
?>

  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Anonymous

  • ****
  • 200 posts
Re: hide phone no. for guest on listing page.
« Reply #4 on: June 20, 2017, 09:24:04 AM »
I AGREE WITH YOU..

:)

THANKS.....
Innovation is change that unlocks new value  ;)