Re: The (bad) perception and image of CakePHP in the public

2014-10-01 Thread j0n4s.h4rtm...@googlemail.com
So for me in 3 words, CakePHP3 is: - Best ORM - Awesome Book / Docs - Super Maintainance TLDR; CakePHP 2 Tops: - Book - Community - Linkable - Recursive = 3 ;P - Cake Bake and great bake looks out of the box - CRUDv3, Scaffold - Super maintainance cycles and fast security patches 3 - Super

Re: The (bad) perception and image of CakePHP in the public

2014-10-01 Thread j0n4s.h4rtm...@googlemail.com
Actually mark_story most of the documentation is really really damn good. I am really not the most advanced coder and I can get around with the docs and API quite well. So maybe it has to do with laziness as well. But as you asked, what I never really understood is how cakes errors and

Re: 3.0: a peek into CakePHP's future

2014-01-03 Thread j0n4s.h4rtm...@googlemail.com
Gersonfs, you will be able to replace that with query string params, Cake 3 will change much anyway thus your app will need a big upgrade. On Thursday, September 12, 2013 7:15:54 PM UTC+2, gersonfs wrote: Remove support for named parameters would not be nice to me. I have a lot of code that

Re: 3.0: a peek into CakePHP's future

2012-07-07 Thread j0n4s.h4rtm...@googlemail.com
On Saturday, 7 July 2012 11:35:08 UTC+2, tigr wrote: No, that is not nice. The strength of the CakePHP design is in being very straightforward when it comes to working with the data. I have seen other frameworks and I think that object-oriented ways are not suitable for working with

Re: CakePHP future

2010-09-07 Thread j0n4s.h4rtm...@googlemail.com
two notes on this: a.) while this might not make me friends: Lithium may be able to pull of both: a.) a very microkernel framework that comes without much tools and with a loose frame (thus bad for newbies and bad programmers like me ;-p) and b.) a standard set of addons extensions plugins

Re: PHP 5.2 no longer supported (Implications for cake 2.0) ??

2010-07-28 Thread j0n4s.h4rtm...@googlemail.com
I don't agree but I ain't an active and/or core developer, if they believe additional work that is required if 5.2 is used instead of 5.3+ is worth it for their own projects and thus for cake 2, I am fine with that. Just myself, I would care less about very old php versions (like 5.3) that follow

Re: PHP 5.2 no longer supported (Implications for cake 2.0) ??

2010-07-27 Thread j0n4s.h4rtm...@googlemail.com
Actually I find that the PHP platform always moved rather slow and cake in the means of php version even slower, I do not get why 5.2 was considered at all, mostly because 5.3 and 6.0 are claimed to be close to each other (while the functional gap between 5.2.x and 5.3.x is huge) On Jul 27, 3:00 

Re: Cake 2.0 Roadmap - must it be all at once?

2010-06-14 Thread j0n4s.h4rtm...@googlemail.com
I like the roadmap, there only one big issue and one smaller thing: 1. the big issue - no mentioning of http://cakephp.lighthouseapp.com/projects/42648/tickets/95-afterfind-and-beforefind-callbacks-not-working-on-associated-models-was-translate-behavior-should-translate-associated-model-data 2.

Re: HOW to use find() to EXCLUDE some datasets?

