Re: Ensuring uniqueness on application level

2010-11-05 Thread Jeremy Burns | Class Outfit
unique] key floating around twice - that is a nightmare waiting to happen. If you are using soft delete is suggests that someone can soft undelete - what happens if that produces a clash with another undeleted id? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com

Re: Does every model really need a "name" field? --psybear

2010-11-04 Thread Jeremy Burns | Class Outfit
akephp.org/view/1014/Titles for more info. I prefer to stick to a name field as Cake drives convention. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Nov 2010, at 08:18, Joshua Muheim wrote: >> Is this what you mean?? > > I guess not really.

Re: Does every model really need a "name" field? --psybear

2010-11-04 Thread Jeremy Burns | Class Outfit
Interesting question - what's your fear of model names? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Nov 2010, at 08:11, psybear83 wrote: > Hi everybody > > A collegue told me some time ago, that every CakePHP model needs a > &q

Re: Acl and bindNode

2010-11-03 Thread Jeremy Burns | Class Outfit
I'm still really hoping that someone with some inside knowledge can shed a light on this for me. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 1 Nov 2010, at 07:24, Jeremy Burns | Class Outfit wrote: > Because the users table has a group_

Re: Select Box Values

2010-11-02 Thread Jeremy Burns | Class Outfit
In your find('list') function you have specified the fields to use, and you have only given one field; 'location'. Try changing that to: array('id', 'location') so that you have two columns; id & location. Jeremy Burns Class Outfit jeremybu...@clas

Re: Acl and bindNode

2010-11-01 Thread Jeremy Burns | Class Outfit
Because the users table has a group_id on it. Duh. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 31 Oct 2010, at 14:48, huoxito wrote: > Guess I dont get your point. > > Users still must de added on Aro's table, otherwise how would your >

Re: Sent mails don't arrive in Outlook Exchange mailboxes!

2010-10-29 Thread Jeremy Burns | Class Outfit
t them. It seems as if it is a problem outside of Cake/PHP and more likely an internal mail server issue. We are trying to track this one down at the moment and I will feedback anything we discover. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 29 Oct 2010

Re: Acl and bindNode

2010-10-29 Thread Jeremy Burns | Class Outfit
Anybody else got any more ideas on this? Anyone using it with success? Jeremy Burns Class Outfit jeremybu...@classoutfit.com (t) +44 (0) 208 123 3822 (m) +44 (0) 7973 481949 Skype: jeremy_burns http://www.classoutfit.com On 27 Oct 2010, at 17:10, Jeremy Burns | Class Outfit wrote: > I w

Re: Strange Session problem

2010-10-29 Thread Jeremy Burns | Class Outfit
Are you switching between http and https at any time? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 29 Oct 2010, at 05:52, Squire wrote: > Hi > > I've just encountered a really strange problem on one of our > production sites. Thi

Re: Deeper User Info

2010-10-28 Thread Jeremy Burns | Class Outfit
I've tried a few ways of doing that and the only success I had was adding extra keys to the Auth->user array after the user logs in, which means it'll be available thereafter. I'd be interested to know if there is a better way. Jeremy Burns Class Outfit jeremybu...@cl

Re: Acl and bindNode

2010-10-27 Thread Jeremy Burns | Class Outfit
I wish that were the case, but the guide then gives an example of the aros table, which only includes groups: http://book.cakephp.org/view/1547/Acts-As-a-Requester Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 27 Oct 2010, at 13:41, cricket wrote: >

Acl and bindNode

2010-10-26 Thread Jeremy Burns
According to the online tutorial: " In case we want simplified per-group only permissions, we need to implement bindNode() in User model. Code View function bindNode($user) { return array('Group' => array('id' => $user['User']['group_id'])); } function bindNode($user) { return array

Re: Fake Model / Table

