Support Forums - Classified Ads Script Osclass
Osclass plugin support => Free Osclass Plugins => Topic started 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
<?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($locales, osc_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>
-
@Дима
I do not remember how this plugin works,.. is image stored properly in plugin table and exists on hosting?
-
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
-
Zara theme use profile picture plugin, that is different to avatar plugin.
-
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
-
https://osclasspoint.com/osclass-plugins/design-and-appearance/avatar-osclass-plugin-i120
-
So this plugin (Avatar) works with zara, but not with other themes?
-
Yes
-
That sounds more like issue of those themes.
.... or incorrect integration.
-
Please tell me which files to look for the problem. or can you help for a surcharge? Since I only need this plugin
-
First check if correct user ID is delivered to plugin function.
-
could you take a look? I will pay for your service. please
-
Just mail us at dev@osclasspoint.com with FTP login, user login that has avatar picture uploaded and is not shown, we will take a look.
No need to pay..
-
You are very kind. Thank you very much for your help, I wrote to you in the mail
-
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 ;)
-
Is this a plugin or theme problem?
-
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.
-
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?
-
I have not told it is plugin issue.
We do not plan to invest time there as this feature is included in core already
-
How much will your help cost?
-
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
-
Yes that could be reason why $_FILES variable was empty :)