MainelyDesign.com Blog

Showing articles 141 - 147 (147 total)

Best Tiny Font for Web Graphics

Posted on 04/28/2009 at 05:03 pm | Viewed 14,445 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...

Preformatted Text in TinyMCE <pre></pre>

Posted on 04/21/2009 at 10:26 am | Viewed 21,773 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...

$paginator->sort() error?

Posted on 04/17/2009 at 01:32 pm | Viewed 11,050 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...

Transactional Support in CakePHP

Posted on 04/17/2009 at 11:50 am | Viewed 14,769 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)) {...

saveAll() to save multiple records in 1 model

Posted on 04/17/2009 at 09:58 am | Viewed 18,992 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...

Checkbox - setting the default state

Posted on 04/17/2009 at 08:31 am | Viewed 14,923 times | 0 comments

I ran across a rather simple problem (I thought) that took a little searching to figure out.  All I had to do was create a checkbox form input that I wanted to have checked by default.  I tried 'default'=>'checked', which didn't work.  I also tried 'checked'=>true and 'checked'=>1, but that works every time, even if validation fails and the...

Importing an Excel file into CakePHP

Posted on 04/16/2009 at 02:42 pm | Viewed 33,755 times | 0 comments

I needed to be able to upload an excel file, parse the file, and then add each row as a separate database entry.  I had this working for a CSV file using the php built-in function fgetcsv() , but the client switched to using an excel file (instead of direct PHP access to the in-house database, we decided to have the client upload a CSV/Excel...

    7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15    older >>

Meet Site Avenger - Hosted Content Management System

Powered By: Site Avenger | Site Production: Saco Design