*

Vlad7

  • ****
  • 244 posts
No profile picture
« on: December 10, 2021, 08:43:34 AM »
Hello. Instant messaging plugin does not display user photos. I noticed that in the old version of the plugin 2.0 the photos are displayed, having looked at the files, I found that the code was missing in the new version of the plugin.
/*
            $img = '';
            if(function_exists('profile_picture_show')) {
              $picture = ModelIM::newInstance()->getPictureByUserId($u_id);
           
              if(file_exists(osc_base_path() . 'oc-content/plugins/profile_picture/images/profile' . $u_id . @$picture['pic_ext'])) {
                $img = osc_base_url() . 'oc-content/plugins/profile_picture/images/profile' . $u_id . @$picture['pic_ext'];
              }
            }
  */
The gamma theme uses the profile picture plugin to display the user's profile photo. If this code is absent in the instant messaging plugin, then the photos will not be displayed. Tell me why did you remove the code, or how to get back the display of the user's profile photo?

*

MB Themes

Re: No profile picture
« Reply #1 on: December 10, 2021, 09:39:55 AM »
@Vlad7
I am not aware this would be removed, probably just moved to model or functions.
Profile picture from this plugin should still be considered.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Vlad7

  • ****
  • 244 posts
Re: No profile picture
« Reply #2 on: December 11, 2021, 11:11:12 AM »
@Vlad7
I am not aware this would be removed, probably just moved to model or functions.
Profile picture from this plugin should still be considered.

I see that this code has been moved to the functions.php file, I understand that this is done to improve compatibility with other plugins like Avatar. also changed $ u_id to $ user_id but for some reason I don't understand it doesn't work, I had to return the code to messages.php and threads.php files

 if(function_exists('profile_picture_show')) {
              $picture = ModelIM::newInstance()->getPictureByUserId($u_id);
           
              if(file_exists(osc_base_path() . 'oc-content/plugins/profile_picture/images/profile' . $u_id . @$picture['pic_ext'])) {
                $img = osc_base_url() . 'oc-content/plugins/profile_picture/images/profile' . $u_id . @$picture['pic_ext'];
              }
            }

*

MB Themes

Re: No profile picture
« Reply #3 on: December 11, 2021, 06:32:48 PM »
@Vlad7
I will not be able to check this sooner than in January.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots