*

calm

  • ***
  • 22 posts
Only in dating category
« on: September 04, 2017, 10:46:24 AM »
Hello!
My idea is: online chat available only in dating categories!
Because there is now different communication forms (email, instant messages, whatsapp, phone number etc.) and why chat, If user can, for example, send sms or simply call (it's from my point of view and I think - most of this topic readers will agree with that.)., but in dating category things are different.  :)
But for that we have to 1)
A) show chat (right bottom corner) only in dating categories
B) show 'chat available. user online.' only on items which are in dating categories.

2) hide phone number for items which are in dating categories.

In osc market You post:
Code: [Select]
if(osc_item_category() in array(1,2,3,4,5)) { echo oc_chat(); }
I think (hope) I could it implement.
And, if understand correct, in this way its possible to show only in dating categories both - chat on bottom right corner and on item 'chat aivalable'.?

Last night I was trying to hide phone for specific category, but till now without results (but, sure I will try more.)

Maybe someone know how to hide phone?

@frosticek
If You could clarify (or even explain little bit precisely) about 1) A and B and help resolve problem 2)  I'm bying this plugin and I'm sure - many of osclass users would find this info useful.

*

MB Themes

Re: Only in dating category
« Reply #1 on: September 04, 2017, 11:23:11 AM »
@calm
code you have placed is correct and will restrict to show specific code in selected categories.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

calm

  • ***
  • 22 posts
Re: Only in dating category
« Reply #2 on: September 04, 2017, 12:55:17 PM »
@frosticek
How far from truth am I?
Code: [Select]
<?php if($mobile_found) && (osc_item_category() in array(1,2,3,4,5))  { ?>
                        <a href="#" class="phone-show" data-item-id="<?php echo osc_item_id(); ?>" data-item-user-id="<?php echo osc_item_user_id(); ?>"><?php _e('Show''veronika'); ?></a>
                      <?php ?>

*

MB Themes

Re: Only in dating category
« Reply #3 on: September 04, 2017, 01:28:04 PM »
Code: [Select]
<?php if($mobile_found && in_array(osc_item_category(), array(1,2,3,4,5)))  { ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

calm

  • ***
  • 22 posts
Re: Only in dating category
« Reply #4 on: September 04, 2017, 02:40:44 PM »
@frosticek
thanks for answer!
code works, but in general, if look on topic probl., it's senseless - it hide only the word "show"  near the 1234XXXX.


*

MB Themes

Re: Only in dating category
« Reply #5 on: September 04, 2017, 02:58:10 PM »
@calm
wrap whole section or create in that way styles that hide phone.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

calm

  • ***
  • 22 posts
Re: Only in dating category
« Reply #6 on: September 04, 2017, 03:48:21 PM »
I tryed, but can't. can't figure out.

thanks for Your time and support @frosticek

If someone get it done, please, share.

*

MB Themes

Re: Only in dating category
« Reply #7 on: September 04, 2017, 03:57:56 PM »
@calm
Code: [Select]
<?php if($mobile_found && in_array(osc_item_category(), array(1,2,3,4,5)))  { ?>
  <style>
    #contact_form .phone.no-number {display:none!important;}
  </style>
<?php ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

calm

  • ***
  • 22 posts
Re: Only in dating category
« Reply #8 on: September 04, 2017, 06:00:21 PM »
@frosticek
famous question:
where exatly I have to put that code?

At first I put where I was sure, then everywhere. nothing. each time cleared cookies and reloaded css.

thanks and respect for Your patience.

*

MB Themes

Re: Only in dating category
« Reply #9 on: September 04, 2017, 06:36:29 PM »
Item.php
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

calm

  • ***
  • 22 posts
Re: Only in dating category
« Reply #10 on: September 04, 2017, 06:47:06 PM »
no doubt!
here is block of code from item.php from fieldset:
Code: [Select]
<div class="phone<?php if(!$mobile_found) { ?> no-number<?php ?>">
                      <a href="#" class="phone-block" data-item-id="<?php echo osc_item_id(); ?>" data-item-user-id="<?php echo osc_item_user_id(); ?>">
                        <i class="fa fa-phone"></i>
                        <span>
                          <?php 
                            
if(strlen($mobile) >= && $mobile <> __('No phone number''veronika')) {
                              echo 
substr($mobile0strlen($mobile) - 4) . 'xxxx'
                            } else {
                              echo 
$mobile;
                            }
                          
?>

                        </span>
                      </a>

                      <?php if($mobile_found) { ?>
                        <a href="#" class="phone-show" data-item-id="<?php echo osc_item_id(); ?>" data-item-user-id="<?php echo osc_item_user_id(); ?>"><?php _e('Show''veronika'); ?></a>
                      <?php ?>
                    </div>
I think it should be there. First, I put it before "phone" class. now, Im not even thinking and trying to understad. Im just surfing with this code all over item.php :) :(

*

MB Themes

Re: Only in dating category
« Reply #11 on: September 04, 2017, 07:25:08 PM »
In code I have sent you is .no-phone .... remove it
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

calm

  • ***
  • 22 posts
Re: Only in dating category
« Reply #12 on: September 04, 2017, 08:12:37 PM »
@frosticek
could You clarify:
in code You sent me isnt  ".no-phone".
there are: .phone.no-number

I tryed remove first ".no-number", then ".phone", then both: ".phone.no-number".
code I placed before
Code: [Select]
<div class="phone<?php if(!$mobile_found) { ?> no-number<?php ?>">. No success.

*

MB Themes

Re: Only in dating category
« Reply #13 on: September 04, 2017, 09:15:44 PM »
@calm
Code: [Select]
<?php if($mobile_found && in_array(osc_item_category(), array(1,2,3,4,5)))  { ?>
  <style>
    #contact_form .phone {display:none!important;}
  </style>
<?php ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

calm

  • ***
  • 22 posts
Re: Only in dating category
« Reply #14 on: September 04, 2017, 09:30:40 PM »
@frosticek
so, this is edit:
Code: [Select]
<fieldset>
                <div class="phone-mail">
                  <div class="wrap">
 
  <?php if($mobile_found && in_array(osc_item_category(), array(104)))  { ?>
  <style>
    #contact_form .phone {display:none!important;}
  </style>
<?php ?>
 
                    <div class="phone<?php if(!$mobile_found) { ?> no-number<?php ?>">
                      <a href="#" class="phone-block" data-item-id="<?php echo osc_item_id(); ?>" data-item-user-id="<?php echo osc_item_user_id(); ?>">
                       


should be, but isn't.
« Last Edit: September 04, 2017, 10:50:06 PM by calm »