Re: routes.php - getting missing controller issue

2010-01-26 Thread leafchild
circket, thank you for the replay. actually i set to 'id'='[0-9a-zA-Z]+' in the beginning but make it simple since nothing was working for me. code below gives me a Missing controller error it say I don't have a Hp Controller =

Displaying apostrophes

2010-01-26 Thread Céryl
Hi all, I have currently developed a new problem in my website. When storing a name into the database wich contains an apostrophe ( ' ), it stores this in the DB as #39; the ASCII code for it. (that's Amperand, Poundsign, 39, semicolon in case googlegroups parses it also) Now some of my pages

Re: Query multiple tables

2010-01-26 Thread Celso
Use joins in you find array options On 22 jan, 14:49, Pedro84 a.osmialow...@gmail.com wrote: Hello Everybody! I'm learning CakePHP since few days and got problems now. I'm rewritting my portal to CakePHP. Sorry for any bad things, this is my first question to google groups ever :-) I got

Re: question about automagic 'modified' field

2010-01-26 Thread Javier
Thank you for the suggestion. I tried creating a parent behavior, but, proved too complex for a newbie like me. Instead I just handled it the afterSave() of the child method. I just force the update of the 'modified' field there. I'll work on a more generic way to do this when I have more cake

Loop Issue Cakephp

2010-01-26 Thread alex
Hi, I'm trying to develop a mailing list In the controller CONTENTS there's a function called sendMailingList [code] $list = $this-Content-query(SELECT * FROM mails WHERE sub = '1'); $data = $this-Content-find($id); $this-Email-smtpOptions =

scaffold isn't working

2010-01-26 Thread andrei.b
Hello, I have 2 tables: authors(id, name, email) and books(id, title, author_id). I've created models for authors and books: class Author extends AppModel { var $name = 'Author'; var $hasMany = 'Book'; } class Book extends AppModel { var $name = 'Book'; var $belongsTo = 'Author';

Re: scaffold isn't working

2010-01-26 Thread Jeremy Burns
If it isn't already there, try turning debug to 2 as this clears the model cache. You can find the setting, which looks like this: Configure::write('debug', 2); ...in app/config/core.php Jeremy Burns On 26 Jan 2010, at 14:47, andrei.b wrote: Hello, I have 2 tables: authors(id, name,

Re: Loop Issue Cakephp

2010-01-26 Thread John Andersen
It is stated the CakePHP manual, that you have to reset the Email fields using the reset method as specified in: http://book.cakephp.org/view/270/Class-Attributes-and-Variables#Sending-Multiple-Emails-in-a-loop-528 Your final flash message invokes the action index in the current controller. What

Re: scaffold isn't working

2010-01-26 Thread andrei.b
I already did that. The response is: SELECT `Book`.`id`, `Book`.`isbn`, `Book`.`title`, `Book`.`description`, `Book`.`author_id` FROM `books` AS `Book` WHERE 1 = 1 LIMIT 20 On Jan 26, 4:50 pm, Jeremy Burns jeremybu...@me.com wrote: If it isn't already there, try turning debug to 2 as this

Re: Loop Issue Cakephp

2010-01-26 Thread alex
I notice that removing $this-flash(...) and writing only the code of redirecting $this-redirect('action'='index'); that pic isn't appeared again... my index function is that standard : function index() { $this-Content-recursive = 0; $this-set('contents',

Re: scaffold isn't working

2010-01-26 Thread andrei.b
I found the error. The name of the controllers was at the plural instead of singular. On Jan 26, 4:56 pm, andrei.b andrei.bogdan.m...@gmail.com wrote: I did that. The select looks like this: SELECT `Book`.`id`, `Book`.`isbn`, `Book`.`title`, `Book`.`description`, `Book`.`author_id` FROM

Re: scaffold isn't working

2010-01-26 Thread euromark
but it is supposed to be plural class BooksController extends AppController { On 26 Jan., 16:30, andrei.b andrei.bogdan.m...@gmail.com wrote: I found the error. The name of the controllers was at the plural instead of singular. On Jan 26, 4:56 pm, andrei.b andrei.bogdan.m...@gmail.com

Re: Loop Issue Cakephp

2010-01-26 Thread John Andersen
Did you try to reset the email fields? I wanted to see that your index action didn't loop! Enjoy, John On Jan 26, 5:05 pm, alex gen...@gmail.com wrote: I notice that removing $this-flash(...) and writing only the code of redirecting $this-redirect('action'='index'); that pic isn't appeared

Re: Loop Issue Cakephp

2010-01-26 Thread alex
Yes I tried! it works!!... Thanks ! On 26 Gen, 18:05, John Andersen j.andersen...@gmail.com wrote: Did you try to reset the email fields? I wanted to see that your index action didn't loop! Enjoy,    John On Jan 26, 5:05 pm, alex gen...@gmail.com wrote: I notice that removing

Re: Displaying apostrophes

2010-01-26 Thread Nathan Lane
Is there something different about your different pages? Like encoding. For example are you maybe not encoding a page as text/html for the content type? I doubt this is the problem though, since the entity #39; should work for XML also. But it may be a possibility. Nathan On Tue, Jan 26, 2010 at

Marking comments as read

2010-01-26 Thread asbestospiping
Hi all, I am trying to do something, and cant work out where to start. I have the blog app running, and have the comments paginated under the post. I have auth working, and would like to track when a user views a comment (Think marking as read) I have a db table viewedcomments, with the fields

Re: datasource and count()

2010-01-26 Thread fain182
no one ever tried to write a datasource with count included and not for an SQL database? 2010/1/21 fain182 fain...@gmail.com: Hello, I wrote a little datasource that i need to browse the filesystem.. find('all'), find('first') works without any problem, but I tried to use find('count') and I

Re: datasource and count()

2010-01-26 Thread John Andersen
How do you search for your files that fulfill your criteria? If you are using a pattern, like *.txt, then you could just use the function glob(*.txt) to return the filenames and dirnames that comply with the pattern. The result is an array, which you can count :) There is no need to worry about