2010-05-02 Thread j0n4s.h4rtm...@googlemail.com
'conditions' = array('NOT' = array('5', '6', 7')) - NOT IN (5,6,7) On Apr 19, 8:42 am, mivogt-LU c...@mivogt.net wrote: HI there, I want to use find() to exlude some data on a few conditions. My app is built like this customer-request-booking-bookingposition-lodging with request fields:

Re: HOW to use find() to EXCLUDE some datasets?

2010-05-02 Thread j0n4s.h4rtm...@googlemail.com
Sorry... something like this should work: 'conditions' = array('NOT' = array('Model.fieldname' = array(5', '6', 7'))) Should create something like NOT (Model.fieldname IN (5,6,7)) Lookup the book on cakephp.org for Complex Find Conditions On Apr 19, 8:42 am, mivogt-LU c...@mivogt.net wrote: HI

Re: Kaching: CakePHP Shopping Cart Framework Plugin

2010-04-22 Thread j0n4s.h4rtm...@googlemail.com
Hello, I took a look at Kaching earlier, it looks great. The biggest bummer for me was that it wasn't on github. You will probably see lots more community action (forks, pull requests, commits, patches) there. Check out the new CakePHP Questions site http://cakeqs.org and help others with their

Re: Kaching: CakePHP Shopping Cart Framework Plugin

2010-04-22 Thread j0n4s.h4rtm...@googlemail.com
In addition, GitHub just released their SVN API, which means you can still use your SVN tools and for pushing and pulling from repositories: http://github.com/blog/626-announcing-svn-support Also, subdirectories aren't used much. Fabio you should create a subdomain pointing to your application,

Re: mac users, which ide are you using to develop cakephp?

2010-04-21 Thread j0n4s.h4rtm...@googlemail.com
Textmate.app Sequel Pro.app git PushPull via GitHub and Cyberduck.app Terminal.app + Cake Bake Console.app / Text Logs and Cake Debug Could use DebugKit Could use XDebug Could use Fixtures and Test Cases Check out the new CakePHP Questions site http://cakeqs.org and help others with their

Re: composite keys to identify a record

2010-04-18 Thread j0n4s.h4rtm...@googlemail.com
Hello, for instance you could have Post, Tag, PostTag, Post HABTM Tag / Post HasMany PostTag, Tag HasMany PostTag. why this example? because it shows the most common place where you would - outside of Active Record - use a combined primary key - PostTag would have PrimaryKey(post_id, tag_id) -

Re: Logout users

2010-04-18 Thread j0n4s.h4rtm...@googlemail.com
How would you enforce the logout? For instance I want to logout a user that is logged in at any other place (e.g. session) using the same account. On Apr 17, 7:56 pm, jacmoe jac...@mail.dk wrote: Yeah, you're right. The beforeFilter could update a user last action session variable with a

Re: naming convention

2010-04-10 Thread j0n4s.h4rtm...@googlemail.com
user.model = model User + var $useTable = 'adb_usres'; users_controller.php = controller UsersController app/views/users/* http://book.cakephp.org/view/1059/useTable Be sure to check out the link that Jeremy provided. On Apr 8, 7:07 pm, Miles J mileswjohn...@gmail.com wrote: However, you don't

Re: Any popular Image Components being used that are better than the rest?

2010-04-10 Thread j0n4s.h4rtm...@googlemail.com
Anyone of you considered using Gravatar + Flickr instead of local solutions and if happy with either of them? 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

Re: beforeSave vs beforeValidate

2010-03-13 Thread j0n4s.h4rtm...@googlemail.com
It depends, it depends on your use case. For instance if one may enter text into a huge textfield, maybe richtext for instance, its better to sanitize after READING it from the database, not upon writing (beforesave). If you want to change things on the fly before validation its no problem. For

Re: Release: CakePHP 1.2.6

2010-01-31 Thread j0n4s.h4rtm...@googlemail.com
Now this is what I love about cake, its so mature and stable, there are regular stability releases. Thanks to all the contributes esp. the core team! On Jan 30, 4:50 am, mark_story mark.st...@gmail.com wrote: The CakePHP development team is happy to announce CakePHP 1.2.6[1]. 1.2.6 is a bug

Re: calling a component in a model

2010-01-30 Thread j0n4s.h4rtm...@googlemail.com
Don't forget, in most cases you want a Behavior (or Datasource) not a Component (only if the component exists and writes data) On Jan 29, 3:14 pm, Florian florian.end...@me.com wrote: Thanks, to all. Worked with App::Import On 29 Jan., 08:55, j0n4s.h4rtm...@googlemail.com j0n4s.h4rtm

Re: 600+ models issue

2010-01-28 Thread j0n4s.h4rtm...@googlemail.com
Are you sure you do not mix up instances and classes? Yes you can fetch 600 instances of one or a few models without any issue (be sure not to store images along or at least not fetch them, or other binary data) Are you sure you modeled 600 classes? None of them are similar? If they are: - use

Re: Avoid multiple form submission

2010-01-28 Thread j0n4s.h4rtm...@googlemail.com
Multiple form submissions are just the peak of the iceberg. http://www.ad7six.com/entries/view/67/Generic-capability-based-security-%28CSRF-prevention%29 http://teknoid.wordpress.com/2008/11/05/make-your-cakephp-forms-a-lot-more-secure/ Basically speaking. Any CUD (like CRUD without the R)

Re: Avoid multiple form submission

2010-01-28 Thread j0n4s.h4rtm...@googlemail.com
The javascript stuff is just optional. On Jan 28, 8:11 am, aveev nashrullah_a...@yahoo.com wrote: Ok, thanks for the replies, I'll try them.. Miles J wrote: You can enable the Security component, which does the session and bot validation automatically. Secondly, after a post is done,

Re: Best approach for Pages

2010-01-28 Thread j0n4s.h4rtm...@googlemail.com
Maybe use something like this: http://github.com/morrislaptop/baked_simple ? Else there is a very easy way. Add your site or page model and MVC. Then there is a third option, use requestaction from pages views (a little dirty) On Jan 28, 9:45 pm, Dave make.cake.b...@gmail.com wrote: No, I need

Re: Thoughs about naming conflict between model and component

2010-01-28 Thread j0n4s.h4rtm...@googlemail.com
Hey, first of all, though I did not know bout it, Miles J's solution seems to be great, and as far as I understood already works out of the box. the way I went for to distinct Behaviors, components and Models and have no singelton naming conflicts was this: Permission = Model (noun)

Re: calling a component in a model

2010-01-28 Thread j0n4s.h4rtm...@googlemail.com
While Miles J is right in general, there are exceptions. This is how I used Emailcomponent from a model: http://github.com/ionas/sna/blob/master/www/app/app_model.php#L98 (1.2.5) I am not sure if an email datasource would be the best approach in general (and the component as well as models could

Re: Should I make the leap from PHP coder to cakePHP coder?

2010-01-08 Thread j0n4s.h4rtm...@googlemail.com
If you want to stick with PHP, cake is a nice upgrade as compareable true PHP5ish frameworks are still very early alpha On Jan 9, 1:03 am, Miles J mileswjohn...@gmail.com wrote: It took me only 2-4 weeks to really understand the core of CakePHP. If you have an extra few weeks, then it doesn't

Re: Secret URLs

2010-01-05 Thread j0n4s.h4rtm...@googlemail.com
Hi again, I am open to learn, so please tell me, whats the benefit of url obscurity if not protecting against CSRF. A large german social network uses that to protect against CSRF - though they do not use UUIDs. Just links like domain.tld/long_random_looking_stuff_here, it works against mining

Re: How can I get an option/select drop down to populate with a table.myfield instead of the table.id (primary key).

2010-01-05 Thread j0n4s.h4rtm...@googlemail.com
This suggestion by Jeremy looks all right: $states = $this-Employee-State-find('list'); $this-set(compact('states')); My hint would be to change your database schema to state: id, name or state: id, title as state: id, state is redundant anyway. The magic that will appear is cake auto detecting

Re: $this-Session-setFlash();

2010-01-03 Thread j0n4s.h4rtm...@googlemail.com
I use this to make it lots shorter: $this-Session-setFlash(___('Success Message'), 'flashes/success'); In app/views/layouts/flashes I have div id=flashMessage class=message success?=$content_for_layout? /div P.s. in app/config/boostrap.php I have function ___($string) { return

Re: Secret URLs

2010-01-03 Thread j0n4s.h4rtm...@googlemail.com
Well using UUIDs would result into /users/view/LONG-UU-ID-HERE Which would not resolve Cross Site Request Forgery. Use SecurityComponent and use form buttons that use method = post. That way destructive links get caught if no form security token was found. I do it like this:

Re: find method fetching all ids in single query

2010-01-02 Thread j0n4s.h4rtm...@googlemail.com
debug($this-Model-find('count', array('conditions' = array ('Model.id' = $arrayOfIds; On Jan 1, 4:32 pm, engine radicalet...@gmail.com wrote: yeah thanks, this method is the same i found after few hours posting this question mike karthauser wrote: On 1 Jan 2010, at 12:56, engine

Re: Multiple Model Pagination

2009-12-30 Thread j0n4s.h4rtm...@googlemail.com
Containable could create multiple queries. This is the solution I went for: http://github.com/ionas/sna/blob/master/www/app/controllers/profiles_controller.php#L112 This could be another solution (not tested yet): http://mark-story.com/posts/view/using-bindmodel-to-get-to-deep-relations

Re: paginating - several on one page

2009-12-27 Thread j0n4s.h4rtm...@googlemail.com
Hello Melanie, as far as I know, the core's Pagination only works on one query (e.g. one primary model and its associations aka contains/ joins) at a time. I have opened an enhancement ticket for 1.3: http://cakephp.lighthouseapp.com/projects/42648/tickets/102-support-for-multiple-pagination I

Re: Share Javascripts and CSSs in various layouts

2009-12-12 Thread j0n4s.h4rtm...@googlemail.com
require() ? http://github.com/ionas/sna/blob/master/www/app/views/layouts/settings.ctp http://github.com/ionas/sna/blob/master/www/app/views/layouts/fullscreen.ctp On Dec 11, 7:22 pm, thomaus tho...@saimiris.com wrote: Hi there, I have to share the same Javascripts and CSSs for various layouts

Re: help on a textarea in edit.ctp

2009-12-11 Thread j0n4s.h4rtm...@googlemail.com
You are using MySQL? Try switching the text encoding from whatever it is to UTF-8 On Dec 11, 1:57 pm, fabio 3bi...@gmail.com wrote: Hello mates, just an update... I've partially solve the thing by substituting the form-helper comand: echo $form-input('description_long', array('rows'='10',

Re: Use of Multiple Fields in $displayField var in Models

2009-12-09 Thread j0n4s.h4rtm...@googlemail.com
As an example for multiple displayField, this is how I change (e.g. translate) my displayField for my Gender dropdowns. http://github.com/ionas/sna/blob/master/www/app/app_model.php#L12 http://github.com/ionas/sna/blob/master/www/app/models/gender.php#L10 Skip the translation part by removing

Re: containable find not ordering

2009-12-05 Thread j0n4s.h4rtm...@googlemail.com
try to place the order in the outside array parts like this http://github.com/ionas/sna/blob/master/www/app/controllers/messages_controller.php#L66 ($just imagen $this-paginate to be your second find() param.) On Dec 5, 11:33 pm, Marcelo Andrade mfandr...@gmail.com wrote: Hi there, I'm using

Re: How to combine two views

2009-12-05 Thread j0n4s.h4rtm...@googlemail.com
You do not even have to use elements. Just call the views from your action to enable all the $this-set() calls, and include the views via $this-element('../controllername/viewname.ctp'), you could also use. This is how I do it, in my example I show registration and login view next to each other:

Re: How to combine two views

2009-12-05 Thread j0n4s.h4rtm...@googlemail.com
p.s. I am using elements here but you can just use php's require() or include() On Dec 6, 4:17 am, j0n4s.h4rtm...@googlemail.com j0n4s.h4rtm...@googlemail.com wrote: You do not even have to use elements. Just call the views from your action to enable all the $this-set() calls, and include

Re: What to use (Component? Helper?) for methods used in both controller and view

2009-12-02 Thread j0n4s.h4rtm...@googlemail.com
a.) Write both, Component and Helper, try to wrap Component methods from your helper. b.) Look at the Set:: or Inflector:: class, what they extend, where they are in core cake, how they get loaded while a cake app runs - implement it similar! c.) Whatever you do, most likely (there are exceptions,

Re: Delete confirm

2009-12-02 Thread j0n4s.h4rtm...@googlemail.com
A mostly working solution[1][2], that you can see here: http://github.com/ionas/sna/blob/master/www/app/app_controller.php#L11 http://github.com/ionas/sna/blob/master/www/app/app_error.php http://github.com/ionas/sna/blob/master/www/app/views/errors/possible_csrf_attack.ctp

Re: releted select

2009-12-02 Thread j0n4s.h4rtm...@googlemail.com
With Model-recursive you can just use associations and fetch data. See http://book.cakephp.org/view/82/hasMany in your ClientsController just do $this-set('clients', $this-Client- find('first', array('conditions' = array('Client.id' = $id; In your clients/view.ctp debug($clients); On Dec 1,

Re: Security component woes

2009-12-02 Thread j0n4s.h4rtm...@googlemail.com
Dump our beforeFilter (AppController and UsersController) On Dec 1, 6:20 pm, designv...@gmail.com designv...@gmail.com wrote: Hi all, I have the Security component enabled in my users controller and its adding the tokens into my register form and I am viewing it via HTTPS, however the form

Re: beforeSave vs beforeValidate

2009-12-02 Thread j0n4s.h4rtm...@googlemail.com
Check what those methods have to return, at least(maybe both) one of them (I think it was beforeSave) has to return true; On Dec 1, 10:46 pm, naidim nai...@gmail.com wrote: Sorry, I meant to say the code is in the user MODEL not controller. Check out the new CakePHP Questions site

Re: Social Portal Demo developed in Cakephp

2009-12-01 Thread j0n4s.h4rtm...@googlemail.com
am interested in the vulnerable side and ways to fix this. Thanks for feedback and suggestions. :) On 30 Nov., 11:48, j0n4s.h4rtm...@googlemail.com j0n4s.h4rtm...@googlemail.com wrote: Hello, my suggestions are: - clean your code from outcommented waste/old stuff

Re: Social Portal Demo developed in Cakephp

2009-11-30 Thread j0n4s.h4rtm...@googlemail.com
Hello, my suggestions are: - clean your code from outcommented waste/old stuff (its just much) - use cake's ORM instad of query() - use cake errors or session-setFlash instead of render('errors/ blah') - docblocks make no sense if you do not describe the usage of the method or the meaning of the

Re: Multiple SUM in query

2009-11-28 Thread j0n4s.h4rtm...@googlemail.com
See: http://book.cakephp.org/view/74/Complex-Find-Conditions CTRL+F: How about GROUP BY? on that page. See the MIN() usage, I'd just try to use it twice (and SUM instead of MIN) On Nov 29, 2:13 am, Dave davidcr...@gmail.com wrote: They really let you use PHP Frameworks for your homework? On

Re: Most concise and complete Recursive Association Support in CakePHP?

2009-11-27 Thread j0n4s.h4rtm...@googlemail.com
1. recursive should be -1 and I would not recommend any other setting 2. besides containable there is linkable (siee github) 3. complex find conditions with joins are another option, not very ORMish but speedy and working On Nov 26, 7:19 pm, jburns jeremybu...@me.com wrote: Unless I haven't

Re: Play Audio in PHP

2009-11-25 Thread j0n4s.h4rtm...@googlemail.com
If you want to build an audio streaming server, maybe, but I would look at quicktime streaming server or shoutcast or something like that, then. Just use a flash or audio based solution http://dev.w3.org/html5/spec/Overview.html#audio http://www.google.com/search?hl=enq=flash+audio+player

Re: Setting form action to something like /Accounts/Manage/?var=b73cr6xzr6zvar2=somethingelse

2009-11-25 Thread j0n4s.h4rtm...@googlemail.com
Afaik internally HtmlHelper::link as well as Controller::redirect as well as Form::create all use Router::url. See: http://book.cakephp.org/view/836/link http://book.cakephp.org/view/842/url http://book.cakephp.org/view/186/options-url On Nov 25, 2:46 pm, Ragnis ragnis.ar...@gmail.com wrote:

Re: CakePHP performance 1.2 - is future any better?

2009-11-23 Thread j0n4s.h4rtm...@googlemail.com
- Clone all of your application files/code (anything besides /app/ webroot but including /app/webroot/index.php) to a ram based file system on your *nix host. - Try lazyloader: http://github.com/mcurry/lazy_loader - Never use recursive -1, make sure containable does not do multiple queries, if it

Re: requireAuth not working as expected (Security Component)

2009-11-23 Thread j0n4s.h4rtm...@googlemail.com
This helped me, thanks! On Nov 23, 4:32 pm, Amit a...@amitvaria.com wrote: So I'm still learning the Security Component but here's one suggestion. Put the following in your app_controller.php or specific controlle: if(!empty($this-data)) {  $this-Security-requirePost('add');  

Re: Delete confirm

2009-11-14 Thread j0n4s.h4rtm...@googlemail.com
Another possibility is adding delete links within a form that has method = post, check the request method (if its POST) on the action as well. in addition: give that form a class and css stylize it down to a link (though why not keep it a button, buttons = post, links = get paradigm works well

Re: Delete confirm

2009-11-14 Thread j0n4s.h4rtm...@googlemail.com
Nevermind, AD7six post explains it well and very better (and included my note, but post alone seems not to be sufficient anyway) On Nov 14, 1:27 pm, j0n4s.h4rtm...@googlemail.com j0n4s.h4rtm...@googlemail.com wrote: Another possibility is adding delete links within a form that has method = post

Re: Displaying data from unrelated models

2009-11-14 Thread j0n4s.h4rtm...@googlemail.com
Try ClassRegistry::init('Post'); On Nov 14, 7:55 am, Dr. Loboto drlob...@gmail.com wrote: Marcelo is wrong totally. App::import only include model file but not create and initialize model for you as loadModel will do. On Nov 14, 6:10 am, Scott Dahl scottmd...@gmail.com wrote: Marcelo,

Re: Re-usable registration and login plugin?

2009-11-11 Thread j0n4s.h4rtm...@googlemail.com
In relation to this. I am also interested in general approaches into modularity. Having user account management is one thing, profiles another, shouts a third, messaging is one and so on. On Nov 11, 2:06 am, Al al.scheur...@gmail.com wrote: Hi All, I've used Auth on several applications and

Re: Hot out of the oven CakePHP 1.3 alpha

2009-11-05 Thread j0n4s.h4rtm...@googlemail.com
Awsome. On Nov 4, 6:28 am, mark_story mark.st...@gmail.com wrote: The CakePHP development team is happy to release the alpha build of CakePHP 1.3.  We've been hard at work improving upon the already great 1.2 and implementing new features to ease development and increase the flexibility of

Re: How to prevent Cross Site Foreign Script Attacks on your actions.

2009-11-03 Thread j0n4s.h4rtm...@googlemail.com
and then perform the add friend logic. On Nov 2, 8:44 am, Jonas Hartmann j0n4s.h4rtm...@googlemail.com wrote: Given someone mails you a link with html images that tries to fetchhttp://domain.tld/users/add_friend/5   - now the user is logged into a web client that fetches that URL. How do you

Re: Framework for existing database and complicated joins Click to flag this post

2009-11-02 Thread j0n4s.h4rtm...@googlemail.com
My idea: You can encapsulate complex writes by modifing your function save() of models you create and you can encapsulate complex reads by creating SQL VIEWS. Other than that: 100 tables? for what? Clean database design based on an ERD does NOT depend on applications running ORM-Layers or in MVC-

Re: Cake and PHP5/PHP6, Base URL in Controllers and FIND QUERY with OR

2009-11-02 Thread j0n4s.h4rtm...@googlemail.com
You probably did not understand SQL / IN. FOO IN (1,2,3) means FOO can be 1 OR 2 OR 3 or to express it other ways FOO is contained in the list afterwards. While I am not sure which is faster and what the internal differences are, the result (should be) is the same. I am not sure if you can

Re: How to retrieve validation errors on model save?

2009-10-31 Thread j0n4s.h4rtm...@googlemail.com
If you are correctly validating within the model, add this to your app_model.php file: function validates($options = array()) { // Debug validation $errors = $this-invalidFields($options); if (is_array($errors) !empty($errors)) {

Re: How to: A user logs in from a second location and the first location's session gets killed?

2009-10-29 Thread j0n4s.h4rtm...@googlemail.com
them out. So if A logs in and has a token, hell be fine. Once B logs in, a new token is created nad logged in the database. A will be logged out since his token does not match the DB one. B will be ok. On Oct 28, 9:48 am, j0n4s.h4rtm...@googlemail.com j0n4s.h4rtm...@googlemail.com wrote: Hi

How to: A user logs in from a second location and the first location's session gets killed?

2009-10-28 Thread j0n4s.h4rtm...@googlemail.com
Hi, the subject essentially asks the whole question already. How did you detect that a user logs in from a second location, and kick him from the first location? The first location should display a warning on the next action that requires to be logged in like You have been logged out

Re: How to pass custom urls to pagination methods

2009-10-26 Thread j0n4s.h4rtm...@googlemail.com
To answer it anyway, not sure if its the best way but: In your View: ?php $paginator-options(array('url' = $this-passedArgs))? On Oct 25, 11:30 pm, BeerMan garej...@gmail.com wrote: Oh problem solved. nevermind. thx anyways.. On Oct 25, 3:01 pm, BeerMan garej...@gmail.com

Re: CakePHP design tips?

2009-10-26 Thread j0n4s.h4rtm...@googlemail.com
Recently I began of thinking to separate certain functionality in some way. On a first glance there is: - Helpers - Components - Behaviors But you can also use plugins to bundle some functionality. Did any of you try multiple apps side by side (lets say /app1 and / app2) and using a proxy app

Re: which CMS should i use?

2009-10-24 Thread j0n4s.h4rtm...@googlemail.com
Next time I need something I am going to try baked simple http://github.com/morrislaptop/baked_simple On Oct 24, 9:34 am, jacmoe jac...@mail.dk wrote: A framework allows you to create applications with ease. A CMS is an application - so I really don't see the redundancy. :) In fact, since a

Re: creating layout with multiple view

2009-10-21 Thread j0n4s.h4rtm...@googlemail.com
for my layout building (same layout, some variations) i use the magic require php command ;), no need for elements there imho. On Oct 20, 6:33 pm, kamiseq kami...@gmail.com wrote: ok, Ill try that as well, thanks On 20 Paź, 15:16, m-e- m...@ifrance.com wrote: On 20 oct, 14:42, kamiseq

Re: Design Pattern == Erroneous?

2009-10-20 Thread j0n4s.h4rtm...@googlemail.com
I would not want to break the basic MVC paradigm because I just can, though I admin thinking about live validation (of form fields) to add some additional php file like ajax.php which handles some model construction and validation checking without ever running a full cake stack. Besides that I

RequestAction: how to pass form data, form errors and paginate url options FROM along

2009-10-05 Thread j0n4s.h4rtm...@googlemail.com
Hello, I have a ProfilesController that got an action view and a ShoutsController that got the actions index and shouts // In ProfilesController function view($id = null) { if (!$id) { $this-Session-setFlash(__('Invalid Profile.', true));

Re: RequestAction: how to pass form data, form errors and paginate url options FROM along

2009-10-05 Thread j0n4s.h4rtm...@googlemail.com
First of all thanks for your efforts, then I have to add that I want direct calls to work so all three should work: a.) /profiles/view/5 b.) /shouts/shout_to/5 c.) /shouts/index a.) should just include b.) and c.) without code duplication... and that's why I went for requestAction. If I cannot

Re: JS/CSS automatic concatenation and compression

2009-10-04 Thread j0n4s.h4rtm...@googlemail.com
Hello, my design idea would be like sql transaction control. This is how you hack helpers for additional features: http://cakebaker.42dh.com/2008/11/07/an-idea-for-hacking-core-helpers/ Now the result would look something like this: Before: ?php echo $html-css('cake.generic')?

Re: Password field is automatically hashed, how to change this?

2009-10-03 Thread j0n4s.h4rtm...@googlemail.com
I am not sure, but I remember something around here solved that: http://teknoid.wordpress.com/2008/10/08/demystifying-auth-features-in-cakephp-12/ http://book.cakephp.org/de/view/384/hashPasswords On Oct 1, 7:56 am, Mukhamad Ikhsan ikhsan.o...@gmail.com wrote: I have a password field that when

Re: CakePHP and scalability

2009-09-21 Thread j0n4s.h4rtm...@googlemail.com
In general, besides the noted tips: - Take a look at lazyloader/lazyloading models - Do not use Model-recursive 0, use Containable. You might look into Translateable as well - DEBUG sql outputs, see where the heavy load is happening. On Sep 21, 9:56 am, marco.rizze...@gmail.com

Re: CakePHP and scalability

2009-09-21 Thread j0n4s.h4rtm...@googlemail.com
While not having much of experience with scaling, scaling the DB by using InnoDB + UUIDs and Replication should not be a huge Problem. What I would do for the application is adding a proxy that redirects like www1.domain.tld www2.domain.tld and so on, though I have no knowledge about

Re: $model-find(list) and concatenated fields

2009-09-19 Thread j0n4s.h4rtm...@googlemail.com
In general, you can use displayField for some magic. 1. In your afterFind you can create a virtual field of those 3 values 2. You can set your displayField to that 3. If you want a more low level solution, try SQL VIEWS and CONCAT (for mysql) Disclaimer: I did not try the latter, but it should

Re: Highlight Author Comment

2009-09-19 Thread j0n4s.h4rtm...@googlemail.com
Use cake bake. On the output of cake bakes comments/index.ctp find the table loop and within that table loop you have to do that comparison like $post['Post']['user_id'] == $comment['Comment']['author_id'] On Sep 18, 3:29 pm, Simon simon_d...@hotmail.com wrote: is there sombody help here please

Re: Isseu with beforeFind($queryData) in Behaviors

2009-08-14 Thread j0n4s.h4rtm...@googlemail.com
Be aware of this bug when using beforeFind in a behavior to to permission stuff: https://trac.cakephp.org/ticket/2056 If you really want to do such things. To it in afterFind with array filtering (see Set:: and array_) Have fun and good luck. On Aug 13, 2:14 pm, subnoodle

Re: Release: 1.2.4 and 1.3-dev

2009-08-05 Thread j0n4s.h4rtm...@googlemail.com
Thank you so much! On Aug 4, 12:58 am, Gwoo gwoo.cake...@gmail.com wrote: The CakePHP development team is happy to announce the release of two new versions. Firstly, CakePHP 1.2.4[1] is a bug fix release of the latest stable branch. Check the changelog[2] for all the changes. Also, we have

Re: index.php of cakephp's core

2009-08-02 Thread j0n4s.h4rtm...@googlemail.com
index.php on the root level of cake should never be called instead / app/webroot/index.php should be called. See: http://book.cakephp.org/view/333/A-Note-on-mod_rewrite In addition you must set your Apache to automatically launch index.php. Normally there is index.html index.shtml index.php

Re: Free Cake Ebook : How to build your own blog from scratch

2009-07-30 Thread j0n4s.h4rtm...@googlemail.com
Can't you all be a little nicer towards each other? :/ Its great to have non-English tutorials around. There is not non- English group. It would make sense to prefix your initial posting with [lang] or [lang-LANG] - that way it won't disturb others. I mostly disagree with euromark. One thing he

Re: call function from .ctp file in cakephp1.2

2009-07-21 Thread j0n4s.h4rtm...@googlemail.com
Issac is right. In General: Use requestAction and Elements Use an existing Cake Helper Create a custom Helper On Jul 21, 4:05 am, Isaac Raja isaacr...@gmail.com wrote: Please mention what you are trying to achieve; we can find a better way to do it. Isaac On Tue, Jul 21, 2009 at 2:49 AM,

Re: EAV (Entity-Attribute-Value) Data Model with CakePHP

2009-06-16 Thread j0n4s.h4rtm...@googlemail.com
PolymorphicBehavior and one or multiple Attributes models that you bind to every model you need to. Just my thought. On Jun 15, 11:39 pm, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Hi I must use a EAV schema for my web app but I have no idea about how realizate this in cake? I

Re: How manage triple relation between Model in CAKEPHP?

2009-05-16 Thread j0n4s.h4rtm...@googlemail.com
Like this?: Message HasOne User (From) Message HasOne ToUser (To) Message HasOne CcUser (Copy) In message.php: var $belongsTo = array( 'User' = array( 'className' = 'User', 'foreignKey' = 'user_id',

Re: Not fully understanding associations. Id showing instead of name.

2009-05-16 Thread j0n4s.h4rtm...@googlemail.com
Is the name field a varchar255 not null or tinytext? Try using cake bake to create your starting environment and work from there On May 15, 5:38 pm, number9 xpozit...@gmail.com wrote: Actually I tried displayfield earlier when I was searching, but it didn't work, presumably because: The model

Re: Routes regarding - e-book by Matt Curry

2009-05-15 Thread j0n4s.h4rtm...@googlemail.com
I didn't work with it yet but afaik 'prefix' = 'admin' On May 15, 12:57 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: In the section regarding the add / edit functions in 1 he has the routes Router::connect('/:controller/add', array('action' = 'edit')); How would you

Re: Default value of INT NOT NULL fields

2009-05-10 Thread j0n4s.h4rtm...@googlemail.com
My suggestion, as far as I understood you, cakephp inserts NULL instead of '0' right? Set your database to default '0' as it should work. - If it does not add function beforeSave() { /* ... */ } to your YourModelWithLotsOfInts - Within that check if a variable is a.) or empty or NULL or

Re: Poll: what do you hate about CakePHP?

2009-05-08 Thread j0n4s.h4rtm...@googlemail.com
BIG HATRED: ++1 @ Park/dr. Hannibal Lecter: Ignoring callbacks on associative queries (See also the associated ticket: https://trac.cakephp.org/ticket/2056 ) That ticket should have high severity and priority Hoping for: + var $displayField only taking one field. Better would be something

Re: Release: 1.2.3.8166

2009-05-05 Thread j0n4s.h4rtm...@googlemail.com
Wow you are fast. And its on the spot. I just released a customer application with SVN head 2 days ago :) Thank you so much! On May 5, 3:52 am, jperras joel.per...@gmail.com wrote: On May 4, 6:20 pm, Brett Wilton bdwil...@gmail.com wrote: Thanks gwoo and all the dev. To find out about

Re: user status enum

2009-05-04 Thread j0n4s.h4rtm...@googlemail.com
Hello, generally: I was looking for enum too for use types. You can use Has One relationships to extend users by types as well. (User HasOne Admin, User HasOne SuperUser, User HasOne Customer, User HasOne Client) Besides that, if you can/want to work with a boolean switch (is_admin TINYINT 1

Re: Trying to Understand the Containable Behavior

2009-05-04 Thread j0n4s.h4rtm...@googlemail.com
First of all, at least to me, you will either have to use Polymorphic Behavior OR you cannot use foreignKey but need to use multiple FKs per model. Following example would NOT use polymorphic (but some FKs being NULL instead) - it uses one FK per model that is bound to Alert. Account HasMany

Re: Trying to Understand the Containable Behavior

2009-05-03 Thread j0n4s.h4rtm...@googlemail.com
Hello Rob, I am not sure, but I think Polymorphic Behavior might help you. It is on the bakery. You can bind that one model dynamically to other models by specifying it category (called class). I am not sure but I do not see why it should not work with containable. I'd frist try to use complex

Re: Help using special character #171; in paginator

2009-05-03 Thread j0n4s.h4rtm...@googlemail.com
For me putting real UTF-8 characters in worked as well: → for instances (thats rarr;) On a sidenote: I recommend moving pagination header and footer to elements btw :) On Mar 15, 7:54 pm, mklappen mklap...@gmail.com wrote: thanks! working now :) On Mar 14, 12:24 pm, brian bally.z...@gmail.com

Re: Auth ignoring Session, redirecting to login under heavy load.

2009-05-01 Thread j0n4s.h4rtm...@googlemail.com
: On Thu, Apr 30, 2009 at 5:04 AM, Jonas Hartmann j0n4s.h4rtm...@googlemail.com wrote: Hello, i have an issue with deploying my cake application. Running local on Mac OS X it works like charm. After uploading it to a Ubuntu based VHost on HostEurope I had some headaches with PLESK and its

Re: Auth ignoring Session, redirecting to login under heavy load.

2009-05-01 Thread j0n4s.h4rtm...@googlemail.com
, Apr 30, 2009 at 2:34 PM, Jonas Hartmann j0n4s.h4rtm...@googlemail.com wrote: Hello, i have an issue with deploying my cake application. Running local on Mac OS X it works like charm. After uploading it to a Ubuntu based VHost on HostEurope I had some headaches with PLESK and its

Re: Using several views for same controller function

2009-04-29 Thread j0n4s.h4rtm...@googlemail.com
Also take a look at element() and requestAction() On Apr 28, 2:25 pm, Paco Gomez paco.gomez.ar...@gmail.com wrote: Thank you every body, Yes, I didn't explain very well what I want to do but with $this- render('the_view'); solution I've resolved my question. Bye On 28 abr, 11:00, John

Re: Problems with Translate Behaviour in Firefox and Internet Explorer (country code)

2009-03-25 Thread j0n4s.h4rtm...@googlemail.com
I'd do the following: - look up standards for language and region selectors (those are probably more en-GB and de-DE and en-US and so on than what IE does, but google should help) - decide what you want to use internally then - if you want automatic selection - create an appcontroller function

Re: Firefox Search Engine Plug-In

2009-02-11 Thread j0n4s.h4rtm...@googlemail.com
Thanks both of you. Do not fight. Thanks for contributions, helps a lot. --~--~-~--~~~---~--~~ 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

Re: BeforeFind

2009-02-02 Thread j0n4s.h4rtm...@googlemail.com
This /could/ be related to https://trac.cakephp.org/ticket/2056 On Feb 2, 2:40 am, Fred fb...@multiply.it wrote: Thanks...that is very helpful. One thing to note it looks like the children method of a tree doesn't support callbacks of false (line 275 of tree.php has only to recursive on the

Re: behaving the CakePHP 1.2 way

2009-01-29 Thread j0n4s.h4rtm...@googlemail.com
I did not try this yet, but this should help you, right?: http://teknoid.wordpress.com/2008/10/08/demystifying-auth-features-in-cakephp-12/ p.s. I believe the whole thing is because AuthComponent is AuthComponent and not AuthBehavior. If it came with such a thing it would be more clear (because

  1   2   >