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

Recent Comments

Posted 09/05/2010 11:31am
Regarding:

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?
Posted 21/03/2010 02:19pm
Just curious if this would work with Cake's built in ACL? Anybody tried it?
Posted 31/01/2010 09:42pm
Hi, I want to learn cakephp but 1.3 in comming and i read things about 2.0. Must i wait for 1.3 of 2.0 or can i start with 1.2 and convert it later to 1.2 or 2.0?

what's the planning for 1.3 or 2.0 final version? any dates?

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.
Posted 25/01/2010 10:36am
@Cake_session.php I removed this: if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') block and replaced for the if suggested.


@ My external pages I have:

Page1:
require("storev1/app/webroot/cake_session.php");
$item = array($id, $price, $name, $price);
$_SESSION['cart']=$item;

Page 2:
require("storev1/app/webroot/cake_session.php");
print_r($_SESSION);

And the output is:
Array ( [cart] => Array ( [0] => a08a40d9-081a-11df-97ae-6dad1c823895 [1] => 60 [2] => Calcas de Sarja [3] => 60 ) [oi] => oi )

In my cake pages the output of print_r($_SESSION) is:
Array ( [Config] => Array ( [userAgent] => cbad7cf5758f0f74a0172958dc10348e [time] => 1264390588 [timeout] => 3 ) )

What am I doing wrong here?

PS: If I print session_id on cake and external the output won't be the sane id :S

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.

Posted 12/12/2009 11:03pm
I don't know why cake publish this "helpers" that are used by companies and they are not free of use like everything arround here. If I want to pay i make a donation...
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.