Re: ACL controlled and slow performance
Do you mean you specify InnoDB actions on delete etc? Dan On 15 Feb, 13:57, Jon Bennett wrote: > Hi Daniel, > > > Just a question: why did you opt for InnoDB tables rather than MyISAM? > > Always use InnoDB for data integrity. > > J > > -- > jon bennett -www.jben.net- blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
ACL + habtm groups
Did you guys manage to handle HABTM relations with ACL? Like User->habtm('Groups')? And then you assign a user to multiple groups and permissions to groups? Dan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: ACL controlled and slow performance
by the way, after adding the indexes the ARO query takes 1 ms vs 5502 ms the ACO query takes 249 ms vs 628 ms Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: ACL controlled and slow performance
Hey Jon, you are my MySQL performance GURU!!! ;o) Your solution of indexes worked great!! Just a question: why did you opt for InnoDB tables rather than MyISAM? Cheers Daniel Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: ACL controlled and slow performance
by the way I use cakePHP 1.2.6 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
ACL controlled and slow performance
Hey guys, I'm using ACL to control my application. I use it in the flavour of ACL "controlled" My user model $actsAs = array('Acl' => array('requester')); When I was building the application with 10 users and 5 groups everything was working fine. Every user belongsTo a group. I then inserted 11,000 records in my user table... and all actions that require ACL check in the ARO/ACO table are really slow! Here an example of the queries that slow down the application: takes 5502 ms --- SELECT `Aro`.`id`, `Aro`.`parent_id`, `Aro`.`model`, `Aro`.`foreign_key`, `Aro`.`alias` FROM `aros` AS `Aro` LEFT JOIN `aros` AS `Aro0` ON (`Aro`.`lft` <= `Aro0`.`lft` AND `Aro`.`rght` >= `Aro0`.`rght`) WHERE `Aro0`.`model` = 'User' AND `Aro0`.`foreign_key` = 1 ORDER BY `Aro`.`lft` DESC --- takes 628 ms --- SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`, `Aco`.`foreign_key`, `Aco`.`alias` FROM `acos` AS `Aco` LEFT JOIN `acos` AS `Aco0` ON (`Aco0`.`alias` = 'controllers') LEFT JOIN `acos` AS `Aco1` ON (`Aco1`.`lft` > `Aco0`.`lft` AND `Aco1`.`rght` < `Aco0`.`rght` AND `Aco1`.`alias` = 'Crags') LEFT JOIN `acos` AS `Aco2` ON (`Aco2`.`lft` > `Aco1`.`lft` AND `Aco2`.`rght` < `Aco1`.`rght` AND `Aco2`.`alias` = 'admin_index') WHERE ((`Aco`.`lft` <= `Aco0`.`lft` AND `Aco`.`rght` >= `Aco0`.`rght`) OR (`Aco`.`lft` <= `Aco2`.`lft` AND `Aco`.`rght` >= `Aco2`.`rght`)) ORDER BY `Aco`.`lft` DESC --- This is a demo structure of my aro table (with just 7 records out of 11,000): id| parent_id | model | foreign_key | alias | lft | rgt | - 1 | NULL; | Group | 1 | superadmin | 1 | 4 | 2 | NULL; | Group | 2 | admin | 5 | 6 | 3 | NULL; | Group | 3 | news_editor | 7 | 8 | 4 | NULL; | Group | 4 | utenti| 9 | 20200 | 5 | NULL; | Group | 5 | guests | 20201 | 20202 | 6 | 1| User| 1 | | 2 | 3 | 7 | 4| User| 2 | | 10| 11 | Did anybody found the same problem? Any clue on how to speed up things? Cheers dan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: git and cake2
here we go with 1.3 http://github.com/cakephp/cakephp1x/tree/1.3 Using this url git://github.com/cakephp/cakephp1x.git once you pull the repo, you must "switch" to the 1.3 branch Dan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: display related articles
Well for related posts I mean posts that have something in common: ie: if I write a news about "cophenagen climate change summit" related articles could be about - cophenagen - summit - environment - climate Maybe using tags I could diplay first articles that have the max number of tags in common ordered by post_count. Just an idea Daniel Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Authentication (cookies?) across different domains
Hey John, well the italian site will display news and all other content in Italian, while the .com in English. The other solution I have is to use subdomains: it.mysite.com | en.mysite.com Daniel On 16 Dic, 14:18, John Andersen wrote: > Is that a good idea? > > What about the content? Will the content be for Italy also, when the > domain is .it? > > Can you describe your site and what changes will happen to the > content, when a user changes the domain extension? > > Enjoy, > John > > On Dec 10, 4:48 pm, cakeFreak wrote: > > > Hey guys, > > > developing a multilanguage application I thought to have different > > languages according to the domain extension: > > > i.e. > > mysite.com => english > > mysite.it => italian > > > How can I keep the user authenticated across the 2 domains via > > cookies? > > > --- > > I know that with subdomains you can just set the cookie config as > > follows: > > >http://book.cakephp.org/view/179/Controller-Setup > > > setting > > > $this->Cookie->domain = '*.example.com'; > > > --- > > > Cheers > > > Dan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Authentication (cookies?) across different domains
Anybody about this? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
display related articles
Hey guys, how do you implemented a kinda query to display "related posts" when visualizing a post as Wordpress does? With tags? with title search? Other suggestions? Daniel Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Authentication (cookies?) across different domains
Hey guys, developing a multilanguage application I thought to have different languages according to the domain extension: i.e. mysite.com => english mysite.it => italian How can I keep the user authenticated across the 2 domains via cookies? --- I know that with subdomains you can just set the cookie config as follows: http://book.cakephp.org/view/179/Controller-Setup setting $this->Cookie->domain = '*.example.com'; --- Cheers Dan Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakeQs - aka Cake Questions - openID
Well I don't think so, 'cause it does not support the yahoo! format, at least when I tested it. They told me via IRC that they have developed their own plugin for it Daniel On 18 Nov, 15:56, Sam Sherlock wrote: > cakebaker's *OpenID - just guessing* > > http://code.42dh.com/openid/ > - S > > 2009/11/18 cakeFreak > > > I just noticed the new CakePHP applicationhttp://cakeqs.org/ > > > It seems it has a really well implemented OpenID handling (supporting > > Yahoo! openid as well - likehttps://me.yahoo.com/your_user-name). > > > Which library does it uses for it? > > > Is the source code ofhttp://cakeqs.org/available somewhere? > > > Cheers Daniel > > > -- > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-...@googlegroups.com. > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/cake-php?hl=. > > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
CakeQs - aka Cake Questions - openID
I just noticed the new CakePHP application http://cakeqs.org/ It seems it has a really well implemented OpenID handling (supporting Yahoo! openid as well - like https://me.yahoo.com/your_user-name). Which library does it uses for it? Is the source code of http://cakeqs.org/ available somewhere? Cheers Daniel -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
eCommerce question
Hey guys, my question is about developing an eCommerce solution in PHP, and it about dealing with stock quantities. When you have real products (not services or e-books, for example, but real books instead) how do you deal with the following situation: 1) you have 10 copies of Book "Learning CakePHP" in stock 2) you have 20 customers in the eCommerce website at the same time 3) 15 customers add a copy of the Book "Learning CakePHP" to their shopping chart 4) only 5 customers finally biught the book At this point my question is: how do you work with your stock values? Decreasing the stock every time a customer adds to chart, is a bit risky. Maybe using a kinda average purchasing rate (say only 50% of those that added to chart bought the book) it would be less risky to manage stock values? Dunno if I'm overcomplicating the problem. Just Curious about your opinion and solutions to this issue. Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
international SEO routing
Hey guys, does anybody has any good suggestion for converting the application routing to international SEO friendly uri? like: http://mydomain.com/en/home http://mydomain.com/it/home etc? To change $this->base mybe? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
encoding problems: utf-8
Hey guys, I have a weird issue! On my local machine everithing works fine, while on the remote one I don't get utf-8 encoding working properly. - DB is utf8 encoding in both machines - files should be saved with utf-8 encoding on both Did you experience similar problems and have any advice? Thanks dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
WhoDidIt behavior
I just posted a new behavior here: http://blog.4webby.com/ and here http://bakery.cakephp.org/articles/view/whodidit-behavior-automagic-created_by-and-modified_by-fields enjoy! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Assmbla.com vs Github.com
No one... has any advice ;o) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Assmbla.com vs Github.com
hey guys I noticed that assembla.com is not free anymore for reserved projects, what do you use: http://assembla.com or http://github.com/? Any other suggestion? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: internazionalization | gettext not working on production server: any idea?
I updated mu i18n lib from trunk, but it didn't work on 64bit Linux/Suse and 64bit Linux/Ubuntu servers I suggested this hack, that made the all thing work. https://trac.cakephp.org/ticket/3729 Dan On Oct 16, 12:06 am, "Larry E. Masters aka PhpNut" <[EMAIL PROTECTED]> wrote: > Unless you are using an old version of CakePHP this should have been > corrected months ago. > -- > /** > * @author Larry E. Masters > * @var string $userName > * @param string $realName > * @returns string aka PhpNut > * @access public > */ > > On Wed, Oct 15, 2008 at 4:14 PM, cakeFreak <[EMAIL PROTECTED]> wrote: > > > I finally got it: > > > the production servers where 64bits servers, while the development > > were 32bits. > > > Therefore, here we go:https://trac.cakephp.org/changeset/6149 > > > A small bug that caused the failure in loading the .mo files on 64bits > > machines! > > > I'm really glad I found the problem, and I hope my post can help > > somebody else! > > > Dan > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: internazionalization | gettext not working on production server: any idea?
I finally got it: the production servers where 64bits servers, while the development were 32bits. Therefore, here we go: https://trac.cakephp.org/changeset/6149 A small bug that caused the failure in loading the .mo files on 64bits machines! I'm really glad I found the problem, and I hope my post can help somebody else! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CAKEPHP Job
Hey Marcus, te 4webby.com team is up as well. Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: internazionalization | gettext not working on production server: any idea?
The problem is with cake.basics.php function __() that uses i18n class Unluckily I don't get any log error or debug error The production server is SuSe g this is driving me crazy! Dan On 4 Ott, 20:20, "jitka (poLK)" <[EMAIL PROTECTED]> wrote: > Not enough info to tell you what is wrong there - turn debug on for a > moment, there is more then a chance cake will report what is wrong. > Btw - cake does not use gettext, it just uses same .po and .mo file > format. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
internazionalization | gettext not working on production server: any idea?
Hey guys, I have 4 languages in my CakePHP applications and everything works fine with l10n library and gettext on my local machine. I deployed the application on the production server, and static translations ( ie those wrapped in __('my word') ) don't wor. Any clue? The production server OS is Ubuntu! Cheers in advnce for the help! Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Set response header of ajax call
I have a method that renders xml and it is structured as follows: /** * Lista faqs per Flash * */ function xml() { //$this->autoRender = false; $this->layout = 'xml/default'; $this->helpers = array('Xml'); $this->RequestHandler->respondAs('xml'); $this->Faq->unbindModel(array('belongsTo' => array('Utente'))); $limit = 10; $order = "Faq.id DESC"; $conditions = array_merge($this->conditions, array('Faq.in_homepage'=>1)); $faqs = $this->Faq->findAll($conditions, null, $order, $limit); $this->set('faqs', $faqs); } My xml layout is as follows: - encoding = 'iso-8859-1'; e($xml->header()); ?> - This might help as well: http://www.pagebakers.nl/2007/06/05/using-json-in-cakephp-12/ Dan On 23 Giu, 12:22, Marcelius <[EMAIL PROTECTED]> wrote: > Hi! > > I have a controller with the RequestHandler component attached, and a > method called by ajax. Now I want to return pure JSON and to do that I > need to set the response header content-type to "application/json". > The problem is that the RequestHandler automaticly sets this response > header so by the time I get control in my controller, $this- > > >RequestHandler->respondAs("json") doesn't have any affect. > > What can I do to make this work properly? The dirty hack now is by > using a header() call in the view but I don't think this is the way to > do it. > > Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: WARNING: Model del() doesn't consider "conditions" while deleting hasOne/hasMany associations
I just cheked out from the repos, and it seems that this issue has now been fixed in latest revision #7198 cheers guys Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Captcha reload problem, works in ff not in IE
Do you load your captcha with ajax? IE7 catches ajax get requests!! Dan On 16 Giu, 00:48, bingo <[EMAIL PROTECTED]> wrote: > Its difficult to say what the problem is without having access to code > or webpage. However, I have compiled a list of issues that can cause > IE7 to break but not firefox. Here is a link to my blog that discuss > all these > issueshttp://ragrawal.wordpress.com/2007/10/25/top-5-reasons-why-ie7-is-com... > > Regards, > > On Jun 15, 6:14 pm, Crazy <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I've implemented the captcha component that was published on the > > bakery > > here:http://bakery.cakephp.org/articles/view/captcha-component-with-phpcap... > > > Everything work fine, untill I want to reload the image. It works just > > fine in firefox, but when I try it in IE7 it doesn't refresh. To be > > more exact, it gives back the same image. > > > I think it's something with caching or the sessions, but don't know > > where to start trying to solve it. > > > Any help/hints are appreciated --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Custom url in paginate CakePHP 1.2
Try to add a parameter in your router: Router::connect('/catalogue/*/:page', array('controller' => 'your_controller', 'action'=>'index')); or alternatively: Router::connect('/catalogue/(.+)/:page', array('controller' => 'your_controller', 'action'=>'index')); Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
WARNING: Model del() doesn't consider "conditions" while deleting hasOne/hasMany associations
Hey guys, I was working with the generic upload behavior, but any kind of polymorfic association is subject to the same threat. Basically I have the following in my, for example, news model: - var $hasMany = array( 'Attachment' => array( 'foreignKey' => 'foreign_id', 'conditions' => array('Attachment.class' => 'News', 'Attachment.mimetype'=>'LIKE image/%'), 'order' => 'Attachment.order ASC', 'dependent' => true ), ); The cake7libs/model/model.php del method is as follows: function _deleteDependent($id, $cascade) { if (!empty($this->__backAssociation)) { $savedAssociatons = $this->__backAssociation; $this->__backAssociation = array(); } foreach (array_merge($this->hasMany, $this->hasOne) as $assoc => $data) { if ($data['dependent'] === true && $cascade === true) { $model =& $this->{$assoc}; $field = $model->escapeField($data['foreignKey']); $model->recursive = -1; if (isset($data['exclusive']) && $data['exclusive']) { $model->deleteAll(array($field => $id)); } else { $records = $model->find('all', array('conditions' => array($field => $id), 'fields' => $model->primaryKey)); if (!empty($records)) { foreach ($records as $record) { $model->delete($record[$model->alias][$model->primaryKey]); } } } } } if (isset($savedAssociatons)) { $this->__backAssociation = $savedAssociatons; } } - As you might notice when you delete a record it only looks for the associated foreign key, and not for the further conditions specified in the hasMany association. Therefore I suggest an array_merge ==> am() of the conditions in the findAll as follows: You can do it in your app_model.php -- function _deleteDependent($id, $cascade) { if (!empty($this->__backAssociation)) { $savedAssociatons = $this->__backAssociation; $this->__backAssociation = array(); } foreach (array_merge($this->hasMany, $this->hasOne) as $assoc => $data) { if ($data['dependent'] === true && $cascade === true) { $model =& $this->{$assoc}; $field = $model->escapeField($data['foreignKey']); $model->recursive = -1; //se ho condizioni su dipendenza if(isset($data['conditions']) && !empty($data['conditions']) && $data['conditions']!=''){ $conditions = am($data['conditions'], array($field => $id)); } else{ $conditions = array($field => $id); } if (isset($data['exclusive']) && $data['exclusive']) { $model->deleteAll($conditions); } else { $records = $model->find('all', array('conditions' => $conditions, 'fields' => $model->primaryKey)); if (!empty($records)) { foreach ($records as $record) { $model->delete($record[$model->alias][$model->primaryKey]); }
Re: Custom url in paginate CakePHP 1.2
Try something like this in your view: options = array('url'=>'../catalogue/'.$seourl)?> Dan On 15 Giu, 21:08, Petr Vytlačil <[EMAIL PROTECTED]> wrote: > Hi pleas can you help me? I have this function (return all entries for > Journal): > > function entriesjournal($seourl = null) { > if (!$seourl) { > $this->flash(__('Invalid Journal', true), > array('action'=>'index')); > } > $this->Entry->recursive = 0; > > $conditions = array('Journal.seourl' => $seourl); > > $paginationParameters = array(); > $paginationParameters['controller'] = 'entries'; > $paginationParameters['action'] = $this->action; > > $this->paginate['Entry'] = array( > 'limit' => 2, > 'order' => array ('Entry.datepublic' => 'desc'), > 'url' => array ('url' => $paginationParameters) > ); > $records = $this->paginate('Entry', $conditions); > //$this->Journal->findBySeourl($seourl) > $this->set('journal', $records); > } > > I call this function with this > link:http://www.domen.com/cataloge/seo_url_of_journel > Router setting: Router::connect('/cataloge/*', array('controller' => > 'entries', 'action' => 'entriesjournal')); > > In View i use for show paging: > > > prev('<< '.__('previous', true), array(), > null, array('class'=>'disabled'));?> > | numbers();?> > next(__('next', true).' >>', array(), null, > array('class'=>'disabled'));?> > > > This generate this url:http://www.domen.com/cataloge/page:2, > but it isnt go i need for router > url:http://www.domen.com/cataloge/seo_url_of_journel/page:2 > because a need parametr $seourl for function entriesjournal. > > I dont know how i can setting format url for paginator or if must set > router to. > > THX sorry my English isnt very good. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
FAQs page hacked?
Hey guys has the FAQs page got hacked? http://groups.google.com/group/cake-php/web/faq Every entry points to a movie site!!! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: translate behavoiur + not fetching translations on recursive fields
Anyone about this issue? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
translate behavoiur + not fetching translations on recursive fields
I just got into this post explaining the issue I encountered with the Translate Behavior: => http://groups.google.com/group/cake-php/browse_thread/thread/2e1567a159e16b55/34485c24eb5a44f7?lnk=gst&q=associations+%2B+translate+behavior#34485c24eb5a44f7 Anyone got this problem fixed *AUTOMAGICALLY*? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: TiramisuPHP
No one then has much insights about this tasty TiramisuPHP? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: __call() in Controller? controller actions with underscores
In faced a similar situation and I did the following: Router::connect('/content/:sezione/:pagina', array('controller' => 'sezioni')); In my sezioni_controller I had something like: -- if(isset($this->params['sezione'])){ $sezione = $this->params['sezione']; $section = $this->Sezione->findByUri($this- >params['sezione']); if(isset($this->params['pagina'])){ $pagina = $this->params['pagina']; $page = $this->Sezione->Pagina->findByUri($this- >params['pagina']); } else{ $limit = 1; $conditions = array('Sezione.uri'=> $sezione, 'Pagina.section_default'=> 1); $page = $this->Sezione->Pagina->find($conditions, null, null, $limit); } } else{ $this->Session->setFlash('la pagina cercata non esiste'); $this->redirect('/', null, true); exit; } -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP bleading hedge... relayability
cheers Baz! Dan On 5 Mar, 23:21, Baz <[EMAIL PROTECTED]> wrote: > Use the pre-beta if you're worried about stability. > > On Wed, Mar 5, 2008 at 4:04 PM, cakeFreak <[EMAIL PROTECTED]> wrote: > > > Hey guys, I'm currently using an intermidiate release in between > > CakePHP 1.2-alpha and CakePHP 1.2.pre-beta. > > > What about the latest version from the 1.2xxx branch (revision 6508)? > > > Does anyone can suggest it in terms of functionalities/stability? > > > I know it's a triky question expecially regarding the tradoff > > "functionalities"-"stability" > > > Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP bleading hedge... relayability
Hey guys, I'm currently using an intermidiate release in between CakePHP 1.2-alpha and CakePHP 1.2.pre-beta. What about the latest version from the 1.2xxx branch (revision 6508)? Does anyone can suggest it in terms of functionalities/stability? I know it's a triky question expecially regarding the tradoff "functionalities"-"stability" Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: TiramisuPHP
The concept I'm interested about TirmisuPHP isn't the templating enjne, but rather its declared capacity of "polymorfism". Namely the capacity to easily associate the same thing to several models. Right, you can achieve this by default using the "condition" in the association array, a bit like in the i18n table. But I was interested anyway in the TiramisuPHP and its way to handle this issue, and therefore asking id there is any public release about it. Dan On 5 Mar, 17:22, aranworld <[EMAIL PROTECTED]> wrote: > I have to admit some skepticism when I see a line like this: > > "TiramisuPHP provides a way to keep your views as clean as possible, > using the powerful Smarty template engine in the main view class." > > One of CakePHP's biggest assets, in my mind, is it's lack of a custom > templating system. > > I like using PHP for my templates. I have used Smarty before, and > mostly I felt it added unnecessary complexity. > > CakePHP's helpers and elements are a great solution for those who want > to simplify their templates. > > On Mar 5, 6:25 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > > > On Wed, Mar 5, 2008 at 9:15 AM, cakeFreak <[EMAIL PROTECTED]> wrote: > > > > Hey guys, > > > > does anyone has any news or any clue about this project: TiramisuPHP? > > > > see it here:http://www.nuvole.org > > > There was a presentation about it at CakeFest in Orlando... > > > -- > > Chris Hartjes > > Internet Loudmouth > > Motto for 2008: "Moving from herding elephants to handling snakes..." > > @T"heKeyBoard:http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
TiramisuPHP
Hey guys, does anyone has any news or any clue about this project: TiramisuPHP? see it here: http://www.nuvole.org Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Dynamic form creation?
I did the following while working on a dynamic questionnaires generation system. 1 Questionnaire hasMany Questions 1 Question has Many options (for multiple answers) --- ANSWERS -- 1 Questionnaire hasMany AnswersMain 1 AnswerMain hasMany Answers AnswerMain has: - id - questionnaire_id - user_id Answers has: - id - answermain_id - question_id - user_id To create the questionnaire I used Javascript (jQuery) to dynamically generate the several options fields for a question Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Dynamic form creation?
I did the following while working on a dynamic questionnaires generation system. 1 Questionnaire hasMany Questions 1 Question has Many options (for multiple answers) --- ANSWERS -- 1 Questionnaire hasMany AnswersMain 1 AnswerMain hasMany Answers AnswerMain has: - id - questionnaire_id - user_id Answers has: - id - answermain_id - question_id - user_id To create the questionnaire I used Javascript (jQuery) to dynamically generate the several options fields for a question Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problems going to production with CakePHP
Check out this thread: http://groups.google.com/group/cake-php/browse_frm/thread/889295952424caf9 and in particular to this post: http://groups.google.com/group/cake-php/msg/3c8b54771a75b59a -- With regard to the sprintf function, I had the same problem on one of my hosting, and I had to replace all delete messages as follows: i.e. replace sprintf(__('Are you sure you want to delete # %s?', true), $post['Post']['id']) with 'Are you sure you want to delete'.' #' . $post['Post']['id'] After performing the above substitutions, eerything worked fine. Hope this helps: I stood one day debugging this stuff in front of a blank screen ;o( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problems going to production with CakePHP
Another time i had a "blank screen" when I've forgotten to upload an helper (I didn't add it with SVN... an Capistrano didn't export it ...) Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP and VBulletin
Hey Lakshmi S can you share the code for the phpbb integration? By the way, my code was for SMF not PhpBB. Dan On 14 Dic, 06:28, "Lakshmi S" <[EMAIL PROTECTED]> wrote: > Hi Dan, > > We had already integrated Phpbbbut when we tried integrating VBulletin > we encountered problems. It is a problem of VBulletin handling the object > in CakePHP. Thanks for the help. > > Regards, > Lakshmi > > On Dec 13, 2007 8:34 PM, cakeFreak <[EMAIL PROTECTED]> wrote: > > > > > DUnno if you are interested but I integrated SMF forum (http:// > >www.simplemachines.org/) as explained here: > > >http://4webby.com/blog/posts/view/2/smake_smf_cakephp_integration > > > Maybe you can use the same method to integrate vBullettin. > > > Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: i18n: static language references with __("My lang key", true) in models and controllers
Cheers for the help francky06l ! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP and VBulletin
DUnno if you are interested but I integrated SMF forum (http:// www.simplemachines.org/) as explained here: http://4webby.com/blog/posts/view/2/smake_smf_cakephp_integration Maybe you can use the same method to integrate vBullettin. Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: i18n: static language references with __("My lang key", true) in models and controllers
Well sorry, this works in controllers. I had problems using it in a validation rule inside models. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
i18n: static language references with __("My lang key", true) in models and controllers
Hey guys, is there a way to use i18n style static language references __("My lang key", true) in models and controllers like for example: $test = __("My lang key", true); When I try to do it this way I get a syntax error in my code. cheers Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
turn debugging on for a single controller
Hey guys, is there a way to turn debugging on for a single controller and not application wide? Or should I use the test suite for this purpose? Cheers Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Generic Upload Behavior and with HABTM associations
Anyone about this issue? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Generic Upload Behavior and with HABTM associations
Hey guys, I'm using the Generic upload behavior by AD7six. http://www.ad7six.com/MiBlog/GenericFileUploadBehavior Everything works fine apart with models that have a HABTM relationship defined. The problem source is when the generic upload behavior overrides the parent::__contruct() in AppModel. Anyone has any clue about this? Cheers Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: YAMMY!: feed your migrations faster
Whell you can type: >cake yammy all And YAMMY generates a schema with ALL tables! It does not take into account changes, namely the generated schema does not write down just changes (as subversion does with files), but at list you have all modification. Hypothesis: 1) you have a DB schema and you run > cake yammy all YAMMY generates a 001_full_schema.yml file with the full DB schema 2) you change some tables and again you run >cake yammy all YAMMY generates a 002_full_schema.yml file with the full DB schema Alternatively you can run YAMMY for just the tables that you have changed. Maybe in future releases I can teach YAMMY to just look for changes if it is asked for it! Dan On 7 Nov, 19:34, jarmstrong <[EMAIL PROTECTED]> wrote: > Speaking of future enhancements. Is there a current feature or easy way to > add in handling that will generate the entire schema from version X to Y or > simply do the update the first time the app is run against a schema that is > out of date or doesnt have any tables? > > I have seen this in some other projects like AppFuse with their combination > of hibernate. > > Maybe I could get pointed towards how you would handle this and add it in > myself? > > cakeFreak wrote: > > > Well... > > > YAMMY does not sort out the problem you mentioned yet. > > > But the functionality you are looking for can be implemented in next > > versions ;o) > > -- > View this message in > context:http://www.nabble.com/YAMMY%21%3A-feed-your-migrations-faster-tf47388... > Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Admin Main page, routing and Routing.admin benefits
I found the solution yesterday with regard to admin routing: You need to pass a parameter: 'admin'='1' EXAMPLE (config/routes.php): Router::connect('/', array('controller' => 'home', 'action' => 'index', 'admin' => '1')); + I found this usefull in the Bakery: http://bakery.cakephp.org/articles/view/custom-urls-from-the-site-root Hope this helps! Daniel On 7 Nov, 19:20, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I've been fighting with this today as well. I have a route set up: > Router::connect('/admin', array('controller' => 'pages', 'action' > =>'index', 'prefix' => Configure::Read('Routing.admin'))); > > Which gets me to the admin main page. However $html->link() doesn't > recognize that you're currently in an admin route. > > With the recent changes away from CAKE_ADMIN to using Configure::* > what's the way to force an admin route based on the value of > Routing.admin in a $html->link() call? (i.e. if a user is logged in > and admin, I might want admin links to show up on standard pages, but > I don't want to hard code /admin for flexibility). > > On Oct 29, 8:22 pm, cakeFreak <[EMAIL PROTECTED]> wrote: > > > Right guys, > > what I' trying to achieve is a kindaadmin/home page, that holds my > > Routing.admin. > > I set my Routing.adminas *admin* > > > -- > > Configure::write('Routing.admin', 'admin'); > > -- > > > I tryed 2 strategies: > > 1) build an admin_controller.php with a admin_index() and index() > > methods > > > 2) create an action in the pages_controller.php called lets sayadmin() and > > than use the Router like > > -- > > Router::connect('/admin', array('controller' => 'pages', 'action' => > > 'display', 'admin')); > > -- > > > Approach #1 didn't work out. > > Approach #2 worked out, but it does not keep the admin_routing in > > myadminmenu. Namely if in myadminmenu I have a link to *posts*, when > > I go towww.mysite.com/adminmylink changes > > > from->www.mysite.com/admin/posts > > to->www.mysite.com/posts > > > How can I reroute my MAINadminpage without loosing the authomagic of > > myADMIN.ROUTED menu links? > > > Cheers in advance for your replays! > > > Dan > > > PS: I also tryed > > -- > > Router::connect('/admin', array('controller' => 'pages', 'action' => > > 'display', 'admin_index')); > > - > > > but it didn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: YAMMY!: feed your migrations faster
HEy Evgeny, what do you mean here? To add comments to the schema generated by YAMMY? Dan On 7 Nov, 08:27, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Really usefull for next version is implement short YAML field > decription syntax that appear in 3.3 version and only it work with > add_fileds goal. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: YAMMY!: feed your migrations faster
Well... YAMMY does not sort out the problem you mentioned yet. But the functionality you are looking for can be implemented in next versions ;o) YAMMY! adds a touch of "speed" and usability to the excellent shell written by joel Moss. Dan On 6 Nov, 22:17, "Sonic Baker" <[EMAIL PROTECTED]> wrote: > Now things are really falling into place. I haven't used YAMMY yet but I > can't wait. Been meaning to use migrations for a long time but have been put > off by the fact that there isn't any way to actually migrate the data once a > structural change is made. E.g. What if I decide I want to further notmalise > my database buy moving a field to another table and replace this with a > primary key? > Perhaps this is more of an SQL issue though. Can't wait to use this with > Migrations and Capistrano. However, this'll have to wait till I'm ready to > upgrade to CakePHP 1.2 > > Good work!! Thanks > > Sonic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: YAMMY!: feed your migrations faster
Sorry this is the right one: -- function __buildUpSchema($tableName) { $useTable = low(Inflector::pluralize($tableName)); $db =& ConnectionManager::getDataSource($this->_useDbConfig); loadModel(); //strip tablePrefix if exists $tbPrefix = $db->config['prefix']; $myTab = substr_replace($tableName, '', 0, strlen($tbPrefix)); //--- $tempModel = new Model(false, $myTab); $modelFields = $db->describe($tempModel); foreach($modelFields as $key=>$item){ if($key!='id' AND $key!='created' AND $key!='modified'){ $default = !empty($item['default']) ? $item['default'] : 'false'; $setNull = $item['null']==true ? 'is_null' : 'not_null'; $tempFieldSchema[$key] = array('type'=>$item['type'], 'default'=>$default, 'length'=>$item['length'], ); //let's set the option NULL field $tempFieldSchema [$key][] = $setNull; $tableSchema = $tempFieldSchema; } } if(!array_key_exists('id', $modelFields)){ $tableSchema[] = 'no_id'; } if(!array_key_exists('created', $modelFields)){ $tableSchema[] = 'no_dates'; } return $tableSchema; } -- Anyway I'll now update YAMMY to version 1.1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: YAMMY!: feed your migrations faster
Or simply try to replace the mehtod __buildUpSchema() with the following: function __buildUpSchema($tableName) { $useTable = low(Inflector::pluralize($tableName)); $db =& ConnectionManager::getDataSource($this->_useDbConfig); loadModel(); //strip tablePrefix if exists $tbPrefix = $db->config['prefix']; $myTab = substr_replace($tableName, '', 0, strlen($tbPrefix)); //--- $tempModel = new Model(false, $tableName); $modelFields = $db->describe($tempModel); foreach($modelFields as $key=>$item){ if($key!='id' AND $key!='created' AND $key!='modified'){ $default = !empty($item['default']) ? $item['default'] : 'false'; $setNull = $item['null']==true ? 'is_null' : 'not_null'; $tempFieldSchema[$key] = array('type'=>$item['type'], 'default'=>$default, 'length'=>$item['length'], ); //let's set the option NULL field $tempFieldSchema [$key][] = $setNull; $tableSchema = $tempFieldSchema; } } if(!array_key_exists('id', $modelFields)){ $tableSchema[] = 'no_id'; } if(!array_key_exists('created', $modelFields)){ $tableSchema[] = 'no_dates'; } return $tableSchema; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: YAMMY!: feed your migrations faster
A kinda function like this should work in order to strip the table_prefix; -- $tableName = "cc_pippo"; $prefix = 'cc_'; $myTab = substr_replace($tableName, '', 0, strlen($prefix)); echo $myTab; -- Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: YAMMY!: feed your migrations faster
Hey Tarique, cheers for your notes! Can you retry to post comments please? I'll correct the bug you submitted, and I'll release versions 1.1. If you already did, can you send me your patch? Dan On 3 Nov, 12:51, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > In case it is of any help - your line 324 reads $tempModel = new > Model(false, $tableName); The tableName you are passing should not > have prefix attached. > > Looking forward to newer versions > > Tarique > > On 11/3/07, Dr. Tarique Sani <[EMAIL PROTECTED]> wrote: > > > > > Hi Dan > > > Yammy insists on adding the prefix to already prefixed table eg: my > > table is called cc_photos where cc_ is the prefix - then > > > --- > > The following Yaml Migration file will be created: > > --- > > DB Connection: default > > DB Table: cc_photos > > do you want to use this table? (y/n) > > [y] > > > Error: Missing database table 'cc_cc_photos' for model 'Model' > > > and your blog insists on not accepting my comment ;) > > > Cheers > > Tarique > > > On 11/3/07, cakeFreak <[EMAIL PROTECTED]> wrote: > > > > Cheers Daniel, > > > > I hope you enjoyed the tutorial! > > > > Daniel > > > -- > > = > > Cheesecake-Photoblog:http://cheesecake-photoblog.org > > PHP for E-Biz:http://sanisoft.com > > = > > -- > = > Cheesecake-Photoblog:http://cheesecake-photoblog.org > PHP for E-Biz:http://sanisoft.com > = --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: YAMMY!: feed your migrations faster
Cheers Daniel, I hope you enjoyed the tutorial! Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Model used by all controller
If you put --- $uses = array( "myglobalmodel"); --- in your AppController, the you can use --- $this->myglobalmodel->BLABLABLA --- in all your controllers. the $uses var of your AppController get merged with the $uses var of your single controller. Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Admin Main page, routing and Routing.admin benefits
Right guys, what I' trying to achieve is a kinda admin/home page, that holds my Routing.admin. I set my Routing.admin as *admin* -- Configure::write('Routing.admin', 'admin'); -- I tryed 2 strategies: 1) build an admin_controller.php with a admin_index() and index() methods 2) create an action in the pages_controller.php called lets say admin() and than use the Router like -- Router::connect('/admin', array('controller' => 'pages', 'action' => 'display', 'admin')); -- Approach #1 didn't work out. Approach #2 worked out, but it does not keep the admin_routing in my admin menu. Namely if in my admin menu I have a link to *posts*, when I go to www.mysite.com/admin my link changes from-> www.mysite.com/admin/posts to-> www.mysite.com/posts How can I reroute my MAIN admin page without loosing the authomagic of my ADMIN.ROUTED menu links? Cheers in advance for your replays! Dan PS: I also tryed -- Router::connect('/admin', array('controller' => 'pages', 'action' => 'display', 'admin_index')); - but it didn't work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Routing + Form Action
Well not sure about how you can handle it "authomagically" with the form helper, but why don't simply HTML hardcode your form? -- -- Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Making comments safe with Sanitize
Cheers guys, in the end I stripped the unwanted HTML tags using strip_tags() PHP native function. -- $commentInputs = $this->data['Comment']; $data['Comment']['body'] = strip_tags($commentInputs['body'], ''); -- The only caveat is that iin this way, tags, as well as all words wrapped in the unwanted tags get removed. Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: converting DB tables from latin to utf-8
Cheers Michael! I hope your suggestion will help before I'll go crazy ;o) I'll let you know! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: deployment on shared host
I had a 'blank page problem' on a shared host due to the sprintf() and the Zend Optimiser version installed on your hosting server. The problem is described here: http://groups.google.com/group/cake-php/browse_frm/thread/889295952424caf9 check out my post there. Maybe your problem is just related to the sprintf function, instead of the folder structure. Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: converting DB tables from latin to utf-8
cheers Mariano, I also found this 2 resources: http://projects.tacker.org/svn/smallprojects/wordpress/convert-encoding.php http://www.orthogonalthought.com/blog/index.php/2007/05/mysql-database-migration-and-special-characters/ Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
converting DB tables from latin to utf-8
Hey guys, I need to convert all tables of an old site from latin1_general_ci (or latin1_swedish_ci) to utf8_unicode_ci Is there a convenient way/script that you would suggest to perform this task in order to avoid to fill pages with strange chars?!? Cheers in advance! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Making comments safe with Sanitize
Hey guys, cheers for your suggestions! What about security? Should I strip out all html from comment messages, leave some stuff etc? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Friends HABTM
Hey Spyder, try to read these posts: Self-referential has_many :through associations http://blog.hasmanythrough.com/2006/4/21/self-referential-through http://groups.google.com/group/cake-php/browse_frm/thread/c8ebc2097f8... http://groups.google.com/group/cake-php/browse_frm/thread/e70d4147be0... Hope this helps! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Making comments safe with Sanitize
Hey guys, just wondering how do you sanitize the input data for the comments of, say for example, a post before saving them in DB. do you use $Sanitize->clean($data), $Sanitize->stripAll($data), both of them or samething else? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Building a forum plug-in
Anyone up for this mission? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Empty page response
Another problem is that the table structure of i18n has changed. If you moving from Cake_1.2-alpha to Cake_1.2-pre-beta without updating that table will result in blank pages. With regard to the sprintf function, I had the same problem on one of my hosting, and I had to replace all delete messages as follows: i.e. replace sprintf(__('Are you sure you want to delete # %s?', true), $post['Post']['id']) with 'Are you sure you want to delete'.' #' . $post['Post']['id'] After performing the above substitutions, eerything worked fine. Hope this helps: I stood one day debugging this stuff in front of a blank screen ;o( Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Stange chars in all apges
Ciao Paolo, CakePHP speaks in English, not Italian. Therefore you must teach CakePHP Italian singular/plural rules in your app/config/inflections.php an example for you: $irregularPlural = array('gruppo'=>'gruppi', 'utente'=>'utenti', 'impianto'=>'impianti', 'provincia'=>'province', 'regione'=>'regioni', 'prodotto'=>'prodotti', 'contatto'=>'contatti', 'referenza'=>'referenze', 'sezione'=>'sezioni', 'cliente'=>'clienti'); In this way you can have a model class called "Cliente" and a controller class called "Clienti" for a "clienti" DB table. Dan On Oct 26, 10:13 am, Paolo <[EMAIL PROTECTED]> wrote: > Hi all! > I have a problem with CAke. In every page it displays a "m" at the > top, sometimes it add something more, such as null,null,null,'Comuni/ > nome');?> > > What can be the cause of this? > > Also, I have a model called Clienti, I use this name in model and > controller, but it complains saying it can't find Clintus Model!!! If > in the controller I change the name in Client for example it tells me > it can't find Client, but when I add the i it changes it to > Clientus!!! > > Any help? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Forum / Bulletin Board written in cakephp
Hey Jacob, read these posts about forum/bulletins: Building a forum plug-in http://groups.google.com/group/cake-php/browse_frm/thread/5397f338d19a155d CakePHP miniFORUM http://groups.google.com/group/cake-php/browse_frm/thread/1cec189f99b27dad CakePHP SMF integration http://groups.google.com/group/cake-php/browse_frm/thread/e44d0a4b957f3bf0 Hope this helps! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Building a forum plug-in
Hey guys, i need a simple forum plugin as well. If you are up for it we can build a small team, open a project on CakeForge, and manage ourself via Trac. Let me know if you are interested. I wouldlike to build it for 1.2. Dan On Oct 23, 11:34 pm, DanielMedia <[EMAIL PROTECTED]> wrote: > I've been thinking about this also. It would be nice to just drop in a > plugin and instantly have a forum. > > On my current site, we use vBulletin but it would be really cool if it > could be done in Cake. This way other site features could be easily > integrated into the forums and vice versa. Instead of having that > separation. > > Like someone mentioned in another post, it would probably be easy to > create the basic forum itself. The real work would come when building > the backend for admins to moderate and manage the forums. > > I think there's already a project open for a Cake-based forum on > CakeForge but still no release to date. Good luck writing your plugin, > that would definitely be something that I'm sure a lot of people could > use. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP SMF integration
I just did a istake in my first post. Correct point 7 with the following (rename to *session_smf.php* instead of *session_cake.php* as written above) - 7. create a file in cake/libs/ called *session_smf.php* [this extends the original Cake Session lib that we moved in *session_cake.php*. go in the bin and copy and past what you will find in here: http://bin.cakephp.org/view/1933866502 into the newly created file. -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP miniFORUM
Ahhh, do you have a demo? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP miniFORUM
well, I managed to integrate SMF (http://groups.google.com/group/cake- php/browse_frm/thread/e44d0a4b957f3bf0) , but I'm still not sure whether to go for a simple HOME-MADE forum solution, with just few esentials functions. In fact the API I'm building already has user profiles etc. Today I started doing some demo of a possible forum. If you are interested I can send you my initial DB schema. I just need to add a column "total_posts" in my users table. The BEAST forum you sent me is exactly what I'm looking for... but in Cake! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP miniFORUM
Has anyone implemented (or tried to) a simple forum in CakePHP? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP SMF integration
I was just forgetting a couple of things about a couple of modifications to the SMF original session table: 1) add a column called 'expires' and set it to NULL (only CakePHP writes there) 2) set the `last_update` field to NULL (only SMF writes there) - Final table: - CREATE TABLE `smf_sessions` ( `session_id` char(32) NOT NULL default '', `last_update` int(10) unsigned default NULL, `data` text, `expires` int(11) default NULL, PRIMARY KEY (`session_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP SMF integration
Following the discussion of these 2 threads: http://groups.google.com/group/cake-php/browse_frm/thread/6440d2b1f7a29534/b0d25b27475b6bdc?lnk=gst&q=SMf#b0d25b27475b6bdc http://groups.google.com/group/cake-php/browse_frm/thread/55d0edff83e39775/2040fbf427a3996c?lnk=gst&q=SMf#2040fbf427a3996c I came out with the following: 1. put the SMF forum in app/webroot/forums/ 2. Set CAKE_SESSION_COOKIE to be the default 'PHPSESSID'. 3. Modify the session handling functions in Cake to use the MySQL table used by SMF (forumprefix_sessions) 4. in my app/bootstrap.php I added this line at the end require_Once('forum/SSI.php'); # NOW WE NEED TO TELL CAKE TO USE SMF session table (here I'll assume that your SMF DB tables prefix is *smf_* # THE SMF sessin table doen't have an id column, but rather a *session_id* one 5. rename cake/libs/session.php in *session_cake.php* 6. rename the class in your new *session_cake.php* into class CakeOriginalSession extends Object { 7. create a file in cake/libs/ called *session_cake.php* [this extends the original Cake Session lib. go in the bin and copy and past what you will find in here: http://bin.cakephp.org/view/1933866502 into the newly created file. 8. create a file in cake/libs/ called *session.php* with the following in it. 10. you can you retrieve the SMF session data then? try this: $user = (unserialize($this->Session- >read('THE_LOGIN_COOKIE_NAME_YOU_SET_IN_SMF_CONFIG'))); echo $user[0]; This will give you the id of the currently logged in user in SMF. # # EXPLANATION # # Why all this files? Well in this way if you update *cake/* dir you want override you extension. What's missing yet? An helper or component that behaves as a wrapper for the functions in SSI.php Dan PS: a different approach is presented here: http://bakery.cakephp.org/articles/view/cakephp-smf --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Dedicated server: which Linux distribution?
Cheers MJ Ray! Anyone about CentOS? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: change validation rules on the fly: how?
Superb! CakePHP always rocks! Cheers GriGri! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Dedicated server: which Linux distribution?
I know it is a bit out of the main topic of this forum, but CakeBakers know the job! Well I'm gonna get a dedicated server, and I can choose betwee Fedora, Debian and Ubuntu. Any suggestion both in terms of performance and mantainability? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
change validation rules on the fly: how?
Hey guys, I have a problem ?!?! In my user table I have a field password. I want it to be REQUIRED on "add" action, while I want it NOT-REQUIRED on edit actions. Namely if the field is left blank on "edit" it's value doesn't get changed in DB, an no errors are displayed. How can I achieve this? How can I tell my model in which action I am? Cheers dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: customize baked views
Yep, It really is this easy! ...and now I can bake my views as-they-should-be-in-my-project! Hope this helps! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
customize baked views
Hey guys, is there a way to customize the views templates used while baking with the command line feature? Should I edit the views in cake/libs/templates/views? Cheers Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Comment Controller
Did you try to load the comments form via Ajax? Dan On 5 Ott, 02:19, dixon_ <[EMAIL PROTECTED]> wrote: > Hi all bakers! > > I'm developing just another CMS application to learn the Cake > framework. Really impressed so far! > > I'm implementing a commenting system to my posts on the blog. I've > associated Comment and Post models correctly and placed the submission > form in an element that is rendered from the post view, as it should > (any other suggestions?). Then I've set the form URL action to "/ > comment/add" where I add data to the Comment model and then > redirecting the user back to the post view. Everything works so long, > records are showing up and associations are being made etc... > > The problem is when a field is invalid while trying to save data in > the CommentsController. How should I handle this? I cannot redirect > the user back to the post view to show errors, as we are loosing all > data in the redirection. I could let it auto render the default view > for the "/comment/add" action (which just would be a submission form) > without any Post data, but that just doesn't make sense. > > To make my problem short: Can anyone show me examples on how to add a > comment from a post view, and still be able to show validation error > messages etc (as in normal cases)? > > Cheers from Sweden. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake deployer
Cheers Dave, I really appreciated your help. I'll dive deep into the single commands, and I'll might get back with some comments on your commands! looking forward your deploiment script via shell! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cake deployer
Hey Dave, can you please give me the full command to deploy with rsync from my local machine and: 1) the repository is on my localhost 2) I need to chmod the files to be accessible to another user, and not just the root admin that has ssh permission on my virtual server, on the server I'm a newby with linux. Cheers Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakePHP friend/buddy system
Try to read these posts: Self-referential has_many :through associations http://blog.hasmanythrough.com/2006/4/21/self-referential-through http://groups.google.com/group/cake-php/browse_frm/thread/c8ebc2097f8aad11/fae9ec58501534e6?lnk=gst&q=friend&rnum=1#fae9ec58501534e6 http://groups.google.com/group/cake-php/browse_frm/thread/e70d4147be079a08/89b225e4ea426352?lnk=gst&q=friend&rnum=4#89b225e4ea426352 Hope this helps! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: how to protect reserved files
Cheers Samuel, I'll try to keep them under the root without ACL an with conditional rules! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: change model $useTable on the fly
Cheers guys! I'll post my findings here lata (if somebody else is interested to the same topic)! Dan On 3 Ott, 15:57, gwoo <[EMAIL PROTECTED]> wrote: > do a search in this group for setSource --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
change model $useTable on the fly
Anyone knows how it is possible to change the table used by a model on the fly? Should I use a beforeFind condition in my model? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
how to protect reserved files
Hey guys, I need to build a filesharing section for one website. Is there any suggested strategy in order to protect reserved files from download? More precisely: - Even if I show the download link only to some usergroups, if somebody get to know the correct location of the file on the server, he can access it. I would like to avoid the latter problem. - Any help is appreciated! ;o) Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to generate URL without ':' that has argument.
Your welcome mate! Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Presentation
Did you see this presentation: http://www.cakephp.org/files/OCPHP.pdf Dan On 2 Ott, 22:09, Joshua Benner <[EMAIL PROTECTED]> wrote: > It would be really cool to have an entire workable application written > while I'm up front... and it's conceivable with bake. Hmm > > rtconner wrote: > > Show em bake and code generation :D > > My fav. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: a simple tag cloud... how?
download the cheesecake photoblog to see a live example in action: http://cheesecake-photoblog.org/ Dan app... I want to pull out a tag > cloud. > > Basically, the page output is more or less like this: > > TAG - URL > > marketing - google.com > searchengine - yahoo.com > searchengine - live.com > news - bbc.co.uk > > how can I have a tag cloud like > > marketing - searchengine - news > > and, when I click on a tag, I see the urls? > > (it should be simple, but I wanted to be as much detailed as possible!) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---