*

nijamutheen

  • ****
  • 110 posts
how to show Instant Messenger Plugin icon & online chat icon on listings

Example For
online chat plugin:
http://prntscr.com/g53yxg

Instant Messenger Plugin
http://prntscr.com/g5414l

following For Grid views
http://prntscr.com/g54bat

---Mb-theme can take this future development
« Last Edit: August 06, 2017, 09:21:33 PM by nijamutheen »

*

MB Themes

@nijamutheen
You have it in plugin configuration in section Plugin setup.

Code: [Select]
If you want to place initiate chat button on specific place, you can use built-in function. This function has optional parameter $user_id that does not need to be used.
<?php if(function_exists('oc_chat_button')) { echo oc_chat_button(); } ?>

If you want to show circle with user status (online - green, offline - gray), you can use built-in function. This function has optional parameter $user_id that does not need to be used.
<?php if(function_exists('oc_user_status')) { echo oc_user_status(); } ?>

If you want to use it in different way, take a look on function oc_user_status how to retrieve if user is online or offline.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

nijamutheen

  • ****
  • 110 posts
Sorry for reply I know that function  but I didn't know where to put that function means which file and which place

*

MB Themes

@nijamutheen
File: loop-single.php, loop-premium.php
Place: trial & error
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

nijamutheen

  • ****
  • 110 posts
i did successfully thanks  frosticek
but gallery view will not shown it shows only list views
« Last Edit: August 10, 2017, 03:13:50 PM by nijamutheen »

*

annunci

  • ***
  • 60 posts
Re: how to show Instant Messenger Plugin icon & online chat icon on listings
« Reply #5 on: September 20, 2017, 05:31:09 PM »
@nijamutheen
File: loop-single.php, loop-premium.php
Place: trial & error
Where i find this file, i want active this function but i no find php file, i see only email.php functions.php index.php

*

annunci

  • ***
  • 60 posts
Re: how to show Instant Messenger Plugin icon & online chat icon on listings
« Reply #6 on: September 20, 2017, 05:36:43 PM »
@nijamutheen
File: loop-single.php, loop-premium.php
Place: trial & error
Where i find this file, i want active this function but i no find php file, i see only email.php functions.php index.php
ok i now find loop.php and loop-single-premium.php in where line i need to paste this <?php if(function_exists('oc_user_status')) { echo oc_user_status(); } ?> please help me only in that

*

MB Themes

Re: how to show Instant Messenger Plugin icon & online chat icon on listings
« Reply #7 on: September 20, 2017, 09:00:52 PM »
@annunci
In premium loop it will not work if you do not place id of user into function:
Code: [Select]
oc_user_status(osc_premium_user_id())
It may not show status to logged user (if user browse own listings), you can try in file:
oc-content/plugins/online_chat/functions.php

Find line (inside above mentioned function):
 
Code: [Select]
if($registered == 1 && $user_id <> osc_logged_user_id() && !oc_check_bans($user_id)) {
and change it to:
Code: [Select]
  if($registered == 1 && !oc_check_bans($user_id)) {
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

annunci

  • ***
  • 60 posts
Re: how to show Instant Messenger Plugin icon & online chat icon on listings
« Reply #8 on: September 21, 2017, 12:05:13 PM »
@annunci
In premium loop it will not work if you do not place id of user into function:
Code: [Select]
oc_user_status(osc_premium_user_id())
It may not show status to logged user (if user browse own listings), you can try in file:
oc-content/plugins/online_chat/functions.php

Find line (inside above mentioned function):
 
Code: [Select]
if($registered == 1 && $user_id <> osc_logged_user_id() && !oc_check_bans($user_id)) {
and change it to:
Code: [Select]
  if($registered == 1 && !oc_check_bans($user_id)) {

Where should I copy the code in single loop? In single loop Do you need the user ID to work?
 

*

MB Themes

Re: how to show Instant Messenger Plugin icon & online chat icon on listings
« Reply #9 on: September 21, 2017, 12:23:15 PM »
@annunci
Answer is in quoted text.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

abhkhan

  • ***
  • 60 posts
1. In which file the above code should be added?

/public_html/oc-includes/osclass/gui/loop-single.php

OR

/public_html/oc-content/themes/veronika/loop-single.php
 and in which line?

2. I found this code

Code: [Select]
if($registered == 1 && $user_id <> osc_logged_user_id() && !oc_check_bans($user_id)) {
at two places on function.php
line 71 and 137
where should I replace?

*

MB Themes

@abhkhan
I do not know on what line - on that one you want to show it in theme. Put it there and try.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots