Showing articles 81 - 90 (92 total)
Posted on 05/12/2009 at 12:27 pm | Viewed 1,902 times | 0 comments
I'm finally working on moving my code over to a version control system. I've tried several times over the past few years to start using Subversion, but I never quite got into it. After hearing so much about Git, I decided I needed to start using it. Luckily, most people tell you to forget everything about Subversion when using Git- no problem...
Read More | Comments
Posted on 05/07/2009 at 04:36 pm | Viewed 3,333 times | 0 comments
One thing, and there are a few, that I can't stand about having to use PHP and MSSQL Server together is the lack of support for pagination. With PHP and MySQL- no problem use limit. MSSQL- can't do it without all these ugly sub-queries. I have to give it to the CakePHP developers though, for the built-in support for pagination in MSSQL. Albe...
Read More | Comments
Posted on 05/07/2009 at 11:23 am | Viewed 1,308 times | 0 comments
Well, it finally happened! The Midcoast has a web design/interface design user group. Last night was the first meeting of From the Hip, an informal, agendas-not-allowed, information exchange session. Some people from Midcoast Magnet helped organize the event, and now the group finally has legs!
Want to Get Involved?For more on From the Hip, t...
Read More | Comments
Posted on 05/06/2009 at 05:13 pm | Viewed 3,273 times | 2 comments
Spoiler: functions that generate a view must be named using lower_case_with_underscores()
I just ran into a very interesting problem. I was testing out some of my plugins to make sure they were still working with Cake version 1.2.2.8120. They worked fine except for one function. I had a form that updates a shopping cart, changing the quantit...
Read More | Comments
Posted on 04/29/2009 at 11:14 am | Viewed 2,986 times | 6 comments
People use what they know. Most of the time I get photos embedded in an MS Word document for use on a web site. My workaround to date has been to enlarge the picture (in Word) until it is as big as it gets (keeping quality) or the size I need. I would then do a print screen and paste into Photoshop.
I knew that there had to be a better way,...
Read More | Comments
Posted on 04/28/2009 at 05:03 pm | Viewed 3,255 times | 0 comments
I finally found the perfect font for making really small, yet readable text in web graphics. I've played around with plenty of fonts and usually arrive at a reasonable result. In the past I would use Eurostyle with enough spacing to make it legible. Now, I have a new go-to font for small typeface. Introducing Silkscreen.
Usage Notes (for Ph...
Read More | Comments
Posted on 04/21/2009 at 10:26 am | Viewed 6,273 times | 1 comment
Now that I've got my blog up and running, I've been playing around with syntax highlighting of source code. I really appreciate sites that serve up code samples in a nice format, so I've tried to comply with my own version of this best practice.
Getting Geshi working, for syntax highlighting was one battle (I'll try and post what I came up wit...
Read More | Comments
Posted on 04/17/2009 at 01:32 pm | Viewed 1,689 times | 0 comments
I thought there was an error in the paginator view helper. All of a sudden I could only sort a field ascending. I (again) did a little research and came across a great thread on the CakePHP Google Group (here). Basically, as of 1.2.8120, you need (or should) specify the ModelName in your sort() function. I had only been doing sort('id'), sor...
Read More | Comments
Posted on 04/17/2009 at 11:50 am | Viewed 2,674 times | 0 comments
I just found out that CakePHP has transactional support built-in. It should have been obvious, seeing how the saveAll() function has transaction support built-in too. My first attempt at using it didn't work. In my contoller/model I was doing the following:
$this->Model->begin();
if(!$this->Model->save($this->data)) {
$this->Model->rollba...
Read More | Comments
Posted on 04/17/2009 at 09:58 am | Viewed 2,809 times | 0 comments
I ran into another issue on something I thought would be simple: saving multiple records with the saveAll() command. In case you don't know about it, saveAll() is one of the best functions in CakePHP. It automatically supports transactions, HABTM saves, and certainly saves a lot of typing for almost every type of save you want to do.
There ar...
Read More | Comments