Osclass Support Forums

Osclass plugin support => Free Osclass Plugins => Topic started by: Дима Пупкин on November 30, 2021, 04:21:52 AM

Title: Avatar plugin does not load user photo
Post by: Дима Пупкин on November 30, 2021, 04:21:52 AM
Avatar plugin does not load user photo tell me how to solve this problem please

code from user-profile.php
Code: [Select]
<?php
 
   /*
 * Copyright 2018 osclass-pro.com
 *
 * You shall not distribute this theme and any its files (except third-party libraries) to third parties.
 * Rental, leasing, sale and any other form of distribution are not allowed and are strictly forbidden.
 */

    
$locales   __get('locales');
    
$user osc_user();
osc_enqueue_script('jquery-ui');
osc_enqueue_script('select');
osc_enqueue_script('owl');
osc_enqueue_script('main');
osc_enqueue_script('date');
osc_enqueue_script('jquery-validate');
?>

<!DOCTYPE html>
<html lang="<?php echo str_replace('_''-'osc_current_user_locale()); ?>">
    <head>
        <?php osc_current_web_theme_path('head.php'); ?>
        <meta name="robots" content="noindex, nofollow" />
        <meta name="googlebot" content="noindex, nofollow" />
    </head>
    <body>
        <?php osc_current_web_theme_path('header.php'); ?>
<div class="forcemessages-inline">
    <?php osc_show_flash_message(); ?>
</div>
            <!-- content -->
<div class="col-wrp">
<div class="col-left">
                        <div class="left-menu">
                            <div class="profile-demo">
                                <img src="<?php echo osc_current_web_theme_url('img/profile.jpg'); ?>" alt="img">
                                <strong class="profile-demo__title"><?php _e('User account manager''eva'); ?></strong>
                                <a href="<?php echo osc_user_profile_url(); ?>"><strong><?php echo osc_logged_user_name(); ?></strong></a>
                            </div>
                            <ul>
<?php echo osc_private_user_menu(get_user_menu()); ?>
                            </ul>
                        </div>
                    </div>
<div class="col-main eva-shadow toppixel">

<?php UserForm::location_javascript(); ?>
                                            <script type="text/javascript">
                                                $(document).ready(function(){
                                                    $("#delete_account").click(function(){
                                                        if (confirm("<?php _e('All your listings and alerts will be removed, this action can not be undone.''eva');?>")) {
                                                            window.location = '<?php echo osc_base_url(true).'?page=user&action=delete&id='.osc_user_id().'&secret='.$user['s_secret']; ?>';
                                                        }
                                                        else {
                                                            return false;
                                                        }
                                                    });

                                                });
                                            </script>
                                            <form action="<?php echo osc_base_url(true); ?>" method="post" class="options-form inaccount">
                                     <h2 class="page-title">
                                                <?php _e('Update your profile''eva'); ?>
                                     </h2>
                                                <input type="hidden" name="page" value="user" />
                                                <input type="hidden" name="action" value="profile_post" />
                                                <div class="inp-group">
<div class="input-row">
<div class="input-col">
                                                    <h4 class="inp-group__title"><?php _e('Name''eva'); ?></h4>
                                                   
                                                        <?php UserForm::name_text(osc_user()); ?>
                                                    </div>
<div class="input-col">
                                                    <h4 class="inp-group__title"><?php _e('E-mail''eva'); ?></h4>
                                                   
                                                        <input id="s_email" type="text" name="s_email" class="form-control" placeholder="<?php echo osc_user_email(); ?>">
                                                   
                                                    <div class="email-actions">
                                                        <a href="<?php echo osc_change_user_email_url(); ?>">
                                                            <?php _e('Modify e-mail''eva'); ?>
                                                        </a>
                                                        <a href="<?php echo osc_change_user_password_url(); ?>">
                                                            <?php _e('Modify password''eva'); ?>
                                                        </a>
                                                    </div> </div>
                                                </div></div>
                                                <div class="inp-group">
<div class="input-row">
<div class="input-col">
                                                    <h4 class="inp-group__title"><?php _e('User type''eva'); ?></h4>
                                                   
                                                        <div class="select">
                                                            <?php UserForm::is_company_select(osc_user()); ?>
                                                            </select>
                                                        </div>
                                                    </div>
<div class="input-col">
                                                    <h4 class="inp-group__title"><?php _e('Cell phone''eva'); ?></h4>
                                                        <?php UserForm::mobile_text(osc_user()); ?>
                                                    </div>
                                                </div></div>
                                                <div class="inp-group">
<div class="input-row">
<div class="input-col">
                                                    <h4 class="inp-group__title"><?php _e('Phone''eva'); ?></h4>
                                                        <?php UserForm::phone_land_text(osc_user()); ?>
                                                    </div>
                                                </div></div>
<div class="inp-group">
<h4 class="inp-group__title"><?php _e('Country''eva'); ?></h4>
                                                        <div class="select">
                                                            <?php UserForm::country_select(osc_get_countries(), osc_user()); ?>
                                                        </div></div>
                                                <div class="inp-group">
                                                    <h4 class="inp-group__title"><?php _e('Region''eva'); ?></h4>
                                                        <div class="select">
                                                            <?php UserForm::region_select(osc_get_regions(), osc_user()); ?>
                                                        </div>
                                                </div>
                                                <div class="inp-group">
                                                    <h4 class="inp-group__title"><?php _e('City''eva'); ?></h4>
                                                        <div class="select">
                                                            <?php UserForm::city_select(osc_get_cities(), osc_user()); ?>
                                                        </div>
                                                </div>
                                                <div class="inp-group">
                                                    <h4 class="inp-group__title"><?php _e('Address''eva'); ?></h4>
                                                        <?php UserForm::address_text(osc_user()); ?>
                                                </div>
                                                <div class="inp-group">
                                                    <h4 class="inp-group__title"><?php _e('Website''eva'); ?></h4>
                                                        <?php UserForm::website_text(osc_user()); ?>
                                                </div>
                                                <div class="inp-group">
                                                    <h4 class="inp-group__title"><?php _e('User Description''eva'); ?></h4>
                                                        <?php UserForm::multilanguage_info($localesosc_user()); ?>
