Osclass Support Forums

Osclass plugin support => Online Chat Plugin => Topic started by: slicer on January 29, 2018, 10:28:39 PM

Title: OC buttons in home
Post by: slicer on January 29, 2018, 10:28:39 PM
Hey I'm using OC custom button as the instruction says in the plugin, but for some strange reason the the button stop working on home while using STELA theme.

if a user are logged A is logged in and  user B is also logged in nother device, both users will see each other,  in while browing Categories or Item page I can initiate chat and works fine, but the same ad in home say user is not registered (perhaps the user is already registered and working fine)

any ideas? sounds weird but it's happening to me.
Title: Re: OC buttons in home
Post by: MB Themes on January 29, 2018, 11:10:51 PM
User needs item user id, on home there is none. How do you use it?
Title: Re: OC buttons in home
Post by: slicer on January 30, 2018, 12:04:30 AM
User needs item user id, on home there is none. How do you use it?

Thanks, I'm trying using this code
Code: [Select]
<?php if(function_exists('oc_chat_button')) { echo oc_chat_button(); } ?> on single.php  on line:
Code: [Select]
<a class="title" href="<?php echo osc_item_url(); ?>"><?php echo osc_highlight(osc_item_title(), 100); ?>
it works in categories no biggie but stop working on home whats the right code to place there? ^_^  ;)
Title: Re: OC buttons in home
Post by: MB Themes on January 30, 2018, 08:34:40 AM
@slicer
Code: [Select]
<?php if(function_exists('oc_chat_button')) { echo oc_chat_button(osc_item_user_id()); } ?>
Title: Re: OC buttons in home
Post by: slicer on February 02, 2018, 07:43:14 PM
@slicer
Code: [Select]
<?php if(function_exists('oc_chat_button')) { echo oc_chat_button(osc_item_user_id()); } ?>

Yes it work fantastic, however doesn't seem to work with premium blocks  any tips?
Title: Re: OC buttons in home
Post by: MB Themes on February 05, 2018, 11:27:03 AM
@slicer
Code: [Select]
<?php if(function_exists('oc_chat_button')) { echo oc_chat_button(osc_premium_user_id()); } ?>
Title: Re: OC buttons in home
Post by: slicer on February 06, 2018, 11:33:48 PM
Tested and worked as intended, now it recognizes premiums and regulars as well
^_^ 8) you ^!@#$# rock