Jump to content
Latest News: (loading..)

Gyakutsuki

♥Ambassador
  • Content count

    647
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by Gyakutsuki

  1. I have some error due to php7.2. It's time do becarefull if you want your code could use in the futur. 7.1 it will be a warning, 7.2 it's out. It's very strict. Notice: Use of undefined constant MODULE_CONTENT_HEADER_CATMENU_DESCRIPTION - assumed 'MODULE_CONTENT_HEADER_CATMENU_DESCRIPTION' in /home/www/test/oscommerce2/catalog/includes/modules/content/header/cm_header_catmenu.php on line 30 you must test if the define is correct before to use it. example (not in your case see below, just to show you, but if you use a constant inside the code and it's not defined, the script write an error. if (define('MODULE_CONTENT_HEADER_CATMENU_TITLE ) ) { } Now in your code you have that $this->title = MODULE_CONTENT_HEADER_CATMENU_TITLE; $this->description = MODULE_CONTENT_HEADER_CATMENU_DESCRIPTION; $this->title = OSCOM::getDef('module_content_header_catmenu_title'); $this->description = OSCOM::getDef('module_content_header_catmenu_description'); delete $this->title = MODULE_CONTENT_HEADER_CATMENU_TITLE; $this->description = MODULE_CONTENT_HEADER_CATMENU_DESCRIPTION; The problem is the same for your other contribution for : Notice: Use of undefined constant OSCOM_APP_FRANKL_PIRELATED_STATUS - assumed 'OSCOM_APP_FRANKL_PIRELATED_STATUS' in /home/www/test/oscommerce2/catalog/includes/OSC/Apps/FrankL/Related/Module/Content/PIRELATED.php on line 34 Now for catalog you have also other erro: notice: Undefined variable: result in /home/www/test/oscommerce2/catalog/includes/classes/catmenu.php on line 48 } elseif(isset($this->_data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level + 1))) { $result .= $this->root_start_string; Call Stack # Time Memory Function Location 1 0.0001 361664 {main}( ) .../index.php:0 2 0.0145 608120 require( '/home/www/test/oscommerce2/catalog/includes/OSC/Sites/Shop/Templates/Sail/template_top.php' ) .../index.php:63 3 0.0212 733680 require( '/home/www/test/oscommerce2/catalog/includes/OSC/Sites/Shop/Templates/Sail/header.php' ) .../template_top.php:48 4 0.0212 733680 oscTemplate->getContent( ) .../header.php:2 5 0.0217 807184 cm_header_catmenu->execute( ) .../osc_template.php:167 6 0.0217 823896 include( '/home/www/test/oscommerce2/catalog/includes/modules/content/header/templates/catmenu.php' ) .../cm_header_catmenu.php:42 7 0.0223 828088 build_hoz( ) .../catmenu.php:14 8 0.0224 829080 explode_category_tree->getExTree( ) .../cm_header_catmenu.php:122 9 0.0224 829080 explode_category_tree->_buildHoz( ) .../catmenu.php:88 notice: Undefined variable: result in /home/www/test/oscommerce2/catalog/includes/classes/catmenu.php on line 53 $result .= $this->child_start_string; Call Stack # Time Memory Function Location 1 0.0001 361664 {main}( ) .../index.php:0 2 0.0145 608120 require( '/home/www/test/oscommerce2/catalog/includes/OSC/Sites/Shop/Templates/Sail/template_top.php' ) .../index.php:63 3 0.0212 733680 require( '/home/www/test/oscommerce2/catalog/includes/OSC/Sites/Shop/Templates/Sail/header.php' ) .../template_top.php:48 4 0.0212 733680 oscTemplate->getContent( ) .../header.php:2 5 0.0217 807184 cm_header_catmenu->execute( ) .../osc_template.php:167 6 0.0217 823896 include( '/home/www/test/oscommerce2/catalog/includes/modules/content/header/templates/catmenu.php' ) .../cm_header_catmenu.php:42 7 0.0223 828088 build_hoz( ) .../catmenu.php:14 8 0.0224 829080 explode_category_tree->getExTree( ) .../cm_header_catmenu.php:122 9 0.0224 829080 explode_category_tree->_buildHoz( ) .../catmenu.php:88 10 0.0228 829656 explode_category_tree->_buildHoz( ) .../catmenu.php:76 Now in 7.2 the class has also a problem change var by public and also function by public function. Theses elements display the menu but does'nt resolve the problem above. 2.3 and add on will in horror in php 7.2 2.4 need just little modification to be completly compatible. +
  2. )Hi @MrPhil, Thank you for the explanation. .Ii don't use often the htaccess, just That I need but in this case, it just to secure the site. It's not perfect, that's why it's interesting to know other approach I have inserted this element in my production server, no problem (with ssl certificate). About GET and POST it can be other like FILE Also when you test your site with an online system (https://www.metaforensics.io/), it tells you for example if it's possible to know the server signature or not and also XSS problem and propose to solve with htaccess recommendation. After, depends of the apache configuration, the website can work or not.
  3. When you look some website test and propose some correction. Whith your experience what is the best approach with osc to create a best htaccess. I tried to make a summary; Opinon and correction will be welcome. speed optimization security optimization cache .. Options +FollowSymlinks <IfModule mod_rewrite.c> RewriteEngine On #blocking Libwww-perl access RewriteCond %{HTTP_USER_AGENT} libwww-perl.* RewriteRule .* – [F,L] FileETag INode MTime Size ## URL Canonicalization RewriteCond %{HTTP_HOST} !^www.mysite.org$ [NC] RewriteRule ^(.*)$ https://www.mysite.org/$1 [L,R=301] # RewriteRule \.(gif|jpg|png|js|css)$ - [F] ### FILTRE CONTRE XSS, base64_encode SALETE , DEFINIR VARIABLE PHP GLOBALS VIA URL, MODIFIER VARIABLE _REQUEST VIA URL RewriteCond %{REQUEST_METHOD} (GET|POST) [NC] RewriteCond %{QUERY_STRING} ^(.*)(%3C|<)/?script(.*)$ [NC,OR] RewriteCond %{QUERY_STRING} ^(.*)(%3D|=)?javascript(%3A|:)(.*)$ [NC,OR] RewriteCond %{QUERY_STRING} ^(.*)document\.location\.href(.*)$ [OR] RewriteCond %{QUERY_STRING} ^(.*)base64_encode(.*)$ [OR] RewriteCond %{QUERY_STRING} ^(.*)GLOBALS(=|[|%[0-9A-Z]{0,2})(.*)$ [OR] RewriteCond %{QUERY_STRING} ^(.*)_REQUEST(=|[|%[0-9A-Z]{0,2})(.*)$ RewriteRule (.*) - [F] </IfModule> # Compress all output labeled with one of the following MIME-types # (for Apache versions below 2.3.7, you don't need to enable `mod_filter` # and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines # as `AddOutputFilterByType` is still in the core directives). <IfModule mod_deflate.c> <IfModule mod_filter.c> AddOutputFilterByType DEFLATE application/atom+xml \ application/javascript \ application/json \ application/rss+xml \ application/vnd.ms-fontobject \ application/x-font-ttf \ application/x-web-app-manifest+json \ application/x-javascript \ application/xhtml+xml \ application/xml \ font/opentype \ image/svg+xml \ image/x-icon \ text/css \ text/html \ text/plain \ text/x-component \ text/xml </IfModule> </IfModule> <IfModule mod_headers.c> # Unset Server Signature header ServerSignature Off # Unset Server Technology header Header unset X-Powered-By Header set Content-Security-Policy "script-src 'self' https://www.google.com" Header always set X-FRAME-OPTIONS "DENY" Header always set X-XSS-Protection "1; mode=block" Header always set X-Content-Type-Options "nosniff" Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains" Header unset ETag Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure <FilesMatch "\.(js|css|xml|gz|html)$"> Header append Vary: Accept-Encoding </FilesMatch> <filesMatch ".(css|jpg|jpeg|png|gif|js|ico)$"> Header set Cache-Control "max-age=25200, public" </filesMatch> </IfModule> <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 2 days" # CSS # ExpiresByType text/css "access plus 2592000 seconds" # Data interchange ExpiresByType application/json "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType text/xml "access plus 0 seconds" # Favicon (cannot be renamed!) and cursor images ExpiresByType image/x-icon "access plus 2592000 seconds" # HTML components (HTCs) ExpiresByType text/x-component "access plus 2592000 seconds" # HTML ExpiresByType text/html "access plus 0 seconds" # JavaScript ExpiresByType application/javascript "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month" # Manifest files ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" ExpiresByType text/cache-manifest "access plus 0 seconds" # Media ExpiresByType audio/ogg "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType video/mp4 "access plus 1 month" ExpiresByType video/ogg "access plus 1 month" ExpiresByType video/webm "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" # Web feeds ExpiresByType application/atom+xml "access plus 2592000 seconds" ExpiresByType application/rss+xml "access plus 2592000 seconds" # Web fonts ExpiresByType image/svg+xml "access plus 1 month" </IfModule>
  4. It's long time the french is not updated, You can find inside element in more and also element does not include inside with the new osc version. You must update in consequence.
  5. PHP Ver 5.4.45 ???

    you can test your site in local with Winamp server or example or easy php server. But you must have the same php version than you have in your future production. With that, you will see if your website works fine or not else it's better to go in commercial request topic and ask a financial proposition for the developer. the second way is to create a subdomain with your new php (htaccess or admin panel configuration) version and copy your files to this subdomain test.
  6. Admin to Bootstrap NO HTML changes

    I think it could be a temporary solution until the administration is converted into boostrap.
  7. Just for information, a little bug I have discovered. The solution <?php echo $oscTemplate->getAppsHeaderTags(); ?> must be before <title><?php echo HTML::outputProtected($oscTemplate->getTitle()); ?></title>
  8. Hello, I am continuing my investigations under osc 2.4 and my learning This tuto will help you to create a new header Tags approach inside OSC using the new concept in 2.4 App Currently, header tags is under includes/modules/header_tags. The goal is to include Header Tags inside the Apps. That's the goals to make. How to do that ? Currently, Osc 2.4 doesn't include this element. I don't know if @Harald Ponce de Leon want to include that inside OSC. The main advantage of this approach is to develop an APPS with all inside a directory and not to have all information everywhere inside the sites. It's just a little modification inside template.php. That's all to have something cool :) @Harald Ponce de Leon is to you to decide if you want to include this element inside App. How to do that ! ================================= Step 1 : Preparation of the elements including abstract and Interface 1-a includes/OM/Modules create a files called HeaderTags.php <?php /* * HeaderTags.php * @copyright Copyright 2008 - gyakutsuki * @copyright Portions Copyright osCommerce * @license GNU Public License V2.0 */ namespace OSC\OM\Modules; use OSC\OM\Apps; class HeaderTags extends \OSC\OM\ModulesAbstract { public function getInfo($app, $key, $data) { $result = []; $class = $this->ns . $app . '\\' . $data; if (is_subclass_of($class, 'OSC\OM\Modules\\' . $this->code . 'Interface')) { $result[$app . '\\' . $key] = $class; } return $result; } public function getClass($module) { list($vendor, $app, $code) = explode('\\', $module, 3); $info = Apps::getInfo($vendor . '\\' . $app); if (isset($info['modules'][$this->code][$code])) { return $this->ns . $vendor . '\\' . $app . '\\' . $info['modules'][$this->code][$code]; } } } 2-a includes/OM/Modules create a files called HeaderTagsAbstract.php <?php /* * HeaderTagsAbstract.php * @copyright Copyright 2008 - Gyakutsuki * @copyright Portions Copyright osCommerce * @license GNU Public License V2.0 */ namespace OSC\OM\Modules; use OSC\OM\Registry; abstract class HeaderTagsAbstract implements \OSC\OM\Modules\HeaderTagsInterface { public $code; public $title; public $description; public $sort_order; public $enabled = false; protected $db; abstract protected function init(); abstract public function getOutput(); abstract public function install(); abstract public function keys(); final public function __construct() { $this->code = (new \ReflectionClass($this))->getShortName(); $this->db = Registry::get('Db'); $this->init(); } public function isEnabled() { return $this->enabled; } public function check() { return isset($this->sort_order); } public function remove() { return $this->db->exec('delete from :table_configuration where configuration_key in ("' . implode('", "', $this->keys()) . '")'); } } 3-a includes/OM/Modules create a files called HeaderTagsAbstract.php <?php /* * HeaderTagsInterface.php * @copyright Copyright 2008 - Gyakutsuki * @copyright Portions Copyright osCommerce * @license GNU Public License V2.0 */ namespace OSC\OM\Modules; interface HeaderTagsInterface { public function getOutput(); public function install(); public function keys(); public function isEnabled(); public function check(); public function remove(); } ===================================== Step 2 Call the new class element inside template Edit includes/classes/osc_templates 1-a Just after use OSC\OM\Registry; add use OSC\OM\Apps; 2-a just before function addBlock($block, $group) { $this->_blocks[$group][] = $block; } Add public function getAppsHeaderTags() { if ( defined('MODULE_HEADER_TAGS_INSTALLED') && !is_null(MODULE_HEADER_TAGS_INSTALLED) ) { $header_tags_array = explode(';', MODULE_HEADER_TAGS_INSTALLED); foreach ($header_tags_array as $header) { if (strpos($header, '\\') !== false) { $class = Apps::getModuleClass($header, 'HeaderTags'); $ad = new $class(); if ( $ad->isEnabled() ) { echo $ad->getOutput(); } } } } } ===================================== Step 3 : Called inside your app the header tag I am supposing you have developped an app, there the main elements to include inside 3-a edit your oscommerce.json just below "modules": { add "HeaderTags": { "RSS": "Module\\HeaderTags\\RSS" }, 3-b Create a directory called - Module -- Headertags 3-c Create a files called RSS An full example about the rss header tags <?php /** * RSS.php * @copyright Copyright 2008 - Gyakutsuki * @copyright Portions Copyright osCommerce * @license GNU Public License V2.0 */ namespace OSC\Apps\Communication\PageManager\Module\HeaderTags; use OSC\OM\Registry; use OSC\OM\HTTP; use OSC\Apps\Communication\PageManager\PageManager as PageManagerApp; class RSS extends \OSC\OM\Modules\HeaderTagsAbstract { protected $lang; public $group; protected function init() { if (!Registry::exists('PageManager')) { Registry::set('PageManager', new PageManagerApp()); } $this->app = Registry::get('PageManager'); $this->lang = Registry::get('Language'); $this->group = 'header_tags'; // could be header_tags or footer_scripts $this->app->loadDefinitions('Module/Admin/header_tags/rss'); $this->title = $this->app->getDef('module_header_tags_rss_title'); $this->description = $this->app->getDef('module_header_tags_rss_description'); if ( defined('MODULE_HEADER_TAGS_RSS_STATUS') ) { $this->sort_order = (int)MODULE_HEADER_TAGS_RSS_SORT_ORDER; $this->enabled = (MODULE_HEADER_TAGS_RSS_STATUS == 'True'); } } public function isEnabled() { return $this->enabled; } public function getOutput() { $xml = $OSCOM_Template->addBlock('<link rel="alternate" type="application/rss+xml" title="' . STORE_NAME . '" href="index.php?Info&RSS'.'">', $this->group); $output = <<<EOD {$xml} EOD; return $output; } public function Install() { $this->app->db->save('configuration', [ 'configuration_title' => 'Do you want install this module ?', 'configuration_key' => 'MODULE_HEADER_TAGS_RSS_STATUS', 'configuration_value' => 'True', 'configuration_description' => 'Do you want install this module ?', 'configuration_group_id' => '6', 'sort_order' => '1', 'set_function' => 'osc_cfg_set_boolean_value(array(\'True\', \'False\'))', 'date_added' => 'now()' ] ); $this->app->db->save('configuration', [ 'configuration_title' => 'Display sort order', 'configuration_key' => 'MODULE_HEADER_TAGS_RSS_SORT_ORDER', 'configuration_value' => '210', 'configuration_description' => 'Display sort order (The lower is displayd in first)', 'configuration_group_id' => '6', 'sort_order' => '215', 'set_function' => '', 'date_added' => 'now()' ] ); } public function keys() { return ['MODULE_HEADER_TAGS_RSS_STATUS', 'MODULE_HEADER_TAGS_RSS_SORT_ORDER' ]; } } ===================================== Step 4 4-a Edit OSC/Sites/templates/Sail Just above (important) this code <?php echo $oscTemplate->getBlocks('header_tags'); ?> add <?php echo $oscTemplate->getAppsHeaderTags(); ?> I hope do not forgotten anything That'All !! Others tutos about OSC 2.4
  9. Today a new tuto for 2.4

    1. radhavallabh

      radhavallabh

      Hi,

      Please do you have any idea on the date of the official release of the 2.4 version...I am so eagerly waiting for it..:smile:

      Awaiting your valued response..

      Warm Regds./

      radhavallabh

    2. Gyakutsuki

      Gyakutsuki

      I have no idea.

  10. Import Reviews from other sites

    I think a lawyer will be the best for you to write or negotiate a contract. Take precaution.
  11. Import Reviews from other sites

    @MrPhil agree with that. I add just an information : At the time of social network, it could be dangerous to do that, impossible to follow and also if the master link is dead, that's can be a problem to verify the source.
  12. Import Reviews from other sites

    I don't know where you are located, but you must verified the law about that in your country. Best way for you.
  13. Import Reviews from other sites

    No you can't all the reviews must writen by yours customers.
  14. Import Reviews from other sites

    I don't think it's legal
  15. Mailchimp newsletter Everywhere add on

    @Demitry Happy you like, you can share what you made with the spam bot-trap, some people can be interested.
  16. Mailchimp newsletter Everywhere add on

    @dimitri Thank you for your fix, I recreated a package and will be available soon.
  17. Mailchimp newsletter Everywhere add on

    I will look when I have the time and if the BS works with php 7.1. It was not the case when this contribution was wroten
  18. Mailchimp newsletter Everywhere add on

    @Demitry You must install now the plugin, there is some interesting can help you in your learning. I don"t use VS Code, but it's built on that. Take time to understand the tool.
  19. Mailchimp newsletter Everywhere add on

    @Demitry @raiwa Hello, Since the 2.02 just the Api has been updated. Nothing has changed in the integration and function. Demitry, it's better for you to change your code editor, I recommend you Phpstorm or code.visualstudio.com if you want something very good. Dreamweaver is old age now. Yesterday, I just updated the api. ?: is an operator
  20. Price Competitive Intelligence : Only for 2.4 Osc :)

    1. Dan Cole

      Dan Cole

      Don't leave us hanging...tell us more.

    2. Gyakutsuki

      Gyakutsuki

      On the road :)

  21. There my class to do that, work perfect (for me :) ). <?php /** * * @license GNU Public License V2.0 * @version $Id: */ namespace ClicShopping\Apps\Catalog\Products\Classes\ClicShoppingAdmin; class ImageResample { protected $image; protected $image_type; protected $filename; protected $height; protected $width; protected $size; protected $scale; protected $x; protected $y; public function __construct($filename = null){ if(!empty($filename)){ $this->load($filename); } } public function load($filename) { $image_info = getimagesize($filename); $this->image_type = $image_info[2]; if( $this->image_type == IMAGETYPE_JPEG ) { $this->image = imagecreatefromjpeg($filename); } elseif( $this->image_type == IMAGETYPE_GIF ) { $this->image = imagecreatefromgif($filename); } elseif( $this->image_type == IMAGETYPE_PNG ) { $this->image = imagecreatefrompng($filename); } else { throw new Exception("The file you're trying to open is not supported"); } } public function save($filename, $image_type=IMAGETYPE_PNG, $compression=100, $permissions=null) { if( $image_type == IMAGETYPE_JPEG ) { imagejpeg($this->image,$filename,$compression); } elseif( $image_type == IMAGETYPE_GIF ) { imagegif($this->image,$filename); } elseif( $image_type == IMAGETYPE_PNG ) { imagepng($this->image,$filename); } if( $permissions != null) { chmod($filename,$permissions); } } public function output($image_type=IMAGETYPE_JPEG, $quality = 80) { if( $image_type == IMAGETYPE_JPEG ) { header("Content-type: image/jpeg"); imagejpeg($this->image, null, $quality); } elseif( $image_type == IMAGETYPE_GIF ) { header("Content-type: image/gif"); imagegif($this->image); } elseif( $image_type == IMAGETYPE_PNG ) { header("Content-type: image/png"); imagepng($this->image); } } public function getWidth() { return imagesx($this->image); } public function getHeight() { return imagesy($this->image); } public function resizeToHeight($height) { $ratio = $height / $this->getHeight(); $width = $this->getWidth() * $ratio; $this->resize($width,$height); } public function resizeToWidth($width) { $ratio = $width / $this->getWidth(); $height = $this->getHeight() * $ratio; $this->resize($width,$height); } public function square($size){ $new_image = imagecreatetruecolor($size, $size); if($this->getWidth() > $this->getHeight()){ $this->resizeToHeight($size); imagecolortransparent($new_image, imagecolorallocate($new_image, 0, 0, 0)); imagealphablending($new_image, false); imagesavealpha($new_image, true); imagecopy($new_image, $this->image, 0, 0, ($this->getWidth() - $size) / 2, 0, $size, $size); } else { $this->resizeToWidth($size); imagecolortransparent($new_image, imagecolorallocate($new_image, 0, 0, 0)); imagealphablending($new_image, false); imagesavealpha($new_image, true); imagecopy($new_image, $this->image, 0, 0, 0, ($this->getHeight() - $size) / 2, $size, $size); } $this->image = $new_image; } public function scale($scale) { $width = $this->getWidth() * $scale/100; $height = $this->getHeight() * $scale/100; $this->resize($width,$height); } public function resize($width,$height) { $new_image = imagecreatetruecolor($width, $height); imagecolortransparent($new_image, imagecolorallocate($new_image, 0, 0, 0)); imagealphablending($new_image, false); imagesavealpha($new_image, true); imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); $this->image = $new_image; } public function cut($x, $y, $width, $height){ $new_image = imagecreatetruecolor($width, $height); imagecolortransparent($new_image, imagecolorallocate($new_image, 0, 0, 0)); imagealphablending($new_image, false); imagesavealpha($new_image, true); imagecopy($new_image, $this->image, 0, 0, $x, $y, $width, $height); $this->image = $new_image; } public function maxarea($width, $height = null){ $height = $height ? $height : $width; if($this->getWidth() > $width){ $this->resizeToWidth($width); } if($this->getHeight() > $height){ $this->resizeToheight($height); } } public function cutFromCenter($width, $height){ if($width < $this->getWidth() && $width > $height){ $this->resizeToWidth($width); } if($height < $this->getHeight() && $width < $height){ $this->resizeToHeight($height); } $x = ($this->getWidth() / 2) - ($width / 2); $y = ($this->getHeight() / 2) - ($height / 2); return $this->cut($x, $y, $width, $height); } public function maxareafill($width, $height, $red = 0, $green = 0, $blue = 0){ $this->maxarea($width, $height); $new_image = imagecreatetruecolor($width, $height); $color_fill = imagecolorallocate($new_image, $red, $green, $blue); imagefill($new_image, 0, 0, $color_fill); imagecopyresampled($new_image, $this->image, floor(($width - $this->getWidth())/2), floor(($height-$this->getHeight())/2), 0, 0, $this->getWidth(), $this->getHeight(), $this->getWidth(), $this->getHeight()); $this->image = $new_image; } } /* usage The first example below will load a file named picture.jpg resize it to 250 pixels wide and 400 pixels high and resave it as picture2.jpg $image = new SimpleImage(); $image->load('picture.jpg'); $image->resize(250,400); $image->save('picture2.jpg'); If you want to resize to a specifed width but keep the dimensions ratio the same then the script can work out the required height for you, just use the resizeToWidth function. $image = new SimpleImage(); $image->load('picture.jpg'); $image->resizeToWidth(250); $image->save('picture2.jpg'); You may wish to scale an image to a specified percentage like the following which will resize the image to 50% of its original width and height $image = new SimpleImage(); $image->load('picture.jpg'); $image->scale(50); $image->save('picture2.jpg'); You can of course do more than one thing at once. The following example will create two new images with heights of 200 pixels and 500 pixels $image = new SimpleImage(); $image->load('picture.jpg'); $image->resizeToHeight(500); $image->save('picture2.jpg'); $image->resizeToHeight(200); $image->save('picture3.jpg'); The output function lets you output the image straight to the browser without having to save the file. Its useful for on the fly thumbnail generation <?php if( isset($_POST['submit']) ) { include('SimpleImage.php'); $image = new SimpleImage(); $image->load($_FILES['uploaded_image']['tmp_name']); $image->resizeToWidth(150); $image->output(); } else { ?> <form action="upload.php" method="post" enctype="multipart/form-data"> <input type="file" name="uploaded_image" /> <input type="submit" name="submit" value="Upload" /> </form> <?php } ?> */
  22. I don't agree with that, 2.4 is very nice and allow to make that you can not make with 2.3.x. I don't understand why there are so many resistance with that and some tools change their core (drupal, joomla, prestashop ...) at a moment for a good benefit for everybody. All programmers say is a pain to maintain the 2.x and if we must have new programmers inside the community and not just like "3 or 4" in this moment, it will be better for everybody. Why you don't like the disruptive ? This forum is not for just a little developper has been make many contributions and does'nt want to adapt the contribution for the new core or does'nt want to evoluate. Stay like that, lost knowledge, learn and lost innovation and technology. Sorry if don't like this sentence Everytime, I have a customer, everytime, I don't know how the contributions are integrated, how and coded inside osc, and eveytime the customer must paid more just for that, just for analyse and for integration because there is some many problem can appear .... Like the last time when there is an evolution on 2.2 to 2.3 with including new template approach, all people create new contribution. That's the evolution. That's sit. Every new tools need time to take this place in ecosystem. HPDL stop the first time the new 2.4 and create another 2.4 just because little does'nt agree with that. At the moment it's time to change and to evoluate. Don't afraid. evoluate like programmer evoluate like shop owner. evoluate for community to finish with that, attitude of the community don't help HPDL to continue. Says opinion ok, says the problem ok, with respect but when I saw all is writen, I can be agree with that. Be positive. that's the good way.
  23. I saw this article, what do you think ? https://medium.com/@bluepnume/introducing-paypals-open-source-cross-domain-javascript-suite-95f991b2731d
  24. Success, 100% full integration IceCat To Oscommerce with options. Available for 2.4 is out

    1. wHiTeHaT

      wHiTeHaT

      Right now try to get the specs into db.

      So can use them as a filter :)

    2. Gyakutsuki

      Gyakutsuki

      I don't what exactly what do you want to say but I included all that I can. Currently just the massive importation it does'nt make. but for a product, there is nothing to do, just to include the price and stock. That's all.

    3. wHiTeHaT

      wHiTeHaT

      I added you to skype, so we can talk about it if you like.

×