Re: ACL/Auth Speed Issues

2009-01-12 Thread AussieFreelancer
certainly looks like it could be the go, how do i then reference that? Just include it in components instead of Acl? thanks patrick On Jan 11, 7:17 am, "Marcus J. Ertl" wrote: > AussieFreelancer schrieb:> Hi there, yes i have put in indexes, im pretty > sure i have done it > > right, but it d

Re: swiftmailer will not send

2009-01-12 Thread brian
I don't know if this repeat post was a slip or what, but the crack about n00bs re-posting in frustration honestly wasn't directed at you! I hadn't seen this. I really was thinking about myself. ;-) On Tue, Jan 13, 2009 at 1:38 AM, ksalling wrote: > > I am running swiftmailer for php5 and the up

Fighting cakephp : can't add user count to group index

2009-01-12 Thread Arthur Pemberton
I was trying to do what would be a fairly simple thing in plain SQL. The bake script generated a nice groups_controller for me which paginated the groups listing. Fairly simple. All I wanted to do was add a user count to the index. The required SQL would be: SELECT `Group`.`id` , `Group`.`name`

Re: swiftmailer wont send

2009-01-12 Thread brian
Does the sendFrom header happen to contain "x...@riverstarcincy.com"? I ask because gMail doesn't display mails from myself to, for instance, this group. It's the source of some n00b frustration--myself included--in that one's first message (likely written in a cold sweat) doesn't appear to make i

Re: where to start - basic security question?

2009-01-12 Thread Miles J
You can simple allow/deny users from viewing certain actions depending on their user/login status. http://book.cakephp.org/view/172/Authentication http://book.cakephp.org/view/175/Security-Component --~--~-~--~~~---~--~~ You received this message because you are su

swiftmailer will not send

2009-01-12 Thread ksalling
I am running swiftmailer for php5 and the updated swiftmailer component for cake. I am running this on my local machine using xampp and everything works fine sending out an email to two recipients. x...@gmail.com and x...@riverstarcincy.com when I upload the controllers etc up to the web server w

swiftmailer wont send

2009-01-12 Thread ksalling
I am running swiftmailer for php5 and the updated swiftmailer component for cake. I am running this on my local machine using xampp and everything works fine sending out an email to two recipients. x...@gmail.com and x...@riverstarcincy.com when I upload the controllers etc up to the web server w

where to start - basic security question?

2009-01-12 Thread SethA
I'm new to all this. It all started with a desire on my part to start building some PHP based apps on my own time. I'm not a programmer by trade, so try to be understanding with me :). After months of [part time] googling, I've become familiar (somewhat) with MVC, why it is important, frameworks,

Re: counterCache is not working in 1.2

2009-01-12 Thread Sergei
I think I found a bug in generated countercache query: UPDATE `projects` AS `Project` LEFT JOIN `users` AS `User` ON (`Project`.`project_id` = `User`.`id`) SET `Project`.`topic_count` = 4 WHERE `Project`.`id` = 1 You see, it makes useless and WRONG JOIN-condition with `Project`.`project_id`: suc

Re: Not saving, how to debug more?

2009-01-12 Thread Miles J
Glad I can help :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@go

Re: Not saving, how to debug more?

2009-01-12 Thread Louie Miranda
Thank you for all your help! Miles yes you are right about, I should not call the save twice. CakePHP SQL query... 407 Query UPDATE `orderlists` SET `status` = 'New' WHERE `orderlists`.`id` = 123 It is now working! -- Louie Miranda (lmira...@gmail.com) http://www.loui

Re: Sessions, phpThumb, SwfUpload, Cake 1.2

2009-01-12 Thread Parris
I am happy to report that the iframe work around did work; however, it did cause a significant amount of grief! There is a security hole now. I could solve it with some round about magic I suppose. Possibly manually creating some sort of checking mechanism. --~--~-~--~~~---

RE: Not saving, how to debug more?

