Re: Problem with Cake PHP blog tutorial..Can't add

2010-11-23 Thread Jeremy Burns | Class Outfit
That's the error message PHP delivers when something is printed to screen before the actual output (the headers referred to in the error message). Check you code for debug statements or other errors that could be doing this. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.class

error in my cake php

2010-11-23 Thread siva
im new to cakephp i started with name convention program but did not get answer there some error that i noted below (default) 0 query took ms Nr Query Error AffectedNum. rows Took (ms) im using wamp server pls help me to find the answer Check out the new CakePHP Questi

noob - Problems with default selected option

2010-11-23 Thread lash
I have a view doing: echo $form->input('cities'); and a controller doing: function edit($id = null) { $this->set('cities', $this->Venue->City->find('list')); $this->Venue->id = $id; if (empty($this->data)) { $this->data = $this->Venue->read(); } else { $this->data['

Re: Baffling blank screen problem

2010-11-23 Thread jason miyashiro
It could be you are missing the cake log file in /cake/libs/cake_log.php. Check to see that the file is there. It has happened to me before because the way I had my .gitignore set up, it ignored the cake_log.php file when I pulled from git. That might be the problem. On Nov 24, 9:02 am, Jules wro

Re: How should my blog look like ?

2010-11-23 Thread Leow
This confusion has been solved, I read another tutorial which there were snapshots and found that my installation was correct. On Wed, Nov 24, 2010 at 12:01 AM, John Maxim wrote: > I'm going through a tutorial set up by cake PHP, where creating a > blog. I mean after creating it successfully, wh

Ajax Helper autoComplete

2010-11-23 Thread macpclinux
I have been using CakePHP for a short while but, recently tried to use autoComplete for one of my displays. During my testing I felt it necessary to include an option array for 'after' to call a javascript of mine. While the code does not break the page display or any of the CakePHP functionality

Problems with timestamp in cakephp 1.3 and postgresql 9

2010-11-23 Thread Erik
I am new to cakephp and have tried to install on Vista with WAPP from bitnami. I succeeded in making it run, but is having problem with the datatype for created and modified. Have tried all dateformat provided by postgesql, but gets an error message. If I change to character var it is OK, but then

Problem with Cake PHP blog tutorial..Can't add

2010-11-23 Thread John Maxim
set('posts', $this->Post->find('all')); } function view($id = null) { $this->Post->id = $id; $this->set('post', $this->Post->read()); } function add() { if (!empty($this->data)) { if ($this->Post->save($this->data)) { $this->Session->setFlash('You

How should my blog look like ?

2010-11-23 Thread John Maxim
I'm going through a tutorial set up by cake PHP, where creating a blog. I mean after creating it successfully, why is there query numbers, error messages at the bottom of the view page ? I wonder if my XAMPP is working correctly I have checked my httpd.conf file and it seems to be fine. The welcom

Only show records associated with group

2010-11-23 Thread Logan
Hi all, I appreciate the help in advance. I'm trying to create a personnel management application, where as records (employee information) would be associated with a group. Administrators should be allowed to access and edit (or view only based on group), employees multiple groups... for the shar

Integrating facebook class to cakePHP 1.2

2010-11-23 Thread sumit
Hi , We are using cakePHP version 1.2.3.8166 in our application. Any pointers/help to the below questions will be very helpful. * Getting the facebook class to work in CakePHP 1.2 * Is it disruptive to migrate to CakePHP 1.3? Thanks in advance. Check out the new CakePHP Questions site http://ca

Re: Drop down menu not retrieving last inserted element in IE

2010-11-23 Thread Master Ram...!
Yes. recently-added record? is not fetching to menu. how to salve this problem. On Wed, Nov 24, 2010 at 12:27 AM, cricket wrote: > On Tue, Nov 23, 2010 at 6:10 AM, Master Ram wrote: > > Hi.. all > > > > I have problem with IE drop down menu. > > > > i have inserted one element its stored in

Re: Dynamic data in fixtures

2010-11-23 Thread Amit Badkas
Hi, Yes, exactly like that. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Nov 24, 2010 at 3:41 AM, Jacob wrote: > You mean like this? > > class AnyFixture { > > var $today; > var $tomorrow; > > function __construct() { >$this->today = date('Y-m-d H:i:s'); >

Re: pagination url options

2010-11-23 Thread Dr. Loboto
$paginator->options(array('url' => array('?' => $this- >data['Search'])); On 24 ноя, 09:31, Dmitry Shevchenko wrote: > I found a very bad solution > 1. make convert from array to url manually > 2. add this to parameters array > 3. unset not flat array's in param > > f.e. > $seeking_url = ''; >  

Re: pagination url options

2010-11-23 Thread Dmitry Shevchenko
I found a very bad solution 1. make convert from array to url manually 2. add this to parameters array 3. unset not flat array's in param f.e. $seeking_url = ''; if (!empty($this->data['Search']['seeking'])) { $seeking_url .= "seeking="; //make url to string

Security component and combine requireSecure() and requireLogin()

2010-11-23 Thread rj
Hello, I try to use the security component in cakePHP 1.3 and want to combine the requirements to establish an SSL connection with a simple security login. First I want to redirect to a secure connection. Then transmitting the password should be okay. Both methods work fine as long as long as I do

Re: Baffling blank screen problem

2010-11-23 Thread Jules
Using version 1.3.5, is working now with 'log' set to false in config.php. Not ideal, but is working for now. 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

Re: cakephp Messaging sysytem

2010-11-23 Thread euromark
i implemented the "facebook" way i hate those old fashioned messaging system. they are so out of date. with "threaded" conversations you always have the last messages at hand. conversations HM conversation_users conversations HM conversation_messages conversation_users BT users conversation_messag

Re: Dynamic data in fixtures

2010-11-23 Thread Jacob
You mean like this? class AnyFixture { var $today; var $tomorrow; function __construct() { $this->today = date('Y-m-d H:i:s'); $this->tomorrow = date('Y-m-d H:i:s', strtotime('+1 day')); } } On 22 nov, 07:21, Amit Badkas wrote: > Hi, > > You can't assign default values to class propert

Re: Drop down menu not retrieving last inserted element in IE

2010-11-23 Thread Joshua Muheim
Internet Explorer is known to be very buggy in such things. Can you post the HTML source code? On Tue, Nov 23, 2010 at 7:57 PM, cricket wrote: > On Tue, Nov 23, 2010 at 6:10 AM, Master Ram wrote: >> Hi.. all >> >> I have problem with IE drop down menu. >> >> i have inserted one element its store

Re: Acl and bindNode

2010-11-23 Thread netusco
I just had the same problem, it really looks like a bug on cakephp... It was working when ids of groups where the same as ids of aros, but not working when different. I agree with parallel 32 but I would prefer not to use his approach as it would break in any upgrading... Is there anyone who cou

Re: Behaviors that arm models with new public methods, e.g. $model->readRandom()?

2010-11-23 Thread Joshua Muheim
Thank you, Majna! On Tue, Nov 23, 2010 at 10:17 PM, majna wrote: >  if ($this->MyModel->Behaviors->attached('Translate')) > > http://api13.cakephp.org/class/behavior-collection#method-BehaviorCollectionattached > > On Nov 23, 3:09 pm, Joshua Muheim wrote: >> Oh, and is there a standard way to ch

Re: Behaviors that arm models with new public methods, e.g. $model->readRandom()?

2010-11-23 Thread majna
if ($this->MyModel->Behaviors->attached('Translate')) http://api13.cakephp.org/class/behavior-collection#method-BehaviorCollectionattached On Nov 23, 3:09 pm, Joshua Muheim wrote: > Oh, and is there a standard way to check whether a behavior is loaded? > E.g. when creating behaviors that are de

Re: cakephp Messaging sysytem

2010-11-23 Thread John Andersen
You should specify your requirement to the messaging system! 1) A message must have a sender. 2) A message must have one or more receivers. 3) A message must indicate for each receiver, whether it has been read or not. 4) A message must retain its list of receivers, even though a receiver has delet

Re: cakephp + jquery help

2010-11-23 Thread Michael T
Note that if you want to use the JsHelper, you might find that some jQuery widgets/functions might not be available e.g. autocomplete. You will have to extend the JsHelper yourself to do that. Good luck! On Nov 19, 12:42 am, jd wrote: > Hi All > > Excuse the beginners question but... > > I want

Re: AJAX Chain Reaction - Multiple Divs.

2010-11-23 Thread Michael T
Hi Stephen, We need some more information about your problem to be able to help. What does your code look like at the moment? Are you using any of the AJAX/JS helper methods provided by Cake? Which JS engine are you using (jQuery, prototype, ...)? Are you firing a new AJAX request each time the v

Re: JS helper

2010-11-23 Thread Michael T
Huoxito - are you referring to server side and client side validation? Generally, it's a good idea to do both anyway. That way you can guarantee that even if someone attempts to trick the server into saving something invalid, it will still be validated. On Nov 22, 7:22 pm, huoxito wrote: > I just

Re: CakePHP 1.3, JSHelper and Autocomplete, Missing method?

2010-11-23 Thread Michael T
I ran into this issue a while ago. I decided to add the autocomplete method to the JsHelper / jQuery engine myself. Here's what you need to do. In jquery_engine.php, you need to create an autocomplete method. You can copy/paste from a similar method e.g. the 'sortable' method. You might want to ma

Re: Drop down menu not retrieving last inserted element in IE

2010-11-23 Thread cricket
On Tue, Nov 23, 2010 at 6:10 AM, Master Ram wrote: > Hi.. all > > I have problem with IE drop down menu. > > i have inserted one element its stored in the DB. i am fetching that > field in the drop down menu. but the last > > inserted element is not retrieving in the drop down menu. In IE. but > i

Re: Controller::__mergeVars() automatically adds model class to Controller::uses that doesn't exist! --psybear

2010-11-23 Thread Miles J
Cake automatically adds a model to your controller based on your controllers name. To disable that, pass an empty $uses. public $uses = array(); On Nov 23, 8:47 am, AD7six wrote: > On Nov 23, 5:02 pm, psybear83 wrote: > > > Hey everybody > > > Because I need it in every controller. > > which is

Re: Controller::__mergeVars() automatically adds model class to Controller::uses that doesn't exist! --psybear

2010-11-23 Thread AD7six
On Nov 23, 5:02 pm, psybear83 wrote: > Hey everybody > > Because I need it in every controller. which is IMO a classic mistake. Don't you have $this->OtherModel->User always available? AD Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related q

Controller::__mergeVars() automatically adds model class to Controller::uses that doesn't exist! --psybear

2010-11-23 Thread psybear83
Hey everybody Because I need it in every controller, I have added 'User' to AppController::uses. But then something strange happened: When calling my SearchController, I got the error that the table searches for the model Search doesn't exist. The funny thing: there IS no Search model. I tracked t

Re: Model - Retrieve data

2010-11-23 Thread Sarpidon
Or even better this!!! Example: Array ( [Projectcategory] = Array ( [id] => 2 [title] => Residential [alias] => residential [imagepath] => [weight] => 1 [published] => 1 [RANDOM IMAGE FROM PROJECTS BELONG TO

Model - Retrieve data

2010-11-23 Thread Sarpidon
Hi. I am not sure how to do the following - what is the best practice. I have a Projectcategories table that has many Projects. A Project has many Projectimages. What I want to do is to get the Projectcategory and a random image for each Project from Projectimages. For example: Array ( [Pro

Re: some acl and auth problem

2010-11-23 Thread pave2009
here is the link: http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application please check your cakephp version tutorial.Link shows tute for cakephp 1.3.x On Nov 22, 4:48 pm, hoss7 wrote: > i am new in cakephp ,and i want use ,user and group and permation > system,but i cant find out how

Re: IIS

2010-11-23 Thread pave2009
Yes, It works!! here is the link: http://bakery.cakephp.org/articles/filippo.toso/2008/01/29/cakephp-on-iis hope it solves the problem. On Nov 22, 10:28 pm, Kevin Davis wrote: > Hi there, > > Can CakePHP work on IIS?? Check out the new CakePHP Questions site http://cakeqs.org and help others w

Re: Behaviors that arm models with new public methods, e.g. $model->readRandom()?

2010-11-23 Thread Joshua Muheim
Oh, and is there a standard way to check whether a behavior is loaded? E.g. when creating behaviors that are depending on other behaviors? Thanks, Josh On Tue, Nov 23, 2010 at 3:08 PM, Joshua Muheim wrote: > Oh great, I was exactly on the right track but didn't dig deep enough! > Silly me. Thank

Re: Behaviors that arm models with new public methods, e.g. $model->readRandom()?

2010-11-23 Thread Joshua Muheim
Oh great, I was exactly on the right track but didn't dig deep enough! Silly me. Thanks for the hint! On Tue, Nov 23, 2010 at 2:42 PM, euromark wrote: > well, usually, if you attach behaviors you can access those public > methods from the model: > > $this->Model->thisisabehaviormethod() etc > > s

pagination url options

2010-11-23 Thread Dmitry Shevchenko
Hi. I found a some error when using paginator-> options ( .. url ..) for example this is my call for paginator in view. $paginator->options (array('url' => $this->data['Search'] .. and if data['Search'] is flat array - all is good - it will create a correct url but if it contain a sub arrays lik

Re: Behaviors that arm models with new public methods, e.g. $model->readRandom()?

2010-11-23 Thread euromark
well, usually, if you attach behaviors you can access those public methods from the model: $this->Model->thisisabehaviormethod() etc so i would recommand using behaviors - thats pretty much exactly what those behaviors are supposed to do they enhance your current model. e.g. Tree Behavior: gener

Re: Authentication against 2 different user tables

2010-11-23 Thread Naresh Kumar
Hi, If you use ACL it will help. Regards, Naresh On Mon, Nov 22, 2010 at 8:01 PM, Johannes wrote: > Hello, > > I want to set up a new project, using CakePHP 1.3 and have one big > problem. > > I have set up all the tables i need, but i have 2 "user-tables" called > users and agents. > I wa

Re: Authentication against 2 different user tables

2010-11-23 Thread Santiago Basulto
What happens if you want to have a user that is both, a member and an Agent? On Nov 22, 11:31 am, Johannes wrote: > Hello, > > I want to set up a new project, using CakePHP 1.3 and have one big > problem. > > I have set up all the tables i need, but i have 2 "user-tables" called > users and agent

Drop down menu not retrieving last inserted element in IE

2010-11-23 Thread Master Ram
Hi.. all I have problem with IE drop down menu. i have inserted one element its stored in the DB. i am fetching that field in the drop down menu. but the last inserted element is not retrieving in the drop down menu. In IE. but its working in Firefox. regards: Master Check out the new CakePH

Re: Session data missing

2010-11-23 Thread Renato de Freitas Freire
You may check your domain config. I solved my "losing session data" changing the scope of cookie session on php.ini. I guess you are using a shared host, or a server with more then one domain. On Tuesday, November 23, 2010, Raph wrote: > Hello, > > We had weird problem with session data. > > L

Re: Session data missing

2010-11-23 Thread Raph
Cake version is 1.2.8. On 23 Lis, 11:26, Raph wrote: > Hello, > > We had weird problem with session data. > > Let's say we have a kind of wizard with two steps. In first step we > saving some data in session i.e.: > > $this->Session->write('user.step1.data', 'foo'); > > In second step we have: >

Session data missing

2010-11-23 Thread Raph
Hello, We had weird problem with session data. Let's say we have a kind of wizard with two steps. In first step we saving some data in session i.e.: $this->Session->write('user.step1.data', 'foo'); In second step we have: if (!$this->Session->check('user.step1.data')) { $this->

Re: application enhancement. how to update acl

2010-11-23 Thread Trent
Use this plugin: https://github.com/markstory/acl_extras/tree/master Then you just need to run the following command in your terminal and it will sync all your acos: cake acl_extras aco_sync On Nov 23, 6:40 am, rethab wrote: > Hi all > > I have a deployed CakePHP application in production with

Re: Behaviors that arm models with new public methods, e.g. $model->readRandom()?

2010-11-23 Thread Joshua Muheim
So far I didn't come to a better solution than just wrapping the methods I want to implement: class AppModel extends Model { function someFunction($params) { return BetterModel::someFunction($params); } } But I remember that there's some OOP function in PHP5 that catches missing methods,