Re: AssetPackager for CakePHP

2007-07-29 Thread Brad Daily
On Jul 30, 12:53 am, Grant Cox <[EMAIL PROTECTED]> wrote: > Indeed. I've put some comments on your blog, but perhaps you should > consider a Bakery article for this? Grant - Already done, just waiting approval from the head chefs :) Also, I responded to your comment on my blog... Brad ---

Re: AssetPackager for CakePHP

2007-07-29 Thread Grant Cox
Indeed. I've put some comments on your blog, but perhaps you should consider a Bakery article for this? On Jul 29, 4:29 am, Walker Hamilton <[EMAIL PROTECTED]> wrote: > Awesome. Simply awesome. > > Thank you. --~--~-~--~~~---~--~~ You received this message becau

Re: Software design question regarding the classic "login page" ...

2007-07-29 Thread Dr. Tarique Sani
On 7/30/07, Geoff Ford <[EMAIL PROTECTED]> wrote: > > > As long as the login page redirects back to the requested url after > successful login in I don't see the difference, and it is probably > easier and cleaner in my opinion to redirect. Well rendering a view instead of redirecting is just as

Re: need possible solution to remove VALUES being quoted

2007-07-29 Thread Grant Cox
Try putting -! in front of the command, eg $data = array( 'data' => '-!AES_ENCRYPT(value,key)' ); More detail on Daniel's blog ( http://cakebaker.42dh.com/2007/05/22/how-to-use-sql-functions-in-conditions-part-ii/ ) On Jul 28, 11:56 pm, rpeterson <[EMAIL PROTECTED]> wrote: > Also, I am using Cak

Re: One Association causing a problem !!!

2007-07-29 Thread Grant Cox
Are you using scaffolding in your controller? The issue sounds like you may have a model classname that is conflicting with something inbuilt - for example if you try to make a model called File, or Folder. However, the three you have listed (Membership, Coder and Editor) shouldn't have any prob

Re: custom query function and associated views

2007-07-29 Thread Grant Cox
You have to make it yourself. On Jul 29, 9:22 pm, rtanz <[EMAIL PROTECTED]> wrote: > hi if i make a custom sql query in my model and create a function that > calls it from a models controller then bake my view will it create a > view for this function or do i have to create any views that are no

Re: inserting controller view into another view

2007-07-29 Thread Grant Cox
Using AJAX, quite easily - just populate an area of your page with the remote index action. If you can't use AJAX, not so easily (but more efficiently). You will need to retrieve the appropriate data for the foreign model in the main index action, and display it appropriately. To get pagination

Re: security

2007-07-29 Thread Grant Cox
This really just comes down to authentication, just based on IP address rather than username / password. I would recommend you put some code in your app/app_controller.php beforeFilter(), which checks what the requested controller/action is, and what the user's IP address is. You can get this IP

Re: $this->action = images ??

2007-07-29 Thread Grant Cox
Or, are you referring to any images in your view that have a relative path (and you aren't using the HTML helper image() function)? If you view localhost/users/index, and there is a relative image "images/yourimage.jpg", then your browser will actually request localhost/users/images/yourimage.jpg

Re: $this->action = images ??

2007-07-29 Thread Geoff Ford
Do you have any images with a url of 'controllerName/images/ imageName.png'? Geoff -- http://lemoncake.wordpress.com On Jul 30, 1:04 pm, starkey <[EMAIL PROTECTED]> wrote: > Sorry, I'm such a noob and I'm swimming through batter. > > I'm getting a weird action... After my expected action runs,

Re: Newbie Introduction Book ... reviews anyone?

2007-07-29 Thread Wimg
i am working with cakephp and want to take a look at ur book . On Jul 30, 9:10 am, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > On 7/30/07, Dave <[EMAIL PROTECTED]> wrote: > > > > > so I'm not worried about making anyone mad over there. > > Everything is proceeding carefully and with open ch

Re: One Association causing a problem !!!

2007-07-29 Thread uae2k
Any Help here please ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED]

$this->action = images ??

2007-07-29 Thread starkey
Sorry, I'm such a noob and I'm swimming through batter. I'm getting a weird action... After my expected action runs, I get a second action of 'images' for some weird reason (I have no idea). My process is really simple (no components, vendors, elements, etc). Basically, I have this in a control

Re: Need: CakePHP Contact Form Need Please

2007-07-29 Thread Baz
Got everything working now. ThanX for the help. I guess I just couldn't get it working with PhpMailer and Cake 1.1. Upgraded to 1.2 and used the included email component and I'm good. ThanX again. -- Baz L Day In The Life of Baz http://www.LifeOfBaz.com --~--~-~--~~~---

Re: Using models in app controller for default.thtml ???

2007-07-29 Thread Tulio Faria
Or you can try create a component, and load it with loadComponent or anything else. I think it's better... On 29 jul, 21:54, Geoff Ford <[EMAIL PROTECTED]> wrote: > I believe $uses is overwritten by the actual controller that is > invoked. I suggest you use loadModel() and creat your own instanc

Re: Newbie Introduction Book ... reviews anyone?

2007-07-29 Thread Dr. Tarique Sani
On 7/30/07, Dave <[EMAIL PROTECTED]> wrote: > > so I'm not worried about making anyone mad over there. > Everything is proceeding carefully and with open channels of > communication. WTG! and good show all around. Looking forward to seeing your book completed Tarique --

Re: Newbie Introduction Book ... reviews anyone?

2007-07-29 Thread Dave
Everyone should know that the Cake Software Foundation has already been open and helpful in providing opportunities for better documentation, so I'm not worried about making anyone mad over there. Everything is proceeding carefully and with open channels of communication. On Jul 29, 11:58 am, "Ch

Re: Best practice - multipage Form

2007-07-29 Thread Hans
okay quite new to Cakephp so forgive if i make any obvious mistakes, but i can't seem to get FormWizard work for me... I'm trying to make a simple test form with 3 different input screen, just to grasp the idea of the FormWizard. In every output I print the $this->data array to see what data is s

Re: Best practice - multipage Form

2007-07-29 Thread Hans
okay quite new to Cakephp so forgive if i make any obvious mistakes, but i can't seem to get FormWizard work for me... I'm trying to make a simple test form with 3 different input screen, just to grasp the idea of the FormWizard. In every output I print the $this->data array to see what data is s

Re: Using models in app controller for default.thtml ???

2007-07-29 Thread Geoff Ford
I believe $uses is overwritten by the actual controller that is invoked. I suggest you use loadModel() and creat your own instances of the models you need. Geoff -- http://lemoncake.wordpress.com On Jul 29, 8:27 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello Friends, > > I am new to

Re: help with form input with multiple objects of same name/class/model

2007-07-29 Thread Geoff Ford
Using Housebolts method the action would look like: for ($i=0; $i<5; $i++){ $this->User->create(); // assign all the fields with correct names $user['email'] = $this->data['User']['email' + $i]; $this->User->set($user); if (!$this->User->validates()) { // You will need to do the fo

Re: Software design question regarding the classic "login page" ...

2007-07-29 Thread Geoff Ford
As long as the login page redirects back to the requested url after successful login in I don't see the difference, and it is probably easier and cleaner in my opinion to redirect. Geoff -- http://lemoncake.wordpress.com On Jul 30, 5:30 am, "Gonzalo Servat" <[EMAIL PROTECTED]> wrote: > On 7/29/0

Re: Form checkbox?

2007-07-29 Thread Geoff Ford
I think in 1.2 all input fields are to go through $form->input() so a check box would be $form->input(array('type' => 'checkbox')); Geoff -- http://lemoncake.wordpress.com On Jul 30, 9:27 am, citrus <[EMAIL PROTECTED]> wrote: > Have you enabled the Form Helper? > > $helpers = array('Html', 'Form

Re: Cake PHP running dead slow

2007-07-29 Thread Grant Cox
On Jul 29, 4:45 pm, housebolt <[EMAIL PROTECTED]> wrote: > $uses is evil and should be sparsely used. Do you have any benchmarks to back this up, or any comments from the core Cake developers (ie PHPNut or Nate) to this effect? I have not heard this before, and it sounds like FUD. I use loadMod

Re: Form checkbox?

2007-07-29 Thread citrus
Have you enabled the Form Helper? $helpers = array('Html', 'Form', 'Session'); On Jul 30, 4:49 am, Mech7 <[EMAIL PROTECTED]> wrote: > I this allready in 1.2 i see in the > API..http://api.cakephp.org/1.2/class_form_helper.html#b8d997c3ed8911e37bf... > > But when i use it like: > > checkbox('Art

security

2007-07-29 Thread monty
Hi there, I have an web application I have built for a company in Cake where I want internal users to access certain controllers 192.168.1.173/cake/internal say. External users should only be able to access mydomain.com/cake/external/ from the same application. What would be the best way to set t

Re: view error when performing sql query

2007-07-29 Thread Pablo Viojo
You're using findByName in your controller, which returns a single element (a car not a cars array). Try findAllByName if you want to get more than one, or change your view code, removing the foreach loop Pablo On 7/29/07, rtanz <[EMAIL PROTECTED]> wrote: > > > sorry here it is: > > > List Maz

Re: view error when performing sql query

2007-07-29 Thread rtanz
sorry here it is: List Mazda Cars Id Name Model Actions --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this grou

Re: How do you usually create admin area on site with CakePHP?

2007-07-29 Thread cakeFreak
Check out this thread: admin backend best practice http://groups.google.com/group/cake-php/browse_frm/thread/7e14ca05b59e27f/d8e76d231cc58d15?lnk=gst&q=admin+best+practice&rnum=3#d8e76d231cc58d15 --~--~-~--~~~---~--~~ You received this message because you are s

Re: view error when performing sql query

2007-07-29 Thread Gonzalo Servat
On 7/29/07, rtanz <[EMAIL PROTECTED]> wrote: > > > Id >   > Name >   > Model >   You might want to provide the other relevant parts of your view code.. like, the foreach loop surrounding the text above. - Gonzalo --~--~-~--~~--

Re: view error when performing sql query

2007-07-29 Thread rtanz
Id   Name   Model   On Jul 29, 11:51 pm, "Pablo Viojo" <[EMAIL PROTECTED]> wrote: > And your view code? > > On 7/29/07, rtanz <[EMAIL PROTECTED]> wrote: > > > > > > > hi i am trying to perform some sql querying in a controller but keep > > getting t

Re: view error when performing sql query

2007-07-29 Thread Pablo Viojo
And your view code? On 7/29/07, rtanz <[EMAIL PROTECTED]> wrote: > > > hi i am trying to perform some sql querying in a controller but keep > getting this error > > Notice: Undefined index: Car in W:\www\cake\app\views\cars\index.thtml > on line 13 > > My controller code is: > > function i

inserting controller view into another view

2007-07-29 Thread rtanz
hi i have a view pertaining to a particular model and associations. in the index page of this model i would also like to display the index view of another model. can i do this? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

view error when performing sql query

2007-07-29 Thread rtanz
hi i am trying to perform some sql querying in a controller but keep getting this error Notice: Undefined index: Car in W:\www\cake\app\views\cars\index.thtml on line 13 My controller code is: function index() { $this->Car->recursive = 0; $this->set('cars

Form checkbox?

2007-07-29 Thread Mech7
I this allready in 1.2 i see in the API.. http://api.cakephp.org/1.2/class_form_helper.html#b8d997c3ed8911e37bf69b1a4112e3b3 But when i use it like: checkbox('Article.frontpage'); ?> I get this error: Warning (512): Method FormHelper::checkbox does not exist [CORE\cake \libs\view\helper.php, l

Re: Software design question regarding the classic "login page" ...

2007-07-29 Thread Gonzalo Servat
On 7/29/07, chess64 <[EMAIL PROTECTED]> wrote: > > > >From a search-engine optimization standpoint, the first option is > better, otherwise when the search engine tries to access any of the > private pages, it will get the login form, which is probably not what > you want. By using the first option

Re: Software design question regarding the classic "login page" ...

2007-07-29 Thread chess64
>From a search-engine optimization standpoint, the first option is better, otherwise when the search engine tries to access any of the private pages, it will get the login form, which is probably not what you want. By using the first option, the search engine will simply not index the private page

Re: help with form input with multiple objects of same name/class/model

2007-07-29 Thread gavincomputer
Hi Housebolt and others, First, thank Housebolt. If I do like Housuebolt suggests, I can't say: this->User->save($this->data['User']); Since email1, email2, firstname1 or firstname2 are not fields exist in users table. I can extract value out and reassign them like $this->data['User']['ema

Software design question regarding the classic "login page" ...

2007-07-29 Thread Gonzalo Servat
Hi All, I'm working on a private site (ie. all pages are only accessible to logged in users) and I'm trying to figure out if it's best to redirect the user to a login URL or keep the URL as is and display the login form. Here are the 2 scenarios: 1) User requests /resources/list (since it is in t

Re: Newbie Introduction Book ... reviews anyone?

2007-07-29 Thread Chris Hartjes
On 7/28/07, Dave <[EMAIL PROTECTED]> wrote: > > Ah, well, there is a little more involved when it comes to trademark > and patent law. But yes, the logo is definitely owned and must be > "blessed." However, in a past project I worked on, Hasbro games tried > to convince my publisher that they coul

Re: Easy problem, not all that easy to figure out (set function)

2007-07-29 Thread Gorka
If I understood you right, you are overwritting the value of 'gallery' with the second call to $this->set(), when you wanted to merge both values. Try preparing your data first, then setting 'gallery' for the view. $galery = $this->Gallery->findAll(); $gallery['numRows'] = $this->Gallery->getNumR

Easy problem, not all that easy to figure out (set function)

2007-07-29 Thread DrLaban
Hey all! Short and simple; I'm trying to add more data to a Controller object with the help of set(). So what I'm doing in practice: $this->set('gallery', $this->Gallery->findAll()); Everything works out fine here. I get access to all the info I need in the view I'm working with. Now, I'd like

Re: How to use the 'finderQuery' attribute of your model definitions.

2007-07-29 Thread dakomoon
Sorry Stefano I don't know where to send you. All I can tell you is that it's a variable that Cake automatically populates when it generates the query and it will be populated with the id of the model that the finder query is being defined on. In this case since I'm trying to find out airport in

Re: Cake PHP running dead slow

2007-07-29 Thread phpjoy
housebolt, how slow is $uses? i should treat 'loadModel()' with the same care ['stay away as much as you can']? how slow does it make the production software? On Jul 29, 8:45 am, housebolt <[EMAIL PROTECTED]> wrote: > It probably is your server. I ran a couple of apps on a godaddy shared > serve

custom query function and associated views

2007-07-29 Thread rtanz
hi if i make a custom sql query in my model and create a function that calls it from a models controller then bake my view will it create a view for this function or do i have to create any views that are not automatically generated by scaffolding myself? thanks --~--~-~--~~-

Using models in app controller for default.thtml ???

2007-07-29 Thread [EMAIL PROTECTED]
Hello Friends, I am new to Cakephp. I am having an problem in it. The scenario is :- i have categories and subcategories. i want to show them as menus so i put them in the default.thtml file. To extract them from the database i have used var $uses =array('Category',Subcategory) in app_controll

Re: how can i use 10n in cake 1.2

2007-07-29 Thread Gorka
Please see the frequent dicussion page http://groups.google.co.uk/group/cake-php/web/frequent-discussions and search the group before making a question, you will get your answers faster and will not create duplicated threads. On 29 jul, 11:04, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > So I

Re: Random Image Helper

2007-07-29 Thread Grzegorz Pawlik
post it on bakery :) On Jul 28, 7:14 pm, Mike <[EMAIL PROTECTED]> wrote: > Hi everyone, I made a helper for random images > > It's at http://mikeski.net/new/snippets/view/24 > > Enjoy! --~--~-~--~~~---~--~~ You received this message because you are subscribed to

how can i use 10n in cake 1.2

2007-07-29 Thread [EMAIL PROTECTED]
So I found http://api.cakephp.org/1.2/l10n_8php-source.html is it completed class ? which function i must use in view and how look file witch translation. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" g

Re: How do you usually create admin area on site with CakePHP?

2007-07-29 Thread housebolt
Well, that's a matter of opinion, but the other way you can do this is by putting your cake core into a root folder, and then referencing your cake app folder config files to that cake core location, so you can have a separation of production and admin interfaces. You'd just have to make sure your

Re: Cake PHP running dead slow

2007-07-29 Thread housebolt
It probably is your server. I ran a couple of apps on a godaddy shared server (with CGI) and the load on the server was already so high that adding a large app load on top of all of it made the thing slow, but not nearly as slow as what you've got going. I used to have an app with about 30 tables

Re: help with form input with multiple objects of same name/class/model

2007-07-29 Thread housebolt
The easiest way to do this is identifying the email/lastname/firstname by a number, rather than trying to create a new array within the array. i.e. tagErrorMsg('User/firstname1', 'First name is required'); ?> in other words: input('User/lastname'.$i),"\n"; echo $html->tagErrorMsg(User/las

Re: Newbie Introduction Book ... reviews anyone?

2007-07-29 Thread madmike210
I would live to take a look at your book, send to [EMAIL PROTECTED] Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubsc

Re: How do you usually create admin area on site with CakePHP?

2007-07-29 Thread keymaster
Suggestion - for a simple approach, you might try the following: use admin routing, and in your appController check for "admin_" prefix in the action part of the url. If it is there, do the auth checks. Your controllers don't need to be involved in auth checking for admin if you follow this appro