Today I was working on a page layout where a page width had to be fluid, while the sidebar had to be with fixed width. So here is my solution:
The layout looked like this in the beginning:

» Read more: How to – layout with fixed sidebar
Today I was working on a page layout where a page width had to be fluid, while the sidebar had to be with fixed width. So here is my solution:
The layout looked like this in the beginning:

When building applications is always smart to check and clean the user input. This is a must when you building a website or public application.
I create always an instance of Sanitize class in my AppController and then using it in all of my controllers like this
» Read more: Problem with mysql_real_escape_string when Sanitize your data.

At the end of last year I received a request from PacktPub to review one of their books – JQuery 1.3 with PHP written by Kae Verens. There were some problem with delivery of the paper copy of the book, so finally I got an electronic copy.
This book will teach you how to use jQuery to create some really stunning effects,
but without you needing to have in-depth knowledge of how jQuery works. It
provides you with everything you need to build practical user interfaces, for
everything from graphics manipulation and drag-and-drop to data searching, and
much more. The book also provides practical demonstrations of PHP and jQuery and
explains these examples, rather than starting from how JavaScript works and how it
is different from PHP.
The book is separated into 10 Chapters.
» Read more: Book review – JQuery 1.3 with PHP – Packt Publishing
This is a helper for building multi-sheets Excel documents in CakePHP. The hepler was inspired from Yuen Ying’s blog post, but it’s extended to support multiple sheets.
» Read more: CakePHP Excel Helper
Securing the admin part of the site is always tricky, especially for open source software CMS. A very good practice is to protect your admin directory with an extra .htaccess, because most of the damages has been done from exploits of the applications rather than brute force cracking.
There are many articles how to set up .htaccess authentication on Apache web server, but here I will explain how to set an extra password request only for Internet users while the users from Local Network should spare the extra password.
The scenario:
When the user in in the local network the administration part need to be accessible with the CMS default authentication, while if the user access the Administration from Internet, an extra password prompt will be shown.
1. Create your password file
If you writing in an existing file don’t use the option -c
2. Setting the .htaccess
Depending of the server set up you can do this in your httpd.conf, or in apache2 style – in sites-available directory. So, let’s say we have a file in /etc/apache/sites-available called site.com which holds the record of the domain
Here is the tricky part: The directive “Satisfy any”. By default the directive is set to all so it’s like AND:
If (you are in local net AND you are valid user) {access the location}
while Satisfy any is like OR
If (you are in local net OR you are valid user) {access the location}
More on this topic: Satisfy directive
It’s very common practice the administrators to get notification mail when a new order is placed on the shop. Here is how to activate this feature in Magento for free (there is paid Admin Notification Module as well):
Log in into admin area, then go to System->Configuration menu. Scroll down to Sales section and click on the Sales Emails and select the first section Orders. Enter your admin e-mail in the field “Send Order Email Copy To”.
And here comes the tricky one
Select the option “Separate email” from the “Send Order Email Copy Method” field. I don’t know why, but if it’s selected “Bcc”, the e-mail to the admin wasn’t send.
It’s possible that this is fixed in the versions above 1.2.x, but I haven’t tested.
hope this helps someone.
Yesterday I found a tool which could be handy for rookie CakePHP developers. Atlas is a web code generator based in CakePHP. As a glance it’s a web alternative of CakePHP bake console which is a nice idea indeed.
My first impression was that tool is like diamond in the mud and I was wondering how I didn’t hear about this tool till now, but after installing I realized that it’s not so good as it looked like.
The first problem occurs in the generation of my first project – I’ve got a error message in Spanish which I couldn’t understand. I had to use Google translate for it, but after the translation, the message still doesn’t say much – “Failed to generate project skeleton”.
After debugging the code figuring out why this error means, I found that the application uses backslash as directory separator (\) ?!? and of course this lead to directories and files with strange names like /var/www/ctest\app\controllers directories where ctest\app\controllers was the full name of the directory
. I am on Ubuntu Desktop machine where backslash is not a directory separator.
Pros:
Cons
The conclusion:
Atlas looking like promising tool, still it’s far from the final version, but it’s worth to try it in Windows environment.
I definitely will follow that project in the future, so hopefully I could use it one day
Few weeks ago I’ve been contacted from Packt Publishing in order to review their new book Magento Beginners Guide and because I had experience with that e-commerce platform, I decided to accept the offer.
Magento Beginners Guide is a new book that covers the process of building an online store using the Magento e-commerce solution. It’s written by William Rice and is focused on the main key features of Magento to setup a unique on-line store and customize its appearance with the help of examples.
This book is for anyone who wants to create an online store using Magento. If you are a non-technical person and are discouraged by the complexity of this powerful e-commerce application, this book is ideal for you.
Magento is the world’s most evolved e-commerce solution which runs on the Apache/MySQL/PHP platform. From one installation, you can control multiple multilingual storefronts, all sharing customer and product information. Magento’s templates, themes and extensions gives the possibility to create an unique and powerful solution for e-commerce.
The book provides a step-by-step approach to building a simple and effective on-line store. It covers the key features of Magento that will help you get your store up and running. It guides you through the installation, configuration, adding categories and product attributes, filling your store with products from various types, payment configuration, maintaining relationships with your customers, and fulfilling orders.
Readers will be able to present and sell products in groups, sets, they can offer discounts based on quantities along with accepting various payments such as PayPal, CC, Checks, Bank transfers, Payment on delivery and many other payment gateways. Along with connecting to shippers such as UPS, FedEx, and USPS they will learn to apply tax rules to different shipping addresses and different types of products.
The publisher kindly provide two chapters from the book, so you can get a clue of the style in it.
If you like the book you can order it from here:
Magento: Beginner’s Guide
€27.89 save 10%