checkbox issue

2008-12-05 Thread gayatri
i not able to get the value of multiple checkboxes can any help me in this issue. --~--~-~--~~~---~--~~ 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

What is wrong with this line of code?

2008-12-05 Thread adam
$answer_count = count($question['Answer']); I am trying to start learning cakePHP using the book CakePHP Application Development. I keep getting this error though that points to this line: Undefined index: Answer [APP\views\questions\home.ctp, line 10] In home.ctp, I need to display the

FormHelper failure on textarea (non-escaped characters?)

2008-12-05 Thread Renesistemic
I'm running into a problem across my Cake application (running latest version of RC3). I currently have about 450 listings loaded on my site, and I'm trying to build an administrative interface to edit those listings individually. I've built that page out without a problem, excluding one issue.

the proper use of vendors

2008-12-05 Thread Craig
Halo, Reading the docs I was getting the impression that if you wanted to use a javascript library like MooTools (only for example) you'd work it into the vendors folder. Browsing the bakery I see people doing such things by creating a helper and dumping libraries into the webroot/js folder.

starting the first controller

2008-12-05 Thread gayatri
hi friends, Recently i downloaded cakephp, iam getting the welcome page of php showing tmp is writable and cake is able to connect to database. but when i created controller and model and view iam not getting the page. when i run like http://localhost/CakeTooDoo/tasks/index it is showing that the

FormHelper failure on textarea (non-escaped characters?)

2008-12-05 Thread Renesistemic
I'm running into a problem across my Cake application (running latest version of RC3). I currently have about 450 listings loaded on my site, and I'm trying to build an administrative interface to edit those listings individually. I've built that page out without a problem, excluding one issue.

Re: htaccess problems.

2008-12-05 Thread erikober
Thanks mate! You saved me... --~--~-~--~~~---~--~~ 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 [EMAIL

AW: starting the first controller

2008-12-05 Thread Liebermann, Anja Carolin
Hi gayatri, If your work on a Linux ( or other iX) environment be carful with capital letters. Have you set the debug level in core.php to 2? Are any more errors shown? And if this doesn't help: Send us the code or part of it. Anja -Ursprüngliche Nachricht- Von:

AW: What is wrong with this line of code?

2008-12-05 Thread Liebermann, Anja Carolin
Hi Adam, This basically says that your array $question doesn't contain any 'Answer'. Oh my that is nearly philosophical Let's look for the answers :c) In your case start with pr($question); and see what you have in your array. If there is no ['Answer'] you have at least the

Question on localization

2008-12-05 Thread [EMAIL PROTECTED]
Hi I have a question on localization of my application. My application has many service builded on the same CakePHP. Every service is avaible for some language. Now I would have a single file language for every service and not a unique file default.po where there is every thing. How can I set

Re: checkbox issue

2008-12-05 Thread deepesh
Hi, Can you plz paste your code here !! Best regards, Deepesh gairola On Dec 4, 11:40 pm, gayatri [EMAIL PROTECTED] wrote: i not able to get the value of multiple checkboxes can any help me in thisissue. --~--~-~--~~~---~--~~ You received this message

Controller not needing a model?

2008-12-05 Thread gearvOsh
Is there a way to make it so a controller does not need a model? I have a controller that holds login/logout/etc and theres no need for a model. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post

Re: Controller not needing a model?

2008-12-05 Thread deepesh
http://cakebaker.42dh.com/2006/02/01/a-controller-without-a-model/ hope it might work. regards, Deepesh gairola On Dec 5, 2:03 pm, gearvOsh [EMAIL PROTECTED] wrote: Is there a way to make it so a controller does not need a model? I have a controller that holds login/logout/etc and theres no

HABTM on multiple DB---Please help me

2008-12-05 Thread [EMAIL PROTECTED]
I have this question that I can't resolve. I hope that someone can help me. How can I set a HABTM relation between table on different DataBase? Many Thanks Marco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Manipulate data, or behavior, or something.

