Skip to content
  • Archives
  • Buy Adspace
  • Contact me
  • Hide Ads for Premium Members

zen of coding

holistic web development

  • Archives
  • Buy Adspace
  • Contact me
  • Hide Ads for Premium Members

Day: May 5, 2008

  • Home
  • 2008
  • May
  • 5
CakePHP

Multiple checkboxes

May 5, 2008 vladko

One question that I’ve seen come up a few times is: “How do I handle multiple checkboxes in a form?” The only trick here is

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Hooray JQuery

May 5, 2008 vladko

I’ve completely abandoned using Prototype/Scriptaculous in favor of JQuery. I simply prefer the way JQuery does things: Simple syntax No more in-line JS Lots of

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Excellent HTML table helper

May 5, 2008 vladko

If your application requires to display a lot of data from the DB, then I suggest you take a look at this nice, little HTML

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

CSS files and $scripts_for_layout

May 5, 2008 vladko

You probably know that if you have $scripts_for_layout in your site’s layout, then you can include JS files from the view. For example, if you’d like

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Fatten up your Models

May 5, 2008 vladko

CakePHP models, unlike super models should be fat. It’s a good practice to keep redundant code out of your controllers. Here’s a quick example on

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Do I have any errors in my form?

May 5, 2008 vladko

A nice little trick to check if you have some errors in the view is to use the $session object. Try this (in the view):

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

You gotta love… Bindable behavior

May 5, 2008 vladko

Update: as of 05/18/2008 there is a new core Containable behavior, which is an evolution of a few previous behaviors, including Bindable. If you are

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

A cleaner way to send emails

May 5, 2008 vladko

CakePHP 1.2 provides a very easy way to send emails using the built-in Email component. However, sending emails directly from your User’s controller add action, for

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Use app controller to keep static list data

May 5, 2008 vladko

In the past I’ve often kept some data such as a list of states or countries in the DB and used that to populate my

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More
CakePHP

Styling the paginator links

May 5, 2008 vladko

A little trick to make your paginator links look pretty… Add a ‘class’ option to your paginator links like so: [sourcecode language=’php’]

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email

Like this:

Like Loading…
Read More

Posts pagination

1 2 Next

New Posts

  • I don’t bother with “whiteboard interviews”.
  • PHP MVC Frameworks preview of 2018 (Phalcon 3, Symfony 4, Laravel 5.x and others)
  • Case study: building a better search with Algolia and Lumen PHP
  • The State of PHP MVC Frameworks in 2017 (Laravel, Symfony, CodeIgniter, CakePHP, Zend)
  • The great PHP MVC Framework Showdown of 2016 – (CakePHP 3 vs Symfony 2 vs Laravel 5 vs Zend 2)

Top Posts & Pages

  • Easy CakePHP logging to FireBug with DebugKit and FirePHP
  • Upgrading Ubuntu to 14.04, 500 errors because of .htaccess and other fun things...
  • The great PHP MVC Framework Showdown of 2016 - (CakePHP 3 vs Symfony 2 vs Laravel 5 vs Zend 2)
  • PHP MVC Frameworks preview of 2018 (Phalcon 3, Symfony 4, Laravel 5.x and others)
  • Redirecting to the home page
  • JQuery in the CakePHP world (part 1 - the basics)
  • "Error: Database connection "Mysql" is missing, or could not be created". CakePHP 2.0 -- cake bake trouble
  • I can't get my estimations right... Top issues and remedies
  • Set variable in the view to be used in the layout
  • CakePHP + MySQL + Tinyint(1) = Confusion
May 2008
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
    Jun »
All Rights Reserved 2024.
Proudly powered by WordPress | Theme: Fairy by Candid Themes.
%d