Smarty PHP Template Programming and Applications
Formats:
save 50%!
save 37%!
Free Shipping!
| Also available on: |
|
- Bring the benefits of Smarty to your PHP programming
- Give your designers the power to modify content and layout without PHP programming
- Produce code that is easier to debug, maintain, and modify
- Useful for both Smarty developers and users
Book Details
Language : EnglishPaperback : 256 pages [ 235mm x 191mm ]
Release Date : April 2006
ISBN : 190481140X
ISBN 13 : 9781904811404
Author(s) : Hasin Hayder, Joao Prado Maia, Lucian Gheorghe
Topics and Technologies : All Books, Open Source, PHP, Web Development
Table of Contents
Preface
Chapter 1: Introduction to Smarty
Chapter 2: Smarty Site Architecture
Chapter 3: What Designers Need to Know
Chapter 4: Creating a Template
Chapter 5: Advanced Templating
Chapter 6: Smarty Functions
Chapter 7: Debugging for Designers
Chapter 8: Built-in Smarty Variables and Methods
Chapter 9: Caching and Performance
Chapter 10: Extending Smarty with Plug-ins
Chapter 11: Filters
Chapter 12: Internationalization
Index
Hasin Hayder
Joao Prado Maia
Lucian Gheorghe
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata
- 20 submitted: last submission 29 Apr 2013Errata type: Future reference | Page number: 0 | Errata date: 05 Sep 06
The code could use some performance improvement.
Errata type: Typo | Page number: 17 | Errata date: 18 Feb 08
Paragraph 2 under Headline "Step 3:...": should be 'properties' not 'proprieties'
Errata type: Technical Issue | Page number: 17 | Errata date: 18 Feb 08
Missing apostrophe (') on line 3 at the end of the define procedure define('SMARTY_DIR', 'C:\apache\htdocs\mycode\libs\); Should be define('SMARTY_DIR', 'C:\apache\htdocs\mycode\libs\');
Errata type: Code | Page number: 17 | Errata date: 03 Apr 09
Missing apostrophe (') on line 3 at the end of the define procedure.
Errata type: Typo | Page number: 17 | Errata date: 03 Apr 09
Paragraph 2 (first line) under Heading "Step 3:...": It should be "properties" and not "proprieties".
Errata type: Code | Page number: 17 | Errata date: 03 Apr 09
chmod 770 /www/hdocs/templates_c should be chmod 770 /www/htdocs/templates_c
Errata type: Code | Page number: 24 | Errata date: 01 Sep 06
The code for books.php in Chapter 2 was missing in the code download package. The concerned code has been included in the package and re-uploaded.
Errata type: Future Reference | Page number: 26 | Errata date: 04 Sep 06
Variable declaration as 'public', 'private', & 'protected' are not supported by PHP 4.x.x only supported in PHP 5.x.x.
Errata type: PHP 4 support | Page number: 26 | Errata date: 04 Sep 06
Variable declarations such as 'public', 'private', & 'protected' are not supported by PHP 4.x.x only supported in PHP 5.x.x. Some examples will need slight modification to work with PHP 4.
Errata type: Code | Page number: 42 | Errata date: 03 Apr 09
#body { left: 210px; ... } should be: #body { margin-left: 210px; ... }.
Errata type: Missing $ sign | Page number: 51 | Errata date: 31 Aug 06
<td>{student.email}</td> should have a $ sign just after the first curly bracket.
Errata type: Typo | Page number: 52 | Errata date: 20 Jul 07
Replace "$smarty = new Smarty ();" with "$smarty = new smarty ();".
Errata type: Typo | Page number: 54 | Errata date: 05 Sep 06
In the section on Associative Array, the array declaration misses a comma after "roll"=>12 and a closing parenthesis and comma after "roll"=>18, respectively.
Errata type: Indenting | Page number: 54 | Errata date: 05 Sep 06
IThe section on associative array has a slight indenting problem in the array declaration.
Errata type: Small syntax errors| Page number: 54 | Errata date: 06 Sep 06
There is a comma missing after "roll"=>12)
Closing parenthesis missing after "roll"=>18
Errata type: Typo| Page number: 58 | Errata date: 03 Apr 09
"sample_section.tpl" should be "sample_section2.tpl"
Errata type: Code| Page number: 60 | Errata date: 15 Nov 06
The code of sample_section2.tpl: sample_section2.tpl {foreach item=book loop=$books} Title: {$book.title} Price: {$book.price} Author: {$book.authors} {/section} shoulde be : {foreach item=book from=$books} Title: {$book.title} Price: {$book.price} Author: {$book.authors} {/foreach}
Errata type: Technical Issue| Page number: 60 | Errata date: 15 Feb 08
{if $smarty.section.section_name.first}
This is Heading
{else} do what ever you want {endif} the {endif} tag should be replaced by {/if}
Errata type: Code problem | Page number: 68 | Errata date: 27 Jul 06
The survey.tpl file has been updated with the required changes.
Errata type: Technical Issue | Page number: 73| Errata date: 15 Feb 08
Tmail($user, "Newsletter", $out, $headers); Should be mail($user, "Newsletter", $output, $headers);
Sample chapters
You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.
This book is a comprehensive guide to all aspects of using Smarty. It will help you to:
- Install and configure Smarty on your Web server
- Understand how Smarty affects your web site architecture, and build site foundations that make the most of what Smarty offers
- Designers will learn to work with templates that contain variables and logic, to modify layouts or content of Smarty web sites
- See how Smarty caching can improve the performance of your sites
- Develop custom Smarty functions and plug-ins to incorporate into your templates
Smarty is a templating engine for PHP. Designers who are used to working with HTML files can work with Smarty templates, which are HTML files with simple tags while programmers work with the underlying PHP code. The Smarty engine brings the code and templates together. The result of all this is that designers can concentrate on designing, programmers can concentrate on programming, and they don't need to get in each others way so much.
Even if you are developing a site on your own, Smarty is a powerful way to make your code clearer to you and others, as well as easier to debug and modify later.
Visit the Free Online Edition for Smarty PHP Template Programming and Applications and learn more about the book and discover what each chapter from this book has in store.
You can now download "Smarty Cheat Sheet" for free: http://smartybook.packtpub.com/
Using a step-by-step approach based on realistic examples, the expert authors show you how to use Smarty in your own PHP development.
This book is written for PHP developers who want to use Smarty templates in their development, and for designers who are working with PHP developers who are using Smarty.

