session management

2011-03-30 Thread Rishab Jain
Hi All, I'm using the Auth for session management in cakephp. But I have no idea as to how to configure the timeout and other variables. Can someone help? regards, Rishab -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions

SUMIF in Cakephp

2011-03-30 Thread thom
Hello, I just wonder about how to write Mysql's syntax SUM IF in Cakephp. Is there a way to insert it in 'cake-way' or just using this-query() ?? Thank you very much. -- Regards,,, mastanto http://www.mastanto.com http://thom-sharing.blogspot.com -- Our newest site for the community: CakePHP

Re: session management

2011-03-30 Thread Jeremy Burns | Class Outfit
You must be busy so I did a search on the online guide for you: http://book.cakephp.org/view/1251/Setting-Auth-Component-Variables Please let me know if there's anything I can do for you. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 30 Mar 2011, at

Re: SUMIF in Cakephp

2011-03-30 Thread Jeremy Burns | Class Outfit
Not sure if this would work (and I haven't tried it) but have a go at adjusting this syntax: array('fields'=array('Product.type','MIN(Product.price) as price'), 'group' = 'Product.type'); As you can see, 'MIN(Product.price) as price' is just a function that gets passed through to the SQL and

Re: Paginate pre-ordered list

2011-03-30 Thread ShadowCross
If you want to paginate based on the primary model (in this case User, ignoring Like for the pagination), you have two possible options: 1) Add two parameters to the Like::getMostLiked() function to control pagination on the array returned, i.e.: class Like extends AppModel { ...

Re: Paginate pre-ordered list

2011-03-30 Thread ShadowCross
Oops. In option 2, the line 'conditions' = array('User.id' = $user ))); should be 'conditions' = array('User.id' = $liked[$i] ))); -- 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

Re: CakePHP files in utf-8 without bom?

2011-03-30 Thread euromark
As I said before, the whole cake project is completely UTF8 keep my first post in mind and you will be fine. there is no need for any more discussion on this topic. RE: Yeah. But i need to translate the app in different languages not only english ^^ So it's enough to convert these .po files to

Re: about jquery and ajax in cakephp