2010-10-26 Thread Jeremy Burns | Class Outfit
That's pretty much what I'd do. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 26 Oct 2010, at 16:10, Dave Maharaj wrote: > How do you make a fake table. I need a select input which has 5 options (0-5, > 5-10, 10-15, 15-20, 20+) as optio

Re: Delete from model not working

2010-10-26 Thread Jeremy Burns | Class Outfit
Do you have referential integrity set up? If so, are there other records that are dependent upon this one? What happens if you try and delete the record directly in the database? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 26 Oct 2010, at 14:18, cricket

Re: Build Query

2010-10-25 Thread Jeremy Burns | Class Outfit
Are you certain you have a row in your database that matches that criteria? The SQL looks right, but the count is zero. What happens when you run the SQL directly against the database? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 25 Oct 2010, at 13:46

Re: Build Query

2010-10-25 Thread Jeremy Burns | Class Outfit
Do you have a field named 'location' or is it 'name'? If it's name, you'd need to do findAllByName. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 25 Oct 2010, at 13:30, Briko03 wrote: > Any idea why this wouldn'

Re: getting a blank page

2010-10-24 Thread Jeremy Burns | Class Outfit
Have you set debug to 2 in /app/config/core.php? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 24 Oct 2010, at 04:34, ravidp wrote: > by the way, > > if i run this query on phpmyadmin, it works fine returns about > 200,000 results. > >

Sessions and http/https

2010-10-22 Thread Jeremy Burns
I can see lots of activity on this subject, but no clear working answer; so excuse me if it's a broken record. My users log in via an https page. They are logged in and the Auth session variable is set. If they now go to an http page I would expect them to still be logged in, but they are not. I

Re: $this->Author->set(...)/find(...) creates other $data array than the one a form creates (case of the keys)

2010-10-20 Thread Jeremy Burns | Class Outfit
Or you could just use a virtual field in the model? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 20 Oct 2010, at 14:48, psybear83 wrote: > Hi everybody > > I just stumbled over the following problem. > > I have a method concatName() i

Re: How to use a controller for layout logic?

2010-10-20 Thread Jeremy Burns | Class Outfit
Use the Containable behaviour. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 20 Oct 2010, at 12:59, ravidp wrote: > Hi, > > I need to paginate data from table connected across 3 levels (a->b- >> c). > The thing is, recursive = 2

Re: So methods that are not an action should have a "_" in front of it?

2010-10-19 Thread Jeremy Burns | Class Outfit
Are you rewriting Cake, PHP or just building your own stuff? ;-) Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 19 Oct 2010, at 16:37, Joshua Muheim wrote: > Yeah I knew that, but still IMHO they should have been named with a "_" > pref

Re: Easiest way to get data from a model (better way than $model->data['modelname']['field'])?

2010-10-19 Thread Jeremy Burns | Class Outfit
I hate to be contrary, but I disagree. Whatever else you come up with would be great for some, awkward for others. It works and I think it's very precise. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 19 Oct 2010, at 16:34, Joshua Muheim wrote: >

Re: Easiest way to get data from a model (better way than $model->data['modelname']['field'])?

2010-10-19 Thread Jeremy Burns | Class Outfit
change the join type in your model and all of your finds and so on will still work. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 19 Oct 2010, at 14:59, Joshua Muheim wrote: > Maybe I don't really understand your point, but as far as I see that'

Re: need help

2010-10-19 Thread Jeremy Burns | Class Outfit
http://book.cakephp.org/view/907/Developing-with-CakePHP Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 19 Oct 2010, at 13:28, Sunil Chugh wrote: > steps to configure > Cake Console and Bake > > Check out the new CakePHP Questions site http:

Re: ACL and multiple groups

2010-10-17 Thread Jeremy Burns | Class Outfit
The permissions thing is a work in progress - eta 1 to 2 weeks. I haven't made a navigation plug in, but revisited it last week for a current project. When I've made the changes I need to I will create a plug in. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.class

Re: Database modelling

