User Profile
- User
- brightball
- Location
- Greenville, SC
- Time Zone
- URL
- http://www.brightball.com
Recent Articles
String localization with dynamic content
Cake has a wonderful shell script function built into it called extract that will run through your code and create a .po file full of all of the text contained within your __('My text here') calls. You can then pass these files onto to translators to modify them for your languages. When you want to add variables though, you have to break it up into pieces which may change the context of the phrase. Here's a way around that.
- Published by brightball 06/20/09 - 05:08
- 10571 views
- 7 comments
WYSIWYGPro Helper and tutorial
I couldn't find any resources on setting up WYSIWYGPro with Cake so I developed this helper along with instructions for total integration with your system. If you've never used WYSIWYGPro, you should check out the demos. I've tried every WYSIWYG editor out there and none of the other ones even come close as far as I'm concerned.
- Published by brightball 06/14/09 - 14:06
- 10488 views
- 5 comments
PublishableBehavior
PublishableBehavior allows the use of datetime fields for start and end ranges on content. Included functionality allows for checking published status, toggling to published / unpublished status, and adding conditions to a find to properly filter those results
- Published by brightball 06/10/09 - 07:46
- 10339 views
- 2 comments
Making the standard date/time fields a little smoother with jQuery
While working with the date/time input fields in Cake I got tired of having to select 3/6 drop down boxes to choose all of the date/time information and specifically of having to select 3/6 drop down boxes if I decided to clear the date. A little bit of jQuery will clear this right up though.
- Published by brightball 04/22/09 - 14:42
- 11192 views
- 1 comment
Using Cake sessions outside of Cake
While recently working on a CMS tool, I needed to pass some in-session information. I was using Cake's database sessions and it wasn't playing nice with outside applications so I set this up to allow my outside application to use Cake's session handlers.
- Published by brightball 02/18/09 - 20:40
- 14894 views
- 13 comments







Model rewrite
* Returning objects
Will this potentially create a huge number of incompatibility issues? Mainly, I'm just wondering if returning arrays will still be an option. Also, what is the major benefit to something like this?
Also regarding:
Behaviors
* Remove them from the ClassRegistry
Will this result in a standalone behavior class being applied to each model or will it still be a single, shared behavior class?
My current understanding is that there will be some fairly significant updates for the 2.0 release, however, there's no telling what the release date will be for that. If you're interested in learning CakePHP, the 1.3 release is excellent.
1.1 got me hooked, 1.2 too was a massive improvement, and 1.3 looks to add a tremendous amount of functionality that will provide the basis for some extremely powerful setups. 1.3 is a good time to jump in.
If the session id's aren't matching up, it sounds like the question's been answered. The first thing I'd ask is whether or not session auto-start is set turned on within Cake. I'm assuming that it is though.
Outside of that, which type of cake session are you using (database, php, etc)?
Have you tried pulling the session id from cookie used by Cake and forcing the non-cake session to start with that ID? Can you see the cookie with the cake session id from the non-cake page?
Lastly, try disabling the Cake user agent check. It's a great security measure, but it can sometimes lead to invalidating sessions. It's one that I've had issues with in the past I know.
Just because a tool makes it easier to integrate a paid service doesn't mean it shouldn't be made available on here. If I have a client that wants to use this service on their site, this helper will save me a ton of time that I would have spend writing it myself.
I understand where you're coming from, but I am a fan every free piece of code I can get to help with integration.