Re: Best practice output a Dynamic menu

2011-12-11 Thread Perry
helpers should not get data directly, and I remember cakephp doesn't suggest get data in components neither( i cant' find the refer), why not get menu data in AppController's beforeRender method? On Sun, Dec 11, 2011 at 8:16 PM, MetZ wrote: > > Hi. > > I am storing my menues and links(tree behav

Re: Testing image upload

2011-12-11 Thread leigh
Hi Matteo, Wrap move_uploaded_file and is_uploaded_file inside the controller function moveUploadedFIle($filename, $destination) { return move_uploaded_file($filename, $destination); } function moveUploadedFIle($filename, $destination) { return is_uploaded_file($filename, $destination); } The

Re: Update field in associated model???

2011-12-11 Thread Geoff Douglas
I am not sure about any one else... but for me I normally have the id from either passing it in, or having it from related data. I must just not do a lot of "UPDATE"-ing. :) I do use this for shell scripts more than web request type functions, because my shell scripts are generally more prone t

Re: QuickApps - CakePHP 2.0 CMS - Awesomeness.

2011-12-11 Thread y2k_2000
"Let me know if there is anything I can do to help" * Translating QuickApps to other languages * Bug-fixes and improvements * Programming free modules or themes Or just by using it and letting other people know about the existence of this pr

Re: CakePHP Paypal IPN Plugin, how to load it correctly?

2011-12-11 Thread denisr
Doh, actually changing the file /app/plugins/paypal_ipn/config/routes.php worked *** /* Paypal IPN plugin */ Router::connect('/paypal_ipn/process', array('plugin' => 'paypal_ipn', 'controller' => 'instant_payment_notifications', 'action' => 'process')); /* Optional Route, but nice for administrat

CakePHP Paypal IPN Plugin, how to load it correctly?

2011-12-11 Thread denisr
So, I have cakephp 2.0.3 and the CakePHP Paypal IPN Plugin for 2.0. The plugin is originally made by https://github.com/webtechnick/CakePHP-Paypal-IPN-Plugin, I found a fork for 2.0 here -> https://github.com/tenutso/CakePHP-2.0-Paypal-IPN-Plugin So, as the instruction said, I uploaded the plugi

Re: How to get all children of a parent if parent_id field is null

2011-12-11 Thread ahmed fakher
i user tree behavior,,but i build it like this table >> all parent must be null field not the top parent only..i know that is wrong but i need it to build menus...i use helper for that..but the problem i need if the user click on Entertainment (parent) see all articles in music(child) and movies(ch

Re: Update field in associated model???

2011-12-11 Thread flosky
Thanks, Geoff, the single quotes did the trick. I'm still surprized that this seems to be a very uncommon approach by me. Is everyone out there doing a find() query first to get the 'id' value and then calling save()??? -flosky -- Our newest site for the community: CakePHP Video Tutorials ht

Re: Best practice output a Dynamic menu

2011-12-11 Thread MetZ
Hi. I am storing my menues and links(tree behavior) in database. I am using several themes for the system, and hardcoding menues manuallly foreach theme is not an option. I have no problem outputting the menues and links with a component and helper in my themes, but i am simply wodering about th

Re: Extend ControllerTestCase

2011-12-11 Thread Matteo Landi
Thank for the fast response: - placed the wrapper inside app/Lib/Test - added App::uses('MyWrapper...', 'Test') on top of all my controllers tests - changed 'extends ControllerTestCase' to 'extends MyWrapper...' et voila! Regards, Matteo On Sun, Dec 11, 2011 at 11:54 AM, euromark wrote: > also

Re: Testing image upload

2011-12-11 Thread Matteo Landi
bump! On Sat, Dec 3, 2011 at 8:01 PM, Matteo Landi wrote: > Hi list, > what is the right way (if any) to test a controller which handles file > uploads? At the moment I fill $_FILES with an array containing the > fields expected by the controller (i.e. 'tmp_name', 'size', etc.) and > then invoke

Re: Extend ControllerTestCase

2011-12-11 Thread euromark
also create a package name for it (e.g. Test) App::uses('My...', 'Test'); App::uses('My...', 'PluginName.Test'); On 11 Dez., 11:52, euromark wrote: > I place mine in the Lib folder > either plugin (cross app) or app Lib folder. > in 2.0 you can > > On 11 Dez., 11:30, Matteo Landi wrote: > > >

Re: Extend ControllerTestCase

2011-12-11 Thread euromark
I place mine in the Lib folder either plugin (cross app) or app Lib folder. in 2.0 you can On 11 Dez., 11:30, Matteo Landi wrote: > Hi, > where is the right place to put a class which extends and add some > functionalities to ControllerTestCase so that I can it inside all my > controllers tests?

Extend ControllerTestCase

2011-12-11 Thread Matteo Landi
Hi, where is the right place to put a class which extends and add some functionalities to ControllerTestCase so that I can it inside all my controllers tests? Imagine all my controllers tests implement a testAction wrapper: it would be handy to extend ControllerTestCase, implement such wrapper in t

Re: Unexpected clear of cached elements

2011-12-11 Thread punglas
Nobody can help me ? I had a look to the models in cache, they don't change. I have noticied that sometimes, all the views in cache are deleted. Thnaks by advance. Pierre On 29 nov, 23:11, Pierre UNGLAS wrote: > Hello, > > I can see in my app\tmp\cache\views that all the elements that I Have > c

Re: 9gag like sites

2011-12-11 Thread Điển vũ
Upload: https://github.com/jrbasso/MeioUpload Comments: https://github.com/CakeDC/comments Ratings/Votes: https://github.com/CakeDC/ratings Facebook: https://github.com/facebook/php-sdk Mobile Theme: I don't know about this. -- Our newest site for the community: CakePHP Video Tutorials http://t