Re: complex query with virtual fields

2012-10-27 Thread Geoff Douglas
- group by invoice - group by customer Does this make sense? Happy Coding. Geoff On Friday, October 26, 2012 3:05:09 PM UTC-7, fly2279 wrote: > > I am trying to get an accounts aging report to work correctly. I want to > find all customers that have invoices with a balan

Re: Can I automagically add an ID to the div generated by form->input

2012-01-06 Thread Geoff Douglas
Don't think that one is possible... But you can look through the documentation for the FormHelper and see how the FormHelper->input method uses the inputDefault data... http://api.cakephp.org/view_source/form-helper/#line-709 It looks like it just merges them... so not much logic there. It look

Re: How to change $model->_schema in 2.0

2012-01-06 Thread Geoff Douglas
You can change it from the inherited model, but you have to do it in a method. The error is telling you that you can't directly alter the property, you must do it in a function call. It adds a level of security to the properties. You have to specifically create a function to manipulate that pro

Re: CakePHP 2.0 Percent Complete

2012-01-05 Thread Geoff Douglas
This is a limitation of the web in general isn't it? In the web development world, each request is a unique call to the server... so there is no such thing as "progress." You request something, and the server responds. Even in the case where you pass over the processing to a daemon of some kind

Re: Extending Cake Shell Classes

