Osclass Support Forums
Osclass plugin support => Online Chat Plugin => Topic started by: nijamutheen on August 06, 2017, 09:00:50 PM
-
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
-
@nijamutheen
You have it in plugin configuration in section Plugin setup.
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.
-
Sorry for reply I know that function but I didn't know where to put that function means which file and which place
-
@nijamutheen
File: loop-single.php, loop-premium.php
Place: trial & error
-
i did successfully thanks frosticek
but gallery view will not shown it shows only list views
-
@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
-
@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
-
@annunci
In premium loop it will not work if you do not place id of user into function:
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):
if($registered == 1 && $user_id <> osc_logged_user_id() && !oc_check_bans($user_id)) {
and change it to:
if($registered == 1 && !oc_check_bans($user_id)) {
-
@annunci
In premium loop it will not work if you do not place id of user into function:
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):
if($registered == 1 && $user_id <> osc_logged_user_id() && !oc_check_bans($user_id)) {
and change it to:
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?
-
@annunci
Answer is in quoted text.
-
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
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?
-
@abhkhan
I do not know on what line - on that one you want to show it in theme. Put it there and try.