*

Tango

  • *
  • 39 posts
Show the plugin only for registered users
« on: April 19, 2020, 10:51:24 PM »
Hello Frosticek,

At the moment, the plugin appears for all users (registered and unregistered), as it automatically hooks to the item details page.

I would like to show the plugin (buttons and stars) only for items added by registered users.
It's easy for the manual placement of the buttons, with:
Code: [Select]
if(function_exists('ur_show_rating_stars') && osc_item_user_id() !== 0) { echo ur_show_rating_stars(); }
if(function_exists('ur_add_rating_link') && osc_item_user_id() !== 0) { echo ur_add_rating_link(); }

But for the item details where the hook is automatically added, the plugin needs to be moded.

Can you please instruct us how to do it?

Thanks!

Marked as best answer by Tango on April 20, 2020, 06:28:21 PM
*

MB Themes

Re: Show the plugin only for registered users
« Reply #1 on: April 20, 2020, 08:03:50 AM »
@Tango
You must place button manually and wrap it into block:
Code: [Select]
if(osc_is_web_user_logged_in()) {
... button...
}
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Tango

  • *
  • 39 posts
Re: Show the plugin only for registered users
« Reply #2 on: April 20, 2020, 06:28:17 PM »
That's right, I forgot you can disable the auto hooks from the plugin settings.

Thanks a lot!