2012-01-04 Thread Geoff Douglas
I know this is a super old Discussion but... I was just extending a Shell and was google-ing to see if anyone had issues doing it, and thought I would share. If you want to extend a shell you need to import it first. So assuming we have created a class called MyShell that extends Shell (like n

Re: How to add varied content in posts?

2012-01-01 Thread Geoff Douglas
There are several ways to do that. Here are a few that I can think of off the top of my head: There are wysiwyg (like TinyMCE) editors, OR markup language options such as Textile, or Markdown, or bbCode, or WikiCreole If you use any these you will need to add a way for users to upload images,

Re: Year range 1991-2031

2011-12-31 Thread Geoff Douglas
I am not sure if I understand your question exactly, but it looks like the date range for the select list allow for the dates that you need. http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html?highlight=form%20helper#datetime-options If this is the problem, then you can controller th

Re: How to "custom belongsto" in CakePHP 2?

2011-12-31 Thread Geoff Douglas
BelongsTo is simply a left join, (on the retrieval side)... I think what you are looking for is the Relationship conditions option. (Which will create the ON statement in SQL) So what you want is something that looks like... Radpostauth Model... var $belongsTo = array( 'Wdevice' => array( 'c

Re: Multiple Businesses in one database

2011-12-31 Thread Geoff Douglas
I do a very similar thing to allow users multiple profiles. So they can segregate their data by company, or family, or team. Here is the basic logic. In the appController beforeFilter() method set the logged in user to the appModel class that you are fetching. Such as... AppModel::setActiveUser

Re: Cake 2.0.4 : how to display "logout" if logged, else display "login"

2011-12-23 Thread Geoff Douglas
Under the logged in condition... you are using double quotes twice... could cause a problem. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions

Re: how to use multiple database connections.

2011-12-23 Thread Geoff Douglas
What do you mean when you say "sync?" -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-p

Re: Textarea linebreak getting converted to text

2011-12-22 Thread Geoff Douglas
Another bit to this issue... the line breaks are coming over as \r\n not just \n, so that could be part of the issue... -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with the

Re: Textarea linebreak getting converted to text

2011-12-22 Thread Geoff Douglas
Just for additional info: The following works to remedy the issue. Form->data['ProductCalculation']['batch'] = str_replace('\n',"\n",$this->Form->data['ProductCalculation']['batch']); ?> I also checked when this is happening... The $this->data array contains the real line breaks inside the cont

Textarea linebreak getting converted to text

2011-12-22 Thread Geoff Douglas
So, I am working with a textarea, where I am allowing for an entry per line. When I submit the form the data hits the controller as expected with the PHP \n intact. I am do a postback to the same controller/action, and when the page renders and the Form input gets populated, all the \n line bre

Re: new action is being blocked by AuthComponent and I'm not sure why

2011-12-22 Thread Geoff Douglas
Because you are authorizing actions, you have to add the action to the aco table. You can do this by using the cake console... but here is some code that I use to automatically do it for you. Put this is your AppContoller... /* * * Used for Adding Aco action automatically on page load. * *

Re: Can I automagically add an ID to the div generated by form->input

2011-12-22 Thread Geoff Douglas
If you are using greater than 1.3, check this out http://book.cakephp.org/view/1616/x1-3-improvements The form helper create() method, now has a inputDefaults array key... that will do what you want. I believe. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.o

Re: Excerpt of just first result from foreach

2011-12-22 Thread Geoff Douglas
foreach($posts as $indexValue => $post){ if($indexValue == 0){/* Show the excerpt*/}else{/* Show the link */} } -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakeP

Re: Question about routing

2011-12-19 Thread Geoff Douglas
Is there a reason you aren't using the prefix_routing functionality? http://book.cakephp.org/view/950/Prefix-Routing (1.3) http://book.cakephp.org/2.0/en/development/routing.html#prefix-routing (2.0) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check ou

Re: best use of var $uses in a controller

2011-12-19 Thread Geoff Douglas
Just to add to the conversation... You have to ask yourself, "when do I need this model?" If you are going to need it in every web request, then stick it in the $uses property. If you only going to use it in one method, then register it on the fly. That way, your not bogging down every other

Re: Multi-level Authorization?

2011-12-19 Thread Geoff Douglas
Yes, this should get you want you need, but to Jose's point, you may want to make sure you are unsetting any sensitive data from the User array before to do the login... Generally all you need is an id, name, and maybe group_id. -- Our newest site for the community: CakePHP Video Tutorials ht

Re: Using encryption to verify parameters

2011-12-19 Thread Geoff Douglas
I like it. This could be very useful at various levels. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, se

Re: Using encryption to verify parameters

2011-12-19 Thread Geoff Douglas
I can understand your point. You can never be secure without a good ACL system in place. But that doesn't mean you can't have both at some level. I think I just like to keep the options open for interesting ideas. I don't know if I would ever encrypt the entire application, but perhaps just so

Re: Using encryption to verify parameters

2011-12-19 Thread Geoff Douglas
I love Freshbooks! Is it a cool place to work? I trust you sir. Point understood. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To uns

Re: save() not working

2011-12-19 Thread Geoff Douglas
Ok, so I see a few odd things going on here. First, you say it's a cron job, but you are using a controller? Shouldn't you be using a Shell? Second, set() is not a global function, it should be $this->set(). It's a method of the Controller class. What fields does the table require... have you

Re: Need help with model design

2011-12-19 Thread Geoff Douglas
http://book.cakephp.org/view/1323/Containable#Containing-deeper-associations-1325 Have you followed the steps in the above documentation? In model add the behavior, using the actsAs property. Then before you do your find, list the Relationships you want to contain... $this->Event->contain('Com

Re: Using encryption to verify parameters

2011-12-18 Thread Geoff Douglas
The accounting web application Freshbooks does this. Every link inside the application uses an long encrypted string, instead of a url path. Once the url hits the app, it's decrypted and routed. Thus securing the urls from users eyes... I agree that this adds a genuine level of security, even a

Re: show id in url on function call

2011-12-18 Thread Geoff Douglas
I agree. meinstream, make sure you set the second param to 301, if you want google and the like to take note of the new urls. Controller Code: $this->redirect(mixed $url, integer $status, boolean $exit) * * -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Ch

Re: Multi-level Authorization?

2011-12-17 Thread Geoff Douglas
You should probably read the User that is associated with the passcode, then when you login, you can pass in that users data... then it will store it like the default functionality. Right? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new Ca

Re: save() not working

2011-12-17 Thread Geoff Douglas
Do you have you core Configure debug level set to 2? (In config/core.php) Errors won't display if you don't have debug turned on. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others

Re: img src not working for me

2011-12-17 Thread Geoff Douglas
The whole reason for the Html helper is so that you don't have to break out of the php code to write HTML. It's just that. A Helper. But as euromark said, it also helps with the routing of your application. So, even if you want to code the HTML by hand, you should at minimum use the Router::url

Re: Lightbox form CakePHP 2.0

2011-12-17 Thread Geoff Douglas
I use this functionality all the time... You can just copy the tutorial from the jQuery demo page. That's what I have done, until I understood what everything does. You can't expect someone to just know exactly what you want and write it for you... If you want that, then you need to hire someon

Re: show id in url on function call

2011-12-17 Thread Geoff Douglas
The only way to change the URL in php, is by doing a redirect. In straight PHP you would set the header location. In Cake you can just do a redirect. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.

Re: when i use findby($id) with association conditions i get SQL Error: 1054

2011-12-17 Thread Geoff Douglas
Yeah, just as a reminder... the magical findByFieldName() methods don't allow for additional options. They are just simplified helper functions. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org a

Re: Passing Data to Javascript using the JQuery "data" Functionality

2011-12-17 Thread Geoff Douglas
I am not sure about the Js Helper... but the jQuery data api stores key/value pair data in the actual object. So, as you create the draggable object, you need to add the data, just as you are trying to access it. So, if you are doing a $('div_1').draggable({options}); You need to also add a $('d

Re: Controllers, Layout & Views

2011-12-17 Thread Geoff Douglas
Just as a BTW if you put an about.ctp in the Pages folder, then the url address just needs to be www.your-domain.com/pages/about. This will pull up that content. To see what is happening, check you routes.php file. Happy Coding! -- Our newest site for the community: CakePHP Video Tutoria

Re: Lightbox form CakePHP 2.0

2011-12-16 Thread Geoff Douglas
Take a look at the http://jqueryui.com/demos/dialog/#modal-form Modal Form demo. There is a function that fires when a user clicks the buttons. There is a function that fires when the modal is open, and closed. (And many other "Events" you can tie functions to) A callback function is simply

Re: img src not working for me

2011-12-16 Thread Geoff Douglas
Just in case you are confused... even by the documentation... The Html Helper only creates HTML. So if you use the image() method, it will output the actual img tag with all the attributes. The src is going to use the path to the image that you specify, and with cake the webroot folder is where

Re: Paginator not working on custom query

2011-12-16 Thread Geoff Douglas
Are you calling the paginate method from the controller? You are getting this error because the Paginator Helper doesn't have anything to use. What database server are you running? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Q

Re: Multi-level Authorization?

2011-12-16 Thread Geoff Douglas
What data is contained in $this -> request -> data that you are passing in to the Auth->login() method? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP rela

Re: Unable to use cake bake

2011-12-16 Thread Geoff Douglas
Similar to Mac then... You need to open you .bash_profile file and add cake to the $PATH http://www.troubleshooters.com/linux/prepostpath.htm Here is a page that talks a bit more about it... --- # User specific environment and startup

Re: Unable to use cake bake

2011-12-16 Thread Geoff Douglas
What OS are you using? If it's windows or mac, I have a couple blog posts that will lead you through adding the cake console to you ENV path. http://madgeekskills.blogspot.com/2011_03_01_archive.html -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check o

Re: Lightbox form CakePHP 2.0

2011-12-16 Thread Geoff Douglas
I suggest jQuery UI dialog. If you need something out of the box, it will work quite well for you. It has callbacks that you can use to load/save stuff via ajax http://jqueryui.com/demos/dialog/ -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out th

Re: ACL fine tuning ,again

2011-12-16 Thread Geoff Douglas
That error usually means that the User.152 is not in the Aco table. As part of the User Create methods, you need to make sure the Aco's get created as well. See if that is the case. Are you trying to edit User 152, or is the logged in user User 152? -- Our newest site for the community: Cake

Altering Relationships on the Fly

2011-12-15 Thread Geoff Douglas
I just learned something and thought I would share. So I came across the need to apply a condition to a hasMany query. I was like how in the world do I do that? // Get all Checkpoints with Appropriate Spec $this->VehicleDailyLog->VehicleDailyLogCheckpoint->VehicleCheckpoint ->hasMany['Vehicle

Re: CakePHP 2.0 and SqlServer

2011-12-15 Thread Geoff Douglas
Take a look at the connect() method in the dbo_sqlsrv.php file. Make sure that it is using the appropriate formatting for the connection string. If you can use it from straight PHP, then it's probably a formatting issue. And you'll be able to see that from the connect() method. -- Our newest s

Re: CakePHP 2.0 and SqlServer

2011-12-15 Thread Geoff Douglas
After looking at my own sql connector, I remembered that I had to alter the connection string, slightly... When you connect to windows, and then to sql server, the authentication process is very finicky. I had to test what user I was coming in as, and give the proper access rights to that user

Re: Joining on Multiple MySql Databases

2011-12-15 Thread Geoff Douglas
The "making a view" is my current work around... but views are not friendly when migrating and editing. So I am trying to move away from that. Hijacking the table name is something that I could do... Thanks AD! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.o

Re: Multi-level Authorization?

2011-12-15 Thread Geoff Douglas
The auth component has the User Data. So, you do a $this->Auth->user(); to retrieve the current logged in user. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePH

Re: Alternative for dropdown with large dataset

2011-12-15 Thread Geoff Douglas
+1 I have used the autocomplete method lots of times... works great! The other convention would be to have a "Create Invoice" from the customer index. Then you can apply some filtering/searching on the customer index, then send the Customer Id when you go to the Invoice create page. Just as a

Re: CakePHP 2.0 and SqlServer

2011-12-15 Thread Geoff Douglas
The driver is the problem. The PHP extension requires the driver to be installed on the windows box. php.net/.../mssql.requirements.php Check the requirements for the linux box at the above link. (Says you need the FreeTDS library built...)

Re: Need help with model design

2011-12-14 Thread Geoff Douglas
Like Andras said.. Containable is what you need, it is simple and awesome! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscrib

Joining on Multiple MySql Databases

2011-12-14 Thread Geoff Douglas
So, I have noticed on Cake 1.3 at least, when you have models that use different dbConfigs, it doesn't join them if they have a belongsTo or hasOne relationship. It instead queries each individual and then combines the results. I understand this and like it for the most part, especially since I

Re: Mobile websites using cakephp

2011-12-14 Thread Geoff Douglas
I agree with AD. Re-theming is a good practice. I have created a couple mobile apps, with Cake, it's easy to create different layouts for mobile platforms. In your controller you can use the layout property $this->layout = 'your_mobile_layout'; I normally use this in the beforeRender() callback

Re: create Ticketing

2011-12-13 Thread Geoff Douglas
You guys are too funny! :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr

A fun little Anti-Custom Query Example...

2011-12-13 Thread Geoff Douglas
So I have been working on a maintenance scheduler and wrote a custom sql query for a upcoming maintenance report. Then converted it to a Cake built statement. Awesome. Works great and doesn't break any of my datasources, or model methods... I have always wondered how something like this would p

Re: Error at Instalation

2011-12-13 Thread Geoff Douglas
If it's a newer mac, you don't have to use MAMP. PHP and Apache is all ready to use in Mac OSX. I wrote an blog post about it... cakephp-on-mac-osx It's not the best post, but it does guide you through getting cake working on Mac

Re: Using Cake w/ url extensions

2011-12-13 Thread Geoff Douglas
I created a Google Base dump for a CakePHP intranet and I have had an issue with PHP running out of memory if my array gets too big... so when I go to convert to XML the system chokes and only returns as much as it finished... Just a issue that I had... not sure if it's related to what you are s

Re: Update field in associated model???

2011-12-11 Thread Geoff Douglas
I am not sure about any one else... but for me I normally have the id from either passing it in, or having it from related data. I must just not do a lot of "UPDATE"-ing. :) I do use this for shell scripts more than web request type functions, because my shell scripts are generally more prone t

Re: How to get all children of a parent if parent_id field is null

2011-12-10 Thread Geoff Douglas
May we assume that you are employing the Tree Behaviorin this Section model? If so, the parent_id would only be null for the top most parent... correct? Generally, when you use a tree or this kind, you must look at it like a collection? So the top

Re: Update field in associated model???

2011-12-10 Thread Geoff Douglas
I see, then updateAll() is the method that you want. It appears by the error message that it's thinking that 'jap' is a field, so maybe it's just in the wrong place? or maybe you have a comma instead of a double arrow? I ran a little test on my Cake 1.3 install and it worked as expected. Here

Re: QuickApps - CakePHP 2.0 CMS - Awesomeness.

2011-12-10 Thread Geoff Douglas
@Christopher: I have am working two project now built on QACMS, and really like what you have done. I will try the installer script on a project I just picked up the other day. Let me know if there is anything I can do to help. Great work. I have looked for a CMS make on cake for a while, and I

QuickApps - CakePHP 2.0 CMS - Awesomeness.

2011-12-09 Thread Geoff Douglas
I have been playing around with QuickApps for the last month or so. ( http://cms.quickapps.es/) (https://github.com/QuickAppsCMS/QuickApps-CMS) It is an awesome CMS built with Drupal in mind, with some other yumminess from other CMS platforms thrown in. My favorite part, is how they have impleme

Re: Model: Query distinct values from a table then save those values to another table

2011-12-09 Thread Geoff Douglas
$distinctBookCategories = $this->Book->find('list',array( 'fields'=>array('category_id'), 'conditions'=>array( 'NOT'=>array('category_id'=>null), '{Other book conditions go here}' ), 'group'=>'category_id' )); I am not sure what you are looking to do here. But this is the code I use to pull un

Re: Store only month and date

2011-12-09 Thread Geoff Douglas
You have two options: Option One: change the data type in the database to VARCHAR, or cake's String, and save whatever you want. Option Two: when saving the date pass in a valid SQL date value (Y-m-d), then ignore the year when you pull, and use the data. Happy Coding! -- Our newest site for

Re: ACL

2011-12-09 Thread Geoff Douglas
Are you trying to set up your application for the first time? Or are you trying to create some other functionality. If it's the first setup, it looks like you are over thinking this a bit. $this->Auth->actionPath = 'controllers/'; $this->Auth->authorize = 'actions'; $this->Auth->loginAction = a

Re: Update field in associated model???

2011-12-09 Thread Geoff Douglas
In Cake, or I guess in SQL rather, you need to tell the system which record you want to update. You are passing in data, with no primary key value specified. So, one way to do this, would be: $setting = $this->User->Setting->findByUserId($user_id); if(!empty($setting)){ $setting['Setting']['p

Re: How to use AuthComponent to authorize using a password only rather than username/password?

2011-12-09 Thread Geoff Douglas
Forgive a few mis-spellings, or bad grammar, I didn't proofread appropriately. :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsu

Re: How to use AuthComponent to authorize using a password only rather than username/password?

2011-12-09 Thread Geoff Douglas
. You don't want to tied up you Model with worrying about the session. That is the controller's job. If you were you want to use the model elsewhere, (Such as a shell script) you won't have access to the session and your model will break. Happy Coding! > On Dec 7, 10:31 am

Re: Shared code for Models but not in AppModel

2011-12-07 Thread Geoff Douglas
I think you have most elements i place... I think the thing that is getting confusing is how cake is suppose to load the classes. So here's the kicker. Cake only "loads" models if they are related to something that you are using. I will use an example from my world to illustrate. I have a Prot

Re: Edit an object without creating it

2011-12-07 Thread Geoff Douglas
In a perfect [browser] world. I would agree with you, but I have seen browsers do some crazy ace stuff, so I don't trust the "before the form is submitted" as the end all. My Question is why not check the id first? It is not a whole lot of overhead. I think in the name of data integrity, I a

Re: "BETWEEN ? AND ?" turning some values into floats

2011-12-07 Thread Geoff Douglas
What Cake version are you using here? What database server are you using? it appears that the values are still coming across as strings. (They are both enclosed in single quotes) You may want to edit your between clause and expicitly convert the values that you are passing in to integers. In M

Re: Edit an object without creating it

2011-12-07 Thread Geoff Douglas
I agree that this "checking if row exists" functionality belongs in the controller. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To un

Re: ACL + Auth = Headache

2011-12-07 Thread Geoff Douglas
When I was a newb, totally did the same thing. :) We live and we learn. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe fro

Re: How to use AuthComponent to authorize using a password only rather than username/password?

2011-12-07 Thread Geoff Douglas
I done something like this before. I called them tokens, and they are used to log someone in. I user the $this->Auth->login({User Data}); method, from a controller. (Cake1.3 Docs | Cake2.0 Docs

Re: Shared code for Models but not in AppModel

2011-12-07 Thread Geoff Douglas
Where are you trying to use the Solidcore Model? I have done what you are explaining several times. Generally to apply different relationships to the same models, for better performance, and cleaner code. It is possible. And it is not breaking "the Cake way" to do it either. Cake is very versa

Re: Edit an object without creating it

2011-12-07 Thread Geoff Douglas
I personally think validating that the record exists before you try to persist data is essential. Goofy stuff happens, and with CakePHP save's, if you don't have a good primary key value, it inserts instead of stopping. I think Cake 2.0 makes use of exceptions much better than 1.3, out of the b

Re: ACL + Auth = Headache

2011-12-07 Thread Geoff Douglas
I believe you problem is that the login method is not publicly available. change the commented out line: //$this->Auth->allow(array('*')); to: $this->Auth->allow(array('login')); This can be in the AppContoller or the UserController. If you put an Auth allow in the AppController it will apply to

Re: Edit an object without creating it

2011-12-07 Thread Geoff Douglas
I think what you are looking for is the Model->exists() method. Please see a baked Cake 2.0 edit method. /** * edit method * * @param string $id * @return void */ public function edit($id = null) { $this->{YourModel}->id = $id; if (!$this->{YourModel}->exists()) { throw new NotFoundException

Re: ACL + Auth = Headache

2011-12-07 Thread Geoff Douglas
I think what you are missing is an "allow" for the login method. Technically the login method needs to be publicly accessible. So, the line you have commented out that says: //$this->Auth->allow(array('*')); needs to say $this->Auth->allow(array('login')); This will allow an un-authenticated user

Cake Question

2011-04-08 Thread Geoff Wiggs
o pass the Load key as a parameter to the Invoice Controller and use the Load# in the findall() function in the controller. But along these lines I am unsure of how to pass the parameter to the Invoice controller correctly. Does this make sense? Or am I just making extra work for myself? Can

Re: Cake root directory

2010-11-08 Thread Geoff Wiggs
cricket, Thanks for your advice, this is indeed where I need to make my changes. However, I am still having an issue. I am using Sparkplug for user and permissions management. How do I reference an action in a controller in a plugin for this purpose? geoff On 11/8/2010 3:18 PM, cricket

Re: Cake root directory

2010-11-08 Thread Geoff Wiggs
cricket, Thanks for your advice, this is indeed where I need to make my changes. However, I am still having an issue. I am using Sparkplug for user and permissions management. How do I reference an action in a controller in a plugin for this purpose? geoff On 11/8/2010 3:18 PM, cricket

Cake schema command fails

2010-10-13 Thread Geoff Wiggs
dvice as to getting schema up and running under this configuration? Geoff 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 pos

Re: Javascript Helper modification. Opinions, please.

2010-07-11 Thread Geoff Oliver
-Mark > > On Jul 9, 3:05 pm, Geoff Oliver wrote: > > > > > Hello, > > > I've been working with Cake for a few years and I really like it. > > Lately, I've run into a bit of a problem with the way that the > > Javascript Helper handles some things

Javascript Helper modification. Opinions, please.

2010-07-09 Thread Geoff Oliver
Hello, I've been working with Cake for a few years and I really like it. Lately, I've run into a bit of a problem with the way that the Javascript Helper handles some things. Specifically, the "link" function and it's $inline parameter. The issue I'm having is this... In an element, I am linking

Re: Using REPLACE INTO with MySQL

2010-03-04 Thread Geoff
@Zaky: although this might not be a SQL standard, it is a part of MySQL, and is useful functionality to use. This is why I am trying to find out whether anyoen else has overcome this problem. Additionally, my web host does not allow me access to create stored procedures, so the stored procedure is

Using REPLACE INTO with MySQL

2010-03-03 Thread Geoff
to how you did so? Did you create a new DBO? Behaviours? I'd really appreciate any help anyone could supply. thanks, Geoff 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 subscribe

Re: Configure::read() "fetch" depth

2009-08-21 Thread geoff
i might still be dreaming. > > On Fri, Aug 21, 2009 at 7:13 AM, geoff wrote: > > > Hey all. Maybe this solution is really simple, and I'm just not > > getting it. > > > But I've noticed that when using Configure::read() with dot notation > > (e.g.: C

Configure::read() "fetch" depth

2009-08-21 Thread geoff
Hey all. Maybe this solution is really simple, and I'm just not getting it. But I've noticed that when using Configure::read() with dot notation (e.g.: Configure::read('level1.level2.level3')), it only seems to go down three levels. However, Set::extract() can go multiple levels down. Is there a

Re: Reverse prefix routing

2009-05-08 Thread geoff
I don't seem to recall that working either. The only time it did work was when visiting the URL directly. On May 8, 12:46 pm, majna wrote: > what about pagination URL's with prefix routing? > > On May 8, 12:38 pm, geoff wrote: > > > It's not useless -- it does

Re: Reverse prefix routing

2009-05-08 Thread geoff
t; "Routing.admin" accepts only one prefix. > > I would like to see prefix routing fixed ASAP in cake :) > > On May 8, 11:45 am, geoff wrote: > > > Hey all. This is pretty much a copy-paste of what I've just posted on > > my blog, but it's still relate

Reverse prefix routing

2009-05-08 Thread geoff
et($url[$url['prefix']]); } else { $prefix = null; } // ... move down to about line 880 $urlOut = Set::filter(array($prefix, $url['controller'], $url ['action'])); // end additions Now, I have a few things that I want to ask: 1. Have you experienced this be

Re: $this->passedArgs breaking my Routes

2009-03-09 Thread geoff
cakephp.org/ticket/5115 > > On Mar 6, 3:43 pm, geoff wrote: > > > Sorry to keep bumping and adding, but a workaround that I've managed > > to find is to use the Routing.admin configuration setting. This is a > > *serious* hack though, as there is already a CMS s

Re: $this->passedArgs breaking my Routes

2009-03-09 Thread geoff
Where would I call that method? In the view, or in routes config? On Mar 8, 11:44 pm, biesbjerg wrote: > Have you tried Router::connectNamed(array('images')); ? > Each named parameter needs to be connected like this for url > generation to function correctly. > > On 6

Re: $this->passedArgs breaking my Routes

2009-03-06 Thread geoff
different sections. Seriously, if anyone has had some success in using custom prefixing in Cake, I'd really appreciate it if you could let me know how you got it working correctly! On Mar 6, 4:19 pm, geoff wrote: > After doing some more searching, I came across the section in the > cookb

Re: $this->passedArgs breaking my Routes

2009-03-06 Thread geoff
application. I copied and pasted the route, as well as the PHP code to create the link using the HTML helper, and it still did not work. The prefix was ignored completely. This seems like it could be a bug? On Mar 6, 3:46 pm, geoff wrote: > Yeah, I've tried every possible combination that I c

Re: $this->passedArgs breaking my Routes

2009-03-06 Thread geoff
ke to see  multiple Routing.admin, like > Routing.admin > Routing.user > Routing.public.. > > For now cake use only one. > > On Mar 6, 8:53 am, geoff wrote: > > > Hey all. > > > I have a fairly troublesome problem that has really been grating my > > go

$this->passedArgs breaking my Routes

2009-03-05 Thread geoff
specting that this might actually just be because there is some silly parameter that I haven't included or something. If there is anyone that can help me, or at least point in the a decent direction, I would really appreciate it! Cheers, Geoff --~--~-~--~~~---~--~-

Linkable Behaviour pagination

2009-02-21 Thread geoff
pagination that refuses to work. This is kind of an important part of most applications, so I really need it to work. Is there something obvious that I'm missing? Any help would really be appreciated. Cheers, Geoff --~--~-~--~~~---~--~~ You received this mes

Re: Linking three tables?

2009-02-07 Thread geoff
ework that I've used before with relative ease. Cake is *way* more flexible and powerful though. Thanks, once again. *g On Feb 7, 12:08 am, mscdex wrote: > On Feb 6, 1:42 am, geoff wrote: > > > I sometimes have issues trying to lock down the types of relationships > > that

  1   2   3   4   >