Showing articles 131 - 140 (147 total)
Posted on 05/19/2009 at 10:49 am | Viewed 14,247 times | 0 comments
I wanted to change the displayed field that Cake automatically returns with a Model::find('list'). If you have a database column named title or name (I'm not sure of the full list), CakePHP will automatically return an array index by Model.id => Model.name. This usually works, but today I'm working with a database table that doesn't use that...
Read More | Comments
Posted on 05/14/2009 at 10:57 am | Viewed 18,770 times | 0 comments
I was sick and tired of having to FTP into my accounts and view the VERSION.txt file that comes with the Cake core to figure out what version of Cake I was running. I did a quick search but wasn't finding anything. I was about to dig in and hack something together, but tried the CakePHP API as a last resort. Bingo! To find out what CakePHP...
Read More | Comments
Posted on 05/13/2009 at 12:15 pm | Viewed 11,239 times | 0 comments
A big pain- you can't just name a file .htaccess through Windows Explorer. It complains that you need to supply a name! No problem. Here's how you can name a file .htaccess (only tested on Notepad, though hopefully it will work on more): Load up your file in Notepad or create a new file in Notepad Add your .htaccess declarations File > Save...
Read More | Comments
Posted on 05/13/2009 at 12:09 pm | Viewed 12,516 times | 0 comments
When re-designing a site, or somehow being locked into a given web site structure that uses .html (or .htm) file extensions, it's a good idea to keep the file names the same (especially if the site has been around a while and has good search engine visibility). Think you can't use PHP on .html or .htm web pages? Think again. With apache it's...
Read More | Comments
Posted on 05/12/2009 at 01:02 pm | Viewed 12,266 times | 0 comments
I decided to upgrade my version of Eclipse to 3.4 (Ganymede) mainly so I could use the Git plugin . I wanted to migrate my settings from one install to the other. I know I had done this before, when I upgraded from 3.2 to 3.3, but forgot how. So I don't have to scratch my head so much next time, here is how you can move your settings...
Read More | Comments
Posted on 05/12/2009 at 12:27 pm | Viewed 12,588 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...
Read More | Comments
Posted on 05/07/2009 at 04:36 pm | Viewed 16,890 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. ...
Read More | Comments
Posted on 05/07/2009 at 11:23 am | Viewed 10,407 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...
Read More | Comments
Posted on 05/06/2009 at 05:13 pm | Viewed 14,338 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...
Read More | Comments
Posted on 04/29/2009 at 11:14 am | Viewed 14,335 times | 1 comment
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