Mutliple validation not working
Hi, I am using cakephp version 3, i am trying to add multiple validation but its not working on password field $validator = new Validator(); $validator ->requirePresence('email', 'create') ->notEmpty('email',['message'=>__('Please enter email address.')]) ->add('email', 'email', ['rule' => 'email', 'message'=>__('Please enter valid email address.')]) ->add('email', 'unique', ['rule' => 'validateUnique', 'provider' => 'table','message'=>__('This Email is already taken.')]) ->requirePresence('password','create') ->add('password', [ 'length' => [ 'rule' => ['minLength', 6], 'message' => 'Password need to be at least 6 characters long', ]) ->notEmpty('password',['message'=>__('Please enter password.')]) ->add('password','length',['rule' => ['minLength',6],'message' => __('Password should be minimum 6 character long.')]) ->requirePresence('repassword', 'create') ->notEmpty('repassword',['message'=>__('Please enter Confirm Password.')]) ->add('repassword','customLength',[ 'rule' => function($value, $context) { if (trim($context['repassword']) != trim($context['password'])) { return false; }else{ return true; } return false; }, 'message' => __('Password and confirm password did not matched.'), ]); return $validator; Thanks, Marcus -- Sign up for our Newsletter for updates. http://cakephp.org/newsletter/signup We will soon be closing this Google Group. But don't worry, we have something better coming. Stay tuned for an updated from the CakePHP Team soon. Like Us on FaceBook https://www.facebook.com/CakePHP Follow us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
use App\Controller\AppController;
Hi All, Cake 3.0. When is/isn't use App\Controller\AppController; required in a controller? The blog tutorial does not use it, some of the examples on the controllers page use it, but not all. Can anyone explain exactly when his is needed please? Thanks -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
3.0 Upgrade Tool not updating files
Morning, I've ran a few passes with the upgrade tool https://github.com/cakephp/upgrade on a cake 2 project and have found the running bin/cake upgrade all /var/www/app my Model files are not relocated. Running through the various upgrade commends individually does relocate my Models. That is really just a comment, the current issue I have is as follows. After running the upgrade tool in full, although I can see that my controllers/models/views and so forth have been relocated, my index.php and .htaccess in webroot go unchanged. I do not see any permission related errors from the upgrade tool and the directories and files have permissions to write these files. I can of course update index.php and .htaccess manually however this leads me to believe perhaps other files have not been created/updated and leads me to my 2 questions.. 1. Do the old 2 project files get automatically removed after the upgrade or do we need to remove them manually? 2. Can anyone think of a reason the index.php and .htaccess files are not being upgraded? Many thanks James -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: The (bad) perception and image of CakePHP in the public
I've spent some time thinking about these issues, as I'm quite involved in that aspect of the project, and have a lot of contact with areas of the community where these issues come up. However, I've just become a dad, so time has been cut in half for me. Florian, you and me have talked a lot about some of these problems in the past. I added my 2 scents to that question on Quora, you can read it here: http://www.quora.com/Why-isnt-Cakephp-popular-despite-being-one-of-the-earliest-php-framework-to-be-written/answer/James-Watts-2 Basically, for me it can all break down into *2* problem areas: - CakePHP has been around for a long time, and therefore has a legacy that it has to live with. This legacy is unfortunately propagated by misinformation (the FUD you mentioned) and the notoriety that takes time and effort to shrug off. - The framework follows a convention-over.configuration philosophy, which is *opinionated*, so there will be people who love, and others who hate it. That comes with the package. I would definitely +100 for *Jose Lorenzo* turning this sour issue into an opportunity to bring out some positivity. The feedback has been really amazing, and shows where the CakePHP community stands and the real sentiments of developers using the framework. You guys are awesome, and you know it. If I were to draw any conclusion on the bad image idea, I would say it's something we can improve as community, and it starts with each person doing what they can. Answer a question on Quora. Write a blog post, or comment on one, especially where CakePHP is being poorly or incorrectly represented. Post around the social networks, get conversations started, or get involved where CakePHP is getting a bad wrap. There's no obligation, but every little bit helps. You're not alone, know that where you go, another 10 can follow. The strength of the community is a vital aspect of the project, not more than the code itself, but integral to the ecosystem. This is how Open Source works, it's people power. That said, be nice, polite, don't get dragged into a flame or take the bait, and rest upon solid technical arguments instead of making opinions the source of your claims. Sounds obvious, but it's easy to get carried away and become a part of the problem very easily. Just remember that CakePHP is all of us, and it's what we make of it. It's good to raise concern of issues like this, but like a nice guy once said, be the change you wish to see in the world. On Monday, September 29, 2014 11:15:54 PM UTC+2, Florian Krämer wrote: In the official CakePHP Facebook group Yanuar Nurcahyo asked about opinions on that link http://www.quora.com/Why-isnt-Cakephp-popular-despite-being-one-of-the-earliest-php-framework-to-be-written I'll quote my own comment I've added to that posting: I'm a little shocked about the wrong information people spreading there as well as the amount of false information. Especially the one that got 4 up-votes. Most of the answers there read like FUD or written by people who can't or won't read documentation. Also I really don't get why people always need bleeding edge php support. There is no urgent need or do you migrate you app / server to a new php version just because it's cool? The only problem that CakePHP has is an image problem. What I would like to discuss in this thread is reasons and solution to them. Why has CakePHP such a negative perception? The thing that bothers me personally the most is why the *uck do people say it has a bad documentation? Seriously, I don't get it. Can't they find the documentation? Can't they use it? Or is it really just FUD by some random-framework fanboys? The stone age php version isn't a very valid argument IMHO. Yes, I agree, CakePHP felt behind other frameworks for at least ~2 years and I've missed the namespace support more than one time. But that was really the only language feature I was really missing. Everything else is sugar on top of the cake. I don't know if other people update their servers and apps for fun and if they do the required testing for free for their clients...but well, looks like some guys out there have more a cowboy-coder attitude than a professional one. Also I don't get why people complain about the architecture of CakePHP, yes it is different, yes it gives you everything out of the box and isn't a package made of 100 loose libs and then glued together. This is IMHO actually an advantage and makes it easy to get started with it. And seriously, how often do you change the ORM stack of random-framework in reality? And on top of that, CakePHP 3.0, as far as I can tell, is more decoupled than 2.0 was. For example the face pattern in Laravel is, as far as I've worked with it and understood it, just one way you can use for dependency injection. The face seems to works like a proxy. I might be wrong, I haven't spent much time
Re: Is CakePHP dead? (Or is it just this group?)
CakePHP is anything but dead. Here's the keynote from CakeFest this year with some stats: http://www.slideshare.net/JamesWatts4/cakephp-community-keynote-38283514 You can also listen to it here, on a podcast episode we recorded after the event: http://podcast.cakephp.org/listen/episode-3-cakefest-recap Like Jose said, learning is good, but you can count on CakePHP staying strong for a very long time, with 3.0 being a significant and strong move in the right direction. I would also suggest targeting more active support bases, like the IRC channel and Stack Overflow, as Jose also suggested. On Monday, November 10, 2014 10:28:38 AM UTC+1, Lucky1968 wrote: I posted a few questions lately but I don't get any answers at all here. Only 1 reply (and that wasn't even an answer to my problem) to 5 questions or so. Therefor I'm asking myself if the group of CakePHP developers is bleeding to death and if that's so, why? Or is there a more intensively used group somewhere? Are we waiting too long for the new CakePHP 3 version? And, like I'm reading at several places, is there a much better and more advanced alternative (Laravel) which is even more advanced than our upcoming CakePHP 3 will be? I'm a CakePHP enthusiast for many years now but I'm not an 'expert' programmer and when I started With CakePHP back then (1.3.x) there was a large community and questions were answered very quickly but that seems to have stopped for a while right now. And I can also see that in this group a while ago we got like 10 updates a day while now we only have around 3 updates a day. I don't want to change to an alternative framework at all but as I have read some comments on the upcoming CakePHP 3 and the fact that I like my code to be as much 'Cake' as possible it will require a (for me) rather steep learning curve and reading 'The Book' from scratch to take advantage of all new techniques. With this in mind I'm doubting if it wouldn't be more appropriate to start learning an alternative (more advanced?) framework right away? Thanks in advance for your comments -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Increase application process speed
Hi, If we have a very large scale application, should we use model association in model itself or should we bind and unbind model on the fly in controller. Does it effect the overall speed of the application. Also does implementing Acl and Auth decreases application speed? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
When do views render?
While trying to track down an error in a UsersController method: Notice (8): Undefined index: User [APP/Controller/UsersController.php, line ...] I've come back to an issue that has yet to clarify in my head, specifically, the line in the cakephp v2 controller documentation that says: ... once a controller action has completed, CakePHP will handle rendering and delivering the View. Seems to me this line in the documentation is incorrect. In fact, a controller renders a view and then control may return to the same controller method to process any form date submitted by the view. Am I wrong in my thinking? - James -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Strange issue with the web runner of test.php
Hello all, So I have a controller that uses the RequestHandler and has some actions named with camelCase names. Running the tests via command line works just fine, however the test.php process of running the test result in a MissingControllerException with a message of Controller class Test.phpController could not be found. I mention the camelCase action names since the exception vanishes if the action names are in_lower_with_underscore format. Has anyone else seen this behavior or have a suggestion for a solution? Thanks James Pence -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Strange issue with the web runner of test.php
I just realized that I forgot to mention that I'm using cake version 2.4.9 and php unit 3.7.30 -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Who uses CakePHP
It was a dead link, I've updated it. Thanks On Thursday, April 17, 2014 1:55:10 PM UTC+2, mark_story wrote: There isn't a public repo for the website. What needs to be changed? Mark -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
CakeFest 2014: Madrid, Spain
This year we're celebrating 9 years of CakePHP, and we want to do it with all of you, our awesome community. There's also a very important milestone on the horizon, in the form of the lucky number 3. You really cannot miss this year's event, held in the beautiful European city of Madrid, Spain, from Thursday the 21st until Sunday the 24th of August. See more details on the location at http://cakefest.org/location We've also got an incredible offer for you this year, as we're providing some tickets which include a room plus breakfast in the 4* hotel that's hosting the conference! That's right, all you need is to get there and we'll take care of the rest. Who said we don't love you guys?! Get your tickets now at http://cakefest.org/tickets *Workshops* The 2 day workshops at CakeFest are an ideal opportunity to learn the internals of CakePHP, and a great way to get up to speed with the latest version of the framework. We'll be focusing part of the workshops on the new 3.0 code base, helping people get to grips with the new features for this third major revision of CakePHP. Attendees will also receive a personal certificate of attendance from the Cake Software Foundation. *Conference* The conference covers 2 jam packed days of keynotes, presentations, discussions and talks on CakePHP and related technologies, plus an array of activities, such as lightning talks, core team QA, the Hour of Contribution and a raffle. It's a great time to engage and network with the community, learn from other experienced developers, and party with the core team. Plus, there will be cake! *Call for Papers* Would you like to be a speaker at a conference which draws an international crowd who love PHP and all things cake related? Never spoken before, or don't think you have anything interesting to share? The annual CakePHP conference draws an exceptionally friendly community of developers, tech lovers and geeks in general. If you're interested in giving a talk this year, then CakeFest is the ideal event. The submissions are open until April 30th! Just head over to http://cakefest.org and submit your talk proposals. We're open to anyone for submissions. All it takes is a interesting idea, and we'd love to hear yours! *Sponsorship* Are you working for a company or own a business that would benefit from the unique exposure that comes from sponsoring the annual CakePHP conference? Consult our sponsorship prospectus (http://cakefest.org/sponsorship) for more details as well as the sponsor packages currently available. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
CakePHP Community 2013
We've been very busy, and have a lot to show for it. Late last year we created the Community Center http://community.cakephp.org/, as a central location for everyone to find their way around, and help people get involved with the project. This year we launched My CakePHPhttp://my.cakephp.org/, as a hub for developers to create a profile, and unify the experience across all of our sites. The Cake Software Foundationhttp://cakefoundation.org/website also received a well overdue facelift. Additionally, after continuous requests, and with a little help from CakeDC http://cakedc.com/, we improved the schedule for the official CakePHP traininghttp://training.cakephp.org/, which is now provided on a regular basis. Earlier this year we also announced our agreement with Microsoft to make CakePHP available on Windows Azurehttp://www.microsoft.com/web/gallery/cakephp.aspx. That doesn't mean you can't get your piece of the cake on other platforms, such as Rackspace's Cloud Siteshttp://www.rackspace.com/knowledge_center/article/installing-cakephp-on-cloud-sites, Amazon's Elastic Beanstalkhttp://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP_cakePHP.htmlor RedHat's OpenShift https://www.openshift.com/quickstarts/cakephp, as well as other PaaS providers, like Pagoda Boxhttp://help.pagodabox.com/customer/portal/articles/174049-cakephpor Fortrabbit http://fortrabbit.com/solutions/cakephp-hosting. There's a lot to choose from. It was also great to see that, since our efforts last yearhttp://bakery.cakephp.org/articles/jameswatts/2012/12/28/cakephp_community_2012to extend the reach of the CakePHP community, both the Facebook interest page https://www.facebook.com/pages/CakePHP/112600242088531 and our official Twitter account https://twitter.com/cakephp have reached over 10,000 likes and followers each. The official grouphttps://www.facebook.com/groups/cake.community/on Facebook also surpassed 3,000 members, becoming even larger than groups for other major PHP frameworks. But the growth didn't stop there. We had almost 1 million more visits to the CakePHP sites compared to last year, with the CookBook http://book.cakephp.org/ seeing nearly an additional 10 million page views, reaching over 26 million. For more numbers and stats check out this year's community keynotehttp://www.slideshare.net/JamesWatts4/cakephp-community-keynote . Which takes us to San Francisco, USA, where we held CakeFesthttp://cakefest.org/2013, the annual conference dedicated to everything CakePHP. Over 80 developers from around the world joined us for 4 days of workshops and conference. We listened to your feedback from the previous year and broke the workshop schedule into beginner and advanced sessions over the first 2 days. This was then followed by another 2 days of 16 talks given by 12 international speakers, as well as keynoteshttp://www.slideshare.net/josezap1/cake-fest-2013-keynote, lightninghttps://www.facebook.com/photo.php?fbid=10152257493958135set=a.10152257440208135.1073741830.339964833134type=3theater talkshttps://www.facebook.com/photo.php?fbid=10152257491388135set=a.10152257440208135.1073741830.339964833134type=3theater, core teamhttps://www.facebook.com/photo.php?fbid=10152257483473135set=a.10152257440208135.1073741830.339964833134type=3theaterQA, and the rafflehttps://www.facebook.com/photo.php?fbid=10152257505438135set=a.10152257440208135.1073741830.339964833134type=3theater. We took away some really memorablehttps://www.facebook.com/photo.php?fbid=10152257496813135set=a.10152257440208135.1073741830.339964833134type=3theater momentshttps://www.facebook.com/photo.php?fbid=10152257493973135set=a.10152257440208135.1073741830.339964833134type=3theater, the best of all being the Hour of Contribution, where we saw everyone contributing to the project for an hour, in true open source fashion. It was a beautiful sight, and a humbling experience. Oh, and who could forget about the cake https://twitter.com/cakephp/status/374262949780533248! But wait, there's more. Work has been going strong on version 3.0https://github.com/cakephp/cakephp/tree/3.0of CakePHP, with the new ORM almost ready for it's first developer preview release. The roadmap https://github.com/cakephp/cakephp/wiki/3.0-Roadmapis slowly being completed, with the milestone https://github.com/cakephp/cakephp/issues?milestone=7state=openavailable for anyone to join in on the fun. In the meantime, this year saw the release of versions 2.3 and 2.4 of the framework, with a sum of 28 releases in total. There's also been a lot of activity in the developer community, with almost 6,000 additional questions taggedhttp://stackoverflow.com/tags/cakephpon Stack Overflow this past year alone. We also saw some interesting http://patisserie.keensoftware.com/en/cakes projectshttp://neptunide.com/released, a couple of videos http://www.youtube.com/watch?v=F3-S-PDGLG4,
Re: Frontend Javascript framework
Check out for Ember.js and for SEO see emberjsseohttp://www.emberjsseo.com/ -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: IBM AS400 DB2 Driver
I'd like to use your DB2 driver on a project. Could you please provide a little more documentation on how to set it up properly? If you have a simple example of how you have the CakePHP DATABASE_CONFIG parameters setup, as well as the database drivers setup inside PHP, that would be very helpful. Also, in your quest to create a connection to DB2 AS/400 have you run across a solution that uses PDO and ODBC? That seems like a viable approach, but I have not been able to find a solution online, and my own attempts are not working. Thanks! James On Wednesday, July 3, 2013 6:41:29 AM UTC-4, Marco Ferragina wrote: Hi all, I've recently written a db2 driver for cakephp2, compatible with db2 on old IBM AS400. It's available here https://github.com/ferama/cakephp2-db2 and it would be nice if it were included in next cakephp version. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
unit testing delete issue.
In a project with HABTM (Has And Belongs To Many) connected through a join table that is also a model. I am trying to delete an instance of the model. The delete works fine within the app. However once trying to run the controller action from a unit test, the connection to the test is reset and the unit tests are stopped. The code surrounding the call to the delete is fine and the test only hangs once it is trying to delete the model instance. Any Idea what might be causing this? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: cronjob in cakephp 1.3
Hi Chris, Add this file cron_dispatcher.php under /app/webroot/. Then to call the function from ssh you need to write it like this:- /usr/bin/php path_to_your_project_webroot/cron_dispatcher.php /guests/update -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out. attachment: cron_dispatcher.php
CakePHP on Windows Azure
We recently teamed up with Microsoft to bring CakePHP to the Windows Azure cloud platform. You can view it now on the Windows Web App Gallery, check it out here - http://www.microsoft.com/web/gallery/cakephp.aspx -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Cake 3.0
As CakePHP is an open source project you can follow the development of 3.0 from the branch in the git repository - https://github.com/cakephp/cakephp/tree/3.0 I'm sure Florian didn't mean to sound out of line, he just has high expectations about anyone's code conforming to an acceptable level of quality. It's one of the key reasons he's on the team at CakeDC. On Sunday, May 12, 2013 9:44:48 PM UTC+2, advantage+ wrote: Yes I would have to agree with you. Rather harsh but ohh well. It will be fun upgrading to 3. All I wanted to know was if they have 3.x in development maybe there was a way to get a jump on the change over. Something that might be backwards compatible. Still works in 2.x but in 3.x it will be this way just to get a jump start rather than waiting till the release and saying ohh wow now I need to re-do everything again. *From:* cake...@googlegroups.com javascript: [mailto: cake...@googlegroups.com javascript:] *On Behalf Of *Jamie *Sent:* Sunday, May 12, 2013 3:33 AM *To:* cake...@googlegroups.com javascript: *Subject:* Re: Cake 3.0 If not it's your code that sucks - that's a little harsh, don't you think? Sure doesn't reflect well on the professionalism of CakeDC. Upgrading from 1.3 to 2.0 is time consuming and tedious, especially for large projects. The upgrade shell helps but by no means does all the work. Going from 2 to 3 will likely be difficult as well given that the model layer is being re-written. On Saturday, May 11, 2013 5:10:30 AM UTC-7, Florian Krämer wrote: Write clean code, follow the CakePHP coding standards and use the API correcty and upgrading will be easy as it ever was in the past. CakePHP was always easy to upgrade, if not it's your code that sucks and needs a refactor anyways. On Saturday, May 11, 2013 5:37:02 AM UTC+2, advantage+ wrote: Is there any date set / expected? Is there anything we can do to current sites to anticipate the new release to get ahead of the changes? Thanks, Dave This email may contain material that is confidential, privileged and/or work product for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. Cake Development Corporation. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+u...@googlegroups.com javascript:. To post to this group, send email to cake...@googlegroups.comjavascript: . Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- This email may contain material that is confidential, privileged and/or work product for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. Cake Development Corporation. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Miles Uploader - Deleting does not work when using beforeUpload and how to keep only the transforms...
Anyone figure out how to delete files that are placed in unique folders? Here's my beforeTransform and beforeUpload: public function beforeTransform( $options ) { $options['finalPath'] = 'files/uploads/' . CakeSession::read( 'Auth.User.id' ) . '/'; $options['uploadDir'] = WWW_ROOT . $options['finalPath']; return $options; } public function beforeUpload( $options ) { $options['finalPath'] = 'files/uploads/' . CakeSession::read( 'Auth.User.id' ) . '/'; $options['uploadDir'] = WWW_ROOT . $options['finalPath']; return $options; } As you can see, I'm placing all my files under /files/uploads/ !-- User ID Folder-- /test.jpg Now, if I upload my files and just place them under /files/uploads, then delete them, the files are physically removed from the server. It's just when they're placed in a sub folder from the above methods, that it won't physically remove them. Also, when this happens (the files not being deleted), the row is removed from the DB. Secondly, is there anyway when uploading files, to only keep the transformed files? I'd like to just keep a medium and small photo, and remove the other. I'm guessing I could do an after save, and possibly execute the following? $this-Image-deleteFiles($id, arrayhttp://www.php.net/array ('medium')); Though, how would I delete the original only? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Help with Cake Auth - Manual Login
I'm running into a issue here, trying to get Cake to manually log a user in. Here is what I am trying to accomplish. I'm using a XML-RPC to log the user in to Vbulletin from Cakephp, what I get back are some cookies, and user info. On the CakePhp Side of things, I have a Users table, which contains: 1. id 2. vbulletinid 3. username 4. avatar 5. created 6. modified Now, when you're on the Cake side of things, and you log in, within my login() method, I grab the following, for the xml-rpc call: $username = $this-request-data['User']['username']; $password = $this-request-data['User']['password']; If the response is valid, and the user is logged in remotely to vbulletin, I then insert the user into the Users table. If they're already in there, I just update the username and avatar, etc. So, I was trying to do the following, to force the login: $this-Auth-login($user) Where $user contained: Array ( [User] = Array ( [id] = 13 [username] = testuser ) ) I thought everything was working, until I turned off the Debugkit plugin. Then, it seems like my login is not working actually. With it turned off, I can't force Cake to log my current user in. Anyone have any ideas on how to force a login? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Help with Cake Auth - Manual Login
What values are you passing inside of the $user array. I assume just a username and what else? On Tuesday, April 30, 2013 9:01:45 PM UTC-6, Shahruk Khan wrote: This is the working code I have: if($this-Auth-login($user['User'])) Using this, I was able to force log my users in via Facebook. Do a find for the user and pass the User array. On Tuesday, April 30, 2013 5:22:18 PM UTC-4, James Lukensow wrote: I'm running into a issue here, trying to get Cake to manually log a user in. Here is what I am trying to accomplish. I'm using a XML-RPC to log the user in to Vbulletin from Cakephp, what I get back are some cookies, and user info. On the CakePhp Side of things, I have a Users table, which contains: 1. id 2. vbulletinid 3. username 4. avatar 5. created 6. modified Now, when you're on the Cake side of things, and you log in, within my login() method, I grab the following, for the xml-rpc call: $username = $this-request-data['User']['username']; $password = $this-request-data['User']['password']; If the response is valid, and the user is logged in remotely to vbulletin, I then insert the user into the Users table. If they're already in there, I just update the username and avatar, etc. So, I was trying to do the following, to force the login: $this-Auth-login($user) Where $user contained: Array ( [User] = Array ( [id] = 13 [username] = testuser ) ) I thought everything was working, until I turned off the Debugkit plugin. Then, it seems like my login is not working actually. With it turned off, I can't force Cake to log my current user in. Anyone have any ideas on how to force a login? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Help with Cake Auth - Manual Login
Okay, was able to get it working by adding the following to my beforefilter: $this-set('user', $this-Auth-user()); On Tuesday, April 30, 2013 9:01:45 PM UTC-6, Shahruk Khan wrote: This is the working code I have: if($this-Auth-login($user['User'])) Using this, I was able to force log my users in via Facebook. Do a find for the user and pass the User array. On Tuesday, April 30, 2013 5:22:18 PM UTC-4, James Lukensow wrote: I'm running into a issue here, trying to get Cake to manually log a user in. Here is what I am trying to accomplish. I'm using a XML-RPC to log the user in to Vbulletin from Cakephp, what I get back are some cookies, and user info. On the CakePhp Side of things, I have a Users table, which contains: 1. id 2. vbulletinid 3. username 4. avatar 5. created 6. modified Now, when you're on the Cake side of things, and you log in, within my login() method, I grab the following, for the xml-rpc call: $username = $this-request-data['User']['username']; $password = $this-request-data['User']['password']; If the response is valid, and the user is logged in remotely to vbulletin, I then insert the user into the Users table. If they're already in there, I just update the username and avatar, etc. So, I was trying to do the following, to force the login: $this-Auth-login($user) Where $user contained: Array ( [User] = Array ( [id] = 13 [username] = testuser ) ) I thought everything was working, until I turned off the Debugkit plugin. Then, it seems like my login is not working actually. With it turned off, I can't force Cake to log my current user in. Anyone have any ideas on how to force a login? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Many to many relations and Froms
This article with help you http://blog.endpoint.com/2009/11/test-fixtures-for-cakephp-has-and.html -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: How to define a variable in Cakephp
Instead of *var $view = 'Open';* Write this *public $view = 'Open';* -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: search filter in cake 1.3
Try this function search() { $this-User-recursive = 0; $params = $this-params['url']; if (!array_key_exists(find, $params)) { $this-set('users', $this-paginate('User')); } else { $this-set('users', $this-paginate('User',array('User.firstname LIKE'=$params['find'].'%'))); } } -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Question on using Miles Uploader Plugin
I'm running into using Miles Uploader Plugin, found here. The issue is, the photos are being created, but they're invalid, in all cases, they're around 300 - 400 bytes. They do have the original file name, but that's about it. Using latest version of Cakephp Using latest version of Uploader, using composer to gather all required lib's. Now, they way I'm using it is: Controllers: Stores Images //Add method in the Stores Controller public function add() { if ($this-request-is('post')) { $this-Store-create(); if ($this-Store-saveAll($this-request-data, array('deep' = true))) { $this-Session-setFlash(__('The store has been saved')); $this-redirect(array('action' = 'index')); } else { $this-Session-setFlash(__('The store could not be saved. Please, try again.')); } } $users = $this-Store-User-find('list'); $types = $this-Store-Type-find('list'); $this-set(compact('users', 'types')); } Here's my add.ctp, just a sample of what I changed: div class=stores form ?php echo $this-Form-create('Store'); ? fieldset legend?php echo __('Add Store'); ?/legend ?php echo $this-Form-input('name'); echo $this-Form-input('user_id'); echo $this-Form-input('type_id'); echo $this-Form-input('details'); echo $this-Form-input('phone'); echo $this-Form-input('address'); echo $this-Form-input('city'); echo $this-Form-input('state'); echo $this-Form-input('zip'); echo $this-Form-input('url'); echo $this-Form-input('is_published'); echo $this-Form-input('Image.0.name', array('type' = 'file')); //echo $this-Form-hidden('Image.0.is_cover', array('value' = 1)); ? /fieldset ?php echo $this-Form-end(__('Submit')); ? /div Now, in the Images Model, I have the following: public $actsAs = array( 'Uploader.Attachment' = array( 'name' = array( 'nameCallback' = '', 'append' = '', 'prepend' = '', 'tempDir' = TMP, 'uploadDir' = '', 'finalPath' = 'img/uploads/', 'dbColumn' = '', 'metaColumns' = array(), 'defaultPath' = '', 'overwrite' = true, 'stopSave' = true, 'allowEmpty' = true, 'transforms' = array(), 'transport' = array() ) ) ); Here's the structure for the Images table: CREATE TABLE IF NOT EXISTS `images` ( `id` int(11) NOT NULL AUTO_INCREMENT, `store_id` int(11) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `is_cover` tinyint(1) DEFAULT '0', `path` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; So, part of this is working correctly, I'm just not sure why they actual file isn't being uploaded. When I use Charles, I see the post for when I submit a Store, but it doesn't look like the photo is actually being uploaded at all. Any help would be awesome! -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Question on using Miles Uploader Plugin
Not sure what you're trying to state here, the originals I'm testing with are 1+ meg in size. If I try to open the files, the os says their invalid. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Question on using Miles Uploader Plugin
So here's a quick update: If in the form, I add the following, I'm noticing that the file is actually uploaded, original, to my files directory. ?php echo $this-Form-create('Store', array('enctype' = 'multipart/form-data')); ? fieldset legend?php echo __('Add Store'); ?/legend ?php echo $this-Form-input('name'); echo $this-Form-input('user_id'); echo $this-Form-input('type_id'); echo $this-Form-input('details'); echo $this-Form-input('phone'); echo $this-Form-input('address'); echo $this-Form-input('city'); echo $this-Form-input('state'); echo $this-Form-input('zip'); echo $this-Form-input('url'); echo $this-Form-input('is_published'); echo $this-Form-input('Image.0.photo', array('type' = 'file')); //echo $this-Form-hidden('Image.0.is_cover', array('value' = 1)); ? /fieldset However, when adding a store, I'm thrown a few errors: Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Array' in 'field list' After adding the array('enctype' = 'multipart/form-data') to the form above, here's the new structure of the post data: Array ( [Store] = Array ( [name] = [user_id] = 1 [type_id] = 1 [details] = [phone] = [address] = [city] = [state] = [zip] = [url] = [is_published] = 0 ) [Image] = Array ( [0] = Array ( [photo] = Array ( [name] = IMG_0075.JPG [type] = image/jpeg [tmp_name] = /private/var/tmp/phporPNhe [error] = 0 [size] = 1804407 ) ) ) ) On Sunday, March 3, 2013 1:04:16 PM UTC-7, James Lukensow wrote: I'm running into using Miles Uploader Plugin, found here. The issue is, the photos are being created, but they're invalid, in all cases, they're around 300 - 400 bytes. They do have the original file name, but that's about it. Using latest version of Cakephp Using latest version of Uploader, using composer to gather all required lib's. Now, they way I'm using it is: Controllers: Stores Images //Add method in the Stores Controller public function add() { if ($this-request-is('post')) { $this-Store-create(); if ($this-Store-saveAll($this-request-data, array('deep' = true))) { $this-Session-setFlash(__('The store has been saved')); $this-redirect(array('action' = 'index')); } else { $this-Session-setFlash(__('The store could not be saved. Please, try again.')); } } $users = $this-Store-User-find('list'); $types = $this-Store-Type-find('list'); $this-set(compact('users', 'types')); } Here's my add.ctp, just a sample of what I changed: div class=stores form ?php echo $this-Form-create('Store'); ? fieldset legend?php echo __('Add Store'); ?/legend ?php echo $this-Form-input('name'); echo $this-Form-input('user_id'); echo $this-Form-input('type_id'); echo $this-Form-input('details'); echo $this-Form-input('phone'); echo $this-Form-input('address'); echo $this-Form-input('city'); echo $this-Form-input('state'); echo $this-Form-input('zip'); echo $this-Form-input('url'); echo $this-Form-input('is_published'); echo $this-Form-input('Image.0.name', array('type' = 'file')); //echo $this-Form-hidden('Image.0.is_cover', array('value' = 1)); ? /fieldset ?php echo $this-Form-end(__('Submit')); ? /div Now, in the Images Model, I have the following: public $actsAs = array( 'Uploader.Attachment' = array( 'name' = array( 'nameCallback' = '', 'append' = '', 'prepend' = '', 'tempDir' = TMP, 'uploadDir' = '', 'finalPath' = 'img/uploads/', 'dbColumn' = '', 'metaColumns' = array(), 'defaultPath' = '', 'overwrite' = true, 'stopSave' = true, 'allowEmpty' = true, 'transforms' = array(), 'transport' = array() ) ) ); Here's the structure for the Images table: CREATE TABLE IF NOT EXISTS `images` ( `id` int(11) NOT NULL AUTO_INCREMENT, `store_id` int(11) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `is_cover` tinyint(1) DEFAULT '0', `path` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; So, part of this is working correctly, I'm just not sure why they actual file isn't being uploaded. When I use Charles, I see the post for when I submit a Store, but it doesn't look like the photo is actually being uploaded at all. Any help would be awesome! -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com
Re: Question on using Miles Uploader Plugin
Yeah, good point. Just checked and here's the content of the file. _method=POSTdata%5BStore%5D%5Bname%5D=data%5BStore%5D%5Buser_id%5D=1data%5BStore%5D%5Btype_id%5D=1data%5BStore%5D%5Bdetails%5D=data%5BStore%5D%5Bphone%5D=data%5BStore%5D%5Baddress%5D=data%5BStore%5D%5Bcity%5D=data%5BStore%5D%5Bstate%5D=data%5BStore%5D%5Bzip%5D=data%5BStore%5D%5Burl%5D=data%5BStore%5D%5Bis_published%5D=0data%5BImage%5D%5B0%5D%5Bphoto%5D=IMG_0069_mod.JPG On Sunday, March 3, 2013 11:59:28 PM UTC-7, rchavik wrote: On Monday, March 4, 2013 8:56:30 AM UTC+7, James Lukensow wrote: Not sure what you're trying to state here, the originals I'm testing with are 1+ meg in size. If I try to open the files, the os says their invalid. Those 400-500 bytes probably contains error messages. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: How to echo and play videos in Cakephp
You can use jPlayer http://www.jplayer.org/ -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Link to PDF? Yikes!
Lets say your file is inside /webroot/file/#id/mypdf.pdf So in your view you write something like this:- $id = 'value of id from database'; $this-Html-link('see file here','/file/'.$id.'/mypdf.pdf'); Also ,if you are storing the name of the file in your database, you can replace the name with another variable that holds the name of the file $fileName = 'vale of name from database'; $this-Html-link('see file here','/file/'.$id.'/'.$fileName); -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Echo a image in cakephp after uploading it
you should write :- ?php echo $this-Html-image('/logos/'. $logo['Logo']['filename']); ? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Echo a image in cakephp after uploading it
what you wrote above, are you saving 511ca905-f170-49d5-90a0-055083176c8c value? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Echo a image in cakephp after uploading it
?php echo $this-Html-image('logos/'. $logo['Logo']['filename']); ? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Advanced find with mulitple OR/WHERE/AND conditions
Open the debug mode and see what the exact query is? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: CakePHP 1.2 Layout error
Found the error there was a file BOM encoded -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
CakePHP 1.2 Layout error
Hi, I made a custom layout for admin panel. The problem is when i validated my HTML i am getting an error ** *Non-space characters found without seeing a doctype first. Expected !DOCTYPE html.* On Firefox the layout renders perfectly when i inspect it but on google chrome its showing an empty space inside body tag and all the html tag is going inside body tag. Any idea what the problem is? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: CakePHP 2.3.0-RC1 and 2.2.4 released
Here's the official CakePHP TV site. http://tv.cakephp.org/ You'll find lots of video tutorials out there. But I suggest you grasp the concept first of CakePHP well before proceeding. Check out the cookbook: http://book.cakephp.org/2.0/en/index.html On Monday, December 17, 2012 4:04:33 PM UTC+8, Rakesh Dongarwar wrote: Hey Hi guys I am also Very new in cakephp. I am working in corephp from last 3 years and now i want to move ahead can you please help me regarding the video tutorials or any type of tutorials for learn easily Kind Regards, Rakesh On Monday, 3 December 2012 03:56:06 UTC+5:30, José Lorenzo wrote: The CakePHP core team is proud to announce the immediate availability of CakePHP 2.3.0-RC1 and 2.2.4[1]. 2.3.0-RC1 marks the freezing of 2.3.0 API and it is jsut a matter of a few weeks to mark it as stable if no bugs are found in current codebase. Changes since 2.3.0-beta - Added ConfigReaderInterface::dump() and made all readers' dump() method support 'Plugin.keyname' format for keys - Made View trigger notice by default if elements are missing and added elementExists() method - Added Helper::$settings to match other objects like components and behaviors - You no longer have to specify 'maxLimit' when setting 'limit' greater than default 'maxLimit' when configuring pagination settings. - Added type hinting to Model::validator() - prev() and next() methods of PaginatorHelper now possible to place the 'tag' option to 'false' to disable the wrapping element. - Calling Form-input() with 'errorMessage'=false should trigger field error, but not render error message (HTML element). - New options in HtmlHelper::getCrumbList() to make it compatible with Twitter Bootstrap, Zurb foundation or other CSS frameworks. - Added CakeTestCase::getMockForModel convenience method. - Implemented SSL peer verification in HttpSocket. - Added context() to CakeSocket. - Renamed HttpResponse to HttpSocketResponse. HttpResponse will continue to exist for backwards compatibility. - Using bytecode sequence for unicode ellipsis in String::trim(). - When using XmlView, you can configure the top level element name by setting the _rootNode view variable. - Added warning to home.ctp when DebugKit is not installed and added a list of official plugins to home.ctp - Added View::startIfEmpty() - Added foreignKey to whitelist in saveAssociated() - RedisEngine: authenticate connection if 'password' is set 2.2.4 is a bugfix/maintenance release for the 2.2.x release branch. These are some of the changes included: - Update TLD validation to accept gTLD variations - Fixed sorting empty data with Hash Set. - Fixed multi-model validators with deep atomic validation error nesting - Fixed exceptions being thrown in beforeFilter breaking error pages. - Using HttpSocket to get proper exceptions when trying to load XML from remote servers to fix warnings from file_get_contents() in Xml::build() - Send charset=UTF-8 if Content-Type is JSON. - Added query logging to DboSource::insertMulti(). - Fixed contain rule parsig in authentication adapters - Fixed required validation rule - Removed Inflector::slug() replacement from Ä to A - Fixed issue with Model::saveAssociated() and TranslateBehavior - Only setting $request-data with PUT/DELETE when it can be decoded. - Improved required field detection. - Made Model::find('first') always return an array. - Fixed issue where the incorrect meridian would be selected in FormHelper::dateTime() - Fixed issue where createSchema() would omit primary keys sometimes. - Fixed saveAssociated() with validate=first, atomic=false - Showing the last 200 queries instead of the first 200 in SQL log. - Fixed 0'th index file not being copied to $_FILES. - Fixed autoLinkUrls so it re-capture query strings. - Allow saving new records with pre specified primary key value with treebehavior. - Fix find('count') with 'group' when result has only one group. A huge thanks to all involved in terms of both contributions through commits, tickets, documentation edits, and those whom have otherwise contributed to the framework. Without you there would be no CakePHP. Download a packaged release [3] Links - [1] http://cakephp.org/changelogs/2.3.0-RC1 - [1] http://cakephp.org/changelogs/2.2.4 - [2] http://github.com/cakephp/cakephp/tags -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Missing View
You should create a ctp file index.ctp inside you folder c:\wamp\www\cakephp\app\view\user\ -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Calling MySQL5 Stored Procedures
I have to call a store procedure on my cakephp can anybpdy tell me how to do it ? On Tuesday, October 16, 2007 8:11:46 PM UTC+5, beverly.guillermo wrote: Hi all, Just thought I'd post my workaround based on some of the posts here but I didn't see a consistent answer to the issue. My environment is PHP 5.2.3, Apache 2.2.6, and MySQL 5.0.41-community. So, here's the problem, I have a stored procedure that I want to call in Cake. When I try to run the $this-model-query(call sp_mine(params)); or $this-model-_call, I don't get anything back and an mysql error occurs. Error 1312 - PROCEDURE ... can't return a result set in the given context: nothing returned To resolve this, I had to modify the connect call to the database in dbo_mysql.php to include a client flag, specifically CLIENT_MULTI_RESULTS or CLIENT_MULTI_STATEMENTS or 65536. But after implementing this and calling my stored procedure I go another mysql error: Error 2014 - Commands out of sync; you can't run this command now I get this for any query or execute that I attempt to call. And per a post from blunt, I added this function function releaseDB() { $db = ConnectionManager::getDataSource($this-useDbConfig); $db-disconnect(); $db-connect(); } to my model_php5.php. After every sp call, I call that method. If anyone has a better resolution or if it's fixed in the current cake version and I'm not doing something right, then let me know. :P Thanks, Beverly -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Cake php
i want to use storedprocedure in cake php can any body tell me how to do it ? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: HABTM Join Table Entries Disappearing
If you are using $this-CartsOrder-delete(); then it must be deleting the cartsorder record . You should check for that. Enjoy, Marcus -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: forn create with ID
Hi Chris Try this ?php echo $this-Form-create('Message', array('action' = 'compose/'.$user_obj['User']['id'] )); ? Enjoy, Marcus -- Like Us on FacekBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: image output tags
Hi Chris, Try this :- ?php echo $this-Html-link($this-PhotoShow-thumb($user_obj), '/photos/index/' . $user_obj['User']['username'], array('escape'=false)) ? Enjoy, Marcus -- Like Us on FacekBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: $this-html-link not changing location
Hi, Just a small mistake :) check your line $this-Html-link($examples['model']['somename'], '/controllername/slug/' + $examples['model']['slug']); You wrote '+', it will concat the string. Use '.' sign, so your new code should be $this-Html-link($examples['model']['somename'], '/controllername/slug/' . $examples['model']['slug']); Enjoy, Marcus -- Like Us on FacekBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: how to implementing sql function like datediff in cake php
Hi, Try this example :- $data = $this-User-find('first',array('conditions'=array('User.id'=1),'fields'=array('DATEDIFF(now(),User.modified) as diff','User.*'))); Enjoy, Marcus -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Help using customFileName with Miles Johnson Uploader
I'm running the latest version of Cake 2, and using the Miles Johns Uploader Plugin. Works great so far, though I don't feel confident I set it up correctly. But that aside, let's move on. In my Controller, when I either add or edit a row, I upload the users selected file. Here's just a snippet of the code I'm using in my controller: App::import('Vendor', 'Uploader.Uploader'); $this-Uploader = new Uploader(array( 'name' = 'formatFileName', // Name of the function to use to format filenames 'uploadDir' = '/files/' )); $data = $this-Uploader-upload($this-data['Upload']['file']); Now, in bootstrap.php, I have the following function: function formatFileName($name, $field, $file) { echo hello; return md5($name); } However, the filename of the uploaded file is always the original file name. Again, I've loaded the plugin in bootstrap with the following code: CakePlugin::load('Uploader'); I've created a upload table in the DB, baked a controller and model for it, but I'm saving the filename, path, size, and so on to that table. Looks like the following: CREATE TABLE IF NOT EXISTS `uploads` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `qarequest_id` int(11) NOT NULL, `name` varchar(200) NOT NULL, `type` varchar(200) NOT NULL, `size` int(11) NOT NULL, `filesize` varchar(200) NOT NULL, `ext` varchar(200) NOT NULL, `group` varchar(200) NOT NULL, `custom_name` int(11) NOT NULL, `path` varchar(200) NOT NULL, `uploaded` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=35 ; Let me know if I need to supply any other information, thanks all! James -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: if statement
Hi, It means that either the word you are searching is in first position, that's why its echoing 0 or (in_array($var_get, $word ) is empty ,meaning $var_get is not inside the array $word. -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: PHP functions in controller
Hi, You can use any PHP function in your controller just like you use it in your normal PHP code. It same in controller too :- function index() { $rand=rand(1,$number); } Enjoy , Marcus -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: how to get rid from id column when i use find('list')
Hi, Try this $var= $this-Login-find('list', array( 'fields'=array('Category','Category'), 'order'='Login.Category ASC', 'conditions'=array('Login. username'=$dbuser['Login']['username']) )); Enjoy, Marcus -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: how to get rid from id column when i use find('list')
When you write $this-Model-find('list'), it gives you an array in return. If you want only 1 field value , then you should use $this-Model-field('filename',array('conition goes here')); In your case it should be $var = $this-Login-field('Category',('Login.username'=$dbuser['Login']['username'])); make sure to check the case of the field name i.e its Category or category in you database. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Detect a nude image
Hi All, I know this is not related to cakePHP but was wondering if there is any script or code that can help me find if an image is a nude image or not. Thanks, Marcus -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: jQuery append, how to get file content
In the controller, just add the line to the page function. function page() { if($this-params['isAjax']==1) { $this-layout = ''; } } what this does is, it will check if the call is an ajax one or not,if its an ajax call, we override the layout by stating it as empty. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: jQuery append, how to get file content
Hi, In your controllers function you need to add this line if($this-params['isAjax']==1) { $this-layout = ''; } this checks if the current request call is an ajax one or not. Enjoy, Marcus -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: pass some key in Pagination links
Hi, In your views you can use it like this echo $this-Paginator-options(array('url' = $var1.'/'.$var2)); echo $this-Paginator-numbers(); where $var1 and $var2 are the two variable that we want to send. Enjoy Marcus -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: pass some key in Pagination links
is your view and the page where you want your link to point are different? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Cake Media Plugin: How to create dynamic directories
Great!!! Thanks Jeremy. James On Thursday, April 19, 2012 6:35:28 PM UTC-4, jeremyharris wrote: Yes, as defined in the transferTo function in your model. Here's a sample one that sticks it under a user directory and uses a UUID as the filename so there aren't conflicts (so something like /media/transfer/doc/user/550e8400-e29b-41d4-a716-44665544.doc): function transferTo($via, $from) { extract($from); $irregular = array( 'image' = 'img', 'text' = 'txt' ); $name = Mime_Type::guessName($mimeType ? $mimeType : $file); if (empty($extension)) { $extension = Mime_Type::guessExtension($mimeType ? $mimeType : $file); } if (isset($irregular[$name])) { $short = $irregular[$name]; } else { $short = substr($name, 0, 3); } $path = $short . DS; $path .= 'user' . DS; // make this as dynamic as you want $path .= String::uuid(); // uses a uuid as the doc name instead $path .= !empty($extension) ? '.' . strtolower($extension) : null; return $path; } This is defined on the model that $actsAs Media.Transfer. On Thursday, April 19, 2012 8:49:00 AM UTC-7, James Dcunha wrote: Hello all, With cake media plugin can we configure the plugin to create dynamic subdirectories dynamically inside the transfer folder without changing the plugin core code. Example with default settings I can transfer document files to WWW_ROOT/media/transfer/doc/test.doc Could we configure it to transfer document files to WWW_ROOT/media/transfer/doc/*{subdirectory}*/test.doc Regards James -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Cake Media Plugin: How to create dynamic directories
Hello all, With cake media plugin can we configure the plugin to create dynamic subdirectories dynamically inside the transfer folder without changing the plugin core code. Example with default settings I can transfer document files to WWW_ROOT/media/transfer/doc/test.doc Could we configure it to transfer document files to WWW_ROOT/media/transfer/doc/*{subdirectory}*/test.doc Regards James -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
How to show message from default.po into javascript
Hi, Can any one tell me how to read messages from default.po inside JavaScript. Thanks, Marcus -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Cake Media Plugin: How to enable .docx files for upload and retrieve errors if upload fails
Hello all, I am using CakePHP 1.3 and Cake Media plugin (https://github.com/davidpersson/media). With the default setting I am able to upload images and pdf. I tried to upload a .docx file and I am not able to upload it. Following is the validate rule in my Document model ?php class Document extends AppModel { var $name = 'Document'; //media plugin behaviors var $actsAs = array( 'Media.Transfer', 'Media.Coupler', 'Media.Generator' ); var $validate = array( 'file' = array( 'mimeType' = array( 'rule' = array('checkMimeType', false, array ( 'text/plain','application/pdf', 'application/msword', 'application/rtf',' application/vnd.openxmlformats-officedocument.wordprocessingml.document')) ), 'size' = array( 'rule' = array('checkSize' , '120M') ) )); } I tried adding the extension values in my validate array but it did not work either. Let me know if I am missing something. Another question how do I retrieve the errors for failing to upload from the media plugin in my controller. Would $errors = $this-Document-invalidFields(); work? Regards James -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Problems with Find ('all')
Hi, I think your condition clause is not properly written. Try this $dados = $this-Usuario-find('all', array('conditions'=array( 'OR'=array(array('nome_usuario LIKE'='%'.$this-data['valor'].'%', 'ocupacao_usuario'=$this-data['valor']),array('religiao_usuario'=$this-data['valor']),array('email_usuario'=$this-data['valor']); Enjoy, Marcus -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Data retrieval
Hi Alex, Just use if condition like this td?php if( $patient['Patient']['gender']==1)echo 'Male';else echo 'Female'; ? /td Enjoy, Marcus -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: sending json / jquery data manually from controller to view
Is your debug mode set to 0 ? Try with setting it to 0 . Regarding the errors , it would be nice if you post what errors you are getting -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Team members invitation
Hi , I have 2 year of exp in cake php and would like to join your team Thanks Marcus -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Strange Problem with default.po
Hi All, I have a strange problem with default.po file, i am creating a multi-lingual website, the problem is the when i see the file in windows any browser the site works fine and all text are loaded from default.po but when i access the website from a macbook it doesnot show the text from default.po Can any one tell me how to fix it, i have downloaded stable 1.3.8 version Thanks Marcus -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Limiting the output from DB
Hi Garret, 2 things:- 1. *In your controller use this $this-set('provider', $this-paginate('Provider')); * 2. *In your view add this line at the end tdecho http://www.php.net/echo $this-Paginator-numbers()/td* * * *Enjoy* * * *Marcus* -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: element vs controller vs component vs helper Best Practice suggestions
Hi Tom, Making an element will speed up your application, you can easily call the function in the element by using ?php $data = $this-requestAction('your_controller/your_function'); foreach($data as $record){ your html code goes here }? in your function instead of setting data you just need to return it. like function myfunction() { $users = $this-User-findAll(); return $uses; } By doing this your application will be fast Enjoy Marcus -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Do you think this project is possible with CakePHP?
Hi, I appreciate your answer. Just really starting to learn more about Cake and haven't done any projects with Cake so far. Thanks a lot for your response. :) Regards, Dorell On May 19, 10:15 pm, Phang Mulianto braveh...@gmail.com wrote: absolutely possible to do with cake. the question is not what cake can do..but what you can do with cake. :) On Wed, May 18, 2011 at 8:06 PM, Kyko kykoc...@gmail.com wrote: Hi Dorell, Of course this project is possible using CakePHP. Good luck! =) 2011/5/17 Dorell James galan...@gmail.com Hi Everyone, I'm really new to cake and was wondering after studying it if this (project) below is possible (i guess, pretty much believe it's possible). :-) Project is divided with sub-projects or modules. MAIN PROJECT SUB-PROJECTS/MODULES - Inventory Management Software - TAR (Technical Action Requests) Solutions = import excel file i think and then when action is confirm it inserts records to the db (data are pulled from the excel file), export documents into excel/ word format. - Document Creator = This is a sub project that will be able to generate a ms.word doc out from a predefined template that we will be making. Some parts of the document created is changeable. I think this is a solution for our prone to error documents we created are too long and thus we came up into our mind that we can make a web- app that could put in data and use that data combined with template and generate a doc file. - Ajax capabilities = This will be my first time developing a project using cakephp and since I'm a newbie with cake, i would like to ask if it's easy to integrate with ajax capabilities and etc.. So sorry about this question. Thanks much to all of you guys. Best Regards, Dorell -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Do you think this project is possible with CakePHP?
Hi Kyko, Thanks a lot. :) Regards, Dorell On May 18, 8:06 pm, Kyko kykoc...@gmail.com wrote: Hi Dorell, Of course this project is possible using CakePHP. Good luck! =) 2011/5/17 Dorell James galan...@gmail.com Hi Everyone, I'm really new to cake and was wondering after studying it if this (project) below is possible (i guess, pretty much believe it's possible). :-) Project is divided with sub-projects or modules. MAIN PROJECT SUB-PROJECTS/MODULES - Inventory Management Software - TAR (Technical Action Requests) Solutions = import excel file i think and then when action is confirm it inserts records to the db (data are pulled from the excel file), export documents into excel/ word format. - Document Creator = This is a sub project that will be able to generate a ms.word doc out from a predefined template that we will be making. Some parts of the document created is changeable. I think this is a solution for our prone to error documents we created are too long and thus we came up into our mind that we can make a web- app that could put in data and use that data combined with template and generate a doc file. - Ajax capabilities = This will be my first time developing a project using cakephp and since I'm a newbie with cake, i would like to ask if it's easy to integrate with ajax capabilities and etc.. So sorry about this question. Thanks much to all of you guys. Best Regards, Dorell -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Do you think this project is possible with CakePHP?
Hi Everyone, I'm really new to cake and was wondering after studying it if this (project) below is possible (i guess, pretty much believe it's possible). :-) Project is divided with sub-projects or modules. MAIN PROJECT SUB-PROJECTS/MODULES - Inventory Management Software - TAR (Technical Action Requests) Solutions = import excel file i think and then when action is confirm it inserts records to the db (data are pulled from the excel file), export documents into excel/ word format. - Document Creator = This is a sub project that will be able to generate a ms.word doc out from a predefined template that we will be making. Some parts of the document created is changeable. I think this is a solution for our prone to error documents we created are too long and thus we came up into our mind that we can make a web- app that could put in data and use that data combined with template and generate a doc file. - Ajax capabilities = This will be my first time developing a project using cakephp and since I'm a newbie with cake, i would like to ask if it's easy to integrate with ajax capabilities and etc.. So sorry about this question. Thanks much to all of you guys. Best Regards, Dorell -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Router:mapResources
Hi all, First post and I'm a noob, so please excuse my noobness. I would like to use restful urls for my applications html interface. I have found Router:mapResources and this seems to work routing requests to the proper locations. My questions is how do I link to these restful urls from within my views? Thanks, James -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: session problem or misunderstanding.
Do you have the Session component enabled for the controller? If you debug out $this-Session you should get a debug out of the object. If you're getting nothing, it could also be that you have debug turned off in your core.php config file. On Dec 19, 9:40 pm, cake-learner sh.koiz...@gmail.com wrote: I am trying to pass a variale with session but without success for a while. within the same controller i go $this - Session - write( 'id', 1 ); $this - Session - read( 'id' ); i gotta nothing and empty when i go debug( $this - Session ); I tried with $_SESSION so i guess within the same controller i can't pass with session? I have this line $helpers = array( 'Session' ) in the controller and there are already some controllers using session. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Using CakePHP on a Zeus Server
Ah Zeus, my old nemesis. If it's shared hosting, I don't think you can implement the rewrite file yourself. I had to go through an extremely frustrating song and dance where I had to send the rewrite script to the hosting company's support, they'd set the rules up, I'd find out I did something wrong or it wasn't working the way I wanted, and then repeat. Good luck! On Dec 18, 2:16 pm, WhyNotSmile sharongilmor...@gmail.com wrote: I'm currently setting up a site and and being made to use a host which has Zeus rather than Apache. They provide a very basic example of how to convert an htaccess file to a 'rewrite.script' file, but don't say much about what to do with the file once you have it, and don't provide much in the way of examples. Has anyone else come across this, and can you tell me what I should be doing? I came across this thread: http://groups.google.com/group/cake-php/browse_thread/thread/78146f5b... which has some stuff that looks helpful, but doesn't say where I should put the code, except that it's not in the htaccess file! This is driving me crazy! I'd appreciate any help. Even if you've tried and given up, that would be good to know, as it would help me build my case for moving to a better host (the guy I work for seems to have a knack for finding the most obscurely-configured hosts on the web!). Thanks, Sharon Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Core test cases
They come with the regular download. On Nov 25, 8:54 am, Rishab karthik_...@ymail.com wrote: Hi Where can i download Core test cases for cakephp Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
setting the value of a checkbox
Hi i was wondering how i might set the default value of a checkbox to the value of the field before it? So if the value of the field before it is 1 then the checkbox would be checked by default? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: setting the value of a checkbox
thanks Iqbal! On Tue, Oct 5, 2010 at 11:40 AM, Iqbal Santyaswardan isant...@gmail.comwrote: If the field is changeable by user, you might have an ObserveField set to that field. See Ajax Helper. Regards On Tue, Oct 5, 2010 at 5:15 PM, james jamesliv...@googlemail.com wrote: Hi i was wondering how i might set the default value of a checkbox to the value of the field before it? So if the value of the field before it is 1 then the checkbox would be checked by default? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
save not working
I'm trying to run a save on certain fields from my model and for some reason it isnt working - similarly to an edit im calling $this-Host-save($this-data) and the array in $this-data looks like Array ( [Host] = Array ( [web] = 25 [prev_cost_of_sale] = [extras] = [price_A4s] = [previous_price_A4s] = [previous_adverts] = [previous_appts] = ) ) can anyone see what im doing wrong? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: save not working
Following on from this - it was a validation error since i was only updating half of the fields the validation rules were not being satisfied. So as part of that does anyone know how to disable the validation on a model before a save? On 5 Oct, 14:15, james jamesliv...@googlemail.com wrote: I'm trying to run a save on certain fields from my model and for some reason it isnt working - similarly to an edit im calling $this-Host-save($this-data) and the array in $this-data looks like Array ( [Host] = Array ( [web] = 25 [prev_cost_of_sale] = [extras] = [price_A4s] = [previous_price_A4s] = [previous_adverts] = [previous_appts] = ) ) can anyone see what im doing wrong? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
views - force inputs to sit together
Hi how would you make two inputs sit on the same line together instead of one underneath the other? cheers Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
handling an update
hi im trying to update some data in a table and the array that holds the data looks like: $this-params['form'] - Array ( [9] = 1 [12] = 1 [14] = 1 [15] = 0 [16] = 0 [29] = 0 [28] = 0 [27] = 0 [26] = 0 [25] = 0 [30] = 0 [31] = 0 [32] = 0 ) what i need to do is update the field (a tinyint) where the id equals the array key but im not sure how to get each array key into a variable for the update. hope that makes sense but im not sure it does! cheers Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
date fields
Hi, is there a cake way to work out the day from a date field? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: date fields
yeah its a database field - just a regular date outputting 'September 29 2010' but i need to 'add' the day to that output - does that make sense? so if the outputted date is the above i need to work out that the day is a Wednesday. Thanks for replying! On Wed, Sep 29, 2010 at 3:19 PM, Tilen Majerle tilen.maje...@gmail.comwrote: Time Helper u mean? or u mean database fields? created and modified (updated) -- Tilen Majerle http://majerle.eu 2010/9/29 james jamesliv...@googlemail.com Hi, is there a cake way to work out the day from a date field? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: updating a value when user clicks a link
Hi Well its during the creation of an advert that the relevant field in appointments would need to be updated so it seemed like the best place to do it thanks On Mon, Sep 27, 2010 at 7:19 PM, cricket zijn.digi...@gmail.com wrote: On Mon, Sep 27, 2010 at 10:24 AM, james livsey jamesliv...@googlemail.com wrote: Thanks Cricket, I added that code as you suggested. While it doesnt cause any errors it doesnt seem to modify the field data either. what I have is: function add($appointment_id = null){ //existing code $this-Advert-Appointment-id = $appointment_id; $this-Advert-Appointment-saveField('appointment_status', 'Order'); $this-Advert-create(); } does that look about right? And yeah your right i should change it to status You've got create() in the wrong place. That should come first, if it's included at all. See the API: http://api.cakephp.org/class/model#method-Modelcreate $this-Advert-Appointment-create(array('Appointment' = array('id' = $appointment_id))); That will initialize the instance with the appropriate id. Actually, why are you calling create() on Advert, instead of Appointment? I'm guessing there's more to this method. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
reporting component
Are there any up to date reporting components for cake? I tried to add the one from the bakery but had loads of probelms with it. cheers! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: editing rows from index.cttp
Hi Jeremy thankyou for replying. yes there are multiple rows and the idea is that it would be more user friendly if the user could 'batch update' multiple records in one view. so in my index i have the normal columns of data eg td?php echo $advert['Advert']['ad_size']; ?nbsp;/td but at the end there is the addition of: td $this-Form-create('Advert'); echo $form-input('contract_received'); /td with the form end after the foreach (so there isnt a submit for every row): ?php echo $this-Form-end(__('Submit', true));? On the controller i tried using saveAll as following $this-Advert-set($this-data); $this-Advert-saveAll($this-data); but i think im missing the way to 'fire' the event. Does that sound like the right way of doing it? At the moment the submit button doesnt do anything. Thanks - hope that isnt too confusing On Fri, Sep 17, 2010 at 2:47 PM, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Do you mean that there are multiple rows, each of which could have been updated? If so, (assuming that your form encompasses all of the potential updates) check your $this-data array when the form is submitted. Depending upon its structure you can either do a saveAll($this-data) or loop through and do a series of saves. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 17 Sep 2010, at 14:38, james wrote: Hi I have a field that shows if a contract has been received or not in my index view. This field needs to be editable from within the same view with one submit button committing the changes to the table. Is this possible? Im not entirely sure as to the correct way to go about this? Thanks in advance Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: updating a value when user clicks a link
Thanks Cricket, I added that code as you suggested. While it doesnt cause any errors it doesnt seem to modify the field data either. what I have is: function add($appointment_id = null){ //existing code $this-Advert-Appointment-id = $appointment_id; $this-Advert-Appointment-saveField('appointment_status', 'Order'); $this-Advert-create(); } does that look about right? And yeah your right i should change it to status On Fri, Sep 17, 2010 at 6:42 PM, cricket zijn.digi...@gmail.com wrote: On Fri, Sep 17, 2010 at 6:22 AM, james jamesliv...@googlemail.com wrote: Hi, I have a table that holds appointments and in view.ctp there is a link that allows the user to convert that appointment to an advert and passes the id of the appointment and the name of the business involved to the add.ctp view for adding an advert. When this happens i need an appointment_status field in the appointments table to update to Ordered. How can I do this? i cant seem to be able to include it in the save method of the add advert. Assuming there's an association between Advert and Appointment: $this-Advert-Appointment-id = $id; $this-Advert-Appointment-saveField('appointment_status', 'ordered'); BTW, why don't you name the field just 'status'? Seems a bit redundant. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
conditions
Is it possible to use conditions from other models' fields? For example if model Advert belongs to model Media and Media has a field called active, is there anyway to use the active field as a condition in the Advert controller? for example $conditions = array('Advert-Media.active'='Active'); Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
updating a value when user clicks a link
Hi, I have a table that holds appointments and in view.ctp there is a link that allows the user to convert that appointment to an advert and passes the id of the appointment and the name of the business involved to the add.ctp view for adding an advert. When this happens i need an appointment_status field in the appointments table to update to Ordered. How can I do this? i cant seem to be able to include it in the save method of the add advert. any help would be greatly appreciated. Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
editing rows from index.cttp
Hi I have a field that shows if a contract has been received or not in my index view. This field needs to be editable from within the same view with one submit button committing the changes to the table. Is this possible? Im not entirely sure as to the correct way to go about this? Thanks in advance Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
save to multiple tables
whats the best way to approach a view that requires information (possibly unrelated) from many tables that can be edited and saved to all those tables? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
multiline inputs
Hi is it possible to make an input multiline? For eg with an address field? cheers! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: multiline inputs
thanks! Another case of read the manual first... :( thanks again! On 15 Sep, 16:23, Andras Kende and...@kende.com wrote: http://book.cakephp.org/view/1433/textarea Andras Kendehttp://www.kende.com On Sep 15, 2010, at 10:38 AM, james wrote: Hi is it possible to make an input multiline? For eg with an address field? cheers! Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: setting options to add inputs
Hi Cricket, where do you declare that in the controller? So for example if the model with the displayField I need to rename is Media and the corresponding model is Host would i declare $this-Mdeia-Host-displayField = '...'; in each function in the controllers? thanks for your help On Fri, Aug 20, 2010 at 5:03 PM, cricket zijn.digi...@gmail.com wrote: On Fri, Aug 20, 2010 at 10:48 AM, james livsey jamesliv...@googlemail.com wrote: Hi cricket, thanks for that. Yes thats the kind of thing im looking for but the fields i need to use as the display field actually belong to another model. Is that possible to declare in the model? Like $displayField = OtherModel.displayField; ? $this-Model-OtherModel-displayField = '...'; Or, you can define it in the other model if it's not going to be changing. The above is something you'd do if displayField needed to be changed in certain situations. If you don't need that put it in the class definition.. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
input styles
This one is more of a css question but it relates directly to the cake settings as im reluctant to use a completely new stylesheet i have a filter area at the top of one of my views with 4 options - 3 text inputs and a drop down select. At the moment it has them all running down the page as in input 1 input 2 select input 3 But what i want to have is: input 1input 2 select input 3 but no matter what i do i cant seem to set it right. does anyone know where this behavious is set in the stylesheet? cheers Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: setting options to add inputs
Hi cricket, thanks for that. Yes thats the kind of thing im looking for but the fields i need to use as the display field actually belong to another model. Is that possible to declare in the model? Like $displayField = OtherModel.displayField; ? On Thu, Aug 19, 2010 at 5:10 PM, cricket zijn.digi...@gmail.com wrote: On Thu, Aug 19, 2010 at 10:38 AM, james jamesliv...@googlemail.com wrote: In one of my add views there is a drop down that allows the user to specify associated records via id fields. I was wondering if there was a way to add exra info to this to make it more user friendly. Search for cakephp displayfield. I think that's what you want. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
setting options to add inputs
In one of my add views there is a drop down that allows the user to specify associated records via id fields. I was wondering if there was a way to add exra info to this to make it more user friendly. thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
ensuring no duplication for each day
Hi I have a table that stores appointments for a sales man each day. Each appointment is given a date, a link to the user table that holds the salesman id and a link to the timeslot table which holds the time of day the meeting is (EG 9.30-9.45). On add and edit I need to perform some validation that ensures that there isnt already an appointment for that salesman on that day at that time. Can anyone help with the best approach? cheers! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
auth component issue
Hi, I'm using the auth component and ive noticed that if i edit a users details from within the app it automatically changes the encrypted password. Any ideas as to why it would do this? thanks, James. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: auth component issue
yes that must be it. Its encrypting the encrypted password! cheers! On Thu, Aug 12, 2010 at 2:41 PM, Max Dörfler max.doerf...@googlemail.comwrote: Hi, that is beacuse when you create the user, the plaintext password gets encrypted. When you now edit the user, the encrypted password gets loaded and when you save your user, the encrypted password gets encrypted again. (so the already encrypted password is handled as if it's a plaintext password). So, to keep the encrypted password, don't save it again. (unset the password field or don't load it or exclude it from your fields array or ...) Greetings Max Am 12.08.2010 14:32, schrieb james: Hi, I'm using the auth component and ive noticed that if i edit a users details from within the app it automatically changes the encrypted password. Any ideas as to why it would do this? thanks, James. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
making record of logged in user
Is it possible when submitting a form to grab the id of the user that has entered the data? I would guess you would grab Auth.User.username but then how would you enter that into the field thats to be saved? thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en