This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Dawid

  • ****
  • 149 posts
LAST VISIT USER - Plugin
« on: March 20, 2018, 09:33:30 AM »
Hi Friends :)

I have question or sugestion , Its possible to show last visit registered used ? ( Last visit user :  20.03.2018 / 9:21pm) in item.php ?
look to picture :
 

*

MB Themes

Re: LAST VISIT USER - Plugin
« Reply #1 on: March 20, 2018, 10:01:29 AM »
@Dawid
You have it in database, table t_user, column dt_access_date
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: LAST VISIT USER - Plugin
« Reply #2 on: March 20, 2018, 10:05:17 AM »
Thanks im find this but how i can show this " dt_access_date " , whats function must use ? MB can Yoy help me ?

*

MB Themes

Re: LAST VISIT USER - Plugin
« Reply #3 on: March 20, 2018, 10:48:37 AM »
@Dawid
I would do it like this:
Code: [Select]
$user_data = User::newInstance()->findByPrimaryKey(osc_item_user_id());
echo $user['dt_access_date'];
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: LAST VISIT USER - Plugin
« Reply #4 on: March 20, 2018, 11:07:19 AM »
Thanks very mutch but still can add this to me code :( wrrrr ... :o

// Show if user is online
function useronline_show_user_status() {
   $itemUserId = osc_item_user_id();
   $conn   = getConnection();
   $userOnline=$conn->osc_dbFetchResult("SELECT * FROM %st_useronline WHERE userid = '%s'",DB_TABLE_PREFIX, $itemUserId);
   if($userOnline !=''){
   if(osc_get_preference('useronline_set_text_image', 'useronline')=='image') {   echo '<img src="'.osc_base_url().'oc-content/plugins/useronline/images/online.png" />' ; } else {
   echo '<span style="color:#00CC00 !important; font-weight:bold">'.osc_get_preference('useronline_text', 'useronline').'&nbsp;</span><br><span style=" font-style: italic; font-size: 12px;"><i class="fa fa-info"></i> Aktywny teraz</span>'; }
   } else {
      if(osc_get_preference('useronline_set_text_image', 'useronline')=='image') {   echo '<img src="'.osc_base_url().'oc-content/plugins/useronline/images/offline.png" />' ;   
        } else {
      echo '<span style="color:#F00 !important; font-weight:bold">'.osc_get_preference('useroffline_text', 'useronline').'&nbsp;</span>'; i need add this "YOURS CODE IN THIS PLACES"
      }

      }
   }


Can You help me modyfi ?

*

MB Themes

Re: LAST VISIT USER - Plugin
« Reply #5 on: March 20, 2018, 11:12:10 AM »
simply add it on that place
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: LAST VISIT USER - Plugin
« Reply #6 on: March 20, 2018, 11:19:48 AM »
not working :(  :o

Marked as best answer by dawid.olszewski on March 20, 2018, 10:57:18 PM
*

MB Themes

Re: LAST VISIT USER - Plugin
« Reply #7 on: March 20, 2018, 03:26:16 PM »
echo $user['dt_access_date'];

should be

echo $user_data['dt_access_date'];
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: LAST VISIT USER - Plugin
« Reply #8 on: March 20, 2018, 10:58:03 PM »
Perfect , Thank You very mutch :)