Re: Problem with Password validation ?

2010-12-20 Thread John Maxim
@Amit First, Thanks man. Second..., Do you know how to implement Solution 1 above ? On Dec 21, 12:47 pm, Amit Badkas wrote: > Hi, > > If your form has password confirmation field then you can add 'not empty' > and 'length check' validations for that field as it won't contain hashed > valu

How to display password_2 field in asterisk ?

2010-12-20 Thread John Maxim
I have 2 password fields; 1. password 2. password_2 The value displayed in field password_2 is in plain text, how to change it to asterisks/dots ? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because

Re: New Js helper in 1.3: jQueryObject value not being used for get method

2010-12-20 Thread senser
I have the same problem. Does anybody find a solution for this? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send

Re: CakePHP HABTM association rules

2010-12-20 Thread Amit Badkas
Hi, Try to build the SQL query something like SELECT *, COUNT(DISTINCT tags.name) AS uniques FROM products, products_tags, tags WHERE products.id = products_tags.product_id AND tags.id = products_tags.tag_id AND tags.name IN ('ruby', 'earrings') GROUP BY products_tags.photo_id HAVING uniques = 2

Re: How can I add to one table while I'm adding to another

2010-12-20 Thread Amit Badkas
Hi, You need to use behavior for this, I use modified version of http://bakery.cakephp.org/articles/dooltaz/2007/05/02/simple-tagging-behavioras this is a too old article and some code in it need to change as per latest version of CakePHP. Amit Badkas PHP Applications for E-Biz: http://www.sanis

Re: Problem with Password validation ?

2010-12-20 Thread Amit Badkas
Hi, If your form has password confirmation field then you can add 'not empty' and 'length check' validations for that field as it won't contain hashed value. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Mon, Dec 20, 2010 at 10:43 PM, John Maxim wrote: > 'password' => a

Re: Problem with Password validation ?