Re: Marking comments as read

2010-01-26 Thread John Andersen
Can I understand that you are only showing one comment at a time, even together with a post? In case that is correct, then one solution is to specific read all the ViewedComment records for the post and the user, and ask in the view, is the current comment in the ViewedComment array of records.

Re: Does ffmpeg adapter need ffmpeg-php extension or is ffmpeg sufficient?

2010-01-26 Thread Deine Mutter
just wanted to add the info for interested people that they might consider the perl module ffmpeg-perl (http://search.cpan.org/~ALLENDAY/ FFmpeg-6036/FFmpeg.pm) as an alternative to ffmpeg-php. On 24 Jan., 14:05, David Persson davidpers...@gmx.de wrote: Oh that's great to hear! As for

Re: Marking comments as read

2010-01-26 Thread cricket
I think the most efficient thing to do would be to update a timestamp whenever a user views a post. Maybe have a posts_users table with an extra column and use contain to include it in your results. Update the column in afterFind() maybe? Then, in the view, compare the original ts that you got

Re: Displaying apostrophes

2010-01-26 Thread cricket
I'd guess that what's happening is that, first, the content is being encoded somewhere before it's inserted into the DB. That may or may not be what you want. Secondly, on the pages where you see the entity displayed, something is encoding it once again. So you end up with amp;#39; and it appears

Re: pagination and routes

2010-01-26 Thread Saleh Souzanchi
this is my problam, plz help 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

Dojo toolkit integration with CakePHP now supported!!

2010-01-26 Thread LordZardeck
There is now an open source project dedicated to providing integration between Dojo and CakePHP! It's called DojoCake and is found at http://dojocake.googlecode.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this

I need help with checkbox

2010-01-26 Thread Edinei Luis Cipriani
The view... $form-input('Curse.0.curse_id',array('type' = 'checkbox', 'value' = 13)); $form-input('Curse.1.curse_id',array('type' = 'checkbox', 'value' = 14)); $form-input('Curse.2.curse_id',array('type' = 'checkbox', 'value' = 15)); how do I recoup the fields checked for edition?

Table Joins

2010-01-26 Thread Uresh
Hi...I am Uresh Patel from india. I am cakephp beginner. I took reference from your Table Rename Join Error topic. I am trying to use inner join between only two tables. Tables : 1.user_profiles fields :- userid (PK) 2. Memberships fields :-membid , userid

Re: Table Joins

2010-01-26 Thread Jeremy Burns
Table joins take place in the model using the $belongsTo, $hasMany and $hasAndBelongsToMany variables. See http://book.cakephp.org/view/78/Associations-Linking-Models-Together. Jeremy Burns On 27 Jan 2010, at 06:31, Uresh wrote: Hi...I am Uresh Patel from india. I am cakephp beginner. I

Re: Loop Issue Cakephp

2010-01-26 Thread Walther
Why are you using raw SQL? I take a very hard stand on this. If you are using raw SQL then you should stop using CakePHP, simple as that (There are exceptions to the rule, but they are very few). By using raw SQL you are entirely negating all the benefits using a framework like CakePHP gives you.

Re: Dojo toolkit integration with CakePHP now supported!!

2010-01-26 Thread Walther
This looks very promising (I don't use dojo, but still). However, the javascript helper has been deprecated in CakePHP 1.3. 1.3 offers the new Js helper along with library engines (jQuery, MooTools and Prototype engines are included by default). Instead of using your time writing helpers that

Re: Displaying apostrophes

2010-01-26 Thread Dr. Loboto
Do not use Sanitize or h() or something similar before save. Do not use them twice on output. On Jan 26, 6:05 pm, Céryl c.a.h.wilt...@student.tue.nl wrote: Hi all, I have currently developed a new problem in my website. When storing a name into the database wich contains an apostrophe ( ' ),