RSSCategory: Web Site Development

Ajax In Place Autocomplete Editor for CakePHP

July 29, 2007 | By | 3 Replies More
Ajax In Place Autocomplete Editor for CakePHP

The Scriptaculous InPlaceEditor and Autocompleter are very useful, and I needed a combination of them: when you click on a field to edit it, the Autocompleter comes up with a list of options, then after you choose an option and click “ok”, the ID of the selected element is sent to the server and the […]

Read More

Last updated December 22, 2013

WordPress Permalink Format

July 6, 2007 | By | Reply More
WordPress Permalink Format

Today I changed my WordPress permalink format to /posts/post_id At first, I used the default date format /year/month/day/post_name but then decided that dates were not useful information in the URL. Next I tried /category/post_name, but the URLs were just too long to look “pretty”. (And I thought that if I ever re-named a post, the […]

Read More

Last updated July 9, 2007

CakePHP – Do not name a table “models”!

July 5, 2007 | By | Reply More
CakePHP – Do not name a table “models”!

I’m making a clock model database. Naturally enough, I named one of my tables “models”. Using CakePHP, I could enter data into the table, but neither data validation nor table associations would work. I renamed the table to “item” and everything is fine. Likewise, I suppose, a table should not be named “views” or “controllers”. […]

Read More

Last updated December 22, 2013

CakePHP: Many views – one controller

July 4, 2007 | By | 2 Replies More
CakePHP: Many views – one controller

If you want multiple controllers to be able to share a view, do this: Put the shared views in the views/common directory Call a shared view like this: $this->render(‘../common/view_name’); Share this post:

Read More

Last updated December 22, 2013

Setting up WordPress

June 14, 2007 | By | 6 Replies More
Setting up WordPress

When trying to install the Independence Day theme, the following error message appeared: Warning: array_merge() [function array_merge]: Argument 2 is not an array in: …/wp-includes/widgets.php on line 53. Based on the comments on this post: http://www.gudlyf.com/2005/01/14/wordpress-plugin-technotag/feed/ I changed line 53 of wp-includes/widgets.php to: $sidebar = array_merge($defaults, (array)$args); The change casts argument 2 to the array […]

Read More

Last updated July 9, 2007

Query Caching Using query($sql) Breaks getNumRows()

March 16, 2007 | By | Reply More
Query Caching Using query($sql) Breaks getNumRows()

I am using Cakephp 1.1.11.4064 and a Postgresql database. I was having trouble in my application where the value returned from getNumRows() was incorrect in certain places. The problem turned out to be Cake’s query caching. Example code $sql_1 = “sql statement 1;”; $parent_result_1 = $this->query($sql_1); . . . Lots of code here . . […]

Read More

Last updated December 22, 2013