2010-12-20 Thread John Maxim
Solution 1: function hashPasswords($data) { if (isset($data[$this->userModel])) { $model =& $this->getModel(); if (!empty($data[$this->userModel][$this- >fields['username']]) && !empty($data[$this->userModel][$this- >fields['password'

CakePHP HABTM association rules

2010-12-20 Thread halfasleeps
If I want to create a category and be able to link products to it by tags I can like so: - Create the category and product tables. - Create a tags table with tags like: Ruby, Earrings, White-Gold - Create a category_tags and product_tags table to map them - Set category and product to hasAndB

Bake not writing files on Mac OS X with XAMPP

2010-12-20 Thread Sam Rae
Hi all, I'm having trouble with the bake process on Mac OS X, running XAMPP. The bake process works fine (it takes me through all the questions and steps and detects things from my database correctly) but it just doesn't write the files to disk. For example, it says: Creating file /Applications

SQL Query & Search Tutorial for CakePHP

2010-12-20 Thread OldWest
Does anyone know of a good tutorial using Cake convention for writing SQL queries with multiple search field types e.g. select menu, text entry, radio, checkboxes etc? I cannot locate anything very specific like this. Check out the new CakePHP Questions site http://cakeqs.org and help others with

Re: Register Function--Hashing Password and Auto-login Causes Password Validation Disabled in Register Page

2010-12-20 Thread John Maxim
How to include Auth component in Array ? I read it there is no example how to put into array, the only way is shown as above. On Dec 21, 6:15 am, cricket wrote: > On Mon, Dec 20, 2010 at 10:33 AM, John Maxim wrote: > > @Ahmed, > > > I found the solution for redirecting, put this function in your

Re: How can I add to one table while I'm adding to another

2010-12-20 Thread Amit Rawat
Hi, Use saveAll For more detail check the link: http://book.cakephp.org/view/75/Saving-Your-Data Enjoy, Amit On Tue, Dec 21, 2010 at 7:32 AM, georgeman wrote: > Here is the scenario based on a simple blog: > > The model for the blog is called Post. Post has the following fields: > id, title

How can I add to one table while I'm adding to another

2010-12-20 Thread georgeman
Here is the scenario based on a simple blog: The model for the blog is called Post. Post has the following fields: id, title, body, created, modified. There are two other related models: Tag and Comment. Tag has the following fields: id, name, created, modified. Comment has the following fields: i

Re: FormHelper Problem

2010-12-20 Thread georgeman
No problem cricket. I appreciates all the responses. (Miles and Tilen too) The first thing I tried was to redirect but this has its own problems. $this->data was no longer available after the redirect, meaning it was empty. It also caused problems with AuthComponent because function beforeFilter()

Re: Export to MSExcel

2010-12-20 Thread Renato de Freitas Freire
There is an excel generator: http://phpexcel.codeplex.com/ Works pretty good, with formatting, tabs, and everything u can imagine. Pretty simple to use with cake: http://phpexcel.codeplex.com/Thread/View.aspx?ThreadId=54383

RE: What could prevent Uploads?

2010-12-20 Thread Dave Maharaj
Good memory! Yeah its VPS server and I am the only one on it, no other domains so is safe mode an issue then if I am the only one on the server? I am admin / root all of the above. Plesk has simple server settings enable safe mode check box so I just unchecked it and uploads worked. -Origina

Re: Export to MSExcel

2010-12-20 Thread cricket
On Mon, Dec 20, 2010 at 8:42 AM, Ryan Schmidt wrote: > On Dec 20, 2010, at 06:16, Mike Karthauser wrote: >> On Mon, December 20, 2010 11:49 am, rakeshyadav rakeshyadav wrote: >>>          i am trying to export my reports to excel in .xls formate and i >>> need to maintain >>> >>>          same vie

Re: FormHelper Problem

2010-12-20 Thread cricket
On Mon, Dec 20, 2010 at 3:37 PM, Miles J wrote: > @Cricket - Since when is that possible? I know you can use action as a > parameter, but if you want to define a full route, you must use url. Since I made it up, apparently. You're right. I wasn't thinking about that clearly. Sorry, georgeman. Ch

Re: What could prevent Uploads?

2010-12-20 Thread cricket
On Mon, Dec 20, 2010 at 3:33 PM, Dave Maharaj wrote: > Thanks will go thru your points, test out more stuff, settings. > > I know I had safe mode on always but just to check things I turned it off > and now it uploads. With it on I found User permission message so it looks > like server access wit

Re: Register Function--Hashing Password and Auto-login Causes Password Validation Disabled in Register Page

2010-12-20 Thread cricket
On Mon, Dec 20, 2010 at 10:33 AM, John Maxim wrote: > @Ahmed, > > I found the solution for redirecting, put this function in your > controller: > > function beforeFilter() >                { >                        parent::beforeFilter(); >                        $this->Auth->allow('*'); >      

Re: FormHelper Problem

2010-12-20 Thread Tilen Majerle
Miles, you're right, and georgeman, this what u did, should work, look source code, if form is correctly generated, maybe you have in "add" method in controller any redirect or something -- Lep pozdrav, Tilen Majerle http://majerle.eu 2010/12/20 Miles J > @Cricket - Since when is that poss

Re: FormHelper Problem

2010-12-20 Thread Miles J
@Cricket - Since when is that possible? I know you can use action as a parameter, but if you want to define a full route, you must use url. On Dec 20, 12:06 pm, cricket wrote: > You don't need to specify url: > > echo $this->Form->create( >     'ContactRequest', >     array('controller' => 'conta

RE: What could prevent Uploads?

2010-12-20 Thread Dave Maharaj
Thanks will go thru your points, test out more stuff, settings. I know I had safe mode on always but just to check things I turned it off and now it uploads. With it on I found User permission message so it looks like server access with files folders. Man I hate dealing with the server. Dave --

Re: What could prevent Uploads?

2010-12-20 Thread cricket
On Mon, Dec 20, 2010 at 1:29 PM, Dave Maharaj wrote: > Puzzled by this one. I had the site uploading images no problem then it > stopped working so I am trying to trace back what I could have done to cause > this error. > > > > In the upload script I kept making debug($foo); exit(); statements to

Re: FormHelper Problem

2010-12-20 Thread cricket
You don't need to specify url: echo $this->Form->create( 'ContactRequest', array('controller' => 'contact_requests', 'action' => 'add') ); On Sun, Dec 19, 2010 at 10:15 PM, georgeman wrote: > I built a simple contact request form using FormHelper. The form is > located on 'pages/contact'

Re: Dynamic forms

2010-12-20 Thread cricket
2010/12/20 Andrés Manikis : > > I do need different fields for passport and National document. For > example, the passport has an expiration date whereas the national > document has not. So I think I should extend the Credential model. > How could I do that? I know how to do it at the PHP side but

Re: Change model behavior in controller

2010-12-20 Thread jodator
In most cases look at book.cakephp.org: http://book.cakephp.org/view/1072/Using-Behaviors On 20 Gru, 15:31, Dobrogor wrote: > Hi all! I want to change my model behavior, when program is running. > For example, I have in my model behavior variable like this > var $actsAs = array('i18n' => array('f

What could prevent Uploads?

2010-12-20 Thread Dave Maharaj
Puzzled by this one. I had the site uploading images no problem then it stopped working so I am trying to trace back what I could have done to cause this error. In the upload script I kept making debug($foo); exit(); statements to pin point exactly where the script craps out and it's when I cop

Re: Non-breaking spaces in baked views

2010-12-20 Thread mark_story
Escaping has been added to scaffolding and baked views in 2.0. Its a change that could easily be backported to the 1.3 branch as well. I might just do that. -Mark On Dec 14, 10:05 am, euromark wrote: > and you shouldnt use those templates for productive websites where > users can input data or

Problem with Password validation ?

2010-12-20 Thread John Maxim
'password' => array( 'notEmpty' => array( 'rule' => 'notEmpty', 'message' => 'This field cannot be blank.', 'last' => true, ), 'len

Re: Dynamic forms

2010-12-20 Thread Andrés Manikis
On 18 dic, 16:46, cricket wrote: > On Fri, Dec 17, 2010 at 11:20 PM, Andr?s Manikis > > wrote: > > Hello. > > I have the following questions. > > > Let's suppose I have, say, a person model which has an id, a name and a > > boolean that tells whether this person is native from a specific countr

Re: Register Function--Hashing Password and Auto-login Causes Password Validation Disabled in Register Page

2010-12-20 Thread John Maxim
But my password validation stopped working after my auth works. I can still insert password but I can also leave it blank and it will regenerates auto-passwords in the field. On Dec 20, 11:33 pm, John Maxim wrote: > @Ahmed, > > I found the solution for redirecting, put this function in your > con

Re: Register Function--Hashing Password and Auto-login Causes Password Validation Disabled in Register Page

2010-12-20 Thread John Maxim
@Ahmed, I found the solution for redirecting, put this function in your controller: function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('*'); } *** It should solve the redirecting problem. I did it a

Re: "Bug" with media.php CakePHP core file - HELP

2010-12-20 Thread BrendonKoz
Oh. I didn't realize I could move that in to my app; I figured only app_* and cake view/layout files could be moved to the app. That makes things much easier. Thanks, euromark! On Dec 16, 10:25 am, euromark wrote: > you dont have to :) > just copy it into your /app/views/ folder > cake will use t

Change model behavior in controller

2010-12-20 Thread Dobrogor
Hi all! I want to change my model behavior, when program is running. For example, I have in my model behavior variable like this var $actsAs = array('i18n' => array('fields'=>array('header', 'preview', 'content'))); But I want change this to null or to delete in some controllers. :) Is this possi

Re: Defining php functions in views

2010-12-20 Thread Bogdan Bursuc
I once come across this just needed a recursive function in a view, so in order to use the helpers I just sent them as params: function getLink($x, &$html) { return $html->link($x, '#'); } getLink('xxx', &$html); if you use php5 > I think this "&" isn't necessary. On Mon, Dec 20, 2010 at 10:08

Re: Export to MSExcel

2010-12-20 Thread Ryan Schmidt
On Dec 20, 2010, at 06:16, Mike Karthauser wrote: > On Mon, December 20, 2010 11:49 am, rakeshyadav rakeshyadav wrote: >> i am trying to export my reports to excel in .xls formate and i >> need to maintain >> >> same view in both MSExcel and Openoffice can any one please >> sugge

Re: Export to MSExcel

2010-12-20 Thread Mike Karthauser
On Mon, December 20, 2010 11:49 am, rakeshyadav rakeshyadav wrote: > Hi All, > > i am trying to export my reports to excel in .xls formate and i > need to maintain > > same view in both MSExcel and Openoffice can any one please > suggest me the > > easy way to achive t

Export to MSExcel

2010-12-20 Thread rakeshyadav rakeshyadav
Hi All, i am trying to export my reports to excel in .xls formate and i need to maintain same view in both MSExcel and Openoffice can any one please suggest me the easy way to achive this Thanks in Advance Rakesh Check out the new CakePHP Questions site http://ca

Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Ahmed Abdulmoula
Thank you Jeremy On Mon, Dec 20, 2010 at 1:14 PM, Jeremy Burns | Class Outfit < jeremybu...@classoutfit.com> wrote: > How are you writing out the session message in the view? I t ought to be: > echo $this->Session->flash(); > > Jeremy Burns > *Class Outfit* > * > * > jeremybu...@classoutfit.com

video sharing script

2010-12-20 Thread chris...@yahoo.com
Hi guys, anyone can suggest video sharing "social network" script written in CAKE. I want to add video section to my social network (still in testing) site. So users can add their own videos from these MAJOR guys like Youtube, Metacafe, DailyMotion Vimeo,... etc... and if possible just by placing t

Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Jeremy Burns | Class Outfit
How are you writing out the session message in the view? I t ought to be: echo $this->Session->flash(); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 20 Dec 2010, at 10:11, Ahmed Abdulmoula wrote: > > I am using mine Layout > > > On Mon, Dec 20, 2010 a

Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Ahmed Abdulmoula
I am using mine Layout On Mon, Dec 20, 2010 at 1:00 PM, Amit Badkas wrote: > Hi, > > The controller code seems to be fine. Are you using CakePHP's built-in > layout or your own? > > Amit Badkas > > PHP Applications for E-Biz: http://www.sanisoft.com > > > > On Mon, Dec 20, 2010 at 12:52 PM, Ahme

Re: Using CakePHP on a Zeus Server

2010-12-20 Thread WhyNotSmile
Ugh, thanks! On Dec 20, 3:30 am, James K wrote: > Ah Zeus, my old nemesis. > > If it's shared hosting, I don't think you can implement the rewrite > file yourself. I had to go through an extremely frustrating song and > dance where I had to send the rewrite script to the hosting company's > suppo

Re: setFlash() doesn't wotk with me on WAMP

2010-12-20 Thread Amit Badkas
Hi, The controller code seems to be fine. Are you using CakePHP's built-in layout or your own? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Mon, Dec 20, 2010 at 12:52 PM, Ahmed - CakePHP wrote: > > This is the Controller code: > > class PostsController extends AppContr

Re: Register Function--Hashing Password and Auto-login Causes Password Validation Disabled in Register Page

2010-12-20 Thread Ahmed - CakePHP
I am also have the same problem I get login page every time I write correct Username and Password What is the problem ?!?! We need help here On Dec 20, 10:00 am, John Maxim wrote: > My Register page: > > Please fill out the form below to register an account. > create('User', array('action'

Re: session problem or misunderstanding.

2010-12-20 Thread georgeman
There is a Session helper and a Session component. If you want for all controllers write in app_controllers: var $components = array('Session'); On Dec 20, 2:03 am, "Shinya Koizumi" wrote: > For 1.2.8, How do I enabled that again? I am already using this for another > control, but don't remember

Re: Defining php functions in views

2010-12-20 Thread ojonam
Hi all, thanks for the replies. @Ryan, Miles J: thanks, I didn't know the intricacies of the scope of "this" in PHP. I'll make sure to check it out on the net. @others: as mentioned above, I'm using this getLink function as a one time function in a specific view. Creating a helper or defining a fu