*

Dawid

  • ****
  • 149 posts
Show only to log in users ??
« on: December 02, 2017, 05:25:40 PM »

I have another difficult question ;)

How to make an element from the image visible only to logged in users, not for everyone?

trying to add <?php if(osc_is_web_user_logged_in()) { ?>  to the code but I have a problem.




*

MB Themes

Re: Show only to log in users ??
« Reply #1 on: December 02, 2017, 07:39:31 PM »
Code you ard using is correct. Make sure to wrap with codd whole element.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: Show only to log in users ??
« Reply #2 on: December 02, 2017, 08:04:31 PM »
if use
<?php if(osc_is_web_user_logged_in())  {
    $user_id = osc_logged_user_id();
  } else {
    $user_id = mb_get_cookie('fi_user_id');
  }

      <div class="notification">

.......



its resulatate :

Parse error: syntax error, unexpected '<' in /oc-content/themes/veronika/header.php on line 128

MB-Themes can look to me code ? https://fishboats.pl

*

MB Themes

Re: Show only to log in users ??
« Reply #3 on: December 03, 2017, 08:42:00 AM »
You must enclose php tag with ?> when you are going to continue with html tags.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: Show only to log in users ??
« Reply #4 on: December 04, 2017, 06:03:19 PM »
he , i done ! working perfect . MB-Themes . Thanks for help .
« Last Edit: December 04, 2017, 06:21:16 PM by Dawid Olszewski »