2008-12-05 Thread laeffe
Hi all. I have a problem that I don't really know how to solve. The actual problem is that I want to parse the way ppl enter time in forms, for instance i want 0600 to be 06:00:00 and 0234 to be 02:34:00 (and of course I want 07:00:00 to be valid as well). That is the basic problem. My solution

How to add line break in text mail layout?

2008-12-05 Thread Hipnotik
How to add line break in text mail layout? It's in elements/email/text/default.ctp file. I tried to use: \n \r\n \r and still it doesn't work correct. It breaks the lines but new line character (i.e. \n) appears in the received message too. How to do that? Thanks for help ;)

Re: How to add line break in text mail layout?

2008-12-05 Thread dr. Hannibal Lecter
What about simply hitting the enter key? :) On Dec 5, 12:14 pm, Hipnotik [EMAIL PROTECTED] wrote: How to add line break in text mail layout? It's in elements/email/text/default.ctp file. I tried to use: \n \r\n \r and still it doesn't work correct. It breaks the lines but new line

Re: checkbox issue

2008-12-05 Thread dr. Hannibal Lecter
Something like this should do it: echo $form-input('Model.Field', array('type' = 'select', 'multiple' = 'checkbox', 'options' = $anArrayOfOptions)); Hope that helps! On Dec 4, 7:40 pm, gayatri [EMAIL PROTECTED] wrote: i not able to get the value of multiple checkboxes can any help me in this

Re: What is wrong with this line of code?

2008-12-05 Thread dr. Hannibal Lecter
Hi adam, your $question array does not contain anything called Answer. If you print out the array (as Anja suggested), you will see that for yourself. Quite possibly, if your $question array is a result of a query in CakePHP, your results will be ordered as $question[0]['Answer'],

Re: .htaccess - Can't access subdirectory

2008-12-05 Thread I Wayan Saryada
Yes, this trick works. It so easy :) Thank you very much teknoid. -- Regards, I Wayan Saryada On Nov 15, 7:40 am, teknoid [EMAIL PROTECTED] wrote: place your forum in the webroot dir of your cakephp install. On Nov 14, 10:46 am, I Wayan Saryada [EMAIL PROTECTED] wrote: Hello, I am

Re: How to add line break in text mail layout?

2008-12-05 Thread Hipnotik
On 5 Gru, 12:35, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: What about simply hitting the enter key? :) Doesn't work... displays all lines in one :( On Dec 5, 12:14 pm, Hipnotik [EMAIL PROTECTED] wrote: How to add line break in text mail layout? It's in

API documentation tool

2008-12-05 Thread Olivier Percebois-Garve
Hi What is used to generate the API doc of cakephp ? thanks Olivier --~--~-~--~~~---~--~~ 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

Re: How to add line break in text mail layout?

2008-12-05 Thread dr. Hannibal Lecter
Well...that's not supposed to happen. Can you check the mail source and mime headers? Maybe you're not sending your email in plain text..? On Dec 5, 1:11 pm, Hipnotik [EMAIL PROTECTED] wrote: On 5 Gru, 12:35, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: What about simply hitting the enter

Re: API documentation tool

2008-12-05 Thread dr. Hannibal Lecter
I'm not sure on this, but I believe it could be phpDocumentor (http:// phpdoc.org/)? On Dec 5, 1:03 pm, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: Hi What is used to generate the API doc of cakephp ? thanks Olivier --~--~-~--~~~---~--~~ You received

Re: API documentation tool

2008-12-05 Thread Olivier Percebois-Garve
But it looks visually so different to what I know from phpDocumentor. No left column, etc... On Fri, Dec 5, 2008 at 1:47 PM, dr. Hannibal Lecter [EMAIL PROTECTED]wrote: I'm not sure on this, but I believe it could be phpDocumentor (http:// phpdoc.org/)? On Dec 5, 1:03 pm, Olivier

Re: API documentation tool

2008-12-05 Thread dr. Hannibal Lecter
Good point... probably Doxygen then..seems like it (look at the examples on Doxygen site, especially the tabs).. On Dec 5, 2:14 pm, Olivier Percebois-Garve [EMAIL PROTECTED] wrote: But it looks visually so different to what I know from phpDocumentor. No left column, etc... On Fri, Dec 5,

Re: API documentation tool

2008-12-05 Thread Olivier Percebois-Garve
yeah after some research it seems to be doxygen. thx. Dont forgot to have a nice weekend. Olivier On Fri, Dec 5, 2008 at 2:29 PM, dr. Hannibal Lecter [EMAIL PROTECTED]wrote: Good point... probably Doxygen then..seems like it (look at the examples on Doxygen site, especially the tabs).. On

Problem when installing the bakery applicatoin

2008-12-05 Thread MarcS
Hi everyone, Has anyone here tried to install the bakery application? I'm currently trying to do so but I keep getting a redirect loop when loading the application. It keeps redirecting me to the login page. I have no idea how to fix this? Has anyone had the same problem? thanks

admin routing

2008-12-05 Thread dravid
hello Cake PHP Group, In one of our simple project using CAKE PHP (1.2) we tried to add administrative pages and access based on admin user roles. The problem is we are not able to view the page by simply entering {URL to CAKE PHP}/admin/ instead we are only able to open the admin section when

ACL Question based on ACL example in cookbook (1.2)

2008-12-05 Thread SymenTimmermans
Hi guys, I'm building an application and want to controll access levels with ACL. I've setup the controllers and database by following the simple ACL application tutorial in the manual. While the example in the manual uses 2 tables: 'groups' (hasmany) 'users', which makes the implementation

AW: TCPDF and Cake PHP

2008-12-05 Thread Pietrowsky, Dennis
Hello everybody, I just got the Tutorial from http://bakery.cakephp.org/articles/view/creating-pdf-files-with-cakephp-and-tcpdf working, too. The header and footer are displayed correctly, but $tcpdf-Cell(0,14, Hello World, 0,1,'L'); in the view doesn't show any effect. If I put

store i18n data in database

2008-12-05 Thread Günther Theilen
Hi, in an application I use cake's l10n class which works fine. Now I want to be able to edit some of the translations from within the application. I'd like to use the __()-function but it should get the translations from a database table instead the po-files. Has someone already done

Form Helper problems with extended ASCII values

2008-12-05 Thread Renesistemic
I've isolated some problems I've been having down to the CakePHP Form helper. It seems that the form helper is unable to create HTML form objects with correct values when the $form-input( ) method is called while passing in extended ASCII characters. For example, this code creates a text box

Re: admin routing

2008-12-05 Thread grigri
The problem here is that cake doesn't know where to go with a plain 'admin/' route since there is no controller or action specified. You need to specify a default controller / action in the routes.php config file. If for example you wanted to have `/admin` be equivalent to `/admin/

Re: Form Helper problems with extended ASCII values

2008-12-05 Thread grigri
If you're using UTF-8, this shouldn't be a problem - just use UTF-8 characters directly. I just tried with ?php echo $form-input('test', array('value' = '☃♠♣♥♦')); ? And it worked fine (that's `snowman`, `spades`, `clubs`, `hearts`, `diamonds` in case the font you're using doesn't have them).

Re: Form Helper problems with extended ASCII values

2008-12-05 Thread Renesistemic
grigri, Thanks for the prompt reply. Unfortunately, that didn't help me. My core.php file already has the line Configure::write('App.encoding', 'UTF-8'); and the MySQL tables for Cake are running a utf8_general collation... the MySQL table collation isn't even an issue at this point, however,

Re: Form Helper problems with extended ASCII values

2008-12-05 Thread grigri
If you're using utf-8 then you can't use chr(135) because it's not a valid utf-8 value. The php function chr() doesn't return a character, it returns a 1-byte character - utf-8 uses 2 bytes to encode this character. You'd need to handle the bytes individually - chr(135) represents unicode

Re: TCPDF and Cake PHP

2008-12-05 Thread Mathias Hunskår Furevik
I use FPDF and do the processing in the controller, and then pass the data to the view and echo it there. pdf_controller() { // generate PDF $pdfout = $pdf-output(); $this-set(pdfout, $pdfout); $this-render(pdf_controller, pdf); } and pdf_controller.ctp ?php echo $pdfout; ? // I do save

Re: Form Helper problems with extended ASCII values

2008-12-05 Thread Renesistemic
I wasn't using HTML entities directly because that data that I'm working with has already been imported from an XLS file into MySQL. I initially noticed this problem when I was pulling the data from MySQL, and found myself where I am now after troubleshooting those issues. Rather than processing

Re: ACL Question based on ACL example in cookbook (1.2)

2008-12-05 Thread Rob
Not sure I follow, does the usergroups table not join the users and groups? I have my ACL set up with the following HABTM: // Link to jobs var $hasAndBelongsToMany = array( 'Slot' = array( 'className' = 'Slot', 'joinTable'

Re: Manipulate data, or behavior, or something.

2008-12-05 Thread brian
There are a bunch of date/time picker widgets out there that format the data for you before sending to the server. Maybe that would be simpler. On Fri, Dec 5, 2008 at 6:03 AM, laeffe [EMAIL PROTECTED] wrote: Hi all. I have a problem that I don't really know how to solve. The actual problem

Re: store i18n data in database

2008-12-05 Thread Penfold
Hi, Cakephp can do translation with it's built in translate behaviour. import into your sql database i18n.sql in the models that has information that requires translation add var $actsAs = array('Translate' = array([This Array Holds All Fields that should be translated])); all the fields in

Re: Controller not needing a model?

2008-12-05 Thread Penfold
use var $uses = array(); as if you set any models in your app_controller var $uses = null; will overwrite them. On 5 Dec, 09:03, gearvOsh [EMAIL PROTECTED] wrote: Is there a way to make it so a controller does not need a model? I have a controller that holds login/logout/etc and theres no

Re: ACL Question based on ACL example in cookbook (1.2)

2008-12-05 Thread aranworld
The first step you should do is to write out an example of what you want your ARO tree to look like. I think it will then be easier for someone to help you out. For example, I often have a tree that looks like the following: Superusers Users --Staff John Kramer Alex Wylde Managers

Re: How to use Core Helpers in a console/shell script

2008-12-05 Thread Adam Royle
Right, you'll need to add this line before that as well. App::import('Core', 'Helper'); On Dec 5, 2:03 pm, RyOnLife [EMAIL PROTECTED] wrote: Thanks Adam, but whether I instantiate or not, I get an error: Fatal error: Class 'Helper' not found in

Re: Need help with model class extensions + behavior

2008-12-05 Thread Adam Royle
Looking at the source of model.php, you'll see that Behavior's beforeSave() is executed *before* the model's beforeSave(). So if you can handle the execution order being Behavior, AppModel, Track, then just add this code into your Track model. function beforeSave() { if

Re: How to use Core Helpers in a console/shell script

2008-12-05 Thread RyOnLife
Ah, tricky. But I've got it now. Many thanks! Adam Royle wrote: Right, you'll need to add this line before that as well. App::import('Core', 'Helper'); On Dec 5, 2:03 pm, RyOnLife [EMAIL PROTECTED] wrote: Thanks Adam, but whether I instantiate or not, I get an error: Fatal error:

Re: Custom queries/sql in models/behaviors

2008-12-05 Thread Adam Royle
First of all, welcome to cakephp! Cake's Model layer can be a big timesaver, so I suggest you get to know it a bit better before dismissing it. However, you can execute custom queries by using the $model-query() method. The one anomaly with this is that cake transforms the results into a

Problem with foreignKey in cake PHP

2008-12-05 Thread Sabinas
Hi, I dont speak englis very well but I will try. Mi problem is: I have a table but this table have a primary key with two columns, an example: sucursal folio 1 1 2 1 1 2 2 2 joining two columns we obtain the primary key i

Haven't got a clue 'bout php-apache 2.2 working under windows xp

2008-12-05 Thread kkdebull
Dear Php-Dev: I have been working with apache 1.x and php 5.x with my web hosting site: Now I am currently trying to work locally (localhost) with my laptop under windows xp, apache 2.2 and php5: My local httpd.conf contains: ServerRoot C:/Program Files/Apache Software Foundation/Apache2.2

Re: Problem with foreignKey in cake PHP

2008-12-05 Thread teknoid
There is no support for composite keys in CakePHP. Add an 'id' column to your table. On Dec 5, 3:34 pm, Sabinas [EMAIL PROTECTED] wrote: Hi, I dont speak englis very well but I will try. Mi problem is: I have a table but this table have a primary key with two columns, an example: sucursal  

Re: Custom queries/sql in models/behaviors

2008-12-05 Thread teknoid
I am not a big fan of the model system because its very limiting if you have advanced queries. How did you come to that conclusion? ... If you properly created your models and associations, a simple find ('all') will give you: Team, Roster, Game and League models with all the relevant info.

updateAll Syntax question

2008-12-05 Thread Tony Thomas
I have a scenario where I want to update multiple records simultaneously. In this case, I have a form with check boxes next to ids from the table I want to update. These are aliquots stored in a lab. updateAll seems like a natural solution, except I can't quite get my head around defining the

saving pagination position

2008-12-05 Thread kai
How can I save the pagination position in my session so that when someone goes back to the list they are on the same page and same sort. I'm having trouble saving my pagination in a session. Can I somehow use referrer to do this? --~--~-~--~~~---~--~~ You received

Re: saving pagination position

2008-12-05 Thread kai
I've found this which answers my own question: http://bakery.cakephp.org/articles/view/pagination-recall But why is the article blank? It's necessary to go to GitHub to see the code. On Dec 5, 2:37 pm, kai [EMAIL PROTECTED] wrote: How can I save the pagination position in my session so that

Re: Custom queries/sql in models/behaviors

2008-12-05 Thread gearvOsh
Because I cant use foreign keys so all of those features are useless to me. I also cant use linked models. On Dec 5, 1:12 pm, teknoid [EMAIL PROTECTED] wrote: I am not a big fan of the model system because its very limiting if you have advanced queries. How did you come to that

Re: saving pagination position

2008-12-05 Thread kai
In the end this is the solution I found. First is to use sessions. The ticket I refer to is waaay old and it seems FF3 doesn't really handle referer. I have a paginated list where I can click on list items to edit them. In my controller that handles the paginated list I add: $this-Session-

Re: Custom queries/sql in models/behaviors

2008-12-05 Thread gearvOsh
Ok thats weird, I dont have foreign keys really setup but it still works. Im using $hasMany for members and games. But within the TeamMember and TeamGame arrays, is there way to get more information returned? I would need the members name, avatar, etc. Array ( [0] = Array (

troubles with deep containable (or schema)

2008-12-05 Thread bally . zijn
I'm having some problems getting Containable to work for a particular model. I don't know if it's the way I'm using it or my associations/schema are no good. The site I'm working on can have several types of users, so I've set it up like so (simplified): User: var $hasOne = array( 'Admin',

Data Validation error message fails on $this-redirect

2008-12-05 Thread Renesistemic
I've had no luck locating any resource online for resolving my issue (which I feel is fairly easy), and thought I'd post it on here to see if anyone has input. I'm trying to use the built-in data validation for submitting a form. The originating action, say, manage_posts, displays the form to