Dynamic Default Database Selection
Hi Guys I want to give user the opportunity to be able to choose the default database from his/her setting page. How can I do that? Imagine there are 2 databases, One in MySQL and the other one in Oracle, How can I let user to change it ? Thanks Sherry -- View this message in context: http://cakephp.19694.n2.nabble.com/Dynamic-Default-Database-Selection-tp5973725p5973725.html Sent from the CakePHP mailing list archive at Nabble.com. -- 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...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: CSV Helper
I fixed that problem by using this method - http://www.dnamique.com/cakephp-export-data-to-excel-the-easy-way/ http://www.dnamique.com/cakephp-export-data-to-excel-the-easy-way/ -- View this message in context: http://cakephp.19694.n2.nabble.com/CSV-Helper-tp5892409p5894944.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
CSV Helper
Hi All I'm using CSV helper to export my report as CSV. I added CSV in my controller and in my view I'm using the following codes: $line = array ( Parameter1,Parameter2); $csv-addRow($line); $line = array ( Parameter3,Parameter4); $csv-addRow($line); echo $csv-render('test.csv', 'UTF-16','auto'); but my result will be parameter1;parameter2 in the first row same col and parameter3;parameter4 in the second row same col, plus the result is not Unicode can anybody help me to fix this code and have the result as: parameter 1 parameter 2 in row1 col 1 col2 parameter 3 parameter 4 in row2 col 1 col2 Thanks Sherry -- View this message in context: http://cakephp.19694.n2.nabble.com/CSV-Helper-tp5892409p5892409.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
$this-Session-setFlash problem
Hi All I have the following lines in my controller: $this-Session-setFlash('blabla'); $this-redirect(array('action'='unsuccessful')); exit(); and this part in my view: if ($session-check('Message.flash')) { echo $session-flash(); } but the result will be : div id=flashMessage class=messageblabla/div1 I have that 1 extra in my view!!! can anyone help me please! Thanks Sherry -- View this message in context: http://cakephp.19694.n2.nabble.com/this-Session-setFlash-problem-tp5856173p5856173.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: $this-Session-setFlash problem
Thank you guys! yes Im using 1.2 and after I removing echo I'm not having that 1!!! I spent hours last night to remove that 1 Thanks Sherry -- View this message in context: http://cakephp.1045679.n5.nabble.com/this-Session-setFlash-problem-tp3314357p3314653.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
One page not loading in IE
Hi All I have a very strange problem with IE, I have a My account page in my web site with Cake 1.2 and it is not showing in IE, the Security Level is set to Low and Sessions are controlling by Database. I used the Firebug and the only problem that I noticed was the cookies, Every time I tried to set a cookie, cake set it 3-4 times!!! Is it normal? because I was thinking maybe it may crash the IE Any Idea? Thanks in advanced Sherry http://cakephp.1045679.n5.nabble.com/file/n3266359/firebug.jpg -- View this message in context: http://cakephp.1045679.n5.nabble.com/One-page-not-loading-in-IE-tp3266359p3266359.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Cakephp email
Hi all I'm using the contact importer to let users send invitation to their contacts. I noticed that when they are sending email to more than 20-30 contacts, servers using lots of resources and, when I have 20-30 users doing that even web server end up crashing!!! here is my send function! function send($email,$code,$message) { $this-Email-delivery = 'mail'; $activate_url= 'http://' . env('SERVER_NAME') . '/users/user_registration_invite/' .$code ; $this-set('url', $activate_url); $this-set('umessage',$message); $this-Session-write('$code',$activate_url); $loo = $this-Session-read('$code'); $name = $this-Session-read('Auth.User.first_name').' '.$this-Session-read('Auth.User.last_name'); $this-set('name',$name); $this-set('email',$this-Session-read('Auth.User.email')); $this-Email-to =$email; $this-Email-subject = Invitation; $this-Email-template = 'user_invitation_acceptance'; $this-Email-sendAs = 'html'; $this-Email-send(); } Did I do sth wrong? is there any way to optimize the process like sending the emails to the que? Thanks Sherry -- View this message in context: http://cakephp.1045679.n5.nabble.com/Cakephp-email-tp3226466p3226466.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Cakephp email
Hi all I'm using the contact importer to let users send invitation to their contacts. I noticed that when they are sending email to more than 20-30 contacts, servers using lots of resources and, when I have 20-30 users doing that even web server end up crashing!!! here is my send function! function send($email,$code,$message) { $this-Email-delivery = 'mail'; $activate_url= 'http://' . env('SERVER_NAME') . '/users/user_registration_invite/' .$code ; $this-set('url', $activate_url); $this-set('umessage',$message); $this-Session-write('$code',$activate_url); $loo = $this-Session-read('$code'); $name = $this-Session-read('Auth.User.first_name').' '.$this-Session-read('Auth.User.last_name'); $this-set('name',$name); $this-set('email',$this-Session-read('Auth.User.email')); $this-Email-to =$email; $this-Email-subject = Invitation; $this-Email-template = 'user_invitation_acceptance'; $this-Email-sendAs = 'html'; $this-Email-send(); } Did I do sth wrong? is there any way to optimize the process like sending the emails to the que? Thanks Sherry -- View this message in context: http://cakephp.1045679.n5.nabble.com/Cakephp-email-tp3228218p3228218.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Email issue
Hi all I'm using the contact importer to let users send invitation to their contacts. I noticed that when they are sending email to more than 20-30 contacts, servers using lots of resources and, when I have 20-30 users doing that even web server end up crashing!!! here is my send function! function send($email,$code,$message) { $this-Email-delivery = 'mail'; $activate_url= 'http://' . env('SERVER_NAME') . '/users/user_registration_invite/' .$code ; $this-set('url', $activate_url); $this-set('umessage',$message); $this-Session-write('$code',$activate_url); $loo = $this-Session-read('$code'); $name = $this-Session-read('Auth.User.first_name').' '.$this-Session-read('Auth.User.last_name'); $this-set('name',$name); $this-set('email',$this-Session-read('Auth.User.email')); $this-Email-to =$email; $this-Email-subject = Invitation; $this-Email-template = 'user_invitation_acceptance'; $this-Email-sendAs = 'html'; $this-Email-send(); } Did I do sth wrong? is there any way to optimize the process like sending the emails to the que? Thanks Sherry -- View this message in context: http://cakephp.1045679.n5.nabble.com/Email-issue-tp3228311p3228311.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
PersistModel problem
Hi all Today I noticed that the registration part of my web site stopped working! I turned on the debug mode and I saw this error message: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition Registration of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in xxx I google it and I found out its related to the persistModel. I deleted the whole cache and nothing changed! the I change the persistModel value from true to false and then the site started to work! but I need the persistModel to be on! Any one knows how can I solve this problem? Thanks Sherry -- View this message in context: http://cakephp.1045679.n5.nabble.com/PersistModel-problem-tp3217510p3217510.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Hide empty value in select box
Hi all I have a selectbox like this $form-select('city_id',$city, array ('empty'=false, 'selected'='1', 'label'= false), array('label'=false, 'div'=false, 'name'='city_id', 'id'='city_id')); I need to remove the empty option at the top of my options. I even set the ''empty'=false' but it not works!!! Can anyone help me please Thanks -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053216.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Hide empty value in select box
Hi Here is the content of my array Array ( [4] = Adana [2] = Ankara [1] = Istanbul [3] = Izmir ) its wired!!! when I use echo $form-select('city_id',$city, array ('empty'= false), false, false); it doesnt show the empty space but it sends the city_id value as undefined !!! Jeremy Burns | Class Outfit wrote: A couple of thoughts... What is in the $city array? This will be used to populate the select list, so if there's an empty row there, you'll get an empty row in the list. Is there an option with an id of 1? If not, your default value might be messing things up a bit. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Jul 2010, at 08:25, sherzo wrote: Hi all I have a selectbox like this $form-select('city_id',$city, array ('empty'=false, 'selected'='1', 'label'= false), array('label'=false, 'div'=false, 'name'='city_id', 'id'='city_id')); I need to remove the empty option at the top of my options. I even set the ''empty'=false' but it not works!!! Can anyone help me please Thanks -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053216.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053405.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Hide empty value in select box
Hi Jeremy thanks for the reply i used $this-Form-select('city_id', $city, 1, array('empty' = false)); and the empty space is still there!!! i really need to remove that space from the form %-| Jeremy Burns | Class Outfit wrote: The guide says: select(string $fieldName, array $options, mixed $selected, array $attributes) There are only four attributes and you have five. Try: $this-Form-select('city_id', $city, 1, array('empty' = true)); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Jul 2010, at 08:56, sherzo wrote: Hi Here is the content of my array Array ( [4] = Adana [2] = Ankara [1] = Istanbul [3] = Izmir ) its wired!!! when I use echo $form-select('city_id',$city, array ('empty'= false), false, false); it doesnt show the empty space but it sends the city_id value as undefined !!! Jeremy Burns | Class Outfit wrote: A couple of thoughts... What is in the $city array? This will be used to populate the select list, so if there's an empty row there, you'll get an empty row in the list. Is there an option with an id of 1? If not, your default value might be messing things up a bit. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Jul 2010, at 08:25, sherzo wrote: Hi all I have a selectbox like this $form-select('city_id',$city, array ('empty'=false, 'selected'='1', 'label'= false), array('label'=false, 'div'=false, 'name'='city_id', 'id'='city_id')); I need to remove the empty option at the top of my options. I even set the ''empty'=false' but it not works!!! Can anyone help me please Thanks -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053216.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053405.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053544.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Hide empty value in select box
can you please try this? echo $form-select('city_id',$city, array ('empty'=false, 'selected'='1', 'label'= false), array('name'='city_id', 'id'='city_id')); this is the only way that I can have the city_id value after the form submission!! but still I have the empty space in the form ! Jeremy Burns | Class Outfit wrote: Stumped. I just tried exactly the same code and it worked as necessary. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Jul 2010, at 09:18, sherzo wrote: Hi Jeremy thanks for the reply i used $this-Form-select('city_id', $city, 1, array('empty' = false)); and the empty space is still there!!! i really need to remove that space from the form %-| Jeremy Burns | Class Outfit wrote: The guide says: select(string $fieldName, array $options, mixed $selected, array $attributes) There are only four attributes and you have five. Try: $this-Form-select('city_id', $city, 1, array('empty' = true)); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Jul 2010, at 08:56, sherzo wrote: Hi Here is the content of my array Array ( [4] = Adana [2] = Ankara [1] = Istanbul [3] = Izmir ) its wired!!! when I use echo $form-select('city_id',$city, array ('empty'= false), false, false); it doesnt show the empty space but it sends the city_id value as undefined !!! Jeremy Burns | Class Outfit wrote: A couple of thoughts... What is in the $city array? This will be used to populate the select list, so if there's an empty row there, you'll get an empty row in the list. Is there an option with an id of 1? If not, your default value might be messing things up a bit. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Jul 2010, at 08:25, sherzo wrote: Hi all I have a selectbox like this $form-select('city_id',$city, array ('empty'=false, 'selected'='1', 'label'= false), array('label'=false, 'div'=false, 'name'='city_id', 'id'='city_id')); I need to remove the empty option at the top of my options. I even set the ''empty'=false' but it not works!!! Can anyone help me please Thanks -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053216.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053405.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053544.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group
Re: Hide empty value in select box
I fixed it!!! its working under this condition- echo $form-select('city_id', $city, null, array('label'=false, 'div'=false,'name'='city_id', 'id'='city_id', 'empty'='false'),false); no space, and the values sends to the controller after the form submission Thanks Jeremy :) Jeremy Burns | Class Outfit wrote: Stumped. I just tried exactly the same code and it worked as necessary. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Jul 2010, at 09:18, sherzo wrote: Hi Jeremy thanks for the reply i used $this-Form-select('city_id', $city, 1, array('empty' = false)); and the empty space is still there!!! i really need to remove that space from the form %-| Jeremy Burns | Class Outfit wrote: The guide says: select(string $fieldName, array $options, mixed $selected, array $attributes) There are only four attributes and you have five. Try: $this-Form-select('city_id', $city, 1, array('empty' = true)); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Jul 2010, at 08:56, sherzo wrote: Hi Here is the content of my array Array ( [4] = Adana [2] = Ankara [1] = Istanbul [3] = Izmir ) its wired!!! when I use echo $form-select('city_id',$city, array ('empty'= false), false, false); it doesnt show the empty space but it sends the city_id value as undefined !!! Jeremy Burns | Class Outfit wrote: A couple of thoughts... What is in the $city array? This will be used to populate the select list, so if there's an empty row there, you'll get an empty row in the list. Is there an option with an id of 1? If not, your default value might be messing things up a bit. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Jul 2010, at 08:25, sherzo wrote: Hi all I have a selectbox like this $form-select('city_id',$city, array ('empty'=false, 'selected'='1', 'label'= false), array('label'=false, 'div'=false, 'name'='city_id', 'id'='city_id')); I need to remove the empty option at the top of my options. I even set the ''empty'=false' but it not works!!! Can anyone help me please Thanks -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053216.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053405.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Hide-empty-value-in-select-box-tp29053216p29053544.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http
Re: Remove cakephp references from cookies
Hi Ed Thank you very much, I fixed it :) Bests, Sherry Ed Propsner wrote: I haven't toyed with the cookies yet but it looks like they can be configured in app/config/core.php Configure::write('Session.cookie', 'CakePHP'); HTH - Ed On Sun, Jun 13, 2010 at 7:50 PM, sherzo shahrzad.azimi...@gmail.com wrote: Hi all I wonder to know if any of you knows how to remove the cakephp references from cookies name?? the name is cakeCookie[cookiename] at the moment!!! Thanks Sherry -- View this message in context: http://old.nabble.com/Remove-cakephp-references-from-cookies-tp28874781p28874781.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Remove-cakephp-references-from-cookies-tp28874781p28877547.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Session setting in app_controller
Hi All I need to get some parameter from URL and set my sessions regarding to those parameters, I need this function to be call in every controller, So I wonder where to call it!! I tested the beforefiler() in app_controller but it didnt work :( Any Idea? Thanks Sherry -- View this message in context: http://old.nabble.com/Session-setting-in-app_controller-tp28877621p28877621.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Session setting in app_controller
Its been solved by writing parent::beforeFilter(); inside other controllers beforeFilter() :jumping: sherzo wrote: Hi All I need to get some parameter from URL and set my sessions regarding to those parameters, I need this function to be call in every controller, So I wonder where to call it!! I tested the beforefiler() in app_controller but it didnt work :( Any Idea? Thanks Sherry -- View this message in context: http://old.nabble.com/Session-setting-in-app_controller-tp28877621p28879452.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Remove cakephp references from cookies
Hi all I wonder to know if any of you knows how to remove the cakephp references from cookies name?? the name is cakeCookie[cookiename] at the moment!!! Thanks Sherry -- View this message in context: http://old.nabble.com/Remove-cakephp-references-from-cookies-tp28874781p28874781.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Header element not refreshing!!!
Hi Paul Thanks for your reply, Actually I solved the problem by setting variables directly from the controller instead of using session. Thanks Sherry WebbedIT wrote: Seems a complicated implementation. Can you show your code? especially the call to the header and the header itself. Paul. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Header-element-not-refreshing%21%21%21-tp28654116p28683100.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
array of objects in the controller
Hi all I need to have something like the following code but in the controller not view. foreach ($coupons as $coupon) $st = $coupon['Coupon']['title']; endforeach; and the $coupons is the result of a find() function. any idea? Thanks Sherrt -- View this message in context: http://old.nabble.com/array-of-objects-in-the-controller-tp28684091p28684091.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: array of objects in the controller
Thanks for your answer The problem in I dont want to send the result to the view, i need to do some process in the contorller. something like : $existingUsers = $this-userSubscriptions(24); foreach($existingUsers as $existingUser): $m = $m .$existingUser['UsersCity']['id']; endforeach; But im getting this erro: Warning (2): Invalid argument supplied for foreach() [APP\controllers\users_cities_controller.php, line 172] really dont know how to solve it!!! calvin-38 wrote: What exactly is the problem? If you know how to do that in the view, then you can do the same thing in the controller. There's nothing magical about passing find() results to the view using $this-set(). All it does is set the variables you specify in the view. If you don't know the structure of $coupons, just use debug() to view it. Also, technically those aren't objects, otherwise you'd access the 'title' property by $coupon-title; they're just associative arrays. On May 26, 10:48 am, sherzo shahrzad.azimi...@gmail.com wrote: Hi all I need to have something like the following code but in the controller not view. foreach ($coupons as $coupon) $st = $coupon['Coupon']['title']; endforeach; and the $coupons is the result of a find() function. any idea? Thanks Sherrt -- View this message in context:http://old.nabble.com/array-of-objects-in-the-controller-tp28684091p2... Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/array-of-objects-in-the-controller-tp28684091p28684491.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Header element not refreshing!!!
Hi Paul Here is the problem definition :) In order to display the city deals controller reads the city from the URL, if there is no city in the URL it checks the cookie. after defining the city I update the cookie and also pass the city name and the city id to the session and then load the page. The page consists of tree parts, Header, Content and the footer. There is no problem in the content, It always shows the correct deal. But in the header which displays the tab menu there is a big issue!!! In order to generate the tab links I echo the cityN session an the end of the link, the one that is generated in the controller. it works very well. and displays the correct cityname if you dont change the cityname, but if you change the city name directly from the URL and press enter, the header part still displays the old content and needs to refresh the page to display the correct city name. I guess its the browser cache because Im sure the session will be updated before page rendering !!! because in theh content pat it displays the correct deals I tried to put nocache tag it didnt help. I even display the cityname session before header, inside header and after header and surprisingly find out it displays the correct information before and after the header but not inside the header! I even wrote a function to read the cityname from the cookie and put it in the session and call it from the header view still shows the old one!!! I really dont know how can i synchronize them!!! I hope I could explain it well. Thanks Sherry WebbedIT wrote: If I change the URL from the addressbar and directly land to the page information that are sending to the header element through the session are not updating I'm confused what you mean by the above. Are you caching data and having problems or is this a user updating their profile and their session info is not being update? HTH Paul. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Header-element-not-refreshing%21%21%21-tp28654116p28670714.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Header element not refreshing!!!
Hi All I have a strange problem with refreshing the sessions inside my header which is an element loaded in my page! If I change the URL from the addressbar and directly land to the page information that are sending to the header element through the session are not updating i have to use F5 to see the correct session value!!! Thanks in advanced Sherry -- View this message in context: http://old.nabble.com/Header-element-not-refreshing%21%21%21-tp28654116p28654116.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Header element not refreshing!!!
Any body please? I turn of the cache as well but still needs to reload the page to see the correct data!!! sherzo wrote: Hi All I have a strange problem with refreshing the sessions inside my header which is an element loaded in my page! If I change the URL from the addressbar and directly land to the page information that are sending to the header element through the session are not updating i have to use F5 to see the correct session value!!! Thanks in advanced Sherry -- View this message in context: http://old.nabble.com/Header-element-not-refreshing%21%21%21-tp28654116p28661355.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Auth login redirect after submit a form in a Thickbox
Hi all I tried to make a ajax login form which is loaded inside a JQuery Thickbox. but the problem is after entering correct username and password the Thickbox returns to the homepage!!! how can I close the Thickbox and redirect the parent to the homepage? Any idea? here is my code: div id = 'login' ?php echo $session-flash(); $session-flash('auth');? /div ?php echo $ajax-form(array('type' = 'post', 'class'='account', 'options' = array( 'model'='User', 'update'='login', 'url' = array( 'controller' = 'users', 'action' = 'login' ), ) )); div class=anket Kullanici Adi: p?php echo $form-text('User.username', array('type'='text', 'label'=false));? /p /div div class=anketSifre p?php echo $form-password('User.password', array( 'label'=false));? /p input type=checkbox name=remember_me class=remember/ Beni Hatirla #TB_inline?height=400width=630inlineId=forgotPass Sifrenizi mi unuttunuz? /div div class=sozlesme style=margin-left:116px; echo $form-submit('giris-yap-button.gif', array( 'class'='submit'));? /div ?php echo $form-end(); ? /div -- View this message in context: http://old.nabble.com/Auth-login-redirect-after-submit-a-form-in-a-Thickbox-tp28567085p28567085.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Dealing with forms!!!!!
Hi Paul Thanks for the useful link. Actually I was using the Thickbox and Jquery, but after visiting your blog I decided to use the Modalbox. Unfortunately I couldnt manage to open a modal box!!! i opens the view into a new window instead of a modal box!! I added all the javascript links and css to my application and use used: ?php echo $html-link('Login',array('action' = 'users/login'),array('title' = 'Customer details','onclick' = Modalbox.show(this.href, {title: this.title, width: 400}); return false;)); ? but still nothing!!! Would you please help me its really urgent ! WebbedIT wrote: I wrote a blog post about using ModalBox which is handy if you're using Prototype: http://webbedit.co.uk/blog_posts/view/tutorial-cakephp-modalbox-crud HTH Paul. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Dealing-with-forms%21%21%21%21%21-tp28541795p28558773.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Dealing with forms!!!!!
Hi Paul Thanks for your reply and the great comment about the validation. My main issue is, the registration form is included in a light box and after submission I dont like it to be redirected to another page in case of any error especially of user turned off the javascript in the browser ! Thanks Sherry WebbedIT wrote: Hmm, your doing all of your validation manually in the controller ... this is supposed to be done automagically by the model when you save the record. Read the following through a couple of times: http://book.cakephp.org/view/125/Data-Validation The one thing you have to watch out for is the password field which is automatically hashed by the Auth component, so to check if password_confirm matches password you also need to hash the password_confirm field. It's easy to do this using a custom validation function such as User Model: ... var $validate = array( 'username' = array( 'isUnique' = array( 'rule' = 'isUnique', 'message' = 'Sorry, this username has been taken, please try another', 'last' = true ), 'validChars' = array( 'rule' = '/^[a-z0-9_]{1,}$/i', 'message' = 'Can only include letters, numbers and underscores' ) ), 'password_confirm' = array( 'notEmpty' = array( 'rule' = array('notEmpty'), 'message' = 'This field cannot be left blank', 'on' = 'create', 'last' = true ), 'confirm' = array( 'rule' = array('validateConfirmPassword'), 'message' = 'Password confirmation does not match' ) ) ); function __validateConfirmPassword($field) { $valid = false; if ($this-data['User']['password'] == Security::hash(Configure::read('Security.salt') . $field['password_confirm'])) { $valid = true; } return $valid; } ... HTH Paul. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Dealing-with-forms%21%21%21%21%21-tp28541795p28544666.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Dealing with forms!!!!!
Hi all I have a registration form which is loaded inside a div and included in the page. I want to have some server-side validation on it and return the result inside the specific div any idea please? its really urgent! [Code] ?php echo $session-flash(); ? ?php echo $form-create('User', array('action' = 'register','type' = 'post','class'='account'));? div class=anketAdı: p?php echo $form-text('first_name' , array ('length'=20));?/p /div div class=anketSoy Adı: p?php echo $form-text('last_name', array ('length'=20));?/p /div div class=anketUsername: p?php echo $form-text('username', array('after' = $form-error('username_unique', 'The username is taken. Please try again.')));?/p /div div class=anketŞifre p?php echo $form-password('password');?/p Hatalı şifre girişi /div div class=anketTekrar Şifre p?php echo $form-password('confirm_password'); ?/p Hatalı şifre girişi /div div class=anketE-posta adresi: p?php echo $form-text('email', array('after' = $form-error('email_duplicate', 'This email address had been registered before. Please try again.')));?/p E-posta adresi kullanımda /div div class=sozlesme input type=checkbox value=sozlesme / javascript:dropSozlesme() Kullanım Şartları 'nı kabul ediyorum. div class=madde h3MARKAPON KULLANICI SÖZLEŞMESİ/h3 pKullanım Şartları'nı kabul ediyorum. Kullanım Şartları'nı kabul ediyorum. Kullanım Şartları'nı kabul ediyorum. Kullanım Şartları'nı kabul ediyorum. Kullanım Şartları'nı kabul ediyorum. Kullanım Şartları'nı kabul ediyorum. Kullanım Şartları'nı kabul /p /div p style= text-align:right; padding:5px 0px 0px 0px; # Yazdır /p /div ?php echo $form-submit('hesap-olustur-button.gif', array('class'='submit'));? ?php echo $form-end(); ? [/Code] [Code] if (!empty($this-data)) { $san = new Sanitize(); $this-data['User']['username'] = $san-paranoid($this-data['User']['username']); if ($this-data['User']['password']!= $this-data['User']['confirm_password']) { $this-data['User']['password'] = ''; $this-data['User']['password_confirm'] = ''; $this-Session-setFlash(__('Password and Password confirmation should be the same.', true)); $this-redirect($this-referer(), null, true); exit(); } else { $this-User-set($this-data); $this-User-create(); $this-User-data = Sanitize::clean($this-data); $this-data['User']['password'] = md5($this-data['User']['password']); $this-User-set('join_date', date('Y-m-d H:i:s')); $this-User-set('first_name', $this-data['User']['first_name']); $this-User-set('username', $this-data['User']['username']); $this-User-set('password', $this-data['User']['password']); $this-User-set('email', $this-data['User']['email']); $this-User-set('status', 1); $this-User-set('referred', $this-Session-read('ref')); // Successfully created account - send activation email //debug($this-data); $result = $this-User-save($this-data); //if(!$this-User-save()){ // debug($this-User-validationErrors); die(); //} // debug($result); if ($result) { // this view is not show / listed - use your imagination and inform // users that an activation email has been sent out to them. //$this-User-username = $this-data['User']['username']; //$this-__sendActivationEmail($this-User-getLastInsertID()); if ($this-Session-read('ref')) { $invited_id = $this-getUserId($this-data['User']['username']); $this-requestAction('/bonuses/updateStatus/'.$this-Session-read('ref').'/'. $this-data['User']['email'].'/'. $invited_id); } $this-Session-setFlash('An invitation email just been sent.',false); $this-redirect('/users/login'); } // Failed, clear password field else { $this-data['User']['password'] = ''; $this-data['User']['password_confirm'] = ''; $this-Session-setFlash(__('Some
Re: Form Tag!!!!
Anyone can help me sherzo wrote: Hi all!!! I have the following code in my View: ?php //echo $form-create('UsersCoupon',array('id'='update','url'=array('action'='changeStatustoUsed')));? div class=kuponTop div class=kuponBottom div class=kuponCenter ul li class=kuponFirstp class=ilkKUPONLARIM/ppADET/ppDEGER/pp class=sonBITIS TARIHI/p/li ?php $usersCoupons = $this-requestAction('users_coupons/listNotUsedCoupons'); ? ?php foreach($usersCoupons as $usersCoupon): ? li ?php //echo $form-checkbox('cop.id.'.$usersCoupon['UsersCoupon']['id'], array('value' = $usersCoupon['UsersCoupon']['id'])); ? ?php //echo $form-input($usersCoupon['UsersCoupon']['id'],array( 'type'='checkbox', 'label'=false, 'name'='cop['.$usersCoupon['UsersCoupon']['id'].']', 'id'='cop_'.$usersCoupon['UsersCoupon']['id'])); ? p class=ilk?php echo $usersCoupon['Coupon']['title']?/p p?php $m = $usersCoupon['UsersCoupon']['transaction_code']; $count = $this-requestAction('users_coupons/countUserCouponPurchasePerTime/'.$m); echo $count;?/pp?php echo $count*$usersCoupon['Coupon']['sale_price'];?TL/pp class=son?php echo $usersCoupon['Coupon']['expiration_date'];?/p/li ?php endforeach; ? /ul /div /div /div ?php //echo $form-submit('kullandiklarimi-arsive-at-button.gif', array('class'='submit'));? div class=pageNum !-- Shows the page numbers -- ?php echo $paginator-prev('« ', null, null, array('class' = 'disabled')); echo $paginator-numbers(); ? !-- Shows the next and previous links -- ?php echo $paginator-next(' »', null, null, array('class' = 'disabled')); ? br class=cb / p style=font-family:Verdana; font-size:11px;color:#c4; padding-top:15px;Lütfen önce kullandığınız kuponları işaretleyin./p /div and as soon as I uncomment the form tag I will receive the following error message!!! Fatal error: Cannot use object of type Xml as array in cakephp form any idea?!?! -- View this message in context: http://old.nabble.com/Form-Tag%21%21%21%21-tp28425388p28452273.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Form Tag!!!!
Hi all!!! I have the following code in my View: ?php //echo $form-create('UsersCoupon',array('id'='update','url'=array('action'='changeStatustoUsed')));? div class=kuponTop div class=kuponBottom div class=kuponCenter ul li class=kuponFirstp class=ilkKUPONLARIM/ppADET/ppDEGER/pp class=sonBITIS TARIHI/p/li ?php $usersCoupons = $this-requestAction('users_coupons/listNotUsedCoupons'); ? ?php foreach($usersCoupons as $usersCoupon): ? li ?php //echo $form-checkbox('cop.id.'.$usersCoupon['UsersCoupon']['id'], array('value' = $usersCoupon['UsersCoupon']['id'])); ? ?php //echo $form-input($usersCoupon['UsersCoupon']['id'],array( 'type'='checkbox', 'label'=false, 'name'='cop['.$usersCoupon['UsersCoupon']['id'].']', 'id'='cop_'.$usersCoupon['UsersCoupon']['id'] )); ? p class=ilk?php echo $usersCoupon['Coupon']['title']?/p p?php $m = $usersCoupon['UsersCoupon']['transaction_code']; $count = $this-requestAction('users_coupons/countUserCouponPurchasePerTime/'.$m); echo $count;?/pp?php echo $count*$usersCoupon['Coupon']['sale_price'];?TL/pp class=son?php echo $usersCoupon['Coupon']['expiration_date'];?/p/li ?php endforeach; ? /ul /div /div /div ?php //echo $form-submit('kullandiklarimi-arsive-at-button.gif', array('class'='submit'));? div class=pageNum !-- Shows the page numbers -- ?php echo $paginator-prev('« ', null, null, array('class' = 'disabled')); echo $paginator-numbers(); ? !-- Shows the next and previous links -- ?php echo $paginator-next(' »', null, null, array('class' = 'disabled')); ? br class=cb / p style=font-family:Verdana; font-size:11px;color:#c4; padding-top:15px;Lütfen önce kullandığınız kuponları işaretleyin./p /div and as soon as I uncomment the form tag I will receive the following error message!!! Fatal error: Cannot use object of type Xml as array in cakephp form any idea?!?! -- View this message in context: http://old.nabble.com/Form-Tag%21%21%21%21-tp28425388p28425388.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Problem in using elements
Thanks John!! I wrote a function to load the data into the form and my edit form is working now :jumping: Thank you very much :-) -- View this message in context: http://old.nabble.com/Problem-in-using-elements-tp28380990p28386698.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
need to load a paging controller through jQuery
Hi All I'm trying to load a paging list inside a DIV in another list through ajax jQuery. lists view is working perfectly but it seems that for some reason jQuery can not load it inside a div in another view!!! here is my javascripts in th eheader: script type=text/javascript function loadPiece(href,divName) { $(divName).load(href, {}, function(){ $(divName).find(a).each(function(i){ $(this).bind('click', function(){ var thisHref = $(this).attr(href); loadPiece(thisHref,divName); return false; }); }); }); } /script script type=text/javascript $(document).ready(function() { loadPiece(?php echo $html-url(array('controller'='users_coupons','action'='lists'));?,#my_coupons); }); /script here is the div part in the view: div id=Kuponlarim div class=kupon id = my_coupons /div /div and here is my lists method in the controller function lists(){ $this-UsersCoupon-recursive = 2; $this-paginate = array( 'conditions' = array('UsersCoupon.user_id' = $this-Session-read('Auth.User.id')), 'limit' = 5 ); if(isset($this-params['requested'])) { return $this-paginate('UsersCoupons'); } $cops = $this-paginate('UsersCoupon'); $this-set('usersCoupons',$cops); } any idea??? -- View this message in context: http://old.nabble.com/need-to-load-a-paging-controller-through-jQuery-tp28380974p28380974.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Problem in using elements
Hi all!!! I have a user edit page, which works perfectly. Somehow I need to make an element of the the edit form and load it in another page as well. but when I load the edit element its an empty page!!! How can I load the date to the form while its an element? Any idea?? here is my edit.ctp ?php echo $form-create('User', array('action' = 'edit','type' = 'post','class'='center', 'id' = 'kaydet', 'name' = 'kaydet' ));? divAd, Soyad ?php echo $html-image(firsat-bullet.gif, array(align = absmiddle, alt = )); ? p?php echo $form-input('id',array('type' = 'hidden')); echo $form-input('username', array('type' = 'hidden')); echo $form-text('first_name',array('class' = 'formInput')); echo $form-text('last_name',array('class' = 'formInput')); ? Kartınızın arkasındaki son 3 rakam./p /div divE-Posta?php echo $html-image(firsat-bullet.gif, array(align = absmiddle, alt = )); ? p ?php echo $form-text('email',array('class' = 'formInput')); ? /p /div divCep Telefonu?php echo $html-image(firsat-bullet.gif, array(align = absmiddle, alt = )); ? p ?php echo $form-text('telephone',array('class' = 'formInput')); ? /p /div p class=kaydet ?php echo $form-submit('degisikleri-kaydet-button.gif', array('class'='submit'));? /p br class=cb / ?php echo $form-end(); ? -- View this message in context: http://old.nabble.com/Problem-in-using-elements-tp28380990p28380990.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Problem in using elements
Hi John Thanks for your quick reply! here is my edit method : function edit($id = null) { if (!$id empty($this-data)) { $this-Session-setFlash(__('Invalid User', true)); $this-redirect(array('action'='login')); } if (!empty($this-data)) { if ($this-User-save($this-data)) { $this-Session-setFlash(__('The User has been saved', true)); $this-redirect(array('action'='index')); } else { $this-Session-setFlash(__('The User could not be saved. Please, try again.', true)); } } if (empty($this-data)) { $this-data = $this-User-read(null, $id); } $coupons = $this-User-Coupon-find('list'); $this-set(compact('coupons')); } Actually it's working from edit view but not from edit element!!! I'm new in cakephp!! is there anything special with elements? aren't they working just like views? Thanks Sherry John Andersen-6 wrote: In the controller action for the view in which you are using the edit element, make sure that you fill out the $this-data array with the data that the edit element need! As you are using the form helper in the edit element, then the form helper takes the data from $this-data. Enjoy, John On Apr 27, 10:23 pm, sherzo shahrzad.azimi...@gmail.com wrote: Hi all!!! I have a user edit page, which works perfectly. Somehow I need to make an element of the the edit form and load it in another page as well. but when I load the edit element its an empty page!!! How can I load the date to the form while its an element? Any idea?? here is my edit.ctp ?php echo $form-create('User', array('action' = 'edit','type' = 'post','class'='center', 'id' = 'kaydet', 'name' = 'kaydet' ));? divAd, Soyad ?php echo $html-image(firsat-bullet.gif, array(align = absmiddle, alt = )); ? p?php echo $form-input('id',array('type' = 'hidden')); echo $form-input('username', array('type' = 'hidden')); echo $form-text('first_name',array('class' = 'formInput')); echo $form-text('last_name',array('class' = 'formInput')); ? Kartýnýzýn arkasýndaki son 3 rakam./p /div divE-Posta?php echo $html-image(firsat-bullet.gif, array(align = absmiddle, alt = )); ? p ?php echo $form-text('email',array('class' = 'formInput')); ? /p /div divCep Telefonu?php echo $html-image(firsat-bullet.gif, array(align = absmiddle, alt = )); ? p ?php echo $form-text('telephone',array('class' = 'formInput')); ? /p /div p class=kaydet ?php echo $form-submit('degisikleri-kaydet-button.gif', array('class'='submit'));? /p br class=cb / ?php echo $form-end(); ? -- View this message in context:http://old.nabble.com/Problem-in-using-elements-tp28380990p28380990.html Sent from the CakePHP mailing list archive at Nabble.com. Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- View this message in context: http://old.nabble.com/Problem-in-using-elements-tp28380990p28381113.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: need to load a paging controller through jQuery
actually I used http://bakery.cakephp.org/articles/view/easy-ajax-pagination-using-jquery http://bakery.cakephp.org/articles/view/easy-ajax-pagination-using-jquery because paging was not working when I tried to use echo $this-element('lists');!! It seems that I have serious problem in using elements!!! Thanks Sherry -- View this message in context: http://old.nabble.com/need-to-load-a-paging-controller-through-jQuery-tp28380974p28381248.html Sent from the CakePHP mailing list archive at Nabble.com. 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 email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en