<?php osc_run_hook('user_profile_form'osc_user()); ?>
                                                        <button class="btn btn-primary" type="submit">
                                                            <?php _e('Update''eva'); ?>
                                                        </button>
                                                        <button class="btn btn-transparent" id="delete_account" type="button">
                                                            <i class="fa fa-close"></i>
                                                            <?php _e('Delete my account''eva'); ?>
                                                        </button>
                                                    <?php osc_run_hook('user_form'); ?>
                                                </div>
                                            </form>
                                    </div>
                                </div>
                            </div>
                        </div>
            <!-- content -->
        </div>
        <?php osc_current_web_theme_path('footer.php'); ?>
    </body>
</html>
Title: Re: Avatar plugin does not load user photo
Post by: MB Themes on November 30, 2021, 07:09:08 PM
@Дима
I do not remember how this plugin works,.. is image stored properly in plugin table and exists on hosting?
Title: Re: Avatar plugin does not load user photo
Post by: Дима Пупкин on November 30, 2021, 07:24:12 PM
I had zara theme installed. everything works on it. I decided to change the theme, when registering the avatar is loaded. but the photo is not uploaded in the personal account
Title: Re: Avatar plugin does not load user photo
Post by: MB Themes on December 01, 2021, 08:59:04 AM
Zara theme use profile picture plugin, that is different to avatar plugin.
Title: Re: Avatar plugin does not load user photo
Post by: Дима Пупкин on December 01, 2021, 02:28:41 PM
I downloaded the plugin from your site. why on the zara template loading photos through the profile works, but on other templates it does not. I am using Osclass 8.0.0 version also downloaded from your site
Title: Re: Avatar plugin does not load user photo
Post by: Дима Пупкин on December 01, 2021, 02:32:56 PM
https://osclasspoint.com/osclass-plugins/design-and-appearance/avatar-osclass-plugin-i120
Title: Re: Avatar plugin does not load user photo
Post by: MB Themes on December 01, 2021, 03:55:07 PM
So this plugin (Avatar) works with zara, but not with other themes?
Title: Re: Avatar plugin does not load user photo
Post by: Дима Пупкин on December 01, 2021, 04:19:19 PM
Yes
Title: Re: Avatar plugin does not load user photo
Post by: MB Themes on December 01, 2021, 08:31:04 PM
That sounds more like issue of those themes.
.... or incorrect integration.
Title: Re: Avatar plugin does not load user photo
Post by: Дима Пупкин on December 01, 2021, 09:46:03 PM
Please tell me which files to look for the problem. or can you help for a surcharge? Since I only need this plugin
Title: Re: Avatar plugin does not load user photo
Post by: MB Themes on December 02, 2021, 07:49:53 AM
First check if correct user ID is delivered to plugin function.
Title: Re: Avatar plugin does not load user photo
Post by: Дима Пупкин on December 02, 2021, 03:18:37 PM
could you take a look? I will pay for your service. please
Title: Re: Avatar plugin does not load user photo
Post by: MB Themes on December 02, 2021, 07:57:26 PM
Just mail us at [email protected] with FTP login, user login that has avatar picture uploaded and is not shown, we will take a look.
No need to pay..
Title: Re: Avatar plugin does not load user photo
Post by: Дима Пупкин on December 02, 2021, 10:27:54 PM
You are very kind. Thank you very much for your help, I wrote to you in the mail
Title: Re: Avatar plugin does not load user photo
Post by: MB Themes on December 03, 2021, 07:11:07 AM
I have reviewed your setup and it looks ok.
When registered new account, profile picture was correctly uploaded and shown in profile sidebar & account itself.
When uploading picture in profile, this never get uploaded.
I've checked data those are send, but no data are sent at all... I select picture but it is not in $_FILES variable.
As this would require much more work to identify issue and fix it, closing it there ;)
Title: Re: Avatar plugin does not load user photo
Post by: Дима Пупкин on December 03, 2021, 11:23:20 AM
Is this a plugin or theme problem?
Title: Re: Avatar plugin does not load user photo
Post by: MB Themes on December 03, 2021, 02:51:44 PM
Hard to say, for some reason file is not submitted. It could be cause by multiple same inputs in form.
Identification of problem needs more time and effort, I would say problem is with placing it in profile form.
Title: Re: Avatar plugin does not load user photo
Post by: Дима Пупкин on December 03, 2021, 03:36:07 PM
Can you please tell me if it is worth waiting for this reason to be fixed in the next version of the plugin?
and the second question, do you need ftp access?
Title: Re: Avatar plugin does not load user photo
Post by: MB Themes on December 03, 2021, 06:48:09 PM
I have not told it is plugin issue.
We do not plan to invest time there as this feature is included in core already
Title: Re: Avatar plugin does not load user photo
Post by: Дима Пупкин on December 03, 2021, 07:19:22 PM
How much will your help cost?
Title: Re: Avatar plugin does not load user photo
Post by: Дима Пупкин on December 03, 2021, 08:32:37 PM
I found the reason. downloaded the old plugin avatar_free and in the plugin settings it was written to add to the <form> field

next post
name = "profile" enctype = "multipart / form-data"

the problem disappeared, thanks for your time
Title: Re: Avatar plugin does not load user photo
Post by: MB Themes on December 03, 2021, 08:34:15 PM
Yes that could be reason why $_FILES variable was empty :)