*

Karel Strejcek

  • **
  • 10 posts
Tatiana admin
« on: April 11, 2017, 08:04:08 AM »
Hello,
updated here tatiana thema but now it doesn't show me that I have uploaded Has large image they uploaded.
Has small image
Has small image shows well.
Internetový bazar All-Bazar.cz nabízí inzerce zdarma do kategorií dětský bazar, PC-bazar, elektro...

*

MB Themes

Re: Tatiana admin
« Reply #1 on: April 11, 2017, 08:14:41 AM »
@Karel
In file:
oc-content/themes/tatiana/admin/functions.php

Find:
Code: [Select]
.jpg
Change to:
Code: [Select]
.png
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Karel Strejcek

  • **
  • 10 posts
Re: Tatiana admin
« Reply #2 on: April 13, 2017, 03:05:19 PM »
Hi
now no longer works, it just does not load images writes this error

Tam byla chyba při nahrávání velkého obrázku #661: extension not allowed, only allowed extension for large images is .jpg!
Internetový bazar All-Bazar.cz nabízí inzerce zdarma do kategorií dětský bazar, PC-bazar, elektro...

*

MB Themes

Re: Tatiana admin
« Reply #3 on: April 13, 2017, 03:56:02 PM »
@Karel
This should be before first div tag:
Code: [Select]
<?php
  
require_once 'functions.php';
  
tatiana_backoffice_menu(__('Settings''tatiana'));
?>


<?php
// MANAGE IMAGES
if(Params::getParam('tatiana_images') == 'done') { 
  
$upload_dir_small osc_themes_path() . 'tatiana/images/small_cat/';
  
$upload_dir_large osc_themes_path() . 'tatiana/images/large_cat/';

  if (!
file_exists($upload_dir_small)) { mkdir($upload_dir_small0777true); }
  if (!
file_exists($upload_dir_large)) { mkdir($upload_dir_large0777true); }

  
$count_real 0;
  for (
$i=1$i<=1000$i++) {
    if(isset(
$_POST['fa-icon' .$i])) {
      
$fields['fields'] = array('s_icon' => Params::getParam('fa-icon' .$i));
      
$fields['aFieldsDescription'] = array();
      
Category::newInstance()->updateByPrimaryKey($fields$i);
      
message_ok(__('Font Awesome icon successfully saved for category' ' <strong>#' $i '</strong>' ,'tatiana'));
    }

    if(isset(
$_FILES['small' .$i]) and $_FILES['small' .$i]['name'] <> ''){

      
$file_ext   strtolower(end(explode('.'$_FILES['small' .$i]['name'])));
      
$file_name  $i '.' $file_ext;
      
$file_tmp   $_FILES['small' .$i]['tmp_name'];
      
$file_type  $_FILES['small' .$i]['type'];   
      
$extensions = array("png");

      if(
in_array($file_ext,$extensions )=== false) {
        
$errors __('extension not allowed, only allowed extension is .png!','tatiana');
      } 

      if(empty(
$errors)==true){
        
move_uploaded_file($file_tmp$upload_dir_small.$file_name);
        
message_ok(__('Small image #','tatiana') . $i __(' uploaded successfully.','tatiana'));
        
$count_real++;
      } else {
        
message_error(__('There was error when uploading small image #','tatiana') . $i ': ' .$errors);
      }
    }
  }

  
$count_real 0;
  for (
$i=1$i<=1000$i++) {
    if(isset(
$_FILES['large' .$i]) and $_FILES['large' .$i]['name'] <> ''){
      
$file_ext   strtolower(end(explode('.'$_FILES['large' .$i]['name'])));
      
$file_name  $i '.' $file_ext;
      
$file_tmp   $_FILES['large' .$i]['tmp_name'];
      
$file_type  $_FILES['large' .$i]['type'];   
      
$extensions = array("png");

      if(
in_array($file_ext,$extensions )=== false) {
        
$errors __('extension not allowed, only allowed extension for large images is .png!','tatiana');
      }

      if(empty(
$errors)==true){
        
move_uploaded_file($file_tmp$upload_dir_large.$file_name);
        
message_ok(__('Large image #','tatiana') . $i __(' uploaded successfully.','tatiana'));
        
$count_real++;
      } else {
        
message_error(__('There was error when uploading large image #','tatiana') . $i ': ' .$errors);
      }
    }
  }
}
?>



  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Karel Strejcek

  • **
  • 10 posts
Re: Tatiana admin
« Reply #4 on: April 13, 2017, 04:10:17 PM »

I guess I found it thanks

$extensions = array("jpg");


Internetový bazar All-Bazar.cz nabízí inzerce zdarma do kategorií dětský bazar, PC-bazar, elektro...

*

Karel Strejcek

  • **
  • 10 posts
Re: Tatiana admin
« Reply #5 on: April 13, 2017, 04:16:07 PM »
now it does not report any error but doesn't load the image
Internetový bazar All-Bazar.cz nabízí inzerce zdarma do kategorií dětský bazar, PC-bazar, elektro...

*

MB Themes

Re: Tatiana admin
« Reply #6 on: April 14, 2017, 08:05:02 PM »
@Karel
.jpg to .png must be changed in oc-content/themes/tatiana/admin/settings.php, if you did not do it so.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots