Re: Plugin architecture and plugin limitations
Out of lack of time and some frustration I've come to the same stall. We had a similar situation to yours about three weeks back. We fiddled a lot and tried to work around the limitations given by Cake and PHP. I say and PHP because classes are inherently closed in PHP vs. Ruby where a plugin can re-open classes and add (to use your example) a bark () method/action to the DogsController. Our lame but necessarily practical/quick solution was to give up on plugins. For everything that really has to hook into the core; seeing our system will stay in-house and new modules/plugins are mostly one off edge cases for customer requests we'll just take our core system and add to it. Not exactly an answer to your question but maybe a bit of our experience will bring up some ideas or nourish the discussion here. --~--~-~--~~~---~--~~ 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: dukudu.de made with CakePHP
Ok, so let's move on and get creative -- Felix Definitely! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: dukudu.de made with CakePHP
Taking this slightly off-topic: Why do people do clones of highly successful sites? I mean is it really worth it? In dukudu's case I can see the point Twitter isn't localized. But in general why should it be a good idea? On Jun 24, 6:25 pm, Jonathan Langevin [EMAIL PROTECTED] wrote: sharp looking site, shame it's in german :-) On 6/24/07, xhoch2 [EMAIL PROTECTED] wrote: Maybe this is interesting for someone. Dukudu.de - a german twitter clone - was made with CakePHP. The service was mentioned on TechCrunch because it is listed for sale on ebay: http://feeds.feedburner.com/~r/Techcrunch/~3/126640006/ In my opinion a very good reference for CakePHP. http://www.dukudu.de/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Which editor you use for views ?
TextMate ( http://macromates.com/ ) + CakePHP Bundle for .php and .thtml CSSEdit( http://macrabbit.com/cssedit/ ) for CSS unless I'm just making a tiny edit, that I'll just do in TextMate BTW those are both for Mac OS X --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Book
There is a PDF version in the repository I downloaded before. On Jun 12, 11:33 pm, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: On Jun 12, 2007, at 3:18 PM, Jonathan Langevin wrote: would be simpler to just have a PDF or HTML export of the docs from the doc site :-) We're working on it, people. Stay tuned. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Member Methods in Views
This is IMHO a total mix up of terms. Yes, MVC preaches that view and business logic shall be separated for all eternity. But what Craig was saying is totally valid. You should be able to call methods on your model. MVC says the business logic should be in the model. Exactly! He only wants to CALL the methods from the view, which is perfectly fine. This does not contradict MVC in any way. In Ruby on Rails you can do this. The reason this doesn't work in Cake PHP is simply one of it's shortcomings. The ActiveRecord pattern is not done 'correctly' (i.e. not all aspects are implemented). A row should correspond to an object. ( http://en.wikipedia.org/wiki/Active_record_pattern ) So Craig, yes you should be able to do this but its not possible in cake PHP. Coming from the Java world you might want to check out Ruby on Rails, to not make your head hurt so much when you come across PHP's limited ability of OO. On Jun 5, 2:32 pm, Chris Hartjes [EMAIL PROTECTED] wrote: This isn't Java... :) MVC supercedes typical OO practices because the goal is to separate business logic from display logic, right? On 6/5/07, Craig [EMAIL PROTECTED] wrote: thanks cook, after find worked I find it interesting that it is discouraged to access model form view.. I have been working in Java for many many years (More than I want to remember a dinosaur like me goes back before J2EE).. In general OO methodology object behaviour should be programmed in the object... NOt externally then stored in the model... either way after find works Thanks Again. Craig. On Jun 5, 12:12 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Craig, Firstly, $event['event']-registerDate() will not work because $event['event'] is an array, not an object. Secondly, the MVC methodology used by the cakePHP developers discourages you from directly accessing the model from the view. Instead you should call canRegister and registerDate from the controller and then pass the information onto the view, or use a helper. Read the manul for more info about helpers. That said, many people are not satisfied with that degree of separation. There are several threads about this topic. Here is a recent one:http://groups.google.com/group/cake-php/browse_thread/thread/57bca638... The entry by Felix Geisendörfer (IMHO) describes the best route for accessing model functions from the view. Do some searching and you will find many other related threads. For you particular case, I would recommend using the afterFind method in your model. That way the registration data will always be available to you. class Event extends AppModel{ ... function afterFind($results) { foreach ($results as $result) { //add code here to add your registration data to the output array. } return $results; } ... } Look at the afterFind method in the manual (http://manual.cakephp.org/ chapter/models) and in the api (http://api.cakephp.org/ class_model.html#21de65cdbc08ce706a9413b4c73f28c5). Good luck, cook On Jun 4, 9:00 am, Craig [EMAIL PROTECTED] wrote: Hi All, I have searched and I can't find an answer anywhere so I ask the question... I would like to display and use derived values in a view The model knows how to calculate these values form it's own data.. but how do I call these methods in a view.. For example I have a model called event I have defined 2 methods canRegister and regsiterDate Can register returns true if a user can register for the event and registerDate returns the date that registrations open... I would like the list (index.thtml) to display the regiser date if you can't register and a link if you can... however I can't see to call these methods from the view?? I tried echo $event['event']-registerDate() but it didn't work... I don't want to store the register date in the database as in the event of a rule change I want to update the model and not have to patch all the data for existing events. an y help would be greatly appreciated. Craig. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheBallpark -http://www.littlehart.net/attheballpark @TheKeyboard -http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AppController
It happend to all of once. Until we read the comment in cake/ app_controller.php :) On Jun 3, 6:33 pm, Oscar Burgos [EMAIL PROTECTED] wrote: oh my god !!! i have been so stupid !!! my app_controller.php was in app/controllers and again, again, again... thank you On 3 jun, 17:51, francky06l [EMAIL PROTECTED] wrote: app/app_controller.php On Jun 3, 2:04 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is AppController.php in the right location? I believe it should be: app/AppController.php On Jun 2, 10:47 pm, Oscar Burgos [EMAIL PROTECTED] wrote: hi, (again) I have a little trouble I´m trying to redefine the AppController but it´s not being executed and I don´t know why??? it is in the correct place.. it´s as simple as this... class AppController extends Controller { function beforeRender() { die(ok); } } but it doesn´t diewhy?? thaks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: GoDaddy Subdomain Woes
That all sounds pretty much correct to me. Where is your problem? If you are confused where that url is created take a look at your '.htaccess' files On May 30, 12:12 am, Ronald Chaplin [EMAIL PROTECTED] wrote: OK. Here's my issue if anyone can help. I have created a subdomain, adcamp that relates to the url adcamp.midnightfury.info. The host is GoDaddy. I have pointed the root directory to /adcamp/app/webroot and the full directory structure is /home/content/d/e/t/dethriderr/html/adcamp/app/webroot. If you view the source of adcamp.midnightfury.info the css tag is href=/app/webroot/css/default.css . I am using the default core files for 1.12 and have only adjusted the core file to disable mod_rewrite. I am using echo $html-css('default'); in my default layout. Also, ?php echo $this-webroot . 'favicon.ico';? equates to href=/app/webroot/favicon.ico .Any suggestions? -- Thanks, Ron Chaplin =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= T73 Software Designwww.t73-softdesign.com We'll make all of your wildest e-Commerce dreams come true! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Interactive Console screencast
Other features I find usefull * create new instances of models by inputing information Are you talking about creating brand new models, or adding info to a model via a save() method? Talking about adding info to a model via save. new Post(array('title' = 'example post', 'body' = 'example post body')) * assign variables to models e.g. $a = Foo-findById(3) I doubt that will happen since it increases the amount of work I need to do in parsing input. If you've ever look at PHP token parsing, you'd understand. I thought you just might be bored :) Just poped into my head because I saw that the console in Ruby on Rails did something like that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Interactive Console screencast
Hey Chris, I think it would be very usefull to have the fetching methods e.g. findAll() give an output how log it took to fetch. That might be usefull when optimizing my models. And maybe help confirming a bottleneck in my application.(Yes, I know there are profiling tools out there as well). Other features I find usefull * create new instances of models by inputing information * assign variables to models e.g. $a = Foo-findById(3) On May 25, 11:01 pm, Chris Hartjes [EMAIL PROTECTED] wrote: Check it out, let me know what you think and any suggestions for things you'd like to see in the console. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---