0% found this document useful (0 votes)
105 views3 pages

Checking For The GD Library

The document discusses checking if the GD library is enabled in PHP and how to enable it if needed. It involves opening the php.ini file, uncommenting the php_gd2.dll line, and restarting the PHP services. It also mentions renaming the admin folder for security reasons and provides some example renaming steps and Prestashop tutorial resources.

Uploaded by

gildlrei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views3 pages

Checking For The GD Library

The document discusses checking if the GD library is enabled in PHP and how to enable it if needed. It involves opening the php.ini file, uncommenting the php_gd2.dll line, and restarting the PHP services. It also mentions renaming the admin folder for security reasons and provides some example renaming steps and Prestashop tutorial resources.

Uploaded by

gildlrei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Checking for the GD library

The GD library enables PrestaShop to rework images that you upload, especially resizing
them.
On a default installation of PHP, the GD Library should be turned on, but if that's not the
case for your install, the standard Windows instructions are:
1.

In the root directory of your PHP folder, open the php.ini file.

2.

Uncomment the extension=php_gd2.dll line (about half-way through the file, in


the middle of a long list of extensions) by deleting the ";" at the start of the line.

3.

Restartthe PHP services.


If you have no access to the php.ini file (which is often the case in shared hosting),
contact your host about your hosting needs.

Renaming the admin folder


The admin folder holds all the web pages and PHP code that allows you to
manage your
shop. Almost any customization or configuration that you will make using your
control panel,
including the ability to log in, relies on this folder and the knowledge of its
location. So you
obviously you dont want any Tom, Dick, and Harry sitting on their PC at
www.yourdomain.
com/admintrying to guess your password. And anybody who knows anything

about
e-commerce software knows that the default folder name for such functions is
often admin.
So we will now name it something more secret and personal.

Time for action renaming the admin fol


1.3. FrontController class
The class FrontController in the classes directory plays the controller role of the framework and is
responsible for initializing each web request and setting up the required environment. I highly recommend
you to open up this class and give it a look. Keep it aside open while you code the templates & other
classes. One thing to note in this class is the list of smarty variables set for each request (for e.g. the
variable cart). This class sets a handful of smarty variables useful in most of the scenarios and this data
can directly be used inside all smarty templates. All pages are managed by individual controller classes
derived from this base class.

1.4. ObjectModel class


The class ObjectModel in the classes directory plays the role of a model. All entities in the framework are
derived from this class. It represents a single entity in the framework for e.g. Category or Product. The
controller class retrieves, manipulates and updates objects of this class.

der
http://www.smaizys.com/prestashop/how-to-create-prestashop-module/
http://www.smaizys.com/prestashop/how-to-create-custom-prestashop-hook/
http://www.1stwebdesigner.com/tutorials/beginners-guide-prestashop/
http://blogs.callosmart.com/2011/02/03/creating-a-prestashop-1-4-themefrom-scratch/
http://www.opensourcevarsity.com/prestashopbasics/prestashopinstall
Debugger em PHPEd
http://www.nusphere.com/products/php_debugger.htm
http://www.nusphere.com/flash_files/dbg-good_smaller.html
Prestashop Tutorial Creating THEME Para efetuar templating (Theme)
recomenda-se ler
http://www.smarty.net/sampleapp1<<-- otimo exemplo FAZER
http://www.smarty.net/docs/en/
http://www.blueprintcss.org/ << - usado em um dos artigos

http://www.techietips.net/creating-prestashop-13-theme.html -> bom


http://www.daveegerton.com/prestashop-guides/Prestashop-DesignersGuide/Structure/File-Structure.html

http://blogs.callosmart.com/2011/02/03/creating-a-prestashop-1-4-themefrom-scratch-part-1-environment-setup/comment-page-0/#comment-218

Ferramentas interessantes
https://kuler.adobe.com/create/color-wheel/

http://www.colorcombos.com/orange-color-schemes.html
http://www.gimp.org/

MVC e FrontController

http://avedo.net/733/understanding-and-implementing-the-frontcontrollerpattern-using-php/

A tecnica do SMARTY consiste em definir os TAGS no arquivo *.TPL. Em


outras palavras, aps criar uma instancia de SMARTY ns definimos os
diretrios obrigatorios para as variaveis do objeto e depois usamos os
mtodos ASSIGN e DISPLAY
/web/www.example.com/smarty/guestbook/templates/index.tpl

{* Smarty *}
Ola! {$name}, bem vindo ao Smarty!

Executa o INDEX.TPL assigning a variavel Name


/web/www.example.com/docs/guestbook/index.php

<?php
// load Smarty library
require_once(SMARTY_DIR . 'Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir = '/web/www.example.com/smarty/guestbook/templates/';
$smarty->compile_dir = '/web/www.example.com/smarty/guestbook/templates_c/';
$smarty->config_dir = '/web/www.example.com/smarty/guestbook/configs/';
$smarty->cache_dir = '/web/www.example.com/smarty/guestbook/cache/';
$smarty->assign('name','Ned'); /* Name a tag definida no arquivo TPL
$smarty->display('index.tpl');
?>

You might also like