2011-03-30 Thread Jens Dittrich
What do you want to learn? What are your Questions? To learn about Asynchronous Javascript and X you do not have to know anything about CakePHP. CakePHP ist a PHP framework and not a Javascript framework therefore it only provides PHP wrappers for the Javascript code (from JS- frameworks like

Re: CakePHP files in utf-8 without bom?

2011-03-30 Thread func0der
Yeah i was just wondering because notepad++ showed me ANSII and the lanuage file i baked with the console. i put an ü in it and it gave me a ? in the browser view. On Mar 30, 1:13 am, Ryan Schmidt google-2...@ryandesign.com wrote: On Mar 29, 2011, at 18:09, Ryan Schmidt wrote: Files that

Re: CakePHP files in utf-8 without bom?

2011-03-30 Thread Ryan Schmidt
On Mar 30, 2011, at 06:13, func0der wrote: Yeah i was just wondering because notepad++ showed me ANSII There is no such thing as ANSII. There is ASCII: http://en.wikipedia.org/wiki/ASCII And there is ANSI: http://en.wikipedia.org/wiki/Windows-1252 and the lanuage file i baked with the

Re: SUMIF in Cakephp

2011-03-30 Thread huoxito
yeah i have used the SUM mysql function just like Jeremy said above and it worked great -- 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.

Re: session management

2011-03-30 Thread huoxito
the timeout you can set in core.php file -- 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

Re: cakephp on godaddy

2011-03-30 Thread Ben McClure
Rather than make it an absolute path (putting '/' before index.php) couldn't you just reset RewriteBase to '/'? -- 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

Re: saveAll and validate=only

2011-03-30 Thread 0x20h
Am 29.03.2011 19:07, schrieb euromark: i would expect saveAll to return either true or false but instead it returns an array with the individual results The return value depends on the 'atomic' option. You should get a boolean return value when 'atomic' is set to true (which is the default) and

Problems running schema update -s

2011-03-30 Thread Benno
Hi, Sorry if this is answered somewhere, but I checked the archives as well as the bug tracker and didn't see anything. I've got an app built on 1.3.7. I generated an initial schema from database1 and have been able to use it to generate tables on database2. I subsequently added a new table to

Re: languages subdomain or directory

2011-03-30 Thread hunny
Maybe this would guide you in the right direction http://stackoverflow.com/questions/1794412/adding-a-prefix-to-every-url-in-cakephp Thanks. On Mar 30, 4:11 am, Carlos Eduardo Sotelo Pinto carlos.sotelo.pi...@gmail.com wrote: I understand an dI like your point of view using directory languages

Re: languages subdomain or directory

2011-03-30 Thread hunny
Following might help: http://stackoverflow.com/questions/1794412/adding-a-prefix-to-every-url-in-cakephp On Mar 30, 4:11 am, Carlos Eduardo Sotelo Pinto carlos.sotelo.pi...@gmail.com wrote: I understand an dI like your point of view using directory languages for seo, the question the will be

Default Css rendering

2011-03-30 Thread kinor
hello all. I have just downloaded and installed Cakephp 1.3.7. it seems that the default index page (localhost\cakephp) does not render the cake.generic.css file. I am using wamp and the cake folder resides in c:\wamp\www\cakephp it works on another computer next to me (we did exactly the same

Re: Wildcard DNS | Domain | Subdomain

2011-03-30 Thread swimwithabhra
Hi all, thanks for all your suggestions. I will talk to my hosting provider to check whether the virtualhost and other server configurations are correctly done or not. The following is the htaccess I am using -: IfModule mod_rewrite.c RewriteEngine On RewriteCond

Re: Wildcard DNS | Domain | Subdomain

2011-03-30 Thread swimwithabhra
3. Upload .htaccess with necessary modifications. Why would you want to modify .htaccess? This step is not needed for CakePHP to work on multiple subdomains. Hello Daniel, What I am trying to do is to access virtual sub domains [non existing sub domains] for each individual user of my

Re: languages subdomain or directory

2011-03-30 Thread Carlos Eduardo Sotelo Pinto
Thanks to much On Wed, Mar 30, 2011 at 1:11 AM, hunny saurabh85maha...@gmail.com wrote: Following might help: http://stackoverflow.com/questions/1794412/adding-a-prefix-to-every-url-in-cakephp On Mar 30, 4:11 am, Carlos Eduardo Sotelo Pinto carlos.sotelo.pi...@gmail.com wrote: I

Re: Problems running schema update -s

2011-03-30 Thread Akeda Bagus
On Wed, Mar 30, 2011 at 5:57 AM, Benno benno.dir...@gmail.com wrote: Hi, Sorry if this is answered somewhere, but I checked the archives as well as the bug tracker and didn't see anything. I've got an app built on 1.3.7. I generated an initial schema from database1 and have been able to use

Re: Default Css rendering

2011-03-30 Thread Akeda Bagus
On Wed, Mar 30, 2011 at 5:05 PM, kinor amit.ki...@gmail.com wrote: hello all. I have just downloaded and installed Cakephp 1.3.7. it seems that the default index page (localhost\cakephp) does not render the cake.generic.css file. I am using wamp and the cake folder resides in

Re: saveAll and validate=only

2011-03-30 Thread euromark
thx for the clarification! makes sense but since i cannot use transactions (mysql, isam), atomic is set to false (wouldnt make sense), therefore the individual results I now do it this way: if (CommonComponent::logicalAnd($this-BoardTopic-saveAll($this- data['BoardTopic'],

View caching - problems with different user roles

2011-03-30 Thread DigitalDude
Hey, I've been plaing around with the cache to speed up an app a little bit and I ran into an interesting problem when having different user roles and elements in a view that can be seen by an admin, but not by a user. So in my app I have some code to check if the currently logged in user is an

Re: Problems running schema update -s

2011-03-30 Thread Benno
On Mar 30, 11:15 am, Akeda Bagus ad...@gedex.web.id wrote:  Comparing Database to Schema...  Error: Missing database table 'cm_foo_bar' for model 'FooBar' I assume you're using database configuration more than one and use different prefix on different configuration. Could you do schema

Re: Paginate pre-ordered list

2011-03-30 Thread CrotchFrog
@ShadowCross: Thank you for the help, I appreciate it. The combination of class LikesController extends AppController { ... var $paginate = array( 'limit' = 20, ... ); AND $this-helpers[] = 'Paginator'; while it does in fact load the

Re: Paginate pre-ordered list

2011-03-30 Thread ShadowCross
My apologies. In retrospect, I think the only method in the PaginatorHelper that I used when manually loading the helper (and not using Controller::paginate()) was PaginatorHelper::sort(). Basically, since you are not using the Controller::paginate() function, you pretty much either have to

Re: syncing two databases

2011-03-30 Thread Shinya Koizumi
Maybe for now I just set up a a file with sql command to propagate changes to the live database when pushing code to live. On Tue, Mar 29, 2011 at 4:06 PM, Ryan Schmidt google-2...@ryandesign.comwrote: On Mar 29, 2011, at 11:29, cake-learner wrote: Is there any way to sync tables schema

Re: cakephp on godaddy

2011-03-30 Thread Ben McClure
I know this is an old topic, but just wanted to provide an update. I just set up the latest CakePHP in GoDaddy and wanted to post my experience. First, they are using PHP5 as the default now. Second, you still get 500 errors on any path. I fixed it by adding the following at the start of the

Re: CakePHP files in utf-8 without bom?

2011-03-30 Thread func0der
Yeah sorry. One i to much. Yeah worked out just fine. Thanks for helping and google notepad++. just a great editor :P On Mar 30, 2:03 pm, Ryan Schmidt google-2...@ryandesign.com wrote: On Mar 30, 2011, at 06:13, func0der wrote: Yeah i was just wondering because notepad++ showed me ANSII

Re: View caching - problems with different user roles

2011-03-30 Thread ShadowCross
When you use Caching in the Controller (http://book.cakephp.org/view/1380/Caching-in-the-Controller), Cake bypasses the actual code in the function. = From http://book.cakephp.org/view/1381/Marking-Non-Cached-Content-in-Views It should be noted that once an action is cached, *the

You favorite IDE/ Dev Setup?

2011-03-30 Thread Chris
How do you develop for CakePHP? OS, Editor, control system, etc.? Ubuntu 10.10 Geany GIT Apache/MySql Bunch of Shell scripts -- 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

PHP Developer| Austin, TX | 6 Months

2011-03-30 Thread Santosh Kumar
*PHP Developer* Location: Austin, TX Duration: 6 Months Rate: Open Must have experience on the following skills: * PHP, MySQL, Linux, Javascript, JQuery, Agile Methodology, Java. * Must have at-least 8 years of IT experience. * Must be able to work independently with minimal

redirect after delete not working

2011-03-30 Thread lemp
My delete method don’t redirect after execution. The record is deleted but the redirect doesn’t occur. If I reload the page, the flash message appears and the record is not there anymore. It used to work and I can´t find why that stopped working. I tried setting debug to 0 and 1 without any more

Re: redirect after delete not working

2011-03-30 Thread lemp
I tested on another server and it does work. I suspect this may be an Apache configuration problem. Any suggestion on what to look for? -- 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

Re: You favorite IDE/ Dev Setup?

2011-03-30 Thread Shinya Koizumi
CentOS Subversion Zend Studio( Remote Server + SVN ) Apache/Mysql shell Scripts( push to live ) On Wed, Mar 30, 2011 at 12:49 PM, Chris theswimmingf...@gmail.com wrote: How do you develop for CakePHP? OS, Editor, control system, etc.? Ubuntu 10.10 Geany GIT Apache/MySql Bunch of Shell

Re: Wildcard DNS | Domain | Subdomain

2011-03-30 Thread bujanga
Do what Ryan suggested for getting your apache set up correctly. Get rid of that .htaccess file and cake until you know apache can serve a simple index.htm. Now about the .htaccess file, is this line really in it? RewriteCond %{HTTP_HOST} ^([^.]+)\.?domain\.com [NC] On Wed, Mar 30, 2011 at 2:05

preguntas sobre setFlash

2011-03-30 Thread c.pfar...@gmail.com
Hola gente, resulta que tengo un sitio en el que por diferentes circunstancias se hacen ciertos informes sobre procesos que se llevaron a cabo como ¨guardado correctaemnte¨, ¨hubo un error¨ etc bueno todos los errores los estoy poniendo de la forma siguiente: $this-Session-setFlash(...);

Multilingual website - Entries in .po file

2011-03-30 Thread jairishab
Hi I tried searching on this a lot. I want to make my website multilingual. So say for french, I wrote the following entry in the default.po file for fre: msgid Hello msgstr Bonjour Now, the issue I am facing is that I'm unable to add more entries here. I tried, msgid Hello str2 msgstr Bonjour

form, url, and id

2011-03-30 Thread cricket
Using 1.3.7 I'm having some trouble with routes again. Specifically, routes and FormHelper. Router::connect( '/admin/galleries/:gallery_id/edit_image/:image_id', array( 'admin' = 1, 'controller' = 'galleries', 'action' =

Re: Multilingual website - Entries in .po file

2011-03-30 Thread cricket
On Thu, Mar 31, 2011 at 12:19 AM, jairis...@gmail.com wrote: Hi I tried searching on this a lot. I want to make my website multilingual. So say for french, I wrote the following entry in the default.po file for fre: msgid Hello msgstr Bonjour Now, the issue I am facing is that I'm unable

Re: Multilingual website - Entries in .po file

2011-03-30 Thread Zaky Katalan-Ezra
Use poedit http://www.poedit.net/http://www.google.com/url?sa=Dq=http://www.poedit.net/ -- 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.

Re: Paginate pre-ordered list

2011-03-30 Thread CrotchFrog
There is not much going on at all with the Like::getMostLiked() function. The Like Model works in conjunction with Facebook. FB's Like button doesn't work so well with password protected pages so I basically re-wrote their script for the Like button and now it does what I want and then some. The