2010-10-16 Thread Jeremy Burns | Class Outfit
All users should belong to the same table and be differentiated by group_id, as you describe. You can then use prefix routing to manage permissions for each group: http://book.cakephp.org/view/950/Prefix-Routing Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com

Re: Newbie question - having trouble with baked model associations

2010-10-15 Thread Jeremy Burns | Class Outfit
See here: http://groups.google.com/group/cake-php/browse_thread/thread/7bfef9785d10d2d5 Jeremy Burns Class Outfit jeremybu...@classoutfit.com (t) +44 (0) 208 123 3822 (m) +44 (0) 7973 481949 Skype: jeremy_burns http://www.classoutfit.com On 15 Oct 2010, at 13:52, deafpanda wrote: > He

Re: Newbie question - having trouble with baked model associations

2010-10-15 Thread Jeremy Burns | Class Outfit
See here: http://groups.google.com/group/cake-php/browse_thread/thread/7bfef9785d10d2d5 Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Oct 2010, at 13:52, deafpanda wrote: > Hello, > > Sorry if this question is really stupid, I'm new t

Re: Another HABTM question

2010-10-15 Thread Jeremy Burns | Class Outfit
The join table has to be in alphabetical order, so try permissions_users. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Oct 2010, at 07:39, brybot wrote: > I've searched and looked through this group and the online > documentation for hou

Re: Is there an easy way to tell CakePHP to use another db setting instead of $default?

2010-10-15 Thread Jeremy Burns | Class Outfit
I have thought of doing something like before, but I can't help thinking that adding in a 'check which environment this is and change some settings' process is a tiny yet present overhead in the production instance. Maybe I'm just a coding skin flint ;-) Jeremy Burns Cl

Re: Is there an easy way to tell CakePHP to use another db setting instead of $default?

2010-10-15 Thread Jeremy Burns | Class Outfit
>From the 1.3 guide: http://book.cakephp.org/view/922/Database-Configuration Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Oct 2010, at 10:04, MissYeh wrote: > You can do that by setting the dbconfig in a specific model that needs > another db

Re: How to use a controller for layout logic?

2010-10-14 Thread Jeremy Burns | Class Outfit
http://articles.classoutfit.com/2009/11/cakephp-dynamic-navigation-bars/ Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 14 Oct 2010, at 10:15, ravidp wrote: > Hi, > > In my layout I have a menu which I want a part of it to be filled > dynamica

Re: Please Help : I Can't get data of both associated models that are being $hasMany and $belongsTo model

2010-10-13 Thread Jeremy Burns | Class Outfit
I'm blushing. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Oct 2010, at 16:38, Ashwani Kumar wrote: > Thanx jeremy, so much, for all the help you did for me. Sorry, I didn't tried > Containable, that you asked me to do earlier, b

Re: Framework benefit?

2010-10-13 Thread Jeremy Burns | Class Outfit
fact it's all probably an intellectual w*nk and a complete waste of time. My advice? Don't think about it too much, give it a go yourself and form your own opinion. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010, at 20:33, WW wrote: > H

Re: schema info in bake?

2010-10-13 Thread Jeremy Burns | Class Outfit
t the various variables in there. I'm sure there's more to learn. /cake/console/libs/tasks/ is where the variables are set. Have a look in view.php, for example. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Oct 2010, at 11:55, euromark wrote: >

Re: schema info in bake?

2010-10-13 Thread Jeremy Burns | Class Outfit
if ($schema[$field]['type'] == 'datetime'): Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Oct 2010, at 11:09, euromark wrote: > does anyone know how to use schema infos in the baking templates? > to be precise, in the views >

Re: Please Help : I Can't get data of both associated models that are being $hasMany and $belongsTo model

2010-10-12 Thread Jeremy Burns | Class Outfit
Remove $this->Book->recursive = 1; That line is effectively stopping any searches pat the Book model. Did you follow my other tip about Containable? A tip; instead of doing pre etc... just do debug($authors); Jeremy Burns Class Outfit jeremybu...@classoutfit.com (t) +44 (0) 208 123 3

