Github or SVN Settings Best Practice - Commercial Project based on CakePHP

2012-04-03 Thread park
Hi all, I've been doing commercial projects based on CakePHP since 1.1 on SVN. I don't think we followed the best practice though: - We keep the entire cake directory within the SVN repo. Yes, with the Cake core. So whenever a new version of Cake is released, we've got to replace the

using Cake's Form helper in non-Cake apps?

2010-12-08 Thread park
Hi all, I'm looking to migrate part of a Cake project into a non-Cake app. Is there a way to use Cake's form helper in a non-Cake environment? Is there any existing solutions or best practice? Thank you. Check out the new CakePHP Questions site http://cakeqs.org and help others with their C

Cake without write permission to file systems?

2010-11-08 Thread park
Hi all, I tried to deploy a Cake app to a cloud hosting service ( similar to GAE but supports PHP and MySQL ) which does NOT allow write access to the file system. The caching is supposed to be taken care of by Memcache. Is it possible to get Cake to work in such an environment? I did change Ses

Recurring Events Model Design in a Calendar App

2009-10-22 Thread park
Hi all, I'm developing a calendar app where some events are recurring on a daily / weekly / monthly basis, just like what Google Calendar offers. I'm not quite sure how to design a model structure to support this. Is there any best practice for this? Many thanks. --~--~-~--~~---

Re: "approved" field for a model

2009-07-28 Thread park
put > > function findApproved(){ > >      $data = $this->find('all', array('conditions'=>array > ('Model.approved'=>1, > more conditions etc etc))); > >       return $data; > > } > > in your controller just put > $this-&

"approved" field for a model

