Re: Overkill for a starter project?
If your target is really simple blog, then cake is the perfect tool. if you are intermediate php, you should not have troubles getting it done. IMO its better to learn cake on a simple project, with no border-the-line use of the framework. That will avoid you to make structural errors on your next BIG cake project. On Thu, Dec 18, 2008 at 4:26 PM, pg p...@metaclarity.com wrote: Yeah, I was going to manually code it and wanted to use cakePHP just to start understanding how to use it. Maybe I should save this for another project. Any idea what would constitute a good starter project? On Dec 17, 4:00 pm, gearvOsh mileswjohn...@gmail.com wrote: Honestly things like that I would just manually code or even use Wordpress just because its so simple. You could use CakePHP simply for the practice and automation, but there are no downsides using Cake. Perhaps just a ton of files the client wouldn't understand what they're for. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
API documentation tool
Hi What is used to generate the API doc of cakephp ? thanks Olivier --~--~-~--~~~---~--~~ 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: API documentation tool
But it looks visually so different to what I know from phpDocumentor. No left column, etc... On Fri, Dec 5, 2008 at 1:47 PM, dr. Hannibal Lecter [EMAIL PROTECTED]wrote: I'm not sure on this, but I believe it could be phpDocumentor (http:// phpdoc.org/)? On Dec 5, 1:03 pm, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Hi What is used to generate the API doc of cakephp ? thanks Olivier --~--~-~--~~~---~--~~ 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: API documentation tool
yeah after some research it seems to be doxygen. thx. Dont forgot to have a nice weekend. Olivier On Fri, Dec 5, 2008 at 2:29 PM, dr. Hannibal Lecter [EMAIL PROTECTED]wrote: Good point... probably Doxygen then..seems like it (look at the examples on Doxygen site, especially the tabs).. On Dec 5, 2:14 pm, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: But it looks visually so different to what I know from phpDocumentor. No left column, etc... On Fri, Dec 5, 2008 at 1:47 PM, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: I'm not sure on this, but I believe it could be phpDocumentor (http:// phpdoc.org/)? On Dec 5, 1:03 pm, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Hi What is used to generate the API doc of cakephp ? thanks Olivier --~--~-~--~~~---~--~~ 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: Mambo on CakePHP brainstorm
Hi Since the announcement of the rewrite (a year ago ?), I tried a few times to check the progress, but I could not find anything. So personally, the first thing I would expect, is to have a publicly readable repository from which i could download the last dev version. After that, I would love the rewrite to be as close as possible to cake's standards and conventions. -Olivier On Wed, Nov 19, 2008 at 3:47 PM, andphe [EMAIL PROTECTED] wrote: Hi all, I'm on Mambo Dev team, and we realize that while we are planning our major rewrite of Mambo based on CakePHP, we are not hearing what the CakePHP community have to say. Specifically it would be good to have a brainstorm here, about what the CakePHP users/developers expect on a cake based CMS. So, go ahead, lets have fun Andrés --~--~-~--~~~---~--~~ 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: Why does this shitty Ggroups need 10 mins to post?
then the best for you is to use an email client such as Thunderbird and use threaded view Mech7 wrote: I have to say that i prefer a decent forum over this group, this is all so unorganized very hard to track your messages. --~--~-~--~~~---~--~~ 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: OceanCMS configuration error
Hi You will not get it running OceanCMS is meant for Cake 0.6 or so, not updated since then. -Olivier lalit kumar wrote: Hi, Any one help me out. i am configuring OceanCMS.from two week i got an error *Query:* getPageImage *Warning*: *SQL Error:* 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getPageImage' at line 1 in *C:\wamp\www\worldentity\cake\libs\model\datasources\dbo_source.php* on line *463* *Query:* getItemCount *Warning*: *SQL Error:* 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getItemCount' at line 1 in *C:\wamp\www\worldentity\cake\libs\model\datasources\dbo_source.php* on line *463* *Notice*: Undefined property: Node::$sanitize in *C:\wamp\www\worldentity\app\models\node.php* on line *145* *Fatal error*: Call to a member function paranoid() on a non-object in *C:\wamp\www\worldentity\app\models\node.php* on line *145 Please help me * -- Lalit Kumar Netsolutions 09888711687 --~--~-~--~~~---~--~~ 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: Mambo 5 to be Cakephp Killer App
errr sorry ignore this, I haven't sseen the thread just before... On 7/26/07, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Very interesting, getting the best of both, framework and CMS. Have you a link to some area where Mambo folks are discussing this ? where is the news coming from ? On 7/26/07, Penfold [EMAIL PROTECTED] wrote: Hi All, This is great news mambo will be using cake. I have only been using cake a little while and amazed by the support from the community. one thing i have noticed is newbies asking for apps out-of-the-box (myself included). Now with mambo seeing the light and adopting cake, hopefully together we could use mambo as the base for many of our applications. For example if we channel help to the mambo dev team (if they would like) with authenication and users right (acl), this will stop the need to have 101 very good authenication routines, when one is enough, that is easy to modify to allow custom usage. There are other areas of common interest which we could work together with mambo to easy all our life. The best comparison i can make is creloaded to oscomerce. oscommerce is the core and creloaded is oscommerce with inbuilt add-ons. Mambo and cake can have the same relationship. Addons wrtten as mambo modules and cake as the core. Developers can then extend the application without having to rewrite the same code over and over. I see this an option for newbies, as this will easy the learning curve for newbies to learn cake. What are everyones views on this? penfold_99 --~--~-~--~~~---~--~~ 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: Mambo 5 to be Cakephp Killer App
Very interesting, getting the best of both, framework and CMS. Have you a link to some area where Mambo folks are discussing this ? where is the news coming from ? On 7/26/07, Penfold [EMAIL PROTECTED] wrote: Hi All, This is great news mambo will be using cake. I have only been using cake a little while and amazed by the support from the community. one thing i have noticed is newbies asking for apps out-of-the-box (myself included). Now with mambo seeing the light and adopting cake, hopefully together we could use mambo as the base for many of our applications. For example if we channel help to the mambo dev team (if they would like) with authenication and users right (acl), this will stop the need to have 101 very good authenication routines, when one is enough, that is easy to modify to allow custom usage. There are other areas of common interest which we could work together with mambo to easy all our life. The best comparison i can make is creloaded to oscomerce. oscommerce is the core and creloaded is oscommerce with inbuilt add-ons. Mambo and cake can have the same relationship. Addons wrtten as mambo modules and cake as the core. Developers can then extend the application without having to rewrite the same code over and over. I see this an option for newbies, as this will easy the learning curve for newbies to learn cake. What are everyones views on this? penfold_99 --~--~-~--~~~---~--~~ 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: Lumad CMS / (Cupcake)
did you also notice http://sourceforge.net/projects/igocms/ svn shows recent activity and good code... keymaster wrote: Came across the Cupcake CMS built on cakePHP. I read somewhere that it is conceptually based off Radiant CMS, which in turn is built off Ruby on Rails, so would be a natural adoption to cake. Here is the Radiant CMS homepage for those interested: http://radiantcms.org/ Cupcake CMS is hosted at sourceforge here: http://sourceforge.net/projects/cupcakecms/ Here are some screenshots: http://sourceforge.net/project/screenshots.php?group_id=191594 Here is the project homepage: http://www.cupcakecms.com/~Home After reading the description on sourceforge and seeing who is listed as the author, I realized it might be the same project listed on cakeforge as Lumad CMS, here: http://cakeforge.org/projects/lumad-cms/ Very happy to see such a project startup, as I think it will be a very welcome addition to the cake project list. Just passing on the info I've found. Perhaps the author might post to this forum with a roadmap for his project? --~--~-~--~~~---~--~~ 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: Lumad CMS / (Cupcake)
last time I saw Ocean showing up was for 9 month or so. Ocean CMS is a neat piece of software, but it is finished at 90%... I think it was compatible to cake until rc4 that all... keymaster wrote: No, Olivier, I didn't notice it. Thanks for pointing it out, though. What most appealed to me about CupCake / Lumad CMS, was not so much that it was a CMS. There are many of those around, and I don't expect anything will approach the functionality of some of the major CMS's already in the opensource world. I am not looking for a standalone CMS. Drupal will do me just fine for that. What appealed to me was their principle of keeping things as lean as possible with only the essentials. This, together with it being developed in cake - a framework I am now familiar with - will enable me to include basic content management in the web apps I develop with cake. Most web apps would benefit from limited content management (without all the publishing workflow / community plumbing which drupal provides). So, I was attracted to some simple, essential content management features which can be plugged-in to a cake app. I don't see igoCMS filling that role. Olivier, you worked on oceanCMS, didn't you? Does it work with the latest cake? Is there any description or screenshot of it's features? --~--~-~--~~~---~--~~ 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: Proposal for killer app
Hi As a free-time coder I'd love the idea to contribute to a cakephp cms project. I'd love to this project aggregate the work of a lot of peoples. Presently I see cakephp as having a great core team, some very good coders around in the community, but much less cohesion in the 3rd line where the peoples seems not to be efficient at producing code together. As a professional web developer I need more than just cake to justify using cake. We kinda have 3 big steps in doing web development. When it is decided that a static site (step 1) has to become dynamic (step 2), we just plug a cms on it. Then some more features are being sold, then we use the cms as a framework, with all its limitations such as a stupid templating system with no php allowed and an un-documented exotic syntax to use, a mandatory web-based coding interface, to name a few. I believe that this situation is very common among web agencies. It actually pisses me off to work this way, but I cant justify the use of cake, because it make really sense at the 3rd step of development. So as a professional web developer I see clearly the benefit of having a little cms on top of cake that would allow me to be a little faster at step 1, with for instance an handy way to generate the navigation menu, to be fast at step 2 with some built-in rich text editing solution, and to have cake under the hand at step 3 when serious coding starts. digital spaghetti wrote: Hi folks, Forgive me for being rather forward with my email here, I'll try to put my case over as level headed and as thoughtfully as possible, and please feel free to give back any constructive critisism. Also, forgive any spelling and grammar - I'm typing this on the way home on my blackberry, it's the only time I get to write an email this long. Through being on the IRC channel, and on here - many a time, someone new has come along and they are looking for a ready-to-roll application that they can plonk onto their server and have running. At the moment, there are a few small apps out there currently being written by small teams (and even just one coder) such as cheesecake, bakesale to name a couple, and there are plenty of dead projects in the trove. I want cake to succeed, it's a great framework - but I have to admit, it took me three tries of coming back to it over the course of a few month to get the hang of it. I could see it's power, but it took me a while to get the hand of it. And I'm not the only one. What I believe CakePHP needs is a killer app, a CMS that can rival the others out there, and that gives people the chance to actually see cakephp in action. Think of it as a pre-packed Cake you get in the supermarket. RoR has one, Radient CMS - why can't we? I think by NOT having one, that scares a lot of people off. So my proposal is this - along with the primary cake team who are developing the framework - we create a secondry team to work on an application that will be this killer app. With the creation of this team, we can set about making something that while it might not suit everyone's needs, it's something that most people can start off with and build upon (which is something I think is imporant to note now, think Drupal!). It would have standard modules such as a user system (registration, authorisation, access levels, etc), a post comments system, pages (from the db), a menu system, file upload - and many more. I'm thinking around a level akin to a default install of Wordpress. As well as creating a base level of these modules for people to work from, I think it would a) drive more people to download and learn CakePHP as they can see it in action and also so they can expand upon this base app and b) drive cakephp itself by defining requirments of the base application, and also provide more components, plugins and documentaion that can be included into CakePHP itself. And of course it would help in bug fixing by providing code back to the main project. Now, please don't me wrong - I think everyone should download the framework and experiment with their own apps, and this killer app is not going to suit all cases, but I think if some of the more senior members of the community who already have apps out there were to come together on this and pool their talents, something great could happen. If not, then I suppose it's the communitys loss. Personally, I'm happy to work on my own app, and although progress is admitidly slow, I certainly wouldn't loose any sleep over it. One last thing I would like to say is: convergance, not divergance - I think that needs to be the motto here So folks, now is your time to pipe up with your opinion. If anyone is interested, then discuss it here and we can start moving forward on it. If not, then that's fine too. Tane --~--~-~--~~~---~--~~ You received this message because you are subscribed to the
Re: Proposal for killer app
@Chris I was thinking about having the cms you can code anything upon it. This should of course not compete with the framework's own reputation, but increase it. @Mariano Sorry but I do not share your elitist vision. Cakephp is making its best to reach new markets and to be used by the masses. Also I am rather considering the question of easing the processes in a team work, where we have various peoples with various skills. Most of our projects are starting small and growing later. We have a lot of legacy apps to manage and what we are producing will be managed by other peoples. We need to make the work easy for them, not require them to be super-geniouses to understand the mess we have produced. Sorry but I wont convince my managers by using your joda talk. :-) I just need something easy for them. The benefits are for me but I need to polish the caveats. Implementation speed in the early stages is one. CMSes seem faster to implement and therfore less costly for the agency. And they often claim to be usables as framworks. Mariano Iglesias wrote: At the end of the day, CakePHP should not be aiming for the highest number of developers, but for the best. Just because a bunch of people uses a specific framework, that doesn't mean that is the best thing to do. IMO developers who are serious about their job will not hesitate in choosing CakePHP. That's what we should put our focus on. Only the best use the best. Sure, the foundation needs to sharpen its marketing strategy (that will surely happen after the release of 1.2), but to change its way just to convince someone who needs to see a particular tool, oh well, I say let that someone walk away... When you, as an interested developer, judge a framework you should take into consideration *NOT* how cute their website is, but: what is the community behind it? what are its features? what does it offer me that other ones don't? etc. etc. I think there are a lot of websites and web applications built with Cake to give them an idea how flexible CakePHP is. Even the Cake team has produced cake based applications (take a look at The Bakery). So if there's a group of people that want to build a Cake-based CMS then I welcome that thought. But don't do it because you believe it is needed to get *more* developers, do it because you believe in it (like gwoo would say, sorry for the joda talk.) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Chris Hartjes Enviado el: Miércoles, 28 de Marzo de 2007 06:42 p.m. Para: cake-php@googlegroups.com Asunto: Re: Proposal for killer app Won't this lead to CakePHP being labeled the framework you can only build a CMS with? --~--~-~--~~~---~--~~ 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: Proposal for killer app
At the end of the day, CakePHP should not be aiming for the highest number of developers, but for the best. Just because a bunch of people uses a specific framework, that doesn't mean that is the best thing to do. IMO developers who are serious about their job will not hesitate in choosing CakePHP. That's what we should put our focus on. Only the best use the best. But please its not meant to flame. I'm just trying to make my point at how it is difficult for me to bring cakephp in my company. Mariano Iglesias wrote: Ok where do I start... Elitist vision? Well I'm not even going to comment on that one, not worth the typing effort... I hear a lot of What I need is.. It's your job to convince your managers, not Cake's... As a developer *YOU* need to assess the tools you'll be using and then go to your managers with a proposal... Since when are the tools expected to convince managers for you? CakePHP, and let's all start understanding it (those who haven't yet): IS A FRAMEWORK. It's not a company that will be doing the job for you, it's something that will help you get things done faster, and better. It won't convince your managers, nor it will magically build an application for you if you haven't put any effort into it. You can use CakePHP to build crap (trust me, I have seen a lot of crappy code written with CakePHP) but that doesn't mean CakePHP is crap. If used correctly, it will improve your coding skills, and leverage your productivity. Period. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Olivier Percebois-Garve Enviado el: Miércoles, 28 de Marzo de 2007 08:24 p.m. Para: cake-php@googlegroups.com Asunto: Re: Proposal for killer app @Mariano Sorry but I do not share your elitist vision. Cakephp is making its best to reach new markets and to be used by the masses. Also I am rather considering the question of easing the processes in a team work, where we have various peoples with various skills. Most of our projects are starting small and growing later. We have a lot of legacy apps to manage and what we are producing will be managed by other peoples. We need to make the work easy for them, not require them to be super-geniouses to understand the mess we have produced. Sorry but I wont convince my managers by using your joda talk. :-) I just need something easy for them. The benefits are for me but I need to polish the caveats. Implementation speed in the early stages is one. CMSes seem faster to implement and therfore less costly for the agency. And they often claim to be usables as framworks. --~--~-~--~~~---~--~~ 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: Proposal for killer app
I've been helping debugging on ocean CMS. I created my own project on cakeforge when I started with cake. Even if it was flawed by design (recursive requestActions ...) it helped me get my job by demonstrating it. At that time I received zero feedback from the community, positive or negative. Not even a can't get it to work. I would just appreciate to participate to a project addressing some very common needs, not a feature bloat competition. But there is no project common enough to participate to. Samuel DeVore wrote: I think a Killer app is a good idea, but it has to be something new done better then anyone could picture, simple elegant and have it work. Trying to come out the door with yet another CMS is, in my mind (and it is a simple old mind remember), is dumb. To try compete with all the other CMS's out there is a fools errand. You would be obligated to make it have features to match all the cms's out there (now I am not saying that a good killer cms would have to have all that crap) but people come to the table with a certain expectation. The cakeforge is littered with half assed attempts to make the killer cms, why start another, you really want to make a difference in the CMS world, get all those people who started all those projects and DO something. The hardest part of a killer app is not building it, it's thinking of it. 37 Signals succeeded because their ideas and the way they executed them were killer (and timely) not because they tried to do something every one and their brother have tried. You need a fresh idea not a re-hash of an old one. I mean this in a helpful, yet cranky way. If you think of a killer idea and want help, scream in this deaf old man's ears and I will probably help. Sam D (my 4 cents because I need the money) --~--~-~--~~~---~--~~ 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 Recipes cancelled
By the way Michal how are your projects coming along ? Fase ? jQuery stuffs ? You have removed the links but the files are still accessible... Any update to expect ? or a new project ? Olivier On 3/13/07, Michal Tatarynowicz [EMAIL PROTECTED] wrote: It's because I wanted to avoid all this useless law-related banter I originally made the framework public-domain. I don't know how much of Cake code is by me, nor do I care. I can either be, or not be included as Cake's inventor/primary designer/ whatever. It is however a bit sickening to have it discussed how much kudos I'm owned tbh. I've stopped using Cake (or, more precisely branched with my own private version) long time ago, and since then I've re-written all of the code at least once. Every professional programmer uses some kind of framework and I'm no different (atm I call the one I use Garden). I'm not in any way emotionally attached to Cake code, although the name is still something I feel a bit proud to read about on one of the blogs I read. I think Cake isn't remarkable as a collection of code, but as a conglomerate of people and companies that it brought together. If all that is to disappear because of some internal disputes -- so be it. There's quite a number of decent PHP frameworks available nowadays. But pls come to senses, code more, fight less, and generally try to behave reasonably. Thank you :) --~--~-~--~~~---~--~~ 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: New Cake FAQ
Hi Q: I have made the blog tutorial, now how can I build a website ? That kind of question appears sometimes on the list and gets little feedback. Web developers are used to a vocabulary that is different to cake's one. Having made the blog tutorial helps to understand cake but does not show how to get that login box on the top of every page... AD7six's last article could be a good answer to that, but its one approach among dozen possible. So I think the FAQ should contains an introduction to how to think a webapp beyond the blog tutorial, showing where the developer has to respect the framework constraint's, where there more freedom, how to link cake's concepts to traditional web development vocabulary. Olivier nate wrote: Hey Y'all, We're putting together an official CakePHP FAQ. So add your recommended frequently asked questions (and answers) here: https://trac.cakephp.org/ticket/1576 --~--~-~--~~~---~--~~ 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: Jquery and Cake
From their homepage: License : MIT or GPL ( what ever you wish to use ) This should be compatible with cake's license, isn't it ? On 2/26/07, nate [EMAIL PROTECTED] wrote: The jQuery interface is already being implemented, however, we don't take code from other projects for licensing reasons. On Feb 26, 7:01 am, Ámon Tamás [EMAIL PROTECTED] wrote: Hello, There was some discuss about jQuery and cakePHP. I found a class what is a jquery helper class for php. Maybe it is usefull. http://www.ngcoders.com/php/pquery-php-and-jquery/ -- Ámon Tamáshttp://linkfelho.amon.hu --~--~-~--~~~---~--~~ 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 LiveGrid (Rico)
Scaffold is not meant for production, but it has been suggested that it is ok for production. The manual is rather unclear on that point : So cool that you'll want to use it in production apps. Now, we think its cool, too, but please realize that scaffolding is... well... just scaffolding. It's a bunch of stuff you throw up real quick during the beginning of a project in order to get started. It isn't meant to be completely flexible. So, if you find yourself really wanting to customize your logic and your views, its time to pull your scaffolding down in order to write some code. Would be nice from the doc team should to clarify if scaffold is or not OK for production... Oli On 2/20/07, CraZyLeGs [EMAIL PROTECTED] wrote: On Feb 20, 7:45 am, archinform [EMAIL PROTECTED] wrote: *really* done easily in cake... ok, it's pretty easy in relation to coding without a framework, but it would be much more Rail style if the creation of js inclusion and especially the datafeeds would be done automatically by scaffolding! Just modify the default layout, copy it from the core dir and put in your app. then do whatever you want in it ( include js or whatever ) Other thing is that it's quite easy to get a working example of such AJAX stuff, but the next step for making the code ready for production use is much more difficult... Scaffold is not meant for production, you should know that by now. Sascha --~--~-~--~~~---~--~~ 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: Kindly Hep Me !!
The blog tutorial is a good way to grasp what cakephp is. On 1/15/07, Eric C Blount [EMAIL PROTECTED] wrote: Cake PHP is a Framework that will help you build PHP applications faster. It does much of the dirty work (the repetitive stuff you do for every project) for you, leaving you to handle only the programming for your specific project. Cake requires a moderate learning curve, but can save you tons of time once you get to know it. MUCH more information can be found at http://www.cakephp.org/ and http://bakery.cakephp.org/, and by passively reading this list for a while. Please search this group and attempt to answer questions on your own first - there is a massive amount of great information in the archives. Good luck! Eric On 1/14/07, Rizwan [EMAIL PROTECTED] wrote: Hello Every one !! warm greetings from me.. i am sorry to post such a post which might be not suitable for anybody but i wann to know..!! I have just learn PHP it been 3 month now.. I want to know about Cake_PHP ,PHP NUke i dont know what is this all about kindly help me on it.. I will be highly Appriciated if you comment on this post !! Thanks Rizwan --~--~-~--~~~---~--~~ 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: anything similar to acts_as_tree in Rails
Would it make sense to go after rails's documentation to get an idea of how these new things in 1.2 are functioning ? olivvv Felix Geisendörfer wrote: I'm thinking of doing a project in cake and would like to know if there is a model convention similar to 'acts_as_tree' in rails. CakePHP 1.2 has a similar functionality named Behaviors. However it's not officially been released yet (only a developer release). -- Felix Geisendörfer aka the_undefined -- http://www.thinkingphp.org http://www.fg-webdesign.de river_jetties wrote: I'm thinking of doing a project in cake and would like to know if there is a model convention similar to 'acts_as_tree' in rails. -j --~--~-~--~~~---~--~~ 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: I Just Installed Cake and then . . .
use the formTag() like ?php echo $html-formTag('/notes/edit/' . $html-tagValue('Note/id')? http://manual.cakephp.org/chapter/helpers HTH olivvv PHPBABY3 wrote: I know PHP and am learning CakePHP. I have installed CakePHP and obtained some files to add to it to produce a search button (meaning a form that asks questions to implement a searching capability.) In file default in directory layouts there is a form and the ACTION parameter is wrong, but when I ask the programmer what the value should be, he only tells me variables that I don't know the value of. He says to make it: http://directory.to.cake/controller_name/control_function My directory structure is c:\sokkit\site\cake\cake_1.1.12.4205/app/ etc. Directory controllers contains one file, urls_controller. What do I enter between the quotes in: form action= . . . in file default ? Thanks --~--~-~--~~~---~--~~ 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: I Just Installed Cake and then . . .
So what you want to know is that URLs are formated : controller/action/params ? PHPBABY3 wrote: Olivier Percebois-Garve wrote: use the formTag() like ?php echo $html-formTag('/notes/edit/' . $html-tagValue('Note/id')? http://manual.cakephp.org/chapter/helpers 1. Aren't you missing a right paren? 2. This chapter doesn't define formTag. It has one reference to it, in sample code, without explanation. 3. I don't use notes so I can't use the above as is. Can someone help - what should I use for the URL? Thanks HTH olivvv PHPBABY3 wrote: I know PHP and am learning CakePHP. I have installed CakePHP and obtained some files to add to it to produce a search button (meaning a form that asks questions to implement a searching capability.) In file default in directory layouts there is a form and the ACTION parameter is wrong, but when I ask the programmer what the value should be, he only tells me variables that I don't know the value of. He says to make it: http://directory.to.cake/controller_name/control_function My directory structure is c:\sokkit\site\cake\cake_1.1.12.4205/app/ etc. Directory controllers contains one file, urls_controller. What do I enter between the quotes in: form action= . . . in file default ? Thanks --~--~-~--~~~---~--~~ 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: Help - How do I Use CakePHP?
http://www.cakefoundation.org/pages/services PHPBABY3 wrote: I have been using PHP for a few years part-time. Now I have to use CakePHP. Where is is the best documentation? Could someone walk me through it or something? We can make this a business relationship if you are a business. Reply to Author, please. PB --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Vocabulary question : What's the name of a MVC object
Hi We know what a Model is, or a Controller, or a View. For the three together however, I'm not sure. I'm saying Object or MVC Object but its quite vague and not really correct. What do you use fore that ? olivvv --~--~-~--~~~---~--~~ 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: Vocabulary question : What's the name of a MVC object
Thanks a lot Mariano that sounds good :-) Mariano Iglesias wrote: I think he's referring to how to generally name an MVC View, an MVC Model or an MVC Controller, using just one term. I would say call it an MVC Element. Such as: One of the first things you'll need to learn before proceeding is how each MVC Element plays a different role on the system... -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Adrian Godong Enviado el: Martes, 26 de Diciembre de 2006 11:07 a.m. Para: cake-php@googlegroups.com Asunto: Re: Vocabulary question : What's the name of a MVC object It's called pattern. MVC is a software pattern. On 12/26/06, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: We know what a Model is, or a Controller, or a View. For the three together however, I'm not sure. I'm saying Object or MVC Object but its quite vague and not really correct. --~--~-~--~~~---~--~~ 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: Vocabulary question : What's the name of a MVC object
And those three tiers are a MVC element, that's right ? gwoo wrote: I like to call them tiers. The Model tier handles data, Controller tier handles business logic, and the View tier displays the data to the user. Refer to the Cake logo, it has three tiers. --~--~-~--~~~---~--~~ 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: Update on translations.
You'll receive the french version pretty soon I think, we are debating some points and then Bruno Baudry should send you the file. Larry E. Masters aka PhpNut wrote: Below is a list of the files we currently have and need translated still. core.po files need to be translated: Danish (https://svn.cakephp.org/repo/branches/1.2.x.x/cake/locale/dan/LC_MESSAGES/ https://svn.cakephp.org/repo/branches/1.2.x.x/cake/locale/dan/LC_MESSAGES/) French (https://svn.cakephp.org/repo/branches/1.2.x.x/cake/locale/fre/LC_MESSAGES/) Japanese (partial by Shunro Dozono) ( https://svn.cakephp.org/repo/branches/1.2.x.x/cake/locale/jpn/LC_MESSAGES/) Russian ( https://svn.cakephp.org/repo/branches/1.2.x.x/cake/locale/rus/LC_MESSAGES/) Portuguese (partial by RoadHouse on irc) (https://svn.cakephp.org/repo/branches/1.2.x.x/cake/locale/por/LC_MESSAGES/ https://svn.cakephp.org/repo/branches/1.2.x.x/cake/locale/por/LC_MESSAGES/) (I think DJ Spark is completing it) Thanks to those who have completed the translations of the core. Completed: Dutch (Dieter Plaetinck) Chinese (ERic ZoU) German (Daniel Hofstetter) Italian (Claudio Poli) Spanish (Mariano Iglesias) -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ --~--~-~--~~~---~--~~ 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 would you scale a cake app?
A simple way to let a webapp scale is to moved session's and db's data to cookies as much as possible. olivvv Nimrod A. Abing wrote: On 12/24/06, keymaster [EMAIL PROTECTED] wrote: .. just dreaming, but.. If one wanted to use cake to build an app which is scalable to the extreme, ie. flickr.com or yourtube.com or myspace.com, how would you do it? http://www.onjava.com/pub/a/onjava/2003/10/15/php_scalability.html http://www.oreillynet.com/onlamp/blog/2006/04/digg_phps_scalability_and_perf.html Would you just separate out the db server and replicate the rest on identical nodes in a cluster? Would you break up the app into view servers, controller servers, and model servers? That depends. Scalability is a difficult issue to handle if it is not considered during the initial application design stage. If you want to be able to scale up your application, you might as well decide on a strategy *now*. --~--~-~--~~~---~--~~ 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: Slightly naughty but is it an acceptable way of doing things?
By using phpThumb you could simplify your application logic and abstract image size to the views. olivvv TWIOF wrote: HI Everyone, I've been making an images system for my site. There are various types of image (e.g. thumb nails and illustrations). As far as the models go an article might use hasOne for the thumb nails and hasMany for illustrations. BUT, i'm using one db table for all images (there won't be that many over all) - so can i have a hasOne and add a condition to only pick thumbs, and a hasMany with a condition only to pick illustrations. I know I should probably separate them into different tables, but would it be that bad? Cheers TWIOF --~--~-~--~~~---~--~~ 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: Why so slow???
Hi. I also use gmail and never experienced such trouble. Keep in mind that are not receiving the email that you are sending, but the answers. Olivvv [EMAIL PROTECTED] wrote: Why does it sometimes take 12+ hours for a post to show up in a discussion? And other times (rarely) it shows up within minutes. sc --~--~-~--~~~---~--~~ 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 1.1.9.3815 Frozen Cake
And Fabio Cevasco's book on cakephp is also out !Did I missed the announcement ? Is there a pitch on what is inside ?On 11/3/06, Larry E. Masters aka PhpNut [EMAIL PROTECTED] wrote:We're excited to see so many people enjoying Cake. To show our appreciation, we are releasing CakePHP 1.1.9.3815[1] Check out the changelog[2] to see what's new, and what you need to know before upgrading. This is another bug fix for the 1.1 series and marks the last release before 1.2. To those who submitted tickets, we'd like to thank you for your patience while we worked through them. We work really hard on making CakePHP the most complete and developed framework, and we appreciate your support in making that happen. There is one major change in this release pertaining to ACL. If you are working with the provided database tables for ACL, we changed the user_id column to be called foreign_key. This makes more sense in a broader context and allows aros to relate to different tables more easily. Run this: ALTER TABLE aros CHANGE user_id foreign_key INT( 10 ) UNSIGNED NULL DEFAULT NULL; Alternatively, an upgrade command has been added to the acl.php cli script to run this query for you.php scripts/acl.php upgrade [-app /path/to/app_directory] There has been a lot of excitement around 1.2. We are working hard to get all the new features to a point where we feel it is stable and ready for production use. We will not set a release date, but we are putting all our efforts into getting it ready as soon as possible. We would also like to thank everyone who has donated to the Cake Software Foundation. We finalized a page at http://cakefoundation.org/donors/thanks. The Super donors have a link to their website, if one was provided. If you are a Super and your name or website link is missing please let us know via the contact form at http://cakefoundation.org/pages/contact. Some people have made multiple donations, which is really helpful and they should see themselves move up the donor ladder. Go to http://cakefoundation.org/donations to learn how you can contribute or click on one of the buttons that appear on the CakePHP sites. Also, PhpNut has put together a list of books which are valuable to developers who want to improve there skills and learn how they can be ninjas like Him. http://astore.amazon.com/cakesoftwaref-20 . Remember, do not try the nail-through-the-finger trick at home. That is for trained professionals. [1] Download: http://cakeforge.org/frs/?group_id=23release_id=155 [2] https://trac.cakephp.org/wiki/changelog/1.1.x.x-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @accesspublic */ --~--~-~--~~~---~--~~ 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: Nested categories controller and routing
hi -routes are like Controller/Action/Param/Param -the 'index' is the default action Take your 'Categories' structure and name it articles, so that the route will be domain.ext/ then use the index() method. feed it with you article name's and convert them to id to do your article management. Something like that: class ArticlesController extends AppController{ function index($name=null){ $row = $this-findAllByName($name); $id = $row['id']; //then get your article content } } you'll need to convert your id to names for your links by using findAllById($id). You need also to make sure that your article names are uniques and that your are using an appropriate way to pass special characters in the url. HTH olivvv gremlin wrote: If I create a model with a relationship to itself ie a nested categories model with a belongs to and has many relationship I can easily enough get a set of nested categories data. The problem for me is that if I wish to reference the content related to that category I must either reference it directly or set a nesting depth limit on the parameters I pass via the url. More clearly I can't figure out how I could set a controller to read category information from an url that might have no parameters or 5 or 13 or any other number. Is there a way to take a structure like so : Categories __ id - parent_id - value __ 0 - null- null 1 - 0- articles 2 - 0- files 3 - 1- programming 4 - 3- php etc.. and represent the actual hierarchy in the url as parameters? domain.ext/ domain.ext/articles domain.ext/articles/php particulary in the case where in the future I might want to add a sub-category to php thus making the url into domain.ext/articles/php/cake or similiar? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: jQuery users
Yeah Jquery is good. Powerful and really easy to use. To use it in cake , the head helper is perfect. Troy Schmidt wrote: Okay. I am eating my big old bowl of crow right now. I believe I may be a jQuery convert. I am doing a project right now where I will be working with BakeSale which use jQuery. Also, I found tweenbox for jQuery which automatically resizes the lightbox with animation which is perfect for my peGallery. I wanted to know who in CakePHP land uses jQuery. Also, has anyone come up with a solution to make RequestHandler component work automagically with jQuery as well. Perhaps by passing a specific parameter in the jQuery AJAX call? Also, how interested is anyone in making an ajax helper for jQuery in CakePHP? I just looked and decided a Volkswagen Rabbit works well for me. Sure the Ford Mustang Shelby looks cooler, but it does so much more than what I NEED. So speak up jQuery and CakePHP users where are you and what have you done to make jQuery play nicer with CakePHP. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: jQuery users
also search for resig on this page : http://irc.cakephp.org/cakephp/viewlog/2006-08-25 Troy Schmidt wrote: Okay. I am eating my big old bowl of crow right now. I believe I may be a jQuery convert. I am doing a project right now where I will be working with BakeSale which use jQuery. Also, I found tweenbox for jQuery which automatically resizes the lightbox with animation which is perfect for my peGallery. I wanted to know who in CakePHP land uses jQuery. Also, has anyone come up with a solution to make RequestHandler component work automagically with jQuery as well. Perhaps by passing a specific parameter in the jQuery AJAX call? Also, how interested is anyone in making an ajax helper for jQuery in CakePHP? I just looked and decided a Volkswagen Rabbit works well for me. Sure the Ford Mustang Shelby looks cooler, but it does so much more than what I NEED. So speak up jQuery and CakePHP users where are you and what have you done to make jQuery play nicer with CakePHP. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Image Processing
What kind of processing do you want to do ?There is a script on sourceforge that I like a lot, it is named phpThumb, you may give it a tryOn 9/22/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I wanted to get some advice on the best logic to process images via awebsite.Various hosts and their parameters mean that anywhere fromonly 3 to above 10 images can be processed before either the scripttimes out of the memory runs out.So, I am wanting the processing page to 1. show progress and 2. redirect after so many iterations to renewthe page and processing.My initial thought is that the action will start rendering first andthen I can echo some progress in the action.At the iteration limit, it will call a redirect to the same page that will continue on.Is this the best approach?Is there a more elegant or more CakePHPapproach?Thanks. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Bakehouse anybody ??
Hi. I'd love to heard about the future of bake. Not when but what, having an idea of the direction. I loved rdbakery, which was quite web developer-friendly rather than sysadmin-friendly like bake. One thing I hope on, is to have the possibility to add our own code templates to the default ones. Any informal info that can be disclosed ? nate wrote: Nowhere as yet. I'll post details as soon as I have some. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Multiple File upload Flash
I use the following code to upload images. I madethe images file mandatory, so save() is invalidated if there is no images. I choose to store them in a directory named after the object's id. I dunno on what to extend the explanation, please tell. You'll find the file in $this-data['MyObject']['image']['tmp_name'] Also make sure your form contains the attribute: enctype=multipart/form-data olivvv function edit($id = null) { $img = ''; if (isset($this-data['Applicationimage']['image']['tmp_name'])) $img = $this-data['Applicationimage']['image']['tmp_name']; if (empty($this-data)){ if ($id) $this-data = $this-Applicationimage-read(null, $id); $this-set('applicationArray',$this-Applicationimage-Application-generateList()); }else{ if (!$id) if (($img == '') || (!$this-_isValidImage($img))) $this-Applicationimage-invalidate('Applicationimage/image'); if ($id) if ($img != '') if (!$this-_isValidImage($img)) $this-Applicationimage-invalidate('Applicationimage/image'); $this-cleanUpFields(); if ($this-Applicationimage-save($this-data)){ if ($img != ''){ if ($id) $this-_uploadfile($img, $this-imgpath.DS.'application'.DS.$id.'.jpg'); if (!$id) $this-_uploadfile($img, $this-imgpath.DS.'application'.DS.$this-Applicationimage-getLastInsertID().'.jpg'); } $this-flash('Votre image d\'application a eacute;teacute; modifieacute;e.','/applicationimages'); }else{ $this-set('applicationArray',$this-Applicationimage-Application-generateList()); if ($id) if ($img != '') if (!$this-_isValidImage($img))$this-set('imageerror', true); if (!$id) if ($img == '') $this-set('imageerror', true); } } } functions in app_controller :## function _selectedArray($data, $key='') { $array = array(); if(!empty($data)) { if ($key != ''){ foreach($data as $var) { $array[$var[$key]] = $var[$key]; } } else { foreach($data as $var) { $array[$var] = $var; } } } return $array; } function _isValidImage($tmp_name){ if (is_uploaded_file($tmp_name)) if (@getimagesize($tmp_name))return true; else return false; } function _uploadFile($tmp_name, $filename){ if (is_uploaded_file($tmp_name)){ if(file_exists($filename)) unlink($filename); move_uploaded_file( $tmp_name , $filename); return true; } else return false; } ## view file: ## h1Ajouter une image d'application:/h1 form action=?php echo $html-url('/applicationimages/edit/'.$html-tagValue('Applicationimage/id')); ? enctype=multipart/form-data method=post ?php //echo $html-formTag('/applicationimages/add') ? p ?php echo $html-tagErrorMsg('Applicationimage/name', 'Entrez le nom.'); ? Nom: ?php echo $html-input('Applicationimage/name', array('size'='40')); ? /p p ?php echo $html-tagErrorMsg('Applicationimage/image', 'Entrez l\'image.'); ? ?php if(isset($imageerror)) echo 'div class=errorChoisissez une image./div'? Image: ?php echo $html-file('Applicationimage/image'); ? /p ?php if(!empty($this-data['Applicationimage']['id'])){ ? img src=/phpThumb/phpThumb.php?src=/cakeimg/application/?php echo $this-data['Applicationimage']['id'] ?.jpgamp;w=200 width=200/ ?php } ? p Application: ?php echo $html-tagErrorMsg('Applicationimage/application_id', 'Choisissez une application.'); ? ?php echo $html-selectTag('Applicationimage/application_id', $applicationArray, null, null) ; ? /p p ?php echo $html-hidden('Applicationimage/id') ? ?php echo $html-submit('Save') ? /p /form [EMAIL PROTECTED] wrote: Okay I am integrating a Multiple File upload Flash applet into CakePHP. It is configurable to direct the uploaded files to a CakePHP url. Now, here is the line of code normally used by the script to get at the files uploaoded. move_uploaded_file($_FILES['Filedata']['tmp_name'], $uploadfile) Is there a pretty way to do this same thing in CakePHP? I am pretty new to this POST upload of files so just looking to get some more information on the CakePHP way to do it since I couldn't really find much on this Group about it. --~--~-~--~~~---~--~~ 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
Re: Problem with FCKEditor
This is probably not directly cake related, but raher some param must be wrong. What method r u using ? Did you see my post on fck ?: http://groups.google.com/group/cake-php/browse_thread/thread/de6ecd314cb7597/22aa22e717f6e456?lnk=gstq=fckrnum=3#22aa22e717f6e456 [EMAIL PROTECTED] wrote: Hi, I am facing some problems with FCKeditor. I am trying to display the editor in my html page and I followed the steps described in http://wiki.cakephp.org/tutorials:online_editor-fckeditor I have used the same code that they given. After changing the basepath in thtml file , I could able to display the toolbar for the editor. But it is not displaying the text area. 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 -~--~~~~--~~--~--~---
Re: multiple controllers on 1 page
Hi I think requestAction is made for that. To avoid a method to be accessed, just use _ as prefix e.g : function _blabla(){ //blabla } Are u american ? Isn't your lastname difficult to live with there? Brian French wrote: Im still in the process of wrapping my head around the MVC. I understand the roles of each of the elements. What i am coming across that i cant seem to figure out is how to have multiple elements work on 1 page. Example: Myspace (i know, but good example of what im talking about). On the homepage you have multiple elements: Music box, Specials box, Cool new people, and videos. In my understanding of MVC, each one of them would be a different controller, prob calling the same method name like GetBlock or something. ($specials-GetBlock();, etc. ). So, the cakephp url would be 'Specials/GetBlock'. I have ran across the method 'requestAction' which can call the multiple controllers, by the cakephp url in the page controller. Then assign it to a variable to be used in the view. Questions: 1. would i basically have to create a seperate method for each of the pages i would have? 2. would the above way of using requestAction be the right way of accomplishing this or is there a better way to do this? 3. in doing it this way, what is preventing someone from access the url 'http://www.blah.com/Specials/GetBlock'? I hope i have explained this well enough. Brian --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: multiple controllers on 1 page
Well, U can also make use of requestAction in the layout, in components and I guess in elements too. In my abroad experiences, sometimes, I found myself very happy when I could hide my French origin... Brian French wrote: Thanks for your help! In response to my own first question, i am assuming that i am correct as i would have to call the requestAction for each block for each page unless they occure everywhere in which case i could use beforeRender() Yes I'm American and no, it's not hard to live with :-p The average American isn't as prejudice as people may believe :-p Olivier Percebois-Garve wrote: Hi I think requestAction is made for that. To avoid a method to be accessed, just use "_" as prefix e.g : function _blabla(){ //blabla } Are u american ? Isn't your lastname difficult to live with there? Brian French wrote: Im still in the process of wrapping my head around the MVC. I understand the roles of each of the elements. What i am coming across that i cant seem to figure out is how to have multiple elements work on 1 page. Example: Myspace (i know, but good example of what im talking about). On the homepage you have multiple elements: Music box, Specials box, Cool new people, and videos. In my understanding of MVC, each one of them would be a different controller, prob calling the same method name like GetBlock or something. ($specials-GetBlock();, etc. ). So, the cakephp url would be 'Specials/GetBlock'. I have ran across the method 'requestAction' which can call the multiple controllers, by the cakephp url in the page controller. Then assign it to a variable to be used in the view. Questions: 1. would i basically have to create a seperate method for each of the pages i would have? 2. would the above way of using requestAction be the right way of accomplishing this or is there a better way to do this? 3. in doing it this way, what is preventing someone from access the url 'http://www.blah.com/Specials/GetBlock'? I hope i have explained this well enough. Brian --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cake Errors I'm getting with
sounds like cake cannot write in the tmp folder. try to chmod it. olivvv Tony wrote: Hey guys, I'm using CakePHP and I'm getting a few errors. I'm going through the blog tutorial and this is what is happening: Warning: file_put_contents(/www/mydomainname.com/mysite/app/tmp/cache/models/default_scribble_list) [function.file-put-contents]: failed to open stream: Permission denied in /www/mydomainname.com/mysite/cake/basics.php on line 826 Warning: file_put_contents(/www/mydomainname.com/mysite/app/tmp/cache/models/default_posts) [function.file-put-contents]: failed to open stream: Permission denied in /www/mydomainname.com/mysite/cake/basics.php on line 826 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /www/mydomainname.com/mysite/cake/basics.php:826) in /www/mydomainname.com/mysite/cake/libs/session.php on line 131 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/mydomainname.com/mysite/cake/basics.php:826) in /www/mydomainname.com/mysite/cake/libs/session.php on line 131 I had to uncomment the line: define ('BASE_URL', env('SCRIPT_NAME')); in the folder /app/config/core.php Am I missing something here? I'm also using the development setup and mysite is the webroot as you can see from above. The funny thing is that everything seems to be working but I'm getting those errors. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Image uploading in FCKeditor?
did you looked at that ? http://groups.google.fr/group/cake-php/browse_thread/thread/de6ecd314cb7597/22aa22e717f6e456?lnk=gstq=fckrnum=2#22aa22e717f6e456 [EMAIL PROTECTED] wrote: Does anyone have image uploading working with FCKeditor 2.3.1 and CakePHP 1.1.7.3363? I followed the tutorial but it still doesn't work: http://wiki.cakephp.org/tutorials:online_editor-fckeditor?s=fckeditor The FCKeditor seems to work great with Cake except for image uploading. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: NON-CAKE files within cakephp framework.
1. use the page controller. 2.use elements or in the layout file. 3.use the page controller. 4. Dunno what NON-CAKE files are but again, just use the page controller. olivvv globalnomad wrote: please help me with these newbie questions: 1) do I have to have a default.thtml for my entire site? because right now I just stuck my files as they are in webroot and I have no template or layout files. Is that bad cake? the reason for this is that I haven't gotten to data-driven pages yet. 2) what do you if you want repeatable sections of PURE html (eg headers and footers etc) in their own file? I just want to extract the htmlhead and body tags for all the static pages destined for display in a particular iframe into a separate file. 3) Once you create a layout, how do you use it if it doesn't need a controller and a model because it isn't data-driven? what would you call the controller in that case? And how would you access the controller / layout? 4) failing all the above, does anyone have a tutorial for using cake with NON-CAKE files please!! I get the mvc stuff but I just don't get how to use the framework for cases where there IS NO MODEL. The cakephp manual completely circumvents this issue but this is how most ppl will convert their sites (slowly) to cakephp. :-( pls 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 -~--~~~~--~~--~--~---
Re: Image uploading in FCKeditor?
Glad that you got it working. but I cant tell anything about your question... sorry [EMAIL PROTECTED] wrote: Hi Olivier - I followed your instructions in your other post and I did get it to work. Do you know why it works if you use app/webroot/files/fck as the upload directory, but it doesn't work if you use app/webroot/img? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Video file Uploading
http://www.raditha.com/php/progress.php poorna wrote: hi all, Can any body guide me please how to upload video files using php and how to maintain it? Is there any thing diffrent way to upload a video files? Regards, poorna --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: UML Design to Cake PHP
k. look at your diagramm. Start with the relations between your objects. For each object a model. Then translate each relation into cake's hasOne, hasMany, BelongsTo, HABTM. Then take the methods in your diagramm and translate them into controller's methods, and give them the appropriate views. olivvv simonvlc wrote: Hello, I´m new to this community, so hi all! I´m a third degree student and I´m familiar to the UML design model (Class diagrams, Use Cases, Activity Diagrams...). Now I want to test the Cake Php framework for a new project but I´m not sure how UML translate to Cake Php, probably because I´m new to the MVC pattern. I understand it, but I don´t know how to translate my diagrams to an MVC/Cake PHP perspective. Anyone could give me a hint about this? How do you prepare your designs? Thanks in advance, Simon. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
In-build way for validation of files ?
Hi Is there an in-build way (in the model) to get validation to work on files (they do not correspond to a db field)? olivvv --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: RdBaker Works with Latest Cake Release?
Well bake is not that horrible to use ;)Harald has written an article explaining how to use it on his blog.Basically go thru the DOS to your directory where php.exe is.Then do php.exe ..\..\path\to\the\bake\script\bake.php If you are still going for #4, you may help yourself by looking at the source code of bake.On 8/24/06, jonathan [EMAIL PROTECTED] wrote:Thanks for the input Olivier,I'm afraid I will be going with the worst option for now, approach #4 - code everything I need manually :)All the best,Jonathan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Not following the conventions
If your only concern is the links, you may attack your problem with the routes. olivvv eDevil wrote: Hi, I'm trying something different here by not following the conventions because of my very complex requirements. Here's how I want it to work: app/controllers/publisher_controller.php --- class PublisherController extends AppController { var $name = 'Publisher'; var $uses = array('Post'); function index() { $this-set('data',$this-Post-findAll()); } } --- Note that I havent used a plural name because I want the links to show up like /publisher/function/param and NOT like /publisher*s*/function/param Now the model /app/models/post.php --- Class Post { var $name = 'Post'; } --- The view file is stored in /app/views/publisher/index.thtml --- div id=content div class=title? echo $data['Post']['title']; ?/div div class=body? echo $data['Post']['body']; ?/div /div --- but this unconventional system isnt working for me. I am getting this error: Fatal error: Call to undefined method Post::findAll() in C:\www\cake\app\controllers\publisher_controller.php on line 29 I know I can fix the problem by changing the controller file name to PostsController.php and class name to PostsController but that's not how I want it to be. Any suggestions how I might get it to work? Thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Signup form probem...URGENT
Search cake world for HABTM (it is the name of the relation you are willing to build : Has And Belong To Many) milicic.marko wrote: Hi Bakers, I'm trying to put together simple Signup page. I have member model with userinfo fields like Firstname, lastname, username, password, email etc. I folowed blog tutrial and implemented logic for inserting members into table. BUT BUT BUT Now I want to allow my users to choose one of the my services defined in SERVICES table. So, after successfull signup, I should make connection betwen user_id and service_id in MEMBER_SERVICE table. What is the natural way to implement this with cakePHP? Let's say the same with simple words! How to implement simple form (with validation on model level) which works with multiple tabes?? Please help me --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: selected items in HABTM multiple select
You're definitely right. thanks a lot. I should think about it every time I see something recurrent in my code. Jon Bennett wrote: Any thoughts ?? how about adding this function to your app_controller.php function getSelectedItems ($data) { $return = array(); foreach ($data as $row) { $return[$row['id']] = $row['name']; } return $return; } then you can use: $this-set('selected_categories', $this-getSelectedItems ($this-params['data']['ProductCategory'])); hth jon --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
selected items in HABTM multiple select
Is there an elegant way to build the list of selected items to feed the $html-selectTag() in a HABTM relation ??I ended with for instance: $materials_selected_designations = array(); for($i=0; $i sizeof($this-params['data']['Material']); $i++){ $materials_selected_designations[$this-params['data']['Material'][$i]['id']] = $this-params['data']['Material'][$i]['designation'];} $this-set('materials_selected_designations', $materials_selected_designations); its not very elegant compared to: $this-set('materials_designations',$this-Application-Material-generateList());The manual doesn't say anything on this, and in the wiki there is only something confuse in understanding_associations. Any thoughts ??olivvv --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Running HTML files through index.php
I think you don't need to mess with .htaccess I'm also integrating html files on the fly in my little engine and the method is just big like that : function view($id = "") { $filecontent = ""; if ($id != ""){ $uploaddir = APP . WEBROOT_DIR . DS . 'files' . DS . 'categories'. DS . $id; $path = $uploaddir . DS . "index.htm"; if (file_exists($path)) $filecontent = file_get_contents($path); } $this-set('data', $filecontent); } Jason Lee wrote: On 7/28/06, AD7six [EMAIL PROTECTED] wrote: Not entirely sure what you mean but why not put your html files in a folder under pages, and follow a similar approach to this: I'm hoping to allow a user of mine to put a HTML file in webroot/. When the file is requested, i want my cake app's controller to wrap it in my layout and spit it out to the browser. This will allow the users to create just the content portion and let me (as the app "admin") to control the final appearance. Sort of a poor man's CMS. Does that make sense? Re excluding stats, one solution is to just create a .htaccess file in that folder to turn off mod rewrite, this should be pretty close: Well, stats/ is, for lack of a better word, a "virtual" URI provided by by provider. The static didn't work, but this did: RewriteCond %{REQUEST_URI} !^/stats* But only under Apache 2. Apache 1.3 doesn't like that, so I'll just have to wait for all my hosts to be updated... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: FCK eventually sorted out - For AD7Six (and those interested)
Hi langdon it should work. Maybe you are being tricked by the iframe ? Langdon Stevenson wrote: Hi Nate Even if you don't use Cake conventions for the textarea field, the data will still show up in $this-params['form'] in the controller. Sorry, I wasn't clear. The data doesn't even show up in $this-params, hence it is a serious issue. Also, (and this is just my personal preference), I've much preferred TinyMCE to FCK. It's much lighter-weight, has a more new-school API, and works well with Cake's field-naming conventions. Thanks for that, I will definitely be checking out TinyMCE. Regards, Langdon --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: How do Models work in Cake
To me "Hierarchical Model View Controler pattern." makes sense. I understand (some) database logic (so objects, ORM etc...) but when I think of a website I think with page-logic (so hierarchy, tree, etc). That's the reason why I made Chameleon, and I guess Ocean had similar motivations for OceanCMS. Greywire what you are looking for can be done with Cake. OceanCMS uses the powerful MPTT tree structure and has other powerful features. Altough it is not compatible with the lasts version of cake it is a 98% finished application. In chameleon (my project) I used a simpler (lazy) approach, agot my stuffs running pretty quickly, I'm quite confident in its stability (if u test use SVN not the package), and could let cake do the nasty job and let me concentrate on the surface of the app to make it easy to use. My code has nothing amazing, and the recipe is simple. Build your tree structure in your model (there is different approaches, MPTT, adjacency,...) and use requestAction in your "main" controller to get what you need from other controllers, i.e from other objects. olivvv John David Anderson (_psychic_) wrote: On Jul 10, 2006, at 4:44 PM, [EMAIL PROTECTED] wrote: I doing research for a new framework for my project, I came across the concept of the Hierarchical Model View Controler pattern. I've only found one php framework that claims to support this (Claw). It makes a whole lot of sense to me and I was wondering if Cake supported this (or could it be extended easily if I needed to). If this is unfamiliar concept, it means basicaly that you can easily embed MVC "components" inside one another. Part of what makes this work is a method for chaining them together and allowing you to specify on the URL arguments for multiple components. So if you had a page that contained an MVC component for "Lead" and one for "Notes", you could do things like this: http://domain.com/view.php/lead/id.123/notes/page.2 which would give you the lead of id 123 with the second page of notes. Does that make any sense? Not to me, at least. :) The other concern I have is with how Cake interfaces to the database. I've always thought it didnt make a lot of sense to directly map objects to the database -- they just arent the same thing, after all. After reading some articles on it, I realize I am not the only one to think this. I've always thought of database tables as objects that relate to an application. Some tables arent (like join tables), but for the most part, a table should reflect an object or domain in your application. That's why they call them RDBMS's after all, but everyone looks at things differently. I figure for 90% of my project, the typical Object Relational Mapping method would probably work fine, to create the CRUD type pages needed. But that last 10% would be a total bitch to create. This is the same problem I have with Codecharge Studio. What sort of things are happening in the 10%? It seems to me that the best method would be not to try and make everything in teh database into an object, and maybe use a combination of objects and list processing (after all, database tables are just lists/sets of data, not objects). Well, Cake actually returns results in array form right now. So for example, in cake, is it goign to create an object for every row I fetch from the database? No. It will create an object that fetches data from your store, though. How easy is it to customize if I want to have my object for a table but internaly it manages the rows as an array? You can always override (or extend) methods or write your own model methods if you want to. Its all OOP. Besides, I think Cake returns data how you'd like. Have you used it yet? Can cake create "smart" SQL queries that will pull all the data needed in one query that ends up as several objects? Not sure what you mean by "smart", but models can be associated in Cake. So if I tell it my Supervisor hasMany Peons, bringing up a Supervisor record could automagically bring up its associated Peon records as well. -- J --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Query on a Tree table (id+parent_id)
Hi, I have written a little tree handling code on cake (without findAllThreaded). https://cakeforge.org/plugins/scmsvn/viewcvs.php/trunk/cameleon/?root=cameleon In the model there is a function get_childnodes($id = ) that does what you need. https://cakeforge.org/plugins/scmsvn/viewcvs.php/trunk/cameleon/models/category.php?rev=11root=cameleonview=markup Olivvv TimO wrote: Hey, I have made a query where i want to select a parent and its childs. I want the array to be like the normal cake structure [PARENT] infomation ---[CHILDS] -[0] information -[1] information -[2] information Im to big of a sql writer. I came up with this: SELECT * FROM content_table AS Content ,content_table AS Childs WHERE Content.id = Childs.parent_id AND Content.id = '$id' ORDER BY Content.position,Childs.position,Content.name,Childs.name I know about the findAllthreaded function but it has limited selecting capability. The findAllThreaded method can't begin somewhere in the middle of the tree and find the childs from that level or id. My query returns another sort of array. Every child gets retrieved and has a parent information array in the row. When the parent has no childs nothing gets returned but i need the parent information nevertheless. Can somebody send me in the right direction with this problem? thanx Tim --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: multiple views in one page?
Use RequestAction(). for instance let's say you have controller Registration with method edit($step) and you want the output of controller User method listening($cat_id) you use to call the adress registration/edit/1 transform edit($step) in edit($step, cat_id) inside the method use RequestAction('User/listening'.$cat_id) in combination with set() Look at the manual about RequestAction() olivvv PaulM wrote: I have a page that consists of a registration form on the left and user listing on the right. I want the registration page to be separate view or element and the user listing another separate element. How do I create two elements like that. They both have their own controllers. Thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Implemented OthAuth
Hi crazylegs, you don't have to worry, I think it's kinda normal at this step to have some little glitches. >From what I saw from the code, othAuth is cool piece of software. >From month to month I see the cake members and the cake-based code making giant steps, so I'm confident we will resolve such minor things pretty quick. Thanks for your code olivvv Langdon Stevenson wrote: Hi CraZyLegGs Thanks for othAuth. I am pretty happy with the results of the current version. It does the job for me :-) ACL support would be awesome if you can get that in for the next version. I think that the greatest weakness of the current release is documentation. Step by step tutorial/s would be great for the next release :-) Looking forward to seeing the results, and am happy to beta test if you need it. Regards, Langdon CraZyLeGs wrote: Sorry for you all trying to implement othAuth and having a tough time! I'm working on a new version with more features: teaser, Persistent Remember me login, other modes ( user has many groups, ACL ), ajax safe... also looking forward to get ride of beforeFilter. cake 1.2 will have component callbacks so othAuth might use those.. I'll be doing a step by step tutorial, and will post the beta version for you guys to test when it's finished.. Thanks guys. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Are there performance overheads to RequestAction?
I'm also dreaming of a $this-isCalledByRequestAction I made a ticket for this https://trac.cakephp.org/ticket/1013 olivvv Gonçalo Marrafa wrote: Hi. This thread is being very enlightening. I have a question though: doesn't an action always render a view (unless $autoRender is set to false)? Here's an example: in one_controller.php: function foo() { $this-set('foo', $this-Foo-findAll()); $this-render('foo_view'); } *NOTE*: The render() part is optional, of course, but assuming $autoRender is not set to false it will implicitly render foo.thtml. in other_controller.php: function bar() { $this-set('bar', $this-Bar-findAll()); $this-set('foo', $this-requestAction('/one/foo')); } Maybe i'm missing something but doesn't the call to '/one/foo' always render the view, even though requestAction is not asked to return the rendered view? Does foo()'s implementation have to contemplate the two distinct situations? Kinda like: function foo() { $foo = $this-Foo-findAll(); if ($this-isCalledByRequestAction) { return $foo; } else { $this-render('foo_view'); } } Thanks in advance. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Implemented OthAuth
Wow. I see that there is more and more othAuth users. I've two issues I'm not sure how to tackle. Just wanna to know if some peoples are sharing the same concerns (and if crazylegs thought about that for the new version) 1.Sometimes I hit the login page while its seems that I am already logged. if I fill in the right login, then I got back the message that credentials are wrong. But n fact after that if I enter manually the url of a restricted method, I can access it. I'm not sure how to reproduce this but it happened often during testing of code in restricted method. maybe it is related to my use of requestAction. 2. I'd like to gather the name of all the controller having restricted methods, and the names of the restricted methods ($othAuthRestrictions) in my layout. Basically I'm doing : if restricted build adminMenu else build userMenu Any ideas on how to achieve this ? olivvv Langdon Stevenson wrote: Hi rombeh I have the following code in the controllers that I want to protect: (note: extra $helpers and $components have been removed to simplify) class LeadersController extends AppController { var $name = 'Leaders'; //for php4 var $helpers = array('othAuth'); var $components = array('othAuth'); var $othAuthRestrictions = array('index'); function beforeFilter() { $auth_conf = array('auto_redirect' = true, 'login_page' = 'leaders/login', 'logout_page' = 'leaders/logout', 'access_page' = '/leaders', 'hashkey' = 'mYpERsOnALhaSHkeY', 'strict_gid_check' = false); $this-othAuth-controller = $this; $this-othAuth-init($auth_conf); $this-othAuth-check(); } function index () { // Action code ... } } That is all that is required to add to the controller to protect the index action, assuming that you have followed the othAuth setup instructions and have the required classes and DB tables in place. As mentioned in my previous post I also have a permission in the permission table like this: INSERT INTO `cake_permissions` VALUES (1,'leaders/index','2006-03-13 23:19:31','-00-00 00:00:00'); And a Groups-Permissions mapping that connects that permission to the desired user's group. As a side note, you have to check that your User has the right group ID assigned, and that their Active field is set to "1". Hope this is useful. Regards, Langdon rombeh wrote: hi Langdon Stevenson, Can u show me quick walkthrough (place some code too :D) in order to get it works thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: AJAX Form builder
maybe this will interest you: http://partridge.wordpress.com/ perhaps you would gain at working together. sicapitan wrote: Who wants to develop an AJAX form builder in Cake? :) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Implemented OthAuth
can you paste your code ? (in cakebin for instance) Ryan Petrain wrote: Hi Langdon, Cna you help me get past a raher mundane aspect of using othAuth? I have added othAuth to my cake install and all appears to be fine. I try to get to a restricted area and it redirects to the login page. I enter the login credentials and then I get this error once I click the submit button: Notice: Trying to get property of non-object in C:\apache2\htdocs\Trans2\app\controllers\components\oth_auth.php on line 109 Fatal error: Call to a member function find() on a non-object in C:\apache2\htdocs\Trans2\app\controllers\components\oth_auth.php on line 109 The login page has access to the User object. I have even added the $users = array('User'); to the controller to see if that was what it needed but I still can not get past this. Any help would be appreciated. thanx. On 6/30/06, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Wow. I see that there is more and more othAuth users. I've two issues I'm not sure how to tackle. Just wanna to know if some peoples are sharing the same concerns (and if crazylegs thought about that for the new version) 1.Sometimes I hit the login page while its seems that I am already logged. if I fill in the right login, then I got back the message that credentials are wrong. But n fact after that if I enter manually the url of a restricted method, I can access it. I'm not sure how to reproduce this but it happened often during testing of code in restricted method. maybe it is related to my use of requestAction. 2. I'd like to gather the name of all the controller having restricted methods, and the names of the restricted methods ($othAuthRestrictions) in my layout. Basically I'm doing : if restricted build adminMenu else build userMenu Any ideas on how to achieve this ? olivvv Langdon Stevenson wrote: Hi rombeh I have the following code in the controllers that I want to protect: (note: extra $helpers and $components have been removed to simplify) class LeadersController extends AppController { var $name = 'Leaders'; //for php4 var $helpers = array('othAuth'); var $components = array('othAuth'); var $othAuthRestrictions = array('index'); function beforeFilter() { $auth_conf = array('auto_redirect' = true, 'login_page' = 'leaders/login', 'logout_page' = 'leaders/logout', 'access_page' = '/leaders', 'hashkey' = 'mYpERsOnALhaSHkeY', 'strict_gid_check' = false); $this-othAuth-controller = $this; $this-othAuth-init($auth_conf); $this-othAuth-check(); } function index () { // Action code ... } } That is all that is required to add to the controller to protect the index action, assuming that you have followed the othAuth setup instructions and have the required classes and DB tables in place. As mentioned in my previous post I also have a permission in the permission table like this: INSERT INTO `cake_permissions` VALUES (1,'leaders/index','2006-03-13 23:19:31','-00-00 00:00:00'); And a Groups-Permissions mapping that connects that permission to the desired user's group. As a side note, you have to check that your User has the right group ID assigned, and that their Active field is set to "1". Hope this is useful. Regards, Langdon rombeh wrote: hi Langdon Stevenson, Can u show me quick walkthrough (place some code too :D) in order to get it works thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Implemented OthAuth
Ryan, I think you need a before filter, I have this : function beforeFilter() { $auth_conf = array( 'auto_redirect' = true, 'login_page' = 'categories/login', 'logout_page' = 'categories/view', 'access_page' = 'categories/login', 'hashkey' = 'MySEcEeTHaSHKeYz'); $this-othAuth-controller = $this; $this-othAuth-init($auth_conf); $this-othAuth-check(); } Sorry I'm in hurry got to go see Germany win. I'll look at your code later if I can. If you want you can have a look at how I implemented it in chameleon in cakeforge (take the svn, the package is old and broke) Ryan Petrain wrote: Hi Olivier, This is the user controller that handles the login. What other code do you need? class UsersController extends AppController { var $name = "Users"; var $components = array('othAuth'); //var $othAuthRestrictions = array('index','view'); var $othAuthRestrictions = null; var $uses = array('User'); function login() { $this-layout = 'nosearchbar'; if(isset($this-params['data'])) { //$this-flash(print_r($this-params['data']),'/users/login'); $auth_num = $this-othAuth-login($this-params['data']['User']); $this-set('auth_msg', $this-othAuth-getMsg($auth_num)); } } function logout() { $this-othAuth-logout(); $this-flash('You are not logged in!','/users/login'); } } ? On 6/30/06, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: can you paste your code ? (in cakebin for instance) Ryan Petrain wrote: Hi Langdon, Cna you help me get past a raher mundane aspect of using othAuth? I have added othAuth to my cake install and all appears to be fine. I try to get to a restricted area and it redirects to the login page. I enter the login credentials and then I get this error once I click the submit button: Notice: Trying to get property of non-object in C:\apache2\htdocs\Trans2\app\controllers\components\oth_auth.php on line 109 Fatal error: Call to a member function find() on a non-object in C:\apache2\htdocs\Trans2\app\controllers\components\oth_auth.php on line 109 The login page has access to the User object. I have even added the $users = array('User'); to the controller to see if that was what it needed but I still can not get past this. Any help would be appreciated. thanx. On 6/30/06, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Wow. I see that there is more and more othAuth users. I've two issues I'm not sure how to tackle. Just wanna to know if some peoples are sharing the same concerns (and if crazylegs thought about that for the new version) 1.Sometimes I hit the login page while its seems that I am already logged. if I fill in the right login, then I got back the message that credentials are wrong. But n fact after that if I enter manually the url of a restricted method, I can access it. I'm not sure how to reproduce this but it happened often during testing of code in restricted method. maybe it is related to my use of requestAction. 2. I'd like to gather the name of all the controller having restricted methods, and the names of the restricted methods ($othAuthRestrictions) in my layout. Basically I'm doing : if restricted build adminMenu else build userMenu Any ideas on how to achieve this ? olivvv Langdon Stevenson wrote: Hi rombeh I have the following code in the controllers that I want to protect: (note: extra $helpers and $components have been removed to simplify) class LeadersController extends AppController { var $name = 'Leaders'; //for php4 var $helpers = array('othAuth'); var $components = array('othAuth'); var $othAuthRestrictions = array('index'); function beforeFilter() { $auth_conf = array('auto_redirect' = true, 'login_page' = 'leaders/login', 'logout_page' = 'leaders/logout', 'access_page' = '/leaders', 'hashkey' = 'mYpERsOnALhaSHkeY', 'strict_gid_check' = false); $this-othAuth-controller = $this; $this-othAuth-init($auth_conf); $this-othAuth-check(); } function index () { // Action code ... } } That is all that is required to add to the controller to protect the index action, assuming that you have followed the othAuth setup instructions and have the required classes and DB tables in place. As mentioned in my previous post I also have a permission in the permission table like this: INSERT INTO `cake_permissions` VALUES (1,'leaders/index','2006-03-13 23:19:31','-00-00 00:00:00'); And a Groups-Permissions mapping that connects that permission to the desired user's group. As a side note, you have to check that your User has the right group ID assigned, and that their Active field is set to "1". Hope this is useful. Regards, Langdon rombeh wrote:
Re: Implemented OthAuth
Well, I experience unwanted redirects to the login page also. But I can't tell what are the conditions for this bug to happen. Sorry, I can't imagine why in addition to that you've twice the login param. Ryan Petrain wrote: I am looking to control where the person is being redirected to after they login based on what they were trying to access. I solved this problem by setting a variable $AuthConf = array(...) in app_controller.php and then having the other controllers override that to set the array to values needed for that controller. I cannot figure out why I am being redirected back to the login page again after Iogin. the pathe before login looks like: http://localhost/users/login when redirected back to the login page it is: http://localhost/users/login/login Any ideas? On 6/30/06, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: "does that mean all the other controllers that do not override this will be redirected to "categories/login" if it is a restricted page?" Yes, I think so, so how my app is behaving. For instance if I request "posts/index/127" I'm redirected first to categories/login. I'm not sure if I understand you second question. You want to be always redirect to the same page after login, whatever the restricted page that has been called ? Ryan Petrain wrote: Olivier, I have a question about you app_controller.php. If I understand it right, seeing where you have the beforeFilter set in the main controller, where you set the login to "categories/login" and the redirect to "categories/login" does that mean all the other controllers that do not override this will be redirected to "categories/login" if it is a restricted page? How do I set up a generic beforeFilter so that it can be handed in apage to redirect after the login is sucessful? Thanx. On 6/30/06, Ryan Petrain [EMAIL PROTECTED] wrote: Olivier, I am not getting that error, but when I visit a restricted page it redirects me to the login (good), I login with proper credentials, and then it redirects me to the login again. Any ideas on what I am still doing wrong? thanx for all your help so far. On 6/30/06, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Ryan, I think you need a before filter, I have this : function beforeFilter() { $auth_conf = array( 'auto_redirect' = true, 'login_page' = 'categories/login', 'logout_page' = 'categories/view', 'access_page' = 'categories/login', 'hashkey' = 'MySEcEeTHaSHKeYz'); $this-othAuth-controller = $this; $this-othAuth-init($auth_conf); $this-othAuth-check(); } Sorry I'm in hurry got to go see Germany win. I'll look at your code later if I can. If you want you can have a look at how I implemented it in chameleon in cakeforge (take the svn, the package is old and broke) Ryan Petrain wrote: Hi Olivier, This is the user controller that handles the login. What other code do you need? class UsersController extends AppController { var $name = "Users"; var $components = array('othAuth'); //var $othAuthRestrictions = array('index','view'); var $othAuthRestrictions = null; var $uses = array('User'); function login() { $this-layout = 'nosearchbar'; if(isset($this-params['data'])) { //$this-flash(print_r($this-params['data']),'/users/login'); $auth_num = $this-othAuth-login($this-params['data']['User']); $this-set('auth_msg', $this-othAuth-getMsg($auth_num)); } } function logout() { $this-othAuth-logout(); $this-flash('You are not logged in!','/users/login'); } } ? On 6/30/06, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: can you paste your code ? (in cakebin for instance) Ryan Petrain wrote: Hi Langdon, Cna you help me get past a raher mundane aspect of using othAuth? I have added othAuth to my cake install and all appears to be fine. I try to get to a restricted area and it redirects to the login page. I enter the login credentials and then I get this error once I click the submit button: Notice: Trying to get property of non-object in C:\apache2\htdocs\Trans2\app\controllers\components\oth_auth.php on line 109 Fatal error: Call to a member function find() on a non-object in C:\apache2\htdocs\Trans2\app\controllers\components\oth_auth.php on line 109 The login page has access to the User object. I have even added
Re: homepage controller = info from other controllers
It seems that often such question remains quite unanswered, I guess because there are several ways. To me the magic is in requestAction(). If you have things you want to have on every page, then you can use it in the layout file. Sergei wrote: Hello, I just started to learn Cake and I have a question: let's say I have users and messages controllers. They have some actions /users/* /messages/* etc. And I need to put some information about users and messages into homepage /. What do I need to create for this homepage - another controller and view? Please explain. I didn't found such info in the manual. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Are there performance overheads to RequestAction?
Hi felix " My advice to people who are concerned about performance, is to think about what they are using requestAction for right now, and to try to figure out if some of it should be moved to the AppController. This will always be the better and faster solution if you have something like a menu, that you need to have rendered for every request" how are you doing that ? currently I have menus that are in every page, and I use requestAction in the layout to do that. olivvv Felix Geisendörfer wrote: Hi johnwik, I think the problem with requestAction is not the dispatching alone. There is a good bit of things happening, just to name a view: Dispatcher Dispatcher does routing Dispatcher figures out what (Plugin)/Controller/Action is request Dispatcher loops through all $paths-controllerPaths files, to figure out what Controller to load (if you request one you haven't requested before) Comment: None of this is necessary when you use requestAction. You know what exact controller/action you need. No request-php interface for this is needed recursive functions get called twice (stripslashes_deep, see Dispatcher::parseParams() ) Lot's of regex get's executed again (finding webroot, base, etc.) Comment: Some of this stuff is necessary to parse the params correctly, but most of it is overhead you only need when rendering the first Controller action in your script execution. Controller setup Once the dispatcher has figured out what Controller you want to use, the following things get executed over and over again for every requestAction, even if you call the same controller again. All Controller Models get loaded and referenced as Controller variables (Note: I think the ClassRegistry keeps record of previously created class instances, which is good) All Components get re-instanced over and over again All filter's (before, after, beforeRender) get executed Comment: I think for a good deal of things requestAction is beeing used right now, some of the stuff above in unnecessary, however avoiding some of it by default could lead to confusion and strange behavior. So I'm not trying to say that requestAction should be avoided, nor that it is bad. But I think doing a fair performance test on it, vs. other approaches would be hard to setup because it's difficult to say what of the stuff above is definitely unnecessary and what isn't. And depending on this decision results could be pretty different. Side Note: I've written the stuff above from my understand of the dispatching process and only looked in the core code a couple times, so some of it might not be completely correct. My advice to people who are concerned about performance, is to think about what they are using requestAction for right now, and to try to figure out if some of it should be moved to the AppController. This will always be the better and faster solution if you have something like a menu, that you need to have rendered for every request. At least it is to me. I think requestAction is more of a problem when you are working with plugins that are supposed to be independent from the AppController setup like I do. Because in that case you might end up with something like 15-20 requestActions / execution which is definitely too much overhead for me. Right now I'm running with my own solution for the problem which I mentioned in my earlier post, but I definitely want to talk to one of the devs about it when I (and they) find time to. Anyway, I hope that stuff above is useful when you try to get your own idea about the overhead caused by requestAction. Best Regards, Felix Geisendörfer -- http://www.thinkingphp.org http://www.fg-webdesign.de johnwik schrieb: Hi! I am also using actionRequest to render several different controllers from within a main controller and I have noticed that the dispatcher is called for each call to a controller. I haven't done any real testing yet so I'm not sure about the performance. Is there a way to reuse the Dispatcher and Controller for several user controllers and plugins? I'm also thinking about extending the Dispatcher or the Controller with a class that should be globally accessible by the user controllers and views. Any comments on that? At the moment I am experimenting with creating a private singleton class in the AppController that is extended by public accessible classes such as Request, Response, Security etc. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Are there performance overheads to RequestAction?
very useful explanations felix and gwoo. Thanks a lot, I'll sleep less stupid tonight. gwoo wrote: There are a couple of things to keep in mind in this discussion. First, if you use full page caching putting a requestAction in and element that called a menu controller would be better. You can always use cake:nocachedont cache this /cake:nocache Also, as of version 1.2 you will be able to specifically cache certain elements. However its also possible to do this in app controller as Felix suggests but I would write it like this: class AppController extends Controller { var $useMenu = true; function beforeRender() { if($this-useMenu) { $Menu = new Menu(); $menuArray = $Menu-findAllThreaded(null, null, array ('position' = 'ASC', 'id' = 'ASC')); } else { $menuArray = null; } $this-set('menu', $menuArray); } } Using the beforeRender method is a better place in case you use requestAction to not return a view. As was previously stated requestAction is not much slower when it does not have to return a view. So, if you are using it in an element to just get the data needed you will not notice much of a speed difference over the above code. The slowest part of Cake is the model as in any application. View is the next slowest piece. The dispatcher and controller operate much faster. Bake on. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Design an hirearchy?
Using prototype or the stripped down version in moo.fx, you could do : document.getElementsByClassName('objective').each( function(element){ element.onclick = function() { //you code } } } ); also don't forget to let a correct behavior if javascript is disabled. olivvv [EMAIL PROTECTED] wrote: Hi all, now, I have a table that contains an hierarchy made like this: - objective - goal (field 'father_id' = objective_id) - practice (field 'father_id' = goal_id) now, how can I draw it in my view? I mean, everyone of these above has a applicabile field that is an enum like Y or N; I want a checkbox near all these elements and if I click on a father, for example to uncheck it, every child unchecks its box. I need Javascript? Please help...it's driving me mad!! Alberto --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Setting rdBloggery
Hi rdbloggery is developed by gwoo (and others) so you may ask them first on the project mailing list http://cakeforge.org/mail/?group_id=13 or on IRC where they often are. olivvv [EMAIL PROTECTED] wrote: No reply ?? :( --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Spam Security component
Felix, yes I know captchas are bad. Why should we code in xhtml, make unobtrusive _javascript_, and then use captcha ? I know the "fake porn site" strategy as anti-anti-bot. I guess it would also be efficient against my preferred method of "organic questions". The only efficient solution I see against spam, would be towards "identity 2.0". By any chance, you know if there would be some identity 2.0 solution we can put our hands on soon ? olivvv Felix Geisendörfer wrote: Jo Olivier, Captchas are *bad*. Those things are better for keeping blind people out, then they are for defeating actual spammers. This is because some captchas can easily be decoded, but mainly because they are easy to hijack. If you want to spam a site with captchas, you simply set up 1-x "The greatest porn you've ever seen"-sites, make their url's popular by spamming non-captcha sites and you've got a good amount of 'users' visiting the site. Now when those users open up one of the fake porn sites, they will see a captcha from the site you want to spam, and be asked to solve it in order to get in. And hey, people are stupid like that and will fill out hundreds of captchas for you, that you can use to spam the site, where they were from. It's not as efficient as spamming non-captcha sites, but the more captchas become popular, the more it will be done. What else is there? Well RosSoft mentioned hidden fields, which I make use of in 1-2 sites of mine as well and it works pretty good (no spam so far). However, if the site you do is pretty big, people will eventually write customized spam bots for it. Now, your only other solution right now is to keep blacklists, with words, ip's, etc. or to use some form of self learning statistical ai / filter. Tons of work if you want to do it yourself. What I would recommend right now when you seriously want to fight spam, is Akismet they offer their spam filter as a free web api (for sites that make less then $500 / month) and there are a couple php api's for it. In order to get a key you have to open up a wordpress account over at wordpress.com, but you can really use it for any site, not just blogs. Before I started making use of their technology I had to filter out tons of spam on thinkingphp.org, now that I have it installed only 1 spam comment made it through the filter, and 2405 didn't. So right now, I think they are doing a really good job (thx for dhofstet for pointing them out to me) and it's worth considering to integrate their api. Anyway, spam remains a big problem, and anybody who can come up with a simple and practical solution could potentially make a good fortune out of it ; ). Best Regards, Felix Geisendörfer -- http://www.thinkingphp.org http://www.fg-webdesign.de Olivier Percebois-Garve schrieb: I'm not specialist of this but the usual "brutal" anti-bot approach is the captcha. If there is some trust in the user base, another way is to add a confirmation field with common sense questions provided by the users. Like "what is the color of the sky ?" and if "blue" does not come as answer for this field, then the post should be invalidated. However it probably it requires a lot of coding to have something smooth, with rotation of questions, etc.. olivvv [EMAIL PROTECTED] wrote: Thank's ;-) I think try referer + time_period (1 post in 1 minutes.. Or something like this)... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Selling CakePHP apps - license changes?
Sadly, in almost every country, copyright is automatic. So you shouldn't need anything, but from a practical point of view "Copyright (c) 2006 Christian Tietze Daniel van Westen" is largely enough. About the other thing, I just have the opinion that for small teams being positioned as a license software editor is not the best thing, that's what I thought you were doing.(like if the client install the same system on another server, then he should pay double). In such case, I think the client should pay only for a new graphical design and maybe the cost of the setup. Christian.Tietze wrote: Thanks for your two answers! Yeah, I copied the app_controller and app_model files into my /app directory and right now I'm happily changing the class description :) What I still lack is a new licence. Do I need one? Or is "Copyright (c) 2006 Christian Tietze Daniel van Westen" enough? Since we're freelancers, a lawyer is way outside of our budget. Olivier Percebois-Garve wrote: Better sell expertise, set up, adaptation, customization of code, rather than code itself. Your first point sounds as if we're selling the code for code's sake :) We develop a management system for small groups, so the content is somewhat limited, it's a really basic solution. I'm programming the backend in Cake and my colleague designs our customer's pages. It's my turn to adjust some things in our product's backend then, so we're offering a whole website - not just the code, just in case my first description misleaded you this way. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Understanding
Usually in your view file corresponding to the form you'll have something like: ?php echo $html-hidden('Post/id'); ? So the method knows what is the right id. If you wanna to change it u can use $this-Model-id = $someintegervalue; Does this answer your question ? olivvv [EMAIL PROTECTED] wrote: ok- so how does save() know to to save to the post table and save the title and body fields for a specific id? I dont understand the abstraction for getting data from a form into the database and then displaying whats in the database in the view again. One thing i should mention is- i am pulling specific rows based upon the id and updating a specific field in that row with data from a form. configuration_id | configuration_title | configuration_key | configuration_value - 1 | Store Name | STORE_NAME | osCommerce 2 | E-Mail Address | EMAILADDRESS | [EMAIL PROTECTED] 3 |Store Owner | STORE_OWNER |Harald Ponce de Leon I need to retrieve the configuration title information and config value for rows 1-3 and display them in the view- when the user posts the form i need to be able to update the update the config_values for rows 1-3. Is there a standard way of doing this? Thanks again --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Never used a framework - interested in cake
Ohh Luke, this is the kind of thread we do like :-) IMHO, cake is much much more mature than zend framework. Most of what is in Zend framework (components) you can get it in cake. With cake you get an implementation of ActiveRecords which is I think now bug-free. You get the database abstraction layer, a cache, and nifty helpers. You get also a structured way of development, which will help you to develop complex system without to turn your code in a ugly unmaintainable thing. Also there is a very active community. that's my view. make yours. Olivvv Luke wrote: That's what I thought... I was confused by that little tidbit... thanks. Marcelo de Moraes Serpa wrote: bontho, this table seems to be wrong... Cake supports templates and modules! On 6/20/06, Luke [EMAIL PROTECTED] wrote: Thank you both... very helpful. I'm going with cakePHP --=_Part_167857_9248639.1150839953082 Content-Type: text/html; charset=ISO-8859-1 X-Google-AttachSize: 456 bontho, this table seems to be wrong... Cake supports templates and modules!brbrdivspan class="gmail_quote"On 6/20/06, b class="gmail_sendername"Luke/b lt;a href="" class="moz-txt-link-rfc2396E" href="mailto:[EMAIL PROTECTED]">"mailto:[EMAIL PROTECTED]"[EMAIL PROTECTED] /agt; wrote:/spanblockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"brThank you both... very helpful. I'm going with cakePHPbrbrbr --=_Part_167857_9248639.1150839953082-- --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: FCK eventually sorted out - For AD7Six (and those interested)
Did you got file upload running in xinha ? Another one very promising is solometra. jeko wrote: I haven't used FCKeditor, but a great trick for preventing js/css files from caching is to throw a query string on the end of it. ex: script language=javascript src=webroot/js/fckconfig.js?a=1/script Otherwise, awesome help. I'm personally sticking with xinha for now. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Problems upgrading form 1.0 to 1.1
Not sure but myabe you've to replace the old dispatcher with the new one. Víctor Berga wrote: Hi to all, I've upgraded my cake app from cake's version 1.0 to 1.1 and returns the next error message: Notice: Undefined index: action in /Applications/MAMP/htdocs/cake/cake/dispatcher.php on line 142 Please help me! Thanks, Víctor -- -- Víctor Berga [vbergae.listas (at) gmail.com] "Sin música la vida sería un error" --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Problems upgrading form 1.0 to 1.1
Sorry typo. I meant bootstrap. Víctor Berga wrote: Hi to all, I've upgraded my cake app from cake's version 1.0 to 1.1 and returns the next error message: Notice: Undefined index: action in /Applications/MAMP/htdocs/cake/cake/dispatcher.php on line 142 Please help me! Thanks, Víctor -- -- Víctor Berga [vbergae.listas (at) gmail.com] "Sin música la vida sería un error" --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Problems upgrading form 1.0 to 1.1
Yeah. To conclude, a file should be replaced. :-) RosSoft wrote: if not works, try replacing /index.php, /app/index.php , /app/webroot/index.php --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Moo.fx problems
Put var $helpers = array('Javascript'); in your app_controller.php Also make sure the moo.fx files are at the right place. Moo.fx is cool. Have fun. martin wrote: I'm just getting started with JavaScript and I really like the moo.fx accordion effect, but I'm having some problems getting moo.fx to work. At first I thought the problem might be with the website I am developing, so I put all of that in a temporary folder and extracted cake 1.1.4.3104 into my server root. After configuring, I create the following three files: --app/views/layouts/default.thtml-- html head ?php echo $javascript-link('prototype')? ?php echo $javascript-link('moo.fx')? ?php echo $javascript-link('moo.fx.pack')? /head body ?php echo $content_for_layout? /body /html --app/controllers/asdf_controller.php-- ?php class AsdfController extends AppController { var $uses = array(); var $helpers = array('Javascript'); function index() { ; } } ? --app/views/asdf/index.thtml-- h1Hello World!/h1 a class=stretchtoggleHello World/a div class=strecher Accordion Text 1 /div a class=stretchtoggleHello World 2/a div class=strecher Accordion Text 2 /div script type=text/javascript var myDivs = document.getElementsByClassName('stretcher'); var myLinks = document.getElementsByClassName('stretchtoggle'); var myAccordion = new fx.Accordion(myLinks, myDivs, {opacity: true}); /script Firefox gives me the following 3 javascript errors: (1) Error: unexpected end of XML source Source File: http://127.0.0.1/js/moo.fx Line: 5, Column: 163 Source Code: bFatal error/b: Call to a member function on a non-object in bC:\Program Files\xammp\xampp\htdocs\app\views\layouts\default.thtml/b on line b3/bbr / And moo.fx looks like this when I click on the link to in in the firefox error console: html head br / bFatal error/b: Call to a member function on a non-object in bC:\Program Files\xammp\xampp\htdocs\app\views\layouts\default.thtml/b on line b3/bb (2) Error: unexpected end of XML source Source File: http://127.0.0.1/js/moo.fx.pack Line: 5, Column: 163 Source Code: bFatal error/b: Call to a member function on a non-object in bC:\Program Files\xammp\xampp\htdocs\app\views\layouts\default.thtml/b on line b3/bbr / And moo.fx.pack looks like this when I click on the link to in in the firefox error console: html head br / bFatal error/b: Call to a member function on a non-object in bC:\Program Files\xammp\xampp\htdocs\app\views\layouts\default.thtml/b on line b3/bbr / (3) Error: fx is not defined Source File: http://127.0.0.1/asdf/index/ Line: 18 I am assuming that this all means that moo.fx is trying to generate a page, and this is causing errors with cake... does anyone know how to work around this and get it working? Am I doing something wrong? I've tried adding the javascript links in the view file, instead of in the layout, but that didn't help either, and I haven't had this problem linking other js libraries. Thanks in advance! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Moo.fx problems
lobby with me :-) KemenAran wrote: I frequently need to use functions like those provided by this Head Helper. I developped a similar class for a personnal framework some time ago, and really missed these features in CakePHP, until you pointed me to this Helper. Is there any chances to see it included in a future release of CakePHP ? Olivier Percebois-Garve wrote: May I advice you the excellent Head Helper made by rossoft ? http://rossoft.wordpress.com/2006/03/28/register-head-tags-from-helpers-2/ By using it, you'll be able to call your _javascript_ files in your views instead of in the layout. This way it gets loaded only when its needed and the head helper take care of putting it where it should. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: {Seeking} Overview for Dummies
I think it would be good to have such representation. It took me a long time to see the big picture of how cake is functioning, and there is still a lot of unclear thing. The link of Nate is cool but I'm not sure how it help newbies: Look at the step 3 where the controller is. honestly you've to know cake to understand that part, to know what a model is, what a requestaction is, ... It seems to be a good start, but to me, A good graphic representation would need a bit more details, and should outline the MVC structure. It should tell what the dispatcher does with the params, that the model are defined in a similar manner to how we build a db scheme (LDM). Do you know a online paperboard website ? So we could tell collectively and graphically how it should look like. Olivvv AD7six wrote: Hi All, I'm looking for a graphical representation of how cake handles a request. I came across http://jmp.xybyx.com/img/overview2.png and http://grahambird.co.uk/cake/tutorials/howitworks.php both of which are very useful for understanding the basics, but miss some objects. Has anyone already created, or is there a page existing somewhere in the manual that I've yet to find, an image that describes graphically all of the various objects used by Cake (or any MVC for that matter) such that none-developers can see how things fit together, in particular everything to do with presentation? As you might guess I'm trying to explain to someone (none-technical) I'm working with generally how things work and which files to edit, but after repeating myself 2 or 3 times I think it's time for a picture. The difficulty seems to stem from the concept of a dispacher; the 'black magic' of mod_rewrite/cake pretty urls and the URL requested may not directly relate to what is expected (routes; using one edit.thtml for add edit methods etc.). Any help or comments most welcome, Cheers, AD7six --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: {Seeking} Overview for Dummies
Are you on irc ? I have troubles to set up the p2p mode in coccinnella. Samuel DeVore wrote: ok if you connect to scid.is-a-geek as a peer to peer server method you should have a document to play with Sam D On 6/17/06, Samuel DeVore [EMAIL PROTECTED] wrote: Olivier, We could use http://hem.fyristorg.com/matben/ Coccinella to do this. I would be happy to host the file for a while and then as we come to consensus, I'll clean it up and make a pdf/page out of it. Sam D I'll post information on the file when I get it up and running On 6/17/06, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: I think it would be good to have such representation. It took me a long time to see the big picture of how cake is functioning, and there is still a lot of unclear thing. The link of Nate is cool but I'm not sure how it help newbies: Look at the step 3 where the controller is. honestly you've to know cake to understand that part, to know what a model is, what a requestaction is, ... It seems to be a good start, but to me, A good graphic representation would need a bit more details, and should outline the MVC structure. It should tell what the dispatcher does with the params, that the model are defined in a similar manner to how we build a db scheme (LDM). Do you know a "online paperboard" website ? So we could tell collectively and graphically how it should look like. Olivvv AD7six wrote: Hi All, I'm looking for a graphical representation of how cake handles a request. I came across http://jmp.xybyx.com/img/overview2.png and http://grahambird.co.uk/cake/tutorials/howitworks.php both of which are very useful for understanding the basics, but miss some objects. Has anyone already created, or is there a page existing somewhere in the manual that I've yet to find, an image that describes graphically all of the various objects used by Cake (or any MVC for that matter) such that none-developers can see how things fit together, in particular everything to do with presentation? As you might guess I'm trying to explain to someone (none-technical) I'm working with generally how things work and which files to edit, but after repeating myself 2 or 3 times I think it's time for a picture. The difficulty seems to stem from the concept of a dispacher; the 'black magic' of mod_rewrite/cake pretty urls and the URL requested may not directly relate to what is expected (routes; using one edit.thtml for add edit methods etc.). Any help or comments most welcome, Cheers, AD7six --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cake Tutorial: Books Title Example (With hasOne)
If you have "errors" that are disappearing by switching debug from 2 to 0, then its not errors it is notices or warnings. AD7six wrote: jeannie109 wrote: The tutorial seems to work ok even with the error message. I did find out that if I change the debug to 0 instead of 2, it gets rid of the error. With Debug set to 0, errors are not displayed in the browser, but they are not removed. If you rename /app/models/titles.php to /app/models/title.php the error will be 'cured' (I think). Left unchecked it would mean (again, I think) you will not be able to use the findByXXX and findByAllXXX methods, as these rely on overloading. On another note, everytime I post to this forum, and put in my URL, some nasty person deletes all my entries. I can't believe people can be so rude. Should I not post my URL in this forum? AFAIK it isn't possible for anyone to delete a message from the google group (this isn't really a forum, or are you referring to something else?), what has lead you to draw that conclusion? Eveyone's pretty friendly around here ;) Cheers, AD7six --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Use another view
Hi See http://manual.cakephp.org/chapter/7 for Interacting with your Views - render() if you want to request in another controller use requestAction(). You might be confusing the MVC structure: There is function in the model and controller files, but not in the views (normally). Olivvv Fernando Andreacci wrote: If I have a funcion called function1, can I use a view called function2 to this function? -- Fernando Andreacci Desenvolvimento Setti Sistemas Ltda. Fone(47)3028-2445 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Cakebased bot ?
Hi I got a proposal for a job and I'm trying to figure out how difficult it is and how long it would take. The job is to make a bot that connects to an external url, logs in, catch somewhere on the page the number in front of the string treffer, save it and then start again with another url. So I have several questions: Can cake run code without a query (every night for instance) ? Can cake (or something else) open external urls and walk through the DOM of the opened page ? Olivvv --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cakebased bot ?
Both links very interesting. :-) 100rk wrote: Just some links for You (if You didn't see them before): - bot for cake IRC log : http://irc.cakephp.org/pages/source - Http Client Class from ros-soft: http://rossoft.wordpress.com/2006/06/09/http-client-class/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: With a new release of Cake, comes new release notes - lets make them more useful - with Greasemonkey
convenient. thanks. Alister Bulman wrote: Hi, Lots of things annoy me - it's too hot and I don't have AirCon in my office, I'm not paid enough for all this s***, and there so much more that I can't control. One thing that used to mildly peeve me was CakePHP release notes, like the latest at http://cakeforge.org/frs/shownotes.php?release_id=105 . It's got details of the bug ID's and subversion changeset versions - but the page is plain text - so you couldn't start clicking through to find out what changed, or read the bug reports and the comments to find out if any of the changes would affect you - for good, or bad. I say used to peeve me because I've written this: http://abulman.co.uk/code/greasemonkey/cakeforgelinker.user.js - A Greasemonkey script that will make links for the revision numbers, and ticket numbers, at least as much as it can easily recognise from a couple of quick regex search and replacements. It could probably be a little quicker, and doubtless be more comprehensive, but I think it solves 90% of the problem, and that's a good 89% more than existed before... For the rest - like the plain text URLs, try a GM script like http://userscripts.org/scripts/source/1024.user.js If you know - and have - Greasemonkey, click the link above, take a look and install it - then go to http://cakeforge.org/frs/shownotes.php?release_id=105 to see the results. If you don't know Greasemonkey, then go google it. You'll find it's very useful. Now, excuse me, while I go check on what has changed in release #3083 Alister http://abulman.co.uk/code/greasemonkey/cakeforgelinker.user.js --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Could the RequestHandler recognized the requestAction ?
Hi I'm an heavy user of requestAction. When I'm in the requested method, I'd like to know that this is being run by a requestAction and also the method where it is originating from. I thought about an extension of the Requesthandler but there is maybe already a way. Somebody has a idea on this ? Olivvv --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Application design : How do you tie your objects in your GUI ?
Hi Yeah its a noob question. How do you tie your objects in your GUI ? How to you get on the same page for instance a menu, an article, and user-specific information ? Maybe I missed something in Cake but my only way to do this is to use requestAction. I'm not sure how to scale if I have more complexity. For now I would do the example above by having a method of CategoryController doing a requestAction on a method of ArticleController and then a second one on UserController. If I want to be able to query ArticleController and have the menu then I need to have in ArticleController some requestAction on CategoryController. This way I build from ArticleController more or less the same interface as from CategoryController. In the end If want a complex and similar interface queried through different controller I'll have a lot a requestAction everywhere and it may be difficult to keep the overview. Ironically it seems easier to have such complex interface (lot of objects) by using Ajax. I'm explaining in a confused way, but I you have understood something :-P can you tell how you are doing your how mix ? Olivvv --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Could the RequestHandler recognized the requestAction ?
Done. thank for confirming its not-too-bad idea. RosSoft wrote: With little modification in object class, and dispatcher class, a new variable ($this-requested_by ? ) can be set at the requested controller. If you really want this, post a ticket at trac --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Application design : How do you tie your objects in your GUI ?
doh ! Didn't knew that something like that was possible. great ! gwoo wrote: Sounds like you should use elements. Put the requestAction calls in the elements. Add the elements in the places you need them. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Self Joining Model
How do you use the array returned by $this-Model-findAllThreaded() ? DJ Spark wrote: I use this in my Gallery Model: var $hasMany = array( 'Galleries' = array( 'className' = 'Gallery', 'order' = 'Galleries.ord ASC', 'foreignKey' = 'parent_id')); var $belongsTo = array( 'Galleries' = array( 'className' = 'Gallery', 'order' = 'Galleries.ord ASC', 'foreignKey' = 'parent_id')); First, note the 'Galleries' (you change that association name for any other, just dont use the model name). Second, you might want to know more about $this-Model-findAllThreaded() . It returns a *VERY* useful array , with ['child'] and everything. I *heart* CakePHP :) spakr On 6/15/06, I. E. Smith-Heisters [EMAIL PROTECTED] wrote: Hi all, I've found a few threads on related subjects, but none of them offer a solution: http://groups.google.com/group/cake-php/browse_thread/thread/8ad0ebbb9171b5a4/82f28d0b433191be?q=finderSQLrnum=7#82f28d0b433191be http://groups.google.com/group/cake-php/browse_thread/thread/ed9f11b62fd2d223/c46ddbf9860e0be6?q=finderSQLrnum=3#c46ddbf9860e0be6 http://groups.google.com/group/cake-php/browse_frm/thread/aba68ec53a2ae064/9988348a93f13d1e#9988348a93f13d1e I have a table that looks like this: +---+--+--+-+-++ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-++ | id| int(10) unsigned | | PRI | NULL| auto_increment | | name | varchar(255) | YES | | NULL| | | ui_name | varchar(50) | | | | | | parent_id | int(10) unsigned | YES | | NULL| | +---+--+--+-+-++ which represents nested menus. I would think it would be trivial to allow each MenuItem to have children (whose parent_id is equal to its id) by using hasMany. So, first I tried this: class MenuItem extends AppModel { var $name = 'MenuItem'; var $useTable = 'tester'; var $validate = array ( 'name' = VALID_NOT_EMPTY, ); var $hasMany = 'MenuItem'; } but that just overwrites the main node, $this-MenuItem-read(): array(1) { ["MenuItem"]= array(0) { } } so I tried something like this instead: var $hasMany = array ( 'child' = array ( 'className' = 'MenuItem', ) ); which at least doesn't overwrite the main object, but still doesn't populate the child array: array(2) { ["MenuItem"]= array(4) { ["id"]= string(1) "4" ["name"]= string(9) "community" ["ui_name"]= string(9) "Community" ["parent_id"]= NULL } ["child"]= array(0) { } } So then I tried a finderSQL parameter var $hasMany = array ( 'child' = array ( 'className' = 'MenuItem', 'finderSQL' = 'SELECT * FROM tester AS one LEFT JOIN tester AS two ON one.id = two.parent_id' ) ); but that has the same output on read() as the attempt with finderSQL undefined. Unfortunately, I haven't found a single successful example of using finderSQL, so it's hard to tell what sort of output the SQL statement should have. I just grabbed and modded this statement from one of the other threads I mentioned. Okay, so then there's findAllThreaded and guiListTree. The former seems to work (albeit it's kind of uncontrollable), but I really think this part of the model belongs in the model definition.. The latter, guiListTree doesn't seem to work as expected and is marked as deprecated in the documentation.. So, does anyone have any suggestions for building a tree out of a self-joining table? Thanks much, Ian Smith-Heisters --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Self Joining Model
Thanks Felix I wanted to make that sure. Everyone its way... I don't see the benefit of findAllThreaded(). It results in having two recursion, one made by cake, the second in the app. Recursion is very heavy for php, and crawling a tree 2 times seems to me unnecessary. I'm curious to see if the 'actAs' thing could bring us a better way to handle this. Felix Geisendrfer wrote: You have to write a recursive function when working with arrays from findAllThreaded(). You basically loop through all the items and check if they have an array called 'Children' (or sth like that). If so, you make the function call itself with the children array as a parameter, if not, you put in your code to display/modify/do stuff with the items themselfs ... -- http://www.thinkingphp.org http://www.fg-webdesign.de Olivier Percebois-Garve schrieb: How do you use the array returned by $this-Model-findAllThreaded() ? DJ Spark wrote: I use this in my Gallery Model: var $hasMany = array( 'Galleries' = array( 'className' = 'Gallery', 'order' = 'Galleries.ord ASC', 'foreignKey' = 'parent_id')); var $belongsTo = array( 'Galleries' = array( 'className' = 'Gallery', 'order' = 'Galleries.ord ASC', 'foreignKey' = 'parent_id')); First, note the 'Galleries' (you change that association name for any other, just dont use the model name). Second, you might want to know more about $this-Model-findAllThreaded() . It returns a *VERY* useful array , with ['child'] and everything. I *heart* CakePHP :) spakr On 6/15/06, I. E. Smith-Heisters [EMAIL PROTECTED] wrote: Hi all, I've found a few threads on related subjects, but none of them offer a solution: http://groups.google.com/group/cake-php/browse_thread/thread/8ad0ebbb9171b5a4/82f28d0b433191be?q=finderSQLrnum=7#82f28d0b433191be http://groups.google.com/group/cake-php/browse_thread/thread/ed9f11b62fd2d223/c46ddbf9860e0be6?q=finderSQLrnum=3#c46ddbf9860e0be6 http://groups.google.com/group/cake-php/browse_frm/thread/aba68ec53a2ae064/9988348a93f13d1e#9988348a93f13d1e I have a table that looks like this: +---+--+--+-+-++ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-++ | id| int(10) unsigned | | PRI | NULL| auto_increment | | name | varchar(255) | YES | | NULL| | | ui_name | varchar(50) | | | | | | parent_id | int(10) unsigned | YES | | NULL| | +---+--+--+-+-++ which represents nested menus. I would think it would be trivial to allow each MenuItem to have children (whose parent_id is equal to its id) by using hasMany. So, first I tried this: class MenuItem extends AppModel { var $name = 'MenuItem'; var $useTable = 'tester'; var $validate = array ( 'name' = VALID_NOT_EMPTY, ); var $hasMany = 'MenuItem'; } but that just overwrites the main node, $this-MenuItem-read(): array(1) { ["MenuItem"]= array(0) { } } so I tried something like this instead: var $hasMany = array ( 'child' = array ( 'className' = 'MenuItem', ) ); which at least doesn't overwrite the main object, but still doesn't populate the child array: array(2) { ["MenuItem"]= array(4) { ["id"]= string(1) "4" ["name"]= string(9) "community" ["ui_name"]= string(9) "Community" ["parent_id"]= NULL } ["child"]= array(0) { } } So then I tried a finderSQL parameter var $hasMany = array ( 'child' = array ( 'className' = 'MenuItem', 'finderSQL' = 'SELECT * FROM tester AS one LEFT JOIN tester AS two ON one.id = two.parent_id' ) ); but that has the same output on read() as the attempt with finderSQL undefined. Unfortunately, I haven't found a single successful example of using finderSQL, so it's hard to tell what sort of output the SQL statement should have. I just grabbed and modded this statement from one of the other threads I mentioned. Okay, so then there's findAllThreaded and guiListTree. The former seems to work (albeit it's kind of uncontrollable), but I really think this part of the model belongs in the model definition.. The latter, guiListTree doesn't seem to work as expected and is marked as deprecated in the documentation.. So, does anyone have any suggestions for building a tree out of a self-joining table? Thanks much, Ian Smith-Heisters --~--~-~--~~~---~--~~ You received
Re: form on one page submits to another model - validation to show on original page?
I use $this-set('editorcontent', $this-requestAction('/bare/editorcontents/showedit/'.$id, array('return' = true))); to get in a form of the edit of CategoriesController the 'display' part of the edit in the EditorContents controller. (So in the case if(empty($this-params['data'])) in the edit CategoriesController ) Now in to save the edited values ( case of if ($this-Category-save($this-params['data'])) ): if ($this-requestAction('/bare/editorcontents/saveedit/'.$this-Category-id, array('return'))){ Hope it helps Olivvv [EMAIL PROTECTED] wrote: I shall try and clarify what I am trying to do. I have a simple form on several static /pages/ it is taking an email address and then submitting this to /subscribers/ controller, and /add action If this is saved / validated ok, then it will flash and return user to where they came from. If it fails validation, I want to REDISPLAY the form, with the tagErrorMsg showing the relevant error in the form itself. But I don't know how to get from the section of code in my subscribers controller after a failed validation, back to the redisplay fo the form and the error that occuerred. This is to do with the switching from one controller to another, which I am unclear on how to do. Also how to pass data between the 2. cheers Luke --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Cameleon preview
For those who are bored, I've released a alpha preview package of Cameleon - the tiny tree-based CMS. http://cakeforge.org/projects/cameleon/ The application seems to have reached some stability, even if a lot of things are missing or need to be completed. It is not-at-all-production-ready. Don't expect something huge. I just want to make sure there is no major thing I have forgotten to put in a release, in order to make the next releases without major flaw. I appreciate comments on code-approach-concept etc... I've to go watch some football now but I'll try to be able to check emails ;) Quickly: Missing: -Sanitization -Caching -Ajaxification -Installer -... To be completed: -authentication -Full IE compatibility -js link to images -better layout Untested: -Image management in FCK Hope it will give you some fun Olivvv --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cameleon preview
Yep I really like it. I spotted a few glitches in Cameleon I'll put up some bug fixes this night or tomorrow morning. If you've some comment on general design of the code, feel free... RosSoft wrote: Cool, you're using HeadHelper :) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Best way to handle url variations in js and css files
Hi I've that little annoying issue: usually the url is : 1)controller/action/params but can be: 2)controller/action in my javascript I play with images url(../../img/myfolder/myimage.png); no problem in cas 1) but in case 2) it will be broken. How do you handle such things ? thanks olivvv --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Best way to handle url variations in js and css files
Felix Geisendörfer wrote: Hi Felix my img path is my js code not html... And? The HtmlHelper::url() function just outputs a path, no html at all. " You could also rename your js file to php to execute the php directly inside of it" Will it then be served as a js ? Yes, it would. I renamed it and I get a "Missing Controller" ?? -- http://www.thinkingphp.org http://www.fg-webdesign.de Olivier Percebois-Garve schrieb: Hi Felix my img path is my js code not html... " You could also rename your js file to php to execute the php directly inside of it" Will it then be served as a js ? Olivvv Felix Geisendörfer wrote: You need to make use of the $html-url() function to create the path's to your images. In your case I'd put this in the head part of your layout: script language="_javascript_" var myImageUrl = '?php echo $html-url('/img/myfolder/myimage.png') ?'; /script You could also rename your js file to php to execute the php directly inside of it. Or put an .htaccess into you /js/ folder that redirects all requests a an includer.php which will then do include() on the .js file, making it parsed via php. Hope that helps, Felix aka the_undefined -- http://www.thinkingphp.org http://www.fg-webdesign.de Olivier Percebois-Garve schrieb: Hi I've that little annoying issue: usually the url is : 1)controller/action/params but can be: 2)controller/action in my _javascript_ I play with images "url(../../img/myfolder/myimage.png)"; no problem in cas 1) but in case 2) it will be broken. How do you handle such things ? thanks olivvv --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Best way to handle url variations in js and css files
Yes Initially I did not want to play with the layout file because my js is not set from there (I uses Head helper) but it could be handy. I must think about it. clemos wrote: hi all maybe something you could do is set some _javascript_ var in your html code like this : script baseUrl = "? echo $html-url("/"); ?"; /script and then prefix all your pics' urls with baseUrl in your external .js or maybe put something like this : base href=""/"); ?" / in your layout, and then make all your urls relative. this second solution could probably work with both css, js... I actually didn't try, but it's the most clever things I can think of ++ clemos ps: by the way, the things are getting a bit more complicated when you (at least : I) can't use .htaccess, because $html-url('/') will be "/absolute/path/index.php/" and relative urls will be "/absolute/path/index.php/relative/url/pic.gif", which won't work... any thoughts about it ? On 6/9/06, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Hi Felix my img path is my js code not html... " You could also rename your js file to php to execute the php directly inside of it" Will it then be served as a js ? Olivvv Felix Geisendrfer wrote: You need to make use of the $html-url() function to create the path's to your images. In your case I'd put this in the head part of your layout: script language="_javascript_" var myImageUrl = '?php echo $html-url('/img/myfolder/myimage.png') ?'; /script You could also rename your js file to php to execute the php directly inside of it. Or put an .htaccess into you /js/ folder that redirects all requests a an includer.php which will then do include() on the .js file, making it parsed via php. Hope that helps, Felix aka the_undefined ---------- http://www.thinkingphp.org http://www.fg-webdesign.de Olivier Percebois-Garve schrieb: Hi I've that little annoying issue: usually the url is : 1)controller/action/params but can be: 2)controller/action in my _javascript_ I play with images "url(../../img/myfolder/myimage.png)"; no problem in cas 1) but in case 2) it will be broken. How do you handle such things ? thanks olivvv --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: ACL and AUTH
As usual on such thread I put my 50 cent for othAuth which is really easy to use. Olivvv HW wrote: Hi, I was curious why there is no AUTH setup or easy method of implementing it in CakePHP. CakePHP seems to be based loosley upon Ruby on Rails and they have the ability to easily implement it. The link for one such application is listed below. All of the methods and information that I can find for the CakePHP seems to be overly complicated and incomplete. Please advise. Thanks!!! http://www.aidanf.net/rails_user_authentication_tutorial --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---