*

Dan Dan

  • ***
  • 40 posts
The profile picture is not displayed when adding new feedback
« on: December 01, 2019, 11:14:40 AM »
In the file form_feedback_add.php I made some changes
Original:

Code: [Select]
        <div class="header"><?php _e('Leave feedback''backoffice_manager'); ?></div>
        <ul id="error_list" class="feedback"></ul>
        <div class="row photo">
          <div class="left">
            <?php if(function_exists('profile_picture_show')) { profile_picture_show(); } else { ?><img src="<?php echo osc_base_url(); ?>oc-content/plugins/backoffice_manager/images/picture_default.png" alt="<?php _e('Profile picture''backoffice_manager'); ?>"/><?php }?>
          </div>
          <div class="right">
            <div class="row">
              <span class="name"><?php echo $user['s_name']; ?></span> <span class="italic">(<?php echo __('registered since''backoffice_manager') . ' <span class="bold">' $user['dt_reg_date'] . '</span>'?>)</span>
            </div>

            <div class="row user_info">
              <?php echo $user['locale'][osc_current_user_locale()]['s_info']; ?>
            </div>

whit:

Code: [Select]
        <div class="header"><?php _e('Leave feedback''backoffice_manager'); ?></div>
        <ul id="error_list" class="feedback"></ul>
        <div class="row photo">
          <div class="left">
            <?php if(function_exists('profile_picture_show')) profile_picture_show();  else { ?><img src="<?php echo osc_base_url(); ?>oc-content/plugins/backoffice_manager/images/picture_default.png" alt="<?php _e('Profile picture''backoffice_manager'); ?>"/><?php }?>
          </div>
          <div class="right">
            <div class="row">
              <span class="name"><?php echo $user['s_name']; ?></span> <span class="italic">(<?php echo __('registered since''backoffice_manager') . ' <span class="bold">' osc_format_date($user['dt_reg_date'] ). '</span>'?>)</span>
            </div>

            <div class="row user_info"><i class="fa fa-info-circle"></i>
              <?php echo $user['locale'][osc_current_user_locale()]['s_info']; ?>
            </div>

            <div class="row loc"><i class="fa fa-map-marker"></i>
              <?php 
                
if($user['s_country'] <> '' and ($user['s_region'] <> '' or $user['s_city'] <> '')) { $loc .= $user['s_country'] . ', '; } 
                if(
$user['s_region'] <> '' and $user['s_city'] <> '') { $loc .= $user['s_region'] . ', '; }
                
$loc .= $user['s_city'];
                echo 
$loc;
              
?>

            </div>
          </div>
        </div>
I changed:
Code: [Select]
<span class="name"><?php echo $user['s_name']; ?></span> <span class="italic">(<?php echo __('registered since''backoffice_manager') . ' <span class="bold">' $user['dt_reg_date'] . '</span>'?>)</span>
whit:
Code: [Select]
<span class="name"><?php echo $user['s_name']; ?></span> <span class="italic">(<?php echo __('registered since''backoffice_manager') . ' <span class="bold">' osc_format_date($user['dt_reg_date'] ). '</span>'?>)</span>because the date of registration was displayed in Ymd format and could not be changed in d.m.Y,  and I added <i class="fa fa-info-circle"></i> and <i class="fa fa-map-marker"></i>

My problem:
If I want to add user feedback, the profile picture is not displayed in the window although the user is registered and has a profile image displayed in the list.
Only the no-user.png image is displayed in the feedback window

Thanks

Edit:
I wiped:
Code: [Select]
<?php if(function_exists('profile_picture_show')) profile_picture_show();  else { ?><img src="<?php echo osc_base_url(); ?>oc-content/plugins/backoffice_manager/images/picture_default.png" alt="<?php _e('Profile picture''backoffice_manager'); ?>"/><?php }?>
I replaced with:
Code: [Select]
                <?php if(function_exists('profile_picture_show')) { ?>
<?php if(osc_item_user_id() <> and osc_item_user_id() <> '') { ?>
<a class="side-prof" href="<?php echo osc_user_public_profile_url(osc_item_user_id()); ?>" title="<?php echo osc_esc_html(__('Profile picture''backoffice_manager')); ?>">
<?php profile_picture_show(null'item'200); ?>
</a>
<?php } else { ?>
                  <div class="side-prof">
                    <?php profile_picture_show(null'item'200); ?>
                  </div>
<?php ?>
                <?php ?>

Now everything is fine.
Fixed or deleted the post
Thanks
« Last Edit: December 01, 2019, 11:40:32 AM by Dan Dan »

*

MB Themes

Re: The profile picture is not displayed when adding new feedback
« Reply #1 on: December 02, 2019, 08:01:36 AM »
Thanks for your detail guide.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots