Re: the Gift of 1.2 Final

2008-12-26 Thread j0n4s.h4rtm...@googlemail.com
THANK YOU! :) --~--~-~--~~~---~--~~ 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...@googl

Re: HTML 4 specific CakePHP?

2008-12-28 Thread j0n4s.h4rtm...@googlemail.com
Just one question, because the thread opener has a point (XHTML and HTML4 both have their benefits as HTML5 will probably have but XHTML2 seems not going to have): Is there a CakePHP global way to define output type (XHTML 1.0, 1.1 HTML 4, all 3 strict, transitional, frameset) - if not, it is jus

Re: HTML 4 specific CakePHP?

2008-12-30 Thread j0n4s.h4rtm...@googlemail.com
You are right Ralph, but first I have to have a working CakePHP application that actually get's used. If that is the case I will aim for HTML 4 STRICT (and later on HTML 5 STRICT or LOOSE let's see) and having website/ application quality in mind I will for sure be remembered on this thread by th

Re: Problem with auth component

2008-12-31 Thread j0n4s.h4rtm...@googlemail.com
if I understood the thread opener he wants to have an automagical redirect to the login page after x min of inactivity by the user where x is the SessionTimeout. If you want that, I do not think CakePHP does it. Typo3 for instance does that (and it is very annoying being a developer to have that f

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

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 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 find, but no cal

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 f

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 t

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 wrote: > is there sombody help here please   thank you im really

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" wrote: > Hi

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 implementatio

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 wrote: > I have a password field that when submiting, the value

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: css('cake.generic')?> css('app.gener

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: Having a couple of problems using recursive = 1

2009-10-17 Thread j0n4s.h4rtm...@googlemail.com
In addition set recursive to -1. Automagical fechting of related models is well, something for scaffold and testing, nothing for production applications imho. Its slow. See Containable (or contains) as mentioned above, Linkable (on GitHUB) or Complex Find Conditions (with "joins") to fetch deep ass

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 won

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 wrote: > ok, Ill try that as well, thanks > > On 20 Paź, 15:16, m-e- wrote: > > > On 20 oct, 14:42, kamiseq wrote: > > > > ok but you thi

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 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 CMS tends to

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: options(array('url' => $this->passedArgs))?> On Oct 25, 11:30 pm, BeerMan wrote: > Oh problem solved. nevermind. thx anyways.. > > On Oct 25, 3:01 pm, BeerMan wrote: > > > Just to be clear on my problem, for e

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 (i

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 automatica

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"

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: 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 en

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

2009-11-03 Thread j0n4s.h4rtm...@googlemail.com
I don't entirely understand. How could I fill up $_POSTS by using $html->link? On Nov 3, 12:32 am, Miles J wrote: > Well in most cases then not, if your on, says a users profile, you > would submit to that page. Within that page you would check if a > $_POST exists and then perform the add frien

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 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 CakePHP.  There ha

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 wrote: > Hi All, > > I've used Auth on several applications and have learned a lot

Re: Delete confirm

2009-11-14 Thread j0n4s.h4rtm...@googlemail.com
Another possibility is adding delete links within a 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 too)

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" wrote: > Another possibility is adding delete links within a that has > method = post, > check

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" 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 wrote: > > > Marcelo, > > > Thanks for the update.  I wa

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 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'); >  $this->Security->requi

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 based solution http://dev.w3.org/html5/spec/Overview.html#audio http://www.google.com/search?hl=en&q=flash+audio+player http://www.

cake-php@googlegroups.com

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 wrote: > But how can i use it in

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 wrote: > Unless I haven't understood your requir

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 wrote: > They really let you use PHP Frameworks for your homework? > > On Sat, Nov 28, 2009

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: Social Portal Demo developed in Cakephp

2009-12-01 Thread j0n4s.h4rtm...@googlemail.com
> base general code and I am trying to improve it. Especially I 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" > >

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 http://github.com/ionas/

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

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" 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 never submits,

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 wrote: > Sorry, I meant to say the code is in the user MODEL not controller. Check out the new CakePHP Questions site http://cakeqs.org and help

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 wrote: > Hi there, > > I'm using containable to ge

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" wrote: > You do not even have to use elements. Just call the views from your > action to enable all the $this->set() calls, and inclu

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 the

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'=>

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 wrote: > Hi there, > > I have to share the same Javascripts and CSSs for various layouts so I > created a

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. t

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 p

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: 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: 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 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 Andersen wrote: >

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

2009-05-01 Thread j0n4s.h4rtm...@googlemail.com
(you can find this in > app/config/core.php in 'Security.level' setting)? If it's 'high' then try > after changing it to 'medium' or 'low' > > Amit > > http://amitrb.wordpress.com/http://coppermine-gallery.net/http://cheesecake-phot

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

2009-05-01 Thread j0n4s.h4rtm...@googlemail.com
Hello Brian, about PLESK: 1. Your DOCUMENT ROOT will be something like /var/www/domains/ domain.tld/httpdocs you will need to change that via ssh for instance. You can do that multiple ways but the PLESK way is to go to /var/www/ domains/domain.tld/conf/ and add vhost.conf there which only has D

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

2009-05-01 Thread j0n4s.h4rtm...@googlemail.com
cheesecake-photoblog.org/http://www.sanisoft.com/blog/author/amitbadkas > > On Thu, 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 > &g

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 f

Re: Help using special character « in paginator

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

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 UNSI

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 C

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 wrote: > On May 4, 6:20 pm, Brett Wilton wrote: > > > Thanks gwoo and all the dev. > > > To find out about the 1.3 features and to keep up wit

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 lik

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 wha

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" 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 configure this for t

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 wrote: > Actually I tried displayfield earlier when I was searching, but it > didn't work, presumably because: "The model will use name or

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" wrote: > Hi > I must use a EAV schema for my web app but I have no idea about how > realizate this in cake? > I have a table with

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 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, Marcelo Andrad

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 m

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: 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 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 made CakePHP 1.3.0-d

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 wrote: > Hello, > i'd

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: 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 (interna

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 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 wrote: > > >

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 P.s. in app/config/boostrap.php I have function ___($string) { return __($string, true); } Check out the new CakePHP Questions site http://cakeq

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: http://github.com/i

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 too

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 detectin

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 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 hurt to try it out. A

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 beh

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) operat

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 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, you can un

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" wrote: > No, I need these pages to be d

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) Permissonabl

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: 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 wrote: > Thanks, to all. > > Worked with App::Import > > On 29 Jan., 08:55, "j0n4s.h4rtm...@googlemail.com" &g

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 wrote: > The CakePHP development team is happy to announce CakePHP 1.2.6[1]. > 1.2.6 is a bug fix release of the la

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 i

Re: Let's get rid of The Bakery

2010-04-05 Thread j0n4s.h4rtm...@googlemail.com
+1 disable comments for now. 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

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 wrote: > However, you don't need a controller pe

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 Groups

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) - but

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 wrote: > Yeah, you're right. > The beforeFilter could update a user last action session variable with > a timestamp. > I wo

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 Push&Pull 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 CakePH

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

  1   2   >