Recent Posts
- (09/10) Fixing Warning: the ECDSA host key for 'github.com' differs from the key for the IP addressTAGS:Web Server Admin
- (12/26) CakePHP 3 - Getting List of Column Definitions from a Table (like schema())TAGS:CakephpCake3
- (09/14) Change Order of Loaded Behaviors in CakePHP 3TAGS:Cake3CakephpWeb ProgrammingPhp
- (05/29) CakePHP 3 - Accept JSON Header Only Working When Debug FalseTAGS:Web ProgrammingCakephpCake3
- (05/23) Remove All Events from Google Calendar (Reset Calendar)TAGS:Web ProgrammingPhp
- (11/08) Google Tag Manager (GTM) Not Firing Default PageView EventTAGS:Web ProgrammingJavascriptGoogle Tag Manager
- (10/13) In PHP, how do you get __toString() Magic Method Result without calling echo?TAGS:CakephpCake3Cakephp 13PhpWeb Programming
- (11/14) Getting output from shell_exec() at all timesTAGS:Web ProgrammingWeb Server Admin
Subscribe to my feed
MainelyDesign.com Blog
Site Avenger Tagged Blog Posts
Global Mysql Find and Replace with CakePHP
Posted on 08/31/2010 at 09:03 am | Viewed 14,802 times | 0 comments
I'm moving my Content Management System over to CakePHP 1.3. I'll post an article about my experiences later. Today I will focus on one and only one issue with the migration from Cake 1.2 to 1.3: the change of webroot/theme/ to webroot/theme/ to serve static content. At first I was a little disapointed/scared at the prospects of making this change, but have since come to see the absolute brilliance in this approach.
Read: Global Mysql Find and Replace with CakePHP | View: Comments
Upgrading Jquery UI Tabs and it Stopped Working
Posted on 12/09/2009 at 08:16 pm | Viewed 12,933 times | 0 comments
I was upgrading the version of Jquery UI that I use with Site Avenger. The last time I was in a rush, nothing seemed to work and I rolled the changes back. This time, I took the time and decided to finally make this Jquery UI upgrade happen. This time everything went swell, except my Jquery UI tabs plugin stopped working. WTF?
Read: Upgrading Jquery UI Tabs and it Stopped Working | View: Comments
Cakephp's Flay Class is Amazing - Examples Included
Posted on 09/08/2009 at 09:31 pm | Viewed 13,931 times | 0 comments
If you haven't checked out CakePHP's Flay class, check it out. It's one of the best utility classes for text output in CakePHP.
I just noticed that my blog was using the same META description for all of my blog entries- not good for SEO. Instead, I want to pull a fragment of the article copy and use that as my META description. I currently use this convoluted way to get my summaries from the article copy, so I decided to try using the Flay class. I've used it before but I'm glad I revisited it... it's amazing!
Read: Cakephp's Flay Class is Amazing - Examples Included | View: Comments
Changing Filetypes Shown in SWF Upload File Browser
Posted on 08/25/2009 at 04:17 pm | Viewed 16,639 times | 0 comments
It's easy to change which file types are allowed to show up (and are displayed) when you browse for files to upload through SWF Upload. SWF Upload makes it easy to upload multiple files in PHP.
I just had to hunt through some source files until I found this in my SWF Upload config. (goes in the new SWFUpload() function)
Read: Changing Filetypes Shown in SWF Upload File Browser | View: Comments
TinyMCE Doesn't Work in IE8
Posted on 07/24/2009 at 11:54 am | Viewed 26,730 times | 4 comments
I was training a client how to update their web site using Site Avenger when the strangest thing happened- no copy was showing in TinyMCE. No matter what I pasted the tiny editor would remain a nice, plain white. I didn't think to try typing directly into TinyMCE. No matter, a click on the HTML button to view the source revealed the content was in fact there, just not being shown within the TinyMCE editor.
Changing the CakePHP Model Schema on the Fly
Posted on 06/11/2009 at 10:28 am | Viewed 14,193 times | 0 comments
I have an interesting way of dynamically changing a model's validation on the fly. I have a standard approach that involves contact forms, contest entries, etc. using a database to store which fields should be on a form. I tweaked this over time, and recently needed to change the schema from text, which all answers have been up to this point (and IS the DB field type), to a type of date. I kept getting the error 'preg_replace expects parameter 2 to be a string, array given'. Once I got the right schema, the errors went away.
Read: Changing the CakePHP Model Schema on the Fly | View: Comments
Displaying phpinfo() without CSS styles
Posted on 06/09/2009 at 10:18 am | Viewed 23,273 times | 1 comment
I wanted logged in users to be able to see the output from phpinfo(); within Site Avenger. The problem with using phpinfo() is that it outputs a full HTML page, CSS styles and all. In the past this has been fine, but now I wanted to show the phpinfo() within the Site Avenger layout and CSS styles. I came across a simple, yet highly effective solution...
Read: Displaying phpinfo() without CSS styles | View: Comments
A tale of caution: naming CakePHP "view" functions
Posted on 05/06/2009 at 05:13 pm | Viewed 14,308 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 quantities of products placed in the cart. When I hit the submit button to change the quantities, I was getting redirected to my site root.
Read: A tale of caution: naming CakePHP "view" functions | View: Comments
Preformatted Text in TinyMCE <pre></pre>
Posted on 04/21/2009 at 10:26 am | Viewed 21,694 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 with later). My real trouble came with using <pre></pre> tags for my code samples within TinyMCE. I absolutely love TinyMCE! I did a lot of research on the best JavaScript-based WYSIWYG editor oh about 5 years ago, and decided on TinyMCE and never looked back. I use it in all of my applications that require formatted HTML input (especially Site Avenger). Every now and then I will look at another editor (I know 5 years is ancient by web standards) but I've never found an editor I like more. Each editor has its quirks and I think the quirks within TinyMCE are the most manageable (as I tell my clients- even MS Word has quirks, you're just used to them).
Read: Preformatted Text in TinyMCE <pre></pre> | View: Comments
Importing an Excel file into CakePHP
Posted on 04/16/2009 at 02:42 pm | Viewed 33,659 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 file).
Full Tag List
- Cakephp
- Web Programming
- Site Avenger
- Excel
- Csv
- Database
- Saveall
- Vendors
- Import
- Truncate
- Empty Table
- Forms
- Habtm
- Usage
- Tinymce
- Geshi
- Usability
- Upgrade
- Graphic Design
- Internet Marketing
- Software
- From The Hip
- Midcoast Magnet
- User Group
- Component
- Mssql
- Git
- Apache
- Seo
- Htaccess
- Mysql
- Eclipse
- Gear
- Photoshop
- Php
- Css
- Iis
- Web Server Admin
- 404 Errors
- Iisreset
- Web Design
- Hack
- Internet Explorer
- Ie
- Firefox
- Forum Answers
- Jquery
- Swfupload
- Windows
- Example
- Links
- Tutorial
- Errors
- Behaviors
- Cakephp 13
- Humor
- Music
- Jquery Ui
- Ui
- Wamp
- Cloudfiles
- Setup
- Javascript
- Responsive
- Quick Tip
- Cake3
- Foundation
- Google Tag Manager