Re: Please Help : I Can't get data of both associated models that are being $hasMany and $belongsTo model

2010-10-12 Thread Jeremy Burns | Class Outfit
on value (your first author) is pre-populated. You can also do: 'empty' => 'Please choose an author' Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010, at 17:59, Ashwani Kumar wrote: > Hi jeremy! Thanx for the reply. I delet

Re: Please Help : I Can't get data of both associated models that are being $hasMany and $belongsTo model

2010-10-12 Thread Jeremy Burns | Class Outfit
ation back too: $authors = $this->Author->find( 'all', array( 'contain' => array( 'Book' => array( 'Publisher' ) )

Re: CakePHP 1.3.4 Stable - Weird problem with sessions! HELP!

2010-10-12 Thread Jeremy Burns | Class Outfit
Are you using https? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010, at 14:04, 浪漫様 wrote: > In a normal world, the following code would work... you receive a > variable on your function, and you save it on a session, then the next > pag

Re: Auth's login is not working at all, nor displaying errror

2010-10-12 Thread Jeremy Burns | Class Outfit
I *think* that in 1.3+ you have to use $this->Session, but I am willing to be corrected. If you are on 1.2-, it probably won't make a huge difference. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010, at 13:20, Marco wrote: > @Jeremy &

Re: Model plurality issue/choice

2010-10-12 Thread Jeremy Burns | Class Outfit
Yes. Model names are singular, and Cake pluralises them where necessary. And, if you were a purist, the primary key would be 'id'. http://book.cakephp.org/view/901/CakePHP-Conventions Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010

Re: CakePHP without CLI for the Bake console

2010-10-12 Thread Jeremy Burns | Class Outfit
I'd say always do the development locally and then upload. You won't need access to the command line remotely. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010, at 10:19, Luis Miguel García wrote: > Hello, > > I'm in t

Re: .htaccess seems to give a problem

2010-10-11 Thread Jeremy Burns | Class Outfit
Things don't just go twang for no reason. What has changed? Have you upgraded your Cake version to 1.3.4? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Oct 2010, at 22:25, Sjiep wrote: > Hello, > > Since a short while I seem to have pro

Re: Auth's login is not working at all, nor displaying errror

2010-10-11 Thread Jeremy Burns | Class Outfit
To be precise, it's echo $this->Session->flash('auth'); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Oct 2010, at 13:31, Marco wrote: > I think you need to write: echo $session->flash('auth'); > > On O

Re: How to access Posted data

2010-10-11 Thread Jeremy Burns | Class Outfit
orial (http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application) which will help you through this. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Oct 2010, at 08:42, @gomesh wrote: > Hi everybody > > I have 2 models (User,Com

Re: Auth's login is not working at all, nor displaying errror

2010-10-10 Thread Jeremy Burns | Class Outfit
One small suggestion. Are you using 1.3? If so, refer to $this->Session rather than $session. At least you might get a message that could help track down the problem. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Oct 2010, at 01:18, Farhanx wr

Re: Convert Text to Images to Protect your Email from Search

2010-10-10 Thread Jeremy Burns | Class Outfit
With respect, you've been 'new to CakePHP' for six months now (I checked back through the email history). Isn't it about time you stepped up to the plate a bit like we all have to? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Oct 2

Re: Why is this SQL query so slow?

2010-10-08 Thread Jeremy Burns | Class Outfit
What are your indexes like on your table? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 8 Oct 2010, at 16:08, victor piousbox wrote: > I have a website with a bunch of articles. This is one of the queries > executed by I assume the Paginator: >

Re: What's your opinion: database views VS complex join conditions?

2010-10-07 Thread Jeremy Burns | Class Outfit
plex joins so I'd say you were leveraging its native power. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 8 Oct 2010, at 03:36, Michael T wrote: > Hi all, > > In attempt to solve a particular problem, I've tried a solution which > to m

Re: redirect not working

2010-10-06 Thread Jeremy Burns | Class Outfit
ssion flash: $this->Session->setFlash('Congratulations, your new account has been successfully created'); ...and then echo it out in the view you are sending them to: echo $this->Session->flash(); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.

Re: help to slove this

2010-10-06 Thread Jeremy Burns | Class Outfit
Cake ships with a default salt value. The salt value is used for encrypting passwords and the like. You are supposed to change it to something unique to your site. Change it in /app/config/core.php Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 6 Oct 2010

Re: Cakephp using flaot on part part of a website and removing it on another

2010-10-06 Thread Jeremy Burns | Class Outfit
Sounds like you need to set up a different layout file that has different div ids/classes, and then apply css appropriately. http://book.cakephp.org/view/1080/Layouts Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 20:27, ninja wrote: > H

Re: Fatal error: Out of memory - Even when there is no memory limit

2010-10-06 Thread Jeremy Burns | Class Outfit
ences between the servers. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 16:28, Fuitad wrote: > Hello, > > I'm in charge of transferring a live CakePHP application from one > server to another. I'm trying to get the new site

Re: Beginners question about adjusting views

2010-10-06 Thread Jeremy Burns | Class Outfit
) ) ) ); $this->set('contact', $contact); Then in your view you can do: To see what the full array looks like, do this in your view: die(debug($contact)); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.c

Re: Cascading Models in "hasone"

2010-10-06 Thread Jeremy Burns | Class Outfit
ple = $this->Person->find( 'all', array( 'contain' => array( 'Adult' => array( 'User' ) ) ) ); You'll see that it m

Re: How can i access home page without login?

2010-10-06 Thread Jeremy Burns | Class Outfit
Do you have a pages controller? If so, adding: parent::beforeFilter(); $this->Auth->allow('display'); ..in your beforeFilter() ought to work. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 21:31, redleon wrote: > I

Re: blog tutorial Html->link problem

2010-10-06 Thread Jeremy Burns | Class Outfit
s were written for earlier versions and need to be updated - perhaps I'll take that on when a get a bit of time. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 20:45, J. Argyl Plath wrote: > Hello. I am following along on the blog t

Re: Bake templates

2010-10-06 Thread Jeremy Burns | Class Outfit
Got it: if ($schema[$field]['type'] == 'datetime'): Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 6 Oct 2010, at 16:51, Jeremy Burns wrote: > I am creating my own templates for baking views (I spend the time > getting that ri

Bake templates

2010-10-06 Thread Jeremy Burns
I am creating my own templates for baking views (I spend the time getting that right then bake all my views - it's quicker than changing the results of hundreds of views after baking or creating my own). I'm changing the following file: /app/vendors/shells/templates/mytemplatename/views/index.ctp

Auth component variables

2010-10-05 Thread Jeremy Burns
Looking at this page in the guide: http://book.cakephp.org/view/1251/Setting-Auth-Component-Variables, you'd think you could do this: var $components = array( 'Auth' => array( /.../ 'allow' => '*', /.../ ) ); ...but it seems this is ignored. You have to specify $this->

Re: CSS Frameworks like Uni-Form for CakePHP?

2010-10-05 Thread Jeremy Burns | Class Outfit
I use http://960.gs/, not so much for style (as it's pretty plain) but for layout. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 19:34, euromark wrote: > what you need is > http://www.yaml.de/ > or > http://www.blueprintcss

Re: Debugging the Email component

2010-10-05 Thread Jeremy Burns | Class Outfit
a bit random. I'm not blaming the email component - I just wish there was a better way of tracking down those sort of errors. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 18:09, j.blotus wrote: > 99% of the problems I ever had with E

Re: Debugging the Email component

2010-10-05 Thread Jeremy Burns | Class Outfit
an to flow through. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 17:02, Jeremy Burns wrote: > I am using the Email component with varying levels of success. A > single function that can send a number of emails sometimes works, > someti

Debugging the Email component

2010-10-05 Thread Jeremy Burns
I am using the Email component with varying levels of success. A single function that can send a number of emails sometimes works, sometimes fails. And yes, I am using $this->Email->reset(); In one case I have two very similar emails that are set up the same: $this->Email->reset();

Re: save not working

2010-10-05 Thread Jeremy Burns | Class Outfit
See the guide: http://book.cakephp.org/view/1031/Saving-Your-Data save(array $data = null, boolean $validate = true, array $fieldList = array()) Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 14:32, james wrote: > Following on from this -

Re: ACL and multiple groups

2010-10-05 Thread Jeremy Burns | Class Outfit
I'm going to roll my own and if I am successful (which I have to be because I need this to work) I'll publish the code. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 19:39, calzone wrote: > I wondered about that user row as w

Re: ACL and multiple groups

2010-10-04 Thread Jeremy Burns | Class Outfit
s when the User already belongs to a Group - and it is the Groups that I usually want to assign permissions to. Am I just being dim (it is possible!)? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 17:55, calzone wrote: > The most maddening

Re: views - force inputs to sit together

2010-10-04 Thread Jeremy Burns | Class Outfit
CSS. Examine the html output and apply styles as necessary. One head start is to add 'div' => false to your inputs - divs by default are block level, which means they go onto a new line. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2

Re: Security: Token is not accepted anymore when creating/updating user

2010-10-04 Thread Jeremy Burns | Class Outfit
If you get stuck and just want to move past this problem, you side step the Security component on one or more specific actions: if ($this->action == '<-action_name->'): $this->Security->validatePost = false; endif; Jeremy Burns Class Outfit jeremyb

ACL and multiple groups

2010-10-04 Thread Jeremy Burns
I am building a site where a user can be assigned one or more roles within an organisation; for example org unit manager, regional manager, Head of Function and so on. I want to create a permissions model - ideally using ACL (although I've never really 'got' ACL before and have never successfully d

Re: Extremely slow > 5000 ms response time with Cake PHP, please help

2010-10-04 Thread Jeremy Burns | Class Outfit
I'm surprised how seldom people index their databases properly (if at all)... http://articles.classoutfit.com/2010/02/cakephp-basic-database-table-tuning-tips/ Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 08:09, Crazy wrote: > I

Re: Security: Token is not accepted anymore when creating/updating user

2010-10-04 Thread Jeremy Burns | Class Outfit
does not match *exactly* what went in, the Security component does what it is supposed to do, which is assume that a user has hacked the form; it black holes it to the WSOD. Are you using any client side script to adjust the contents of the form, even hiding inputs? Jeremy Burns Class Outfit

Re: Newbie

2010-10-01 Thread Jeremy Burns | Class Outfit
lly poke around. Then I'd go through the two tutorials at the end of the online book. The blog tutorial covers the basic MVC patterns in Cake really well. Then I'd just pile into a real life app; in my view, nothing beats getting stuck in and solving real challenges. Jeremy Bur

Re: want to use database store procedure with cakephp

2010-10-01 Thread Jeremy Burns | Class Outfit
You can run a stored procedure by using the Model->query method. http://book.cakephp.org/view/1027/query Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 1 Oct 2010, at 16:25, Ma'moon wrote: > I really think that the core developers should i

Re: Automatically save timestamp fields

2010-10-01 Thread Jeremy Burns | Class Outfit
What are you trying to achieve the Cake doesn't already do with the created and modified fields which already get populated with 'now'? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 1 Oct 2010, at 15:36, Hugo M wrote: > There's

Re: Newbie

2010-10-01 Thread Jeremy Burns | Class Outfit
http://book.cakephp.org/ Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 1 Oct 2010, at 11:19, Ashwani Kumar wrote: > Hi all, > I'm an intermediate level PHP developer, and i'm gonna learn > CakePHP. but i don't know how to

Re: cakephp dynamic databases.

2010-10-01 Thread Jeremy Burns | Class Outfit
Couldn't store this data in a separate database that just has log in details? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 30 Sep 2010, at 20:06, nithiz wrote: > Hi all, > > im developing an application which has the cakephp installed on

Re: Prev/Next Record

2010-09-30 Thread Jeremy Burns | Class Outfit
There's probably a way to use pagination with the limit set to 1? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 30 Sep 2010, at 02:09, naidim wrote: > For viewing a record, how would one get the record id for the next and > previous records

Debug error with media view

2010-09-29 Thread Jeremy Burns
I am using the media view to allow customers to download PDF documents they have purchased. Everything is working fine, but the debug.log has these lines in it: 2010-09-28 22:53:24 Notice: Notice (8): ob_end_clean() [ref.outcontrol]: failed to delete buffer. No buffer to delete. in [/xxx/cake/libs

Re: Is it possible to get a query and display it to views/layouts/default.ctp? Cake 1.3?

2010-09-29 Thread Jeremy Burns | Class Outfit
Put it in an element - in fact your whole cart should be an element. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 29 Sep 2010, at 08:25, Louie Miranda wrote: > Hi, > > I have this shopping cart where I am trying to figure out how can I display a

Re: common value name for all pages

2010-09-28 Thread Jeremy Burns | Class Outfit
Check for the value in beforeFilter in app_controller...? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 29 Sep 2010, at 01:13, leafchild wrote: > I have to use a value $myvalue for 90% of pages at my site. > > 50% pages has same value (10

Re: shared controller functions

2010-09-27 Thread Jeremy Burns | Class Outfit
Use components - that's what they were born for. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 27 Sep 2010, at 21:05, Michael Gaiser wrote: > So I want to use some of the functions from my locations controller in my > domains controller. I

Re: id field as char(40) and id number is automatically created

2010-09-27 Thread Jeremy Burns | Class Outfit
e severely ugly and I do my best to keep them back of house. They can be a pain while testing and debugging too. Their distinct advantage is that they are limitless, but if you pick the right int datatype you'd do well to use them all up. Jeremy Burns Class Outfit jeremybu...@class

Re: JS helper

2010-09-27 Thread Jeremy Burns | Class Outfit
I concur with your feelings about the guide with respect to the JS helper - but did you know that you can create yourself an account and add to the guide? It would be a good community spirited thing to pass on some of your knowledge. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http

Re: id field as char(40) and id number is automatically created

2010-09-27 Thread Jeremy Burns | Class Outfit
varchar? Is it a MySQL database? If so, what's the restriction for? If you really really can't (and I'd be surprised) then can you work with an int instead? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 27 Sep 2010, at 17:48, Mariano C. w

Re: "Pages" database table

2010-09-25 Thread Jeremy Burns | Class Outfit
could always retain the 'default' display action anyway and change the routing to avoid conflicts if really necessary. I could be talking out of my backside and it all might fall down in a horrible heap, but if it were me I'd try it. Jeremy Burns Class Outfit jeremybu...@class

Re: how to use required => true in multiple validation

2010-09-25 Thread Jeremy Burns | Class Outfit
Yup - agreed. I always use 'last' => true for each rule in a multi-part rule array (except for the last part of course) and put them in the most sensible processing order from a user perspective - which probably means the most likely one to fail first or perhaps the most important

Re: how to use required => true in multiple validation

2010-09-25 Thread Jeremy Burns | Class Outfit
I'm prepared to be corrected, but my understanding is that 'required => true' just means that the field must be present in the data array, and doesn't really test its value. So in your case, required => true might be enough. Jeremy Burns Class Outfit jeremy

Re: adodb and odbc support in 1.3

2010-09-25 Thread Jeremy Burns | Class Outfit
What happens when you give it a go? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 25 Sep 2010, at 09:33, emmexx wrote: > I want to connect to an Access db on a a Vista pc (I have to, it is a > legacy app.) > I installed cakephp 1.3 and a dataso

Re: 1.2 to 1.3: Auth component: login does not work anymore

2010-09-23 Thread Jeremy Burns | Class Outfit
Have you included the Session component and helper? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 23 Sep 2010, at 12:44, psybear83 wrote: > Hi everybody > > After upgrading from 1.2 to 1.3 my login (using the Auth component) > doesn't

Re: setFlash and key

2010-09-22 Thread Jeremy Burns | Class Outfit
I read the code for the Session helper, and this behaviour is correct. The div does inherit its id from the key, so you can't place css against the id of the div in a generic way (unless you want to add a style for each potential id). I have made the styles completely class based. Jeremy

setFlash and key

2010-09-22 Thread Jeremy Burns
According to the guide, if I do this: $this->Session->setFlash('A message.', 'default', array('class' => 'warning'), 'reset_password'); ...and this in a view: echo $this->Session->flash('reset_password'); ...I ought to get this: A message. ...but I am actually getting this: A message. In ot

Re: 1.2 to 1.3: Notice (8): Undefined variable: session [APP/views/layouts/default.ctp, line 103]

2010-09-22 Thread Jeremy Burns | Class Outfit
Make sure you have included the Session component and helper, and then refer to them as $this->Session. in fact, refer to everything in the same way ($this->Form, $this->Html etc). Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Sep 2010,

Re: After upgrade from 1.2.0 to 1.2.8: $this->Medium->Author->find(...) results in "Fatal error: Call to a member function find() on a non-object"

2010-09-22 Thread Jeremy Burns | Class Outfit
It's not a huge step, and while you're getting your hands dirty I - personally - would go all the way. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Sep 2010, at 15:16, Joshua Muheim wrote: > I'm playing around with it, and it reall

Re: After upgrade from 1.2.0 to 1.2.8: $this->Medium->Author->find(...) results in "Fatal error: Call to a member function find() on a non-object"

2010-09-22 Thread Jeremy Burns | Class Outfit
What is the table name? Take a look here: http://book.cakephp.org/view/953/Inflections - you might need to set up your own inflection. As an experiment, use Bake to bake the model for the table and see what it recommends. Obviously back up your current one first! Jeremy Burns Class Outfit

Re: After upgrade from 1.2.0 to 1.2.8: $this->Medium->Author->find(...) results in "Fatal error: Call to a member function find() on a non-object"

2010-09-22 Thread Jeremy Burns | Class Outfit
media controller? As an side, why stop at 1.2.8 - why not go for 1.3.4? If you're going through the migration process, why not come right up to date? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Sep 2010, at 13:08, Joshua Muheim wrote: > User mo

Re: After upgrade from 1.2.0 to 1.2.8: $this->Medium->Author->find(...) results in "Fatal error: Call to a member function find() on a non-object"

2010-09-22 Thread Jeremy Burns | Class Outfit
Do you have a User model? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Sep 2010, at 12:53, psybear83 wrote: > Hi everybody > > I have overtaken a CakePHP application which used an out-dated version > of CakePHP (1.2.0.x), so I upgraded

Re: Passing some parameters in a function

2010-09-21 Thread Jeremy Burns | Class Outfit
Have you tried it? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 21 Sep 2010, at 10:09, Cruisine wrote: > hi, guys..i just wanna know on how to pass some parameters in one > function ?? > as usual when i want to pass one paramater to a function,

Re: memcache and counterCache

2010-09-20 Thread Jeremy Burns | Class Outfit
Thanks I tried that before posting. No joy. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 20 Sep 2010, at 21:16, j.blotus wrote: > You need to clear your cache. This happens to me sometimes because > cake stores model schema and some other core i

<    6   7   8   9   10   11   12   13   14   15   >