2009-07-28 Thread park
Hi, Would like to add an "approved" field for a model. Users can only see entries whose Model.approved = 1. Only in admin section can unapproved entries be retrieved. It's an existing site, so I don't want to rewrite conditions for all find queries. Is there a centralized method (presumably in

user preferences on a social site

2009-05-10 Thread park
On a social site, users may change preferences on whether their profiles are open for strangers. In cake, what's the best practice for implementing this functionality? Will ACL work well on this? Or is there any other solutions? Many thanks! --~--~-~--~~~---~--~~

user preferences on a social site

2009-05-10 Thread park
On an social site, users may change preferences on whether their profiles are open for strangers, or whether their actions are posted to the newsfeed section. In cake, what's the best practice for implementing this functionality? Will ACL work well on this? Or is there any other solutions? Many

Re: Poll: what do you hate about CakePHP?

2009-05-07 Thread park
No HABTM counterCache Ignoring callbacks on associative queries On May 8, 6:29 am, Nate wrote: > Well, maybe hate's a strong word.  Let's say, what do you like the > least?  Kind of an odd question, I know, but since we've kick-started > development of a new version, I'd like to know what the mo

Re: paragraph breaks removed on form save

2009-05-05 Thread park
the content, you'll need > to run it through nl2br(). Either that, or use a WYSIWYG widget to > create proper paragraphs. > > http://www.php.net/manual/en/function.nl2br.php > > On Tue, May 5, 2009 at 10:05 PM, park wrote: > > > > Hi, > > > > It s

paragraph breaks removed on form save

2009-05-05 Thread park
Hi, It seems that cake automatically removes paragraphs breaks from textareas on form submission. So anything user inputs will end up one long paragraph. Is there a way to preserve the paragraph breaks? Thank you! --~--~-~--~~~---~--~~ You received this message

Re: change "contain" settings for $paginate on the fly

2009-04-10 Thread park
Thanks very much! On Apr 10, 9:22 pm, brian wrote: > You can change it within the action by doing: > > $this->paginate['Model']['contain'] = array(...); > > > > On Fri, Apr 10, 2009 at 6:10 AM, park wrote: > > > Hi, > > > $this-

change "contain" settings for $paginate on the fly

2009-04-10 Thread park
Hi, $this->Model->contain() doesn't seem to affect $paginate query result. The following approach is mentioned in the official documentation. var $paginate = array( 'Model'=> array( 'contain' => array( // Contain settings goes here

Re: Get "last deleted id" from afterDelete?

2009-04-09 Thread park
l() returns. > > hth > grigri > > On Apr 9, 4:09 pm, park wrote: > > > > > Hi, > > > Working on a set of models, in which after one model got its record > > updated, the Log model will be manipulated accordingly. > > > $cascade = true of

Get "last deleted id" from afterDelete?

2009-04-09 Thread park
Hi, Working on a set of models, in which after one model got its record updated, the Log model will be manipulated accordingly. $cascade = true of Model:del() doesn't seem to work, 'coz models mentioned above are not associated. (Log model has a field 'item_id' that is shared by all other models

Re: Get $Auth->user() in Model?

2009-04-09 Thread park
I see. Thanks a lot! On Apr 8, 4:45 am, Miles J wrote: > You are not able to use Components in models. The best is to import > the session component. > > App::import('Component', 'Session'); > $Session = new SessionComponent(); > > $user = $Session->read('Auth.User'); --~--~-~--~~--

Get $Auth->user() in Model?

2009-04-07 Thread park
Is it possible to get $Auth->user() in a Model? Infomation of current user is needed in an afterFind function. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send ema

Re: Custom url's

2009-03-04 Thread park
You either define a '/fields/view/science' route (hard coded) in /app/ config/route.php, Or pass 'science' as an argument an do a query in db. On Mar 5, 8:23 am, MaNuM wrote: > Hi everybody. I haven't worked for a long time with CakePHP and I > can't find a solution for this: > > In my applicati

field value-dependent self-referencing HABTM?

2009-01-24 Thread park
Hi there, I'm developing a romantic matchmaking app and just went into a problem, which concerns two models: User (id, gender) Score (id, male_id, female_id, score) A user is either a male or a female. A score (the HABTM middle model) is an indicator of compatibility between a male and a female

Re: Using CakePHP with XAMPP for Windows

2009-01-18 Thread park
By default, CSS and images should be put here: cake\app\webroot\css cake\app\webroot\img See if it works for you. On Jan 19, 8:46 am, Sharmo wrote: > Hi, > > I use XAMPP for Windows as my localhost server. I have installed > CakePHP. I have made my first application using CakePHP. When I try to

Re: gzip compression with Cakephp

2009-01-13 Thread park
ing. > > php_value output_buffering On > php_value output_handler ob_gzhandler > > _k10_ > > On Jan 14, 8:05 am, park wrote: > > > Hi, > > > Is there any best practices turning gzip compression on with Apache > > (on shared hosting where php.ini cannot be modified

Re: gzip compression with Cakephp

2009-01-13 Thread park
Thanks, I'll try. How do I know it works or not? Is there anywhere I can check gzip is on? On Jan 14, 1:00 pm, _k10_ wrote: > use your .htaccess file to enable gzipping. > > php_value output_buffering On > php_value output_handler ob_gzhandler > > _k10_ > > On

gzip compression with Cakephp

2009-01-13 Thread park
Hi, Is there any best practices turning gzip compression on with Apache (on shared hosting where php.ini cannot be modified) and Cake? I've been developing with Cake for quite a while, but not an expert on Apache. Below is the zlib setting on the server. zlib.output_compressionO

Re: really simple authentication

2009-01-08 Thread park
The simplest method would be .htaccess password. On Jan 9, 5:19 am, fain182 wrote: > hello, > I need to protect a whole cakephp site under one password, i don't > need user, groups, registration etc.. so i don't want use ACL for a > simple thing like this.. how can I do? there is a simpler > aut

Re: 'php' is not recognized as an internal or external command, operable program or batch file'

2009-01-03 Thread park
You should set \xampp\php in the "path" environment variable. On Jan 4, 2:49 pm, "amar goud" wrote: >  Hi All, > > If I run *php -v* command to know php version on command line, > it shows error like > 'php' is not recognized as an internal or external command, operable program > or batch file'

How to remove execution duration output

2008-12-30 Thread park
Is there any way to remove at the end of page? Useful in some occasions when $this->layout = 'ajax'. Many thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email t

Unintended Redirect to homepage after Implementing 'Remember_Me' Component

2008-12-01 Thread park
Hi guys, Implemented 'remember_me' component mentioned in the following article, http://bakery.cakephp.org/articles/view/remember-me-a-component-to-add-upon-basic-auth Sometimes works fine, sometimes got redirected to homepage unintendedly upon accessing any pages. Anyone have the same problem?

Re: Where to find graham bird's AJAX tutorial?

2008-11-11 Thread park
Manning's jQuery in Action On Nov 12, 2:40 pm, mario <[EMAIL PROTECTED]> wrote: > Ok. I know now that the tutorial is outdated. > I'm really looking for nice tutorials about using ajax in cakephp. > > Are there any recommendations for this? > > Thanks, > Mario > > On Nov 12, 12:04 pm, mario <[EMA

Re: Pagination link URL doesn't work with extra variable

2008-10-19 Thread Daehee Park
Nice, now the links actually are clickable and route to the correct pagination view. But the link still looks like this: http://localhost/test/newyorkcity/spots/newyorkcity/page:2 So using the options() in the paginationhelper is passing it twice to the controller? If I *don't* use the options, h

Re: Any one Familiar with XML/SWF charts usage in Cakephp

2008-10-16 Thread Daehee Park
Thanks everyone for your replies. It's working! After considering the advice, I also used the tutorials here: http://www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-services-in-cakephp-12-really-easy/ http://bakery.cakephp.org/articles/view/automatically-generate-dynamic-sitemaps Th

admin routing issue while debug = 0

2008-10-16 Thread park
Using admin routing + .htaccess to restrict admin operations. Works correctly while cake debug is set to 1. When debug = 0, 404 error is returned instead of username/password (define in .htaccess of /admin directory) dialog. Any ideas why? --~--~-~--~~~---~--~~ Y

Auth->allow() in controller specific cases

2008-10-16 Thread park
Hi, I've got, say, two actions, with exactly the same action name but belong to different controllers. posts/add, comments/add. I want to set: $this->Auth->allow('comments/add'); (while blocking users not logged in from access posts/add) But this syntax does not seem to be supported by Auth com

Re: SQL WHERE statement working with "created" field

2008-10-15 Thread Daehee Park
Perfect, thanks so much! On Wed, Oct 15, 2008 at 3:54 PM, Chez17 <[EMAIL PROTECTED]> wrote: > > I'm no expert but I think I maybe able to help. So lets assume you > have a php variable $lastWeek that has the date you want (7 days ago). > You create a find statement like this: > > $result = $this

Re: nicer flash+redirect page?

2008-09-22 Thread park
quot;flash_error.ctp" and should go in > the layouts folder but it is not a full layout, just a wrapper-div > with an id and a class I set. > > /Martin > > On Sep 22, 4:57 am, park <[EMAIL PROTECTED]> wrote: > > > Hi, > > > Is there any better practice of imp

nicer flash+redirect page?

2008-09-21 Thread park
Hi, Is there any better practice of implementing a nicer-looking flash redirect? Many thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegrou

hasMany/belongsTo w/ more than one foreign keys?

2008-07-12 Thread park
Hello, Just came across a case where hasMany/belongsTo relations requires more than one foreign keys from the same model. Take a wish list for instance. There's two models, User and Wish. A user can have multiple wishes for him self for sure. And he/she can pick up others' wishes and claim a exc