2009-01-12 Thread websta*
So your model is just not saving the record, maybe failing validation, not returning true from your before filter or something similar? Hard to know without seeing the data that you are passing in, or your model, just a couple ideas?! From: cake-php@googlegroups.com [mailto:cake-...@googlegr

Re: Not saving, how to debug more?

2009-01-12 Thread Miles J
Is this method within the Model or Controller. If its in the model, $this->Card should be $this->. You also cannot call save twice, try this: > function activate($id = null) > { > $this->checkSession(); > if (!$id) { > $this->Session->setFlash('Invalid Cancel Id request.'); >

Not saving, how to debug more?

2009-01-12 Thread Louie Miranda
Hello CakePHP! I have a little problem on my code. I have this function that upon trigger will activate and $id and change the status to "New". However, when doing this - the application is always doing the "else" part "The order could not be activated". I am monitoring the SQL logs and no query

Automatic foreignKey in $hasMany

2009-01-12 Thread kicaj
Hi I use this example: http://mrphp.com.au/code/code-category/cakephp/cakephp-1-2/attach-comments-any-model-cakephp And I i have a question: In models (Post, Event) we set property 'foreignKey' = 'foreign_id' in $hasMany, so why we must set again in 'view' action in 'Posts' controller: $this- >

Re: testing/fixtures: load different records on demand

2009-01-12 Thread mark_story
Currently fixtures are not that sophisticated. You get all or nothing. One solution is to do what websta* suggested and have two fixtures, or modify the fixture. But currently fixtures are pretty unaware with regards to how many records they have / are inserting. -Mark On Jan 12, 3:49 pm, Dav

Re: belongsTo not working on a HABTM

2009-01-12 Thread Miles J
I needed to paginate based on a condition within the HABTM, so simply using the parent model would not work. I had the model name correct because I debug() the controller and it outputs how the models should be named. Next I thought the file was named incorrectly, so I renamed it like 9 different

Re: Sessions, phpThumb, SwfUpload, Cake 1.2

2009-01-12 Thread Parris
Graham, Thanks for the response; however, that did not fix the situation. I know the session is dead because when I look at the login area it tells me to log in. The strange thing is that when i go to a different page the session is alive again. It seems that the session just temporarily goes awa

Re: belongsTo not working on a HABTM

2009-01-12 Thread Webweave
Sounds like there was something wrong with your model in that case. Did you have your corresponding hasMany/hasOne in your Topic and Entry models ? What 'extra data' were you not getting that you expected ? On Jan 12, 12:50 pm, Miles J wrote: > Ive tried many different things but simply, I nee

Re: Sessions, phpThumb, SwfUpload, Cake 1.2

2009-01-12 Thread graham
Hey, If you are overwriting your $components variable for that controller, try adding in the Session component. I've got the feeling you'll want to do: var $components = array('Thumb', 'SwfUpload', 'Session'); Cheers, Graham On Mon, 12 Jan 2009 12:43:45 -0800 (PST), Parris wrote: > > Hi E

Re: Quick help in starting to understand Cake's unit tests?

2009-01-12 Thread Gwoo
Probably best to paste your test case. Are you using the ClassRegistry to create the instance of your test model? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to c

RE: testing/fixtures: load different records on demand

2009-01-12 Thread websta*
IM pretty certain... ( crosses fingers ) that you would just use a different fixture in this case Or you could maybe pull some trickery in MyFixture::init to reduce records ( untested, but should do it ) -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups

RE: How well I can use CakePHP for building static site ?

2009-01-12 Thread websta*
This is true if your site is purely static then cake is a pretty hefty overhead, however. If you use view caching, coupled with a custom CacheHelper to render essentially static cached copies of your cake pages then you can still pull pretty good render times, your site is in a familiar forma

RE: Wrestling with the Auth Component

2009-01-12 Thread websta*
Depends on your app in my opinion, Sometimes you want an admin login and a "normal" login, sometimes the one login is sufficient for both, depends where your users are coming from and going to and what they should and shouldn’t see to exist. The only thing you need to double check on here is y

testing/fixtures: load different records on demand

2009-01-12 Thread David
Hi! I am using fixtures for my test methods and I'm not sure if it's possible, but I would like to load different records on demand in the different test methods. I know that you can load different fixtures with loadFixtures() and setting $autoFixtures to false, but I would like to load in one met

Re: HABTM and field formatting issue [Need Suggestion]

2009-01-12 Thread Miles J
Minor things like that could also be done in the view :p --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group,

Re: Loading models within the controller action

2009-01-12 Thread Miles J
I found an easier approach, setting the models in the beforeFilter! Heres my example. /** * Load action specific models * @return void */ function beforeFilter() { switch ($this->params['action']) { case 'games':

Re: How well I can use CakePHP for building static site ?

2009-01-12 Thread Miles J
If its all static, all you need is a header.php and a footer.php and include them on every page. Why use all the extra overhead and processing for static pages? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP

Re: Wrestling with the Auth Component

2009-01-12 Thread Rob Wilkerson
On Mon, Jan 12, 2009 at 3:48 PM, Miles J wrote: > > Arent you not supposed to allow() the login action also. That's my understanding from the docs, but I think it relates to explicit allowance rather than being rolled into an "*" allowance. Of course, I haven't gotten to the point of actually lo

Re: Cakesheet.pdf 1.2

2009-01-12 Thread Miles J
http://cakephp.org/files/Resources/CakePHP-1.2-Cheatsheet.pdf --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this gr

Re: Wrestling with the Auth Component

2009-01-12 Thread Rob Wilkerson
On Mon, Jan 12, 2009 at 3:35 PM, Rob Wilkerson wrote: >> When using the admin param in your route, your effectively pointing your >> route to AdministratorsController::admin_login -> you specified login as >> your login method Okay, you're dead-on. As soon as I rename the login() method to admin

Re: belongsTo not working on a HABTM

2009-01-12 Thread Miles J
Ive tried many different things but simply, I needed to use this model to paginate with, not the other way around. I could never get the associations to work, so I had to make a fake model and do $useTable to the correct table and that worked. --~--~-~--~~~---~--~~

Re: Wrestling with the Auth Component

2009-01-12 Thread Miles J
Arent you not supposed to allow() the login action also. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group,

Re: bug in Debugger?

2009-01-12 Thread brian
I forgot to mention that I *did* try debugging this with the controller's $components line commented. In fact, right now, with or without $components available, this still gives me a truncated array: public function add($media_type_slug = null) { die(Debugger::dump($this->data)); ... whe

Sessions, phpThumb, SwfUpload, Cake 1.2

2009-01-12 Thread Parris
Hi Everyone, So here is my issue. I have gotten the phpThumb and SWFupload components working. They upload, create thumbnails and using an ajax call will even post the thumbnails back on the page. There is an issue though. When I went back to only allow people logged in to upload pictures cake wo

Re: Wrestling with the Auth Component

2009-01-12 Thread Rob Wilkerson
On Mon, Jan 12, 2009 at 3:25 PM, websta* wrote: > > You got debug set to 1 or 2 right? And its still giving you blank page? Argh. I forgot about the obvious first step. I'm still not used to having a full-on debug mode available to me. That got me past one problem (trailing whitespace in my rout

RE: Wrestling with the Auth Component

2009-01-12 Thread websta*
You got debug set to 1 or 2 right? And its still giving you blank page? Im far from knowing the solution, but I can see a couple things that may be upsetting things: When using the admin param in your route, your effectively pointing your route to AdministratorsController::admin_login -> you spe

Re: (Bad) Tip: Checking HTTP Auth against your normal users table

2009-01-12 Thread Nate
Actually, I'd say this is a good tip given the caveat that HTTP authentication always be done over SSL. On Jan 12, 11:19 am, Martin Westin wrote: > Hi all, > It is not overtly documented but you can check your http > authentication against your normal users table, just like Auth > Component does

Wrestling with the Auth Component

2009-01-12 Thread Rob Wilkerson
I've been at this for a couple of hours now and I seem to be stuck. I'm trying to enable a pretty simple admin section for an app and would like to get familiar with the Auth component rather than rolling my own. I'm varying a bit from the convention, here, so I'll try to present what I have as si

Re: bug in Debugger?

2009-01-12 Thread brian
Got it working. Unfortunately, I'm still in the dark on this. None of what I did to make it work explains why Debugger was repeating the statements. I ruled out (from the access log) the action being accessed more than once. And, why Debugger's dump would show nothing when a die(debug($this-data))

Re: Scaffolding and Bake Question

2009-01-12 Thread Eric
The event types for both is INT. There is not a title in either table. On Jan 12, 1:55 pm, Rob Wilkerson wrote: > On Jan 12, 2:36 pm, Eric wrote: > > > > > Hello, > > > I have an entity called "Event" and an entity called "Gathering".  A > > "Gathering" is comprised of one or more "Event". > >

Re: returning checkmarked checkboxes after form is submitted

2009-01-12 Thread kai
Thanks, got it working. Used some different logic but same idea. It's not the html output that has me doing this manually, it's because i need to order the checkboxes according to another model. It's sections and categories and i want each category to be listed under its section. Anyways, thanks

Re: Scaffolding and Bake Question

2009-01-12 Thread Rob Wilkerson
On Jan 12, 2:36 pm, Eric wrote: > Hello, > > I have an entity called "Event" and an entity called "Gathering".  A > "Gathering" is comprised of one or more "Event". > I have a table called "events" and a table called "gatherings".  I > also have a table called "events_gatherings" that contains 2

Re: Recommended Controller Class Name.

2009-01-12 Thread Rogelio Nodal
Thanks a lot for your detailed answer. I will move on with the Admin controller I wanted :) and look into your method if requestAction starts giving me problems. One more time, thanks for your time and detailed answer. On Mon, Jan 12, 2009 at 2:37 PM, websta* wrote: > > As far as controller name

RE: Recommended Controller Class Name.

2009-01-12 Thread websta*
As far as controller name conventions go, yes usually they are the plural name of the relative model, but this by no means restricts you to calling your controllers plural names or names of models present in your application. As far as im aware controllers can be named almost anything (besides the

Scaffolding and Bake Question

2009-01-12 Thread Eric
Hello, I have an entity called "Event" and an entity called "Gathering". A "Gathering" is comprised of one or more "Event". I have a table called "events" and a table called "gatherings". I also have a table called "events_gatherings" that contains 2 fields "event_id" and "gathering_id". The "

Re: Multiple forms per page, field IDs need to be unique

2009-01-12 Thread mark_story
specify the id attribute? -Mark On Jan 12, 6:05 am, Chris Hawes wrote: > Hello, > > I'm currently working on an e-commerce application. > > On the product pages, I am generating a form to add products to the > cart. As such, each page can contain several forms. > > I've created a helper for my

Re: Ajax Request to delete record

2009-01-12 Thread Cris Sawfish
RequestHandler is loaded in the controller and it works perfectly! On 12 Ιαν, 20:11, brian wrote: > Make sure you have the RequestHandler component loaded in your controller. > > On Mon, Jan 12, 2009 at 8:58 AM, Cris Sawfish wrote: > > > Hi everybody, > > > I was playing around with the blog tu

RE: returning checkmarked checkboxes after form is submitted

2009-01-12 Thread websta*
data[Model]) && !empty($this->data[Model][checkboxName])) ? 'checked' : ''; ?> mailto:cake-...@googlegroups.com] On Behalf Of kai Sent: Tuesday, January 13, 2009 6:06 AM To: CakePHP Subject: returning checkmarked checkboxes after form is submitted I'm manually building my checkbox inputs so i c

Re: belongsTo not working on a HABTM

2009-01-12 Thread Webweave
Why do you have the echo in test action of your controller ? That's going to break things even if everything else was OK. If you set debug to 2 or 3, you should get the SQL that was produced, which will help diagnose your issue. I don't think you should be calling the test method in the model,

Re: hasMany + belongsTo relationship problem

2009-01-12 Thread Webweave
You just need to set the recursive level to fetch the data that is not directly related. See: http://book.cakephp.org/view/439/recursive Set it before you do your find, or in the individual action. On Jan 8, 11:20 pm, Ernesto wrote: > Hello and thx for the fast response. > > i forgot to paste t

Re: ACL's permission problem

2009-01-12 Thread Webweave
>From my experience with this, the user gets redirected back to the page that they came from. If you go to http://volunteercake.sf.net and login as jdoe/jdoe, then try to go to http://volunteercake.sf.net/slots, you'll get the "You are not authorized to access that location." error and be redirec

Quick help in starting to understand Cake's unit tests?

2009-01-12 Thread BrendonKoz
Firstly, I just want to say that I have successfully created and run a web-based test with Cake (https://trac.cakephp.org/ticket/5659), but I've come to realize that there are maybe 3-5 different ways to create and run tests for Cake. There's command line, web-based (core and app), and even diffe

Recommended Controller Class Name.

2009-01-12 Thread CakeAddict
Hello all, Based on what I have read from the documentation, the recommended way of naming your controller class is the plural form of the model they use. So if I have Post model then the controller class should be PostsController but what is the recommended name for a controller that does not us

Re: Ajax Request to delete record

2009-01-12 Thread brian
Make sure you have the RequestHandler component loaded in your controller. On Mon, Jan 12, 2009 at 8:58 AM, Cris Sawfish wrote: > > Hi everybody, > > I was playing around with the blog tutorial on cakephp, and I decided > to make a modification in the section "Delete posts", in order to use > aj

Re: Bulk emailing in cakephp1.2

2009-01-12 Thread brian
I just posted this in another mail a moment ago. It's an updated component for using SwiftMailer[1] instead ofCake's EmailComponent. SwiftMailer has a plugin named, AntiFlood, which allows one to set the number of mails (from a large list of addresses) to send out in one go, as well as a delay tim

Re: Multiple forms per page, field IDs need to be unique

2009-01-12 Thread brian
What Rogelio said. And, if you prefer buttons to links, you can always use javascript to swap your links for buttons. This would be a snap with jQuery. On Mon, Jan 12, 2009 at 12:34 PM, Rogelio Nodal wrote: > I'm new to CakePHP(day of reading documentation is pretty much my > experience) but If

Re: Soft delete in CakePHP

2009-01-12 Thread brian
I seem to recall seeing that behavior quite some time ago. You could modify it to bring it up to 1.2 level and add the desired functionality. On Mon, Jan 12, 2009 at 11:07 AM, Ernesto wrote: > > Hello. > > i'm looking for a smart way to implement Soft Delete in my app. > > every table (model) ha

Re: comment model from bakery - controller dump (memory size)

2009-01-12 Thread brian
Set debug to 2 in core.php. The controller dump from level 3 is far too much noise so don't use it unless you really need all that info. On Mon, Jan 12, 2009 at 5:39 AM, tobi_one wrote: > > Hi, > > I'm currently trying to build a comment system and used the bakery > comment system as a starting

Re: get render output

2009-01-12 Thread brian
I've been modifying Wouter Verweirder's port of othman ouahbi's SwiftMailer component. I've posted my version here: http://bin.cakephp.org/view/2015386698 This is very much a work in progress. I'm pretty sure I'll be changing things but it works fine as is, so far. Note that a new Message is cre

Re: Multiple forms per page, field IDs need to be unique

2009-01-12 Thread Rogelio Nodal
I'm new to CakePHP(day of reading documentation is pretty much my experience) but If it was me doing it I would instead of using forms I would just add links in the form /produtcs/addtocart/45 or /products/addtocart/VeryNiceProduct and then use the flash function to redirect back to the products pa

Re: bug in Debugger?

2009-01-12 Thread brian
Thanks, but no luck. The access log doesn't show anything strange that I can see. But, I still see Debugger's statements repeated a couple seconds later. But, the strangest thing of all is this: public function add($media_type_slug = null) { die(debug($this->data)); die(Debugger:

Re: Accessing a directory

2009-01-12 Thread Bernardo Vieira
Have you tried to put the livehelp folder inside your webroot folder? The stock .htaccess rules for the webroot folder are as follows: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] That means

Re: Cake ACL check

2009-01-12 Thread Steppio
Thanks for your response! My full problem is i have groups that users belong to through a parent_id, and when i upload the site and make groups there not registering with the ACL (SQL Error: 1054: Unknown column 'Aro.parent_id' in 'field list' ). Normally i would run 'cake schema run create DbAcl

returning checkmarked checkboxes after form is submitted

2009-01-12 Thread kai
I'm manually building my checkbox inputs so i can display them in a special way. how can i have the marked checkboxes remain marked after the form is submitted? This comes as a core feature when using $form- >input() but i'm having trouble figuring out how to get this working manually. (other than

Re: Submitting a form with ajax using a diffrent controller

2009-01-12 Thread dimitri
are you also reading "apress cakephp from novice." cause i'm doing so and tought I recognised the problem. have you solved in the main time and could you now help someone else please like me for example? ;) --~--~-~--~~~---~--~~ You received this message

Re: /index.php killing session

2009-01-12 Thread Mike Bernat
Even when accessing index.php does it send you to a controller. By default, the pages controller. On Mon, Jan 12, 2009 at 11:40 AM, Gwoo wrote: > > This usually happens when you have extra whitespace after a ?> in one > of the class files. > > > --~--~-~--~~~---~--~-

Re: How to redirect from /pages ?

2009-01-12 Thread the_woodsman
Thanks for the tip Miles. In the end, we realised that we can do the redirect in the view with standard php, as long as we put it in a nocache block. For us that's better, because it means our less technical html guys can do this, without having to edit the controllers... On Jan 12, 3:03 am, Mar

Re: Acl example help.

2009-01-12 Thread Adriano Varoli Piazza
On 12 ene, 01:32, Eric wrote: > I just installed cakePHP 1.2, I am at step 10.2.6 in the "Example > Applications" section of the manual.  I have added the buildAcl() > function to the app_controller.php file, but how do I run the > function? > > I have tried several methods, but keep getting er

Re: /index.php killing session

2009-01-12 Thread Gwoo
This usually happens when you have extra whitespace after a ?> in one of the class files. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com

Re: Cakesheet.pdf 1.2

2009-01-12 Thread Gwoo
Fixed --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.co

Acl example help.

2009-01-12 Thread Eric
I just installed cakePHP 1.2, I am at step 10.2.6 in the "Example Applications" section of the manual. I have added the buildAcl() function to the app_controller.php file, but how do I run the function? I have tried several methods, but keep getting errors. Any help is appreciated. Thanks...

Re: Cakesheet.pdf 1.2

2009-01-12 Thread gpreston
I brought this up to PhpNut in IRC about two weeks ago, the link on the website still points to the old place unfortunately. The offending page is: http://cakephp.org/#learn On Jan 12, 9:32 am, Daniel Hofstetter wrote: > Hi, > > > Since few days the cakesheet link [http://cakephp.org/files/ > >

Ajax Request to delete record

2009-01-12 Thread Cris Sawfish
Hi everybody, I was playing around with the blog tutorial on cakephp, and I decided to make a modification in the section "Delete posts", in order to use ajax request to delete a certain post. I created an $ajax->link(), inside the view that displays all the posts, to make the request as follows

Bulk emailing in cakephp1.2

2009-01-12 Thread miracle
Hello, I need to send emails to 100's of users in my application and i am using cake php 1.2. Can you guys please help me which component to use for bulk emailing.?? Thanks in advance, --~--~-~--~~~---~--~~ You received this message because you are subscribed to

SaveAll + one-to-many

2009-01-12 Thread Joshua
I have no idea on how to save model A that has a one-to-many relationship with module B. Example: --- table A id name -- table B id a_id name -- How to do this if I want to save A with many B records in model A function. I really google a lot of resource, but I didn't find the answer

Re: how can i create a disabled input box using formhelper?

2009-01-12 Thread TC
thanks for your help On Jan 9, 5:56 pm, kizuki wrote: > Set 'disabled' option to true (or 1). > > input('Model.field_name', array('disabled' => > true)); ?> > > On Jan 9, 12:01 pm, TC wrote: > > > howcani create a disabled input box using formhelper? --~--~-~--~~~--

Multiple forms per page, field IDs need to be unique

2009-01-12 Thread Chris Hawes
Hello, I'm currently working on an e-commerce application. On the product pages, I am generating a form to add products to the cart. As such, each page can contain several forms. I've created a helper for my application which contains: product display; add to cart form generation; menu generati

Re: How well I can use CakePHP for building static site ?

2009-01-12 Thread Martin Westin
If you have more than 10 static pages (or you want some menu hierarchy) I would suggest publishing those "static" pages using one of the CMSes available. Even though they are static they will probably change a little at times and a CMS is very helpful even when changes are rare. There are a few

(Bad) Tip: Checking HTTP Auth against your normal users table

2009-01-12 Thread Martin Westin
Hi all, It is not overtly documented but you can check your http authentication against your normal users table, just like Auth Component does. I didn't know this before. I thought I had to make an loginUserrs array. But a simple change gave me the opportunity to check the login any way I wanted.

Soft delete in CakePHP

2009-01-12 Thread Ernesto
Hello. i'm looking for a smart way to implement Soft Delete in my app. every table (model) has 2 fields - Deleted DATETIME (if not null = record deleted) - DeletedBy INT (PersonID) i tried the SoftDeletable behavior found in Bakery but i get some errors. for example... - it loads data from lin

Re: How well I can use CakePHP for building static site ?

2009-01-12 Thread Keith
While it's definitely possible to do the things you're talking about with CakePHP you might just want to take advantage of the Server Side Include technology that HTML can do natively. Every time you add on another layer of technology (in this case PHP, and then CakePHP) you add some complexity i

Re: /index.php killing session

2009-01-12 Thread tog
The problem is when I simply access /index.php with no controller specified. The second post here fixewd the issue, but I was hoping to not have to hack the framework: http://groups.google.com/group/cake-php/browse_thread/thread/5504a76dd4c5405c/68aec777eeb5cf0c?lnk=gst&q=session+problem+setcook

Re: How well I can use CakePHP for building static site ?

2009-01-12 Thread dr. Hannibal Lecter
Hi Sridhar, Of course you can use CakePHP to build a static site. Search for articles regarding "PagesController", a built-in controller which enables you to do just that - show static pages. Your header, side navigation etc are handled with view layouts. Hope that helps a bit. Welcome to cake wo

Re: how to display image in your view from database

2009-01-12 Thread Martin Westin
Hi mona, It is not too hard to display "dynamic" images, protected images or in your case database-stored images. You need two parts for this puzzle. 1: Your controller needs a new method called "image" or something like it. This method will pretty much be a copy of your view method. This method

Re: Problem with text encoding

2009-01-12 Thread Martin Westin
Isn't it great that a divx video-file is more "cross compatible" than simple text-files. :) On Jan 12, 11:01 am, brian wrote: > Probably *anything* that might be interpreted by the PHP engine. So, > .po files in your locale directory, too, I'm sure. > > On Mon, Jan 12, 2009 at 4:52 AM, Marco

How well I can use CakePHP for building static site ?

2009-01-12 Thread Sridhar Kuppalli
Hi All, I am new to cakePHP, but really impressed with the blog example and tried similar other example also. Now I want to design a static website, with less dynamic functionality, (3 to 4 through out the site). But it has common modules, like header, side navigation etc. Can I use cakePHP to imp

Re: Cakesheet.pdf 1.2

2009-01-12 Thread Daniel Hofstetter
Hi, > Since few days the cakesheet link [http://cakephp.org/files/ > cakesheet.pdf] isn't working. I don't know if it's some mistake or it > isn't prepared yet the one for the new version. Well, if someone has > the cakesheet of the 1.2 version please send it to me to villosil at > gmail dot com.

Re: Accessing a directory

2009-01-12 Thread Unite
I have tried RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/livehelp/(.*)$ RewriteRule ^.*$ - [L] RewriteEngine on RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] but this didnt work either. any suggestions? On Jan 12, 4:07 p

How to upload files in edit view

2009-01-12 Thread mona
I tried alot i wan't to chand my attachment in edit view but when i m doing that it is displaying error how to edit uploaded files in database from edit view i tried as add action but it doesn't work thsi is my controller code please tell me in edit function where to write file uploading code an

how to display image in your view from database

2009-01-12 Thread mona
i m storing images in database and i wan't to display images in my view how to do this in cake php my controller code is Entry->find('all', array('fields' => array('(max (Entry.counter)) as max_counter'))); $query=mysql_query("select max(counter) from entries"); $row=mysql_fetch_array($q

Cakesheet.pdf 1.2

2009-01-12 Thread villosil
Hi, Since few days the cakesheet link [http://cakephp.org/files/ cakesheet.pdf] isn't working. I don't know if it's some mistake or it isn't prepared yet the one for the new version. Well, if someone has the cakesheet of the 1.2 version please send it to me to villosil at gmail dot com. Thanks!

Re: Accessing a directory

2009-01-12 Thread Unite
RewriteEngine on RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] thats my .htaccess. so how would I do it? Dont know much about .htaccess. Thanks On Jan 12, 4:00 pm, Kappa wrote: > Why not configuring properly the .htaccess ? put a rule before the > cake

Re: Accessing a directory

2009-01-12 Thread Kappa
Why not configuring properly the .htaccess ? put a rule before the cake routing, in that way it will not be remapped in /app/webroot Bye, Andrea On Jan 12, 2:33 pm, Unite wrote: > On my servers WWW directory I have cakephp installed and it works. My > problem is I want to now add a comercial

Re: share function in views

2009-01-12 Thread Kappa
I agree with the helper solution, it's more scalable.. now you have 1 function soon you'll maybe have 1 hundred.. On Jan 12, 1:00 pm, Adam Royle wrote: > If it's just a simple function, then you can place it in bootstrap.php > and it will be globally available. > > Cheers, > Adam > > On Jan 12,

TinyMCE - I keep getting SCRIPT tags added and converting wrong characters

2009-01-12 Thread jabocs
Hello, I've been using TinyMCE for a while now in a custom Content Management System written in CakePHP. I'm having a weird instance lately where I'm getting some converting of HTML tags to script... For Example: Some span and img tags are putting the following code: into strange places like

Re: Simple Drop Down List

2009-01-12 Thread forrestgump
Oh wow $displayField i would have never figured this out thanks a lot grigri...:).a lil more advicewhere did u come by this one? On Jan 12, 5:37 pm, grigri wrote: > In your District model, add this line: > > class District extends AppModel { >   var $displayField = 'district'; >   //

Accessing a directory

2009-01-12 Thread Unite
On my servers WWW directory I have cakephp installed and it works. My problem is I want to now add a comercial product to my site that gets accessed using www.mydomain.com/livehelp (livehelp is the commercial package). How or where would I put the livehelp folder so it has the affect of www.mydoma

Re: Simple Drop Down List

2009-01-12 Thread grigri
In your District model, add this line: class District extends AppModel { var $displayField = 'district'; // ... } Now use find('list') and it will work fine. To avoid unnecessary code, you can just do this: [controller] $this->set('districts', $this->District->find('list')); [view] echo $

  1   2   >