I'm creating CakePOWER.org: a plugin enhancement extension for CakePHP, i need your help!

2010-10-06 Thread MPeg
Hi, i'm Marco Pegoraro, an italian CakePHP lover and developer. I use CakePHP to build a lot of sites and in the last three years i built a CMS named juniorcms.com (not documented, not distributed yet). It is built upon CakePHP 1.1 and i wrote some classes to allow plugins coworking and

Testing file uploads using SimpleTest web tests?

2010-10-06 Thread psybear83
Hi everybody After suffering hours of debugging the problem that my upload form worked great when used in Firefox and not working (being blackholed) using SimpleTest web tests, I finally found the problem: SimpleTest doesn't seem to recognize the file upload field, and so the

some helper problem

2010-10-06 Thread hoss7
i have this: class SubcatHelper extends Helper { function find($id){ $subcat = $this-Subcat-Cat-find('all',array('conditions' = array('Subcat.status' = 1,'Subcat.id'=2))); return $subcat; } } in SubcatsController this

Re: some helper problem

2010-10-06 Thread Mike Karthauser
hi hoss helpers are for manipulating views and shouldn't/ can't be used to load data from models. perhaps you are better suited with a component? mikek On Wed, October 6, 2010 1:09 pm, hoss7 wrote: i have this: class SubcatHelper extends Helper { function find($id){

Re: some helper problem

2010-10-06 Thread Tilen Majerle
u can load data from models with helpers use ClassRegistry::init(ModelName, Model); or App::import(); read cakephp manual about this... -- Tilen Majerle http://majerle.eu 2010/10/6 Mike Karthauser mi...@brightstorm.co.uk hi hoss helpers are for manipulating views and shouldn't/ can't

Re: Best way to handle sub-tabs

2010-10-06 Thread Joey Mukherjee
Maybe I'm missing something really fundamental... What is the best way to have a menu of side tabs for a given index view? Right now, I have this: $options = array ('update' = '#main_content'); $options ['escape'] = false; $options ['before'] = ; foreach

Re: some helper problem

2010-10-06 Thread hoss7
thanks tilen 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

Re: some helper problem

2010-10-06 Thread Tilen Majerle
hehe no problem :D -- Tilen Majerle http://majerle.eu 2010/10/6 hoss7 hoss...@gmail.com thanks tilen 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: some helper problem

2010-10-06 Thread Mike Karthauser
On Wed, October 6, 2010 2:20 pm, Tilen Majerle wrote: u can load data from models with helpers use ClassRegistry::init(ModelName, Model); or App::import(); read cakephp manual about this... Although you *can* do this, its breaking cake MVC conventions. Really you should be loading data

Re: Getting numeric array keys from query... need model names.

2010-10-06 Thread Dr. Loboto
We had same problem on find queries with MySQL 5.0 and model for view based on UNION query. For a while we lived with check for key, then upgraded MySQL to 5.1 and problem gone. On Oct 5, 9:28 pm, foldiman vi...@vinceallen.com wrote: I'm currently deploying a CakePHP site that works fine in one

Bake templates

2010-10-06 Thread Jeremy Burns
I am creating my own templates for baking views (I spend the time getting that right then bake all my views - it's quicker than changing the results of hundreds of views after baking or creating my own). I'm changing the following file: /app/vendors/shells/templates/mytemplatename/views/index.ctp

Re: Bake templates

2010-10-06 Thread Jeremy Burns | Class Outfit
Got it: if ($schema[$field]['type'] == 'datetime'): Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 6 Oct 2010, at 16:51, Jeremy Burns wrote: I am creating my own templates for baking views (I spend the time getting that right then bake all my views -

Re: save not working

2010-10-06 Thread huoxito
try this to see if its a valitation problem: if ( $this-Host-save($this-data) ){ // it saved }else{ echo $errors = $this-ModelName-invalidFields(); } or maybe some wrong field name you got in your array On 5 out, 10:15, james jamesliv...@googlemail.com wrote: I'm trying to run a

Re: HTML Purifier or Sanitize core library

2010-10-06 Thread mark_story
HTML purifier is miles better than the Sanitize. I would recommend escaping and using a text processor like markdown or textile. However, if you need to accept html from the unwashed masses, use HTMLPurifier. -Mark On Oct 4, 1:02 pm, Loic Duros loic.du...@gmail.com wrote: Hello, I'm

Re: Possible bug in HtmlHelper ?

2010-10-06 Thread mark_story
Don't use the Html-tag method to make inputs. It won't do it correctly, as it wasn't intended for this. Use the FormHelper, its much better at building input tags. -Mark On Oct 4, 6:20 am, Adael adae...@gmail.com wrote: Hi all, in HtmlHelper::tag() (line 728) we found this code: if ($text

Re: HTML Purifier or Sanitize core library

2010-10-06 Thread Loic Duros
Thanks for all the answers -- Mark, do you use Markdown or textile at mark-story.com to write blog posts? Just curious since it seems you have lots of HTML in there. Thanks again, Loic On Wed, Oct 6, 2010 at 1:16 PM, mark_story mark.st...@gmail.com wrote: HTML purifier is miles better than

Help for simple behavior

2010-10-06 Thread senser
Hello, I'm trying to create a simple behavior for data mapping - I have an array with structure different than this in my model. Just an example: $input=array('some_key'=array('id'=2, 'data'='some_data'),

Problem with saveAll or wrong way?

2010-10-06 Thread DerBjörn
Hi, i habe a model 'player' and a model 'skill_pool': Player hasOne SkillPool. Now i want to randomize the player data and his skills and save everything at once, but it doesn't work this way: $this-Player-randomize(); $this-Player-SkillPool-randomize(); $this-Player-saveAll(); The player gets

Strange behavior own comparing validat...@model

2010-10-06 Thread leafchild
I have Auth system, and In my user model, I have a validation soemething like this: == var $validate = array( ... 'password' = array( 'sameCheck' = array( 'rule' = array('sameCheck',

Chef Cookbook for CakePHP

2010-10-06 Thread ardell
I just posted a Chef Cookbook for CakePHP at http://github.com/ardell/cakephp-cookbook Chef allows you to easily provision cloud instances (e.g. Amazon EC2, Rackspace, etc) and Chef Cookbooks allow you to configure applications on a cloud server in a repeatable way. Using Chef and this

How can i access home page without login?

2010-10-06 Thread redleon
I'm using Auth Component. Guest visitor can access register, login, remember_password etc. but can not access home page of the site. I tried everythink i know. For Auth-Allow () methot, i gave '/', 'home', 'display' parameters. But it has not worked. I would like to give permission for guests

Cascading Models in hasone

2010-10-06 Thread Rob
Hello Everyone, I'm a new user of CakePHP, and have a project where we need to reflect a 3-step hierarchy of inheritance in our database in a model. We have people, adults, and users. All users are adults, and people, and all adults are people. Ideally our Adults model hasone person, and our

SELECT ... FOR UPDATE

2010-10-06 Thread andres amaya diaz
Hi, hope you can help me with a SELECT .. FOR UPDATE problem. I have a web app that can be accessed by many users at the same time. I have a table with a field wich has a counter on the next invoice number. Lets call if invoicenumbers (this field cant be auto_increment) And then i have another

Beginners question about adjusting views

2010-10-06 Thread AvE
Hi all, I'm kind of new to CakePHP and currently learning the system. So far I've been able to find answers to my questions via internet and in this group, but this time I have a problem where I can't find the answer to, also because it's a bit hard to describe. I'm building an application to

Changing the language of CakePHP

2010-10-06 Thread me3911
Hallo! How can I change the language of the users module and my CakePHP installation? Is there a german translation that can be downloaded anywhere? Thanks Regards me3911 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You

Fatal error: Out of memory - Even when there is no memory limit

2010-10-06 Thread Fuitad
Hello, I'm in charge of transferring a live CakePHP application from one server to another. I'm trying to get the new site to work but I'm hitting a weird error and I just can't figure it out. When I try to load the main page, I get this: Fatal error: Out of memory (allocated 13631488) (tried

Strange issue using mysqlnd and the character encoding

2010-10-06 Thread 5942marine
Okay, let me give you a little background on the issue. Up until know, I've been using Cakephp 1.3.3 with PHP 5.3.2. Now, my site has two parts, a front end for users and my crawlers, which I run at home, again, using Cakephp 1.3.0 My crawlers basically hit RSS feeds for twiter and google blog

Google Checkout

2010-10-06 Thread Daniel Mulé
Hi guys! Anyone know of a plugin to integrate Google Checkout in CakePhp? I need to do a subscription! Thanks, Daniel. 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

How to keep Cake from trying to save certain form inputs ?

2010-10-06 Thread EJ
Folks, I have a newbie question: I have a form that has certain inputs that just need to be ignored. For example a User may be associated (e.g. via HABTM) with a particular City The City may be associated with a State but I don't need an association between State and User. When I show the

Cakephp using flaot on part part of a website and removing it on another

2010-10-06 Thread ninja
Hi I am still a bit new to phpcake so i already have a page that has two floats left and right but now i want to remove the float on certain pages of the website eg(About page) which needs the entire horizontal spacing of the page.please help Check out the new CakePHP Questions site

How to use ORDER BY within Containable Behavior

2010-10-06 Thread Paul Bricks
I would like to have a sorted-array (order by) to print out in my Post- View. The Problem is, that the order-by-attribute (Category.name) lies deeper than attributes (Post.id, Tag.id, ...), which have to be ordered. Here is my example: Relations: Post -- hasMany -- Tag -- belongsTo -- Category

Using Form type of GET makes input elements have blank name attributes?

2010-10-06 Thread Michael T
Hello, I have a form in a view which is created using the FormHelper in the following way: echo $this-Form-create(False, array('action' = 'something', 'type' = 'get')); I then have an input for the form defined in the following way: echo $this-Form-input('department', array('id' =

Paypal integration

2010-10-06 Thread Warrior
Hi Guys! I am integrating my site with paypal, as per requirement I am not suppose to use the api credentials for integrating paypal with website. is there any way to integrate paypal directly without api integration? Check out the new CakePHP Questions site http://cakeqs.org and help others

help to slove this

2010-10-06 Thread Adnan
why this msg is sowing Notice (1024): Please change the value of 'Security.salt' in app/ config/core.php to a salt value specific to your application [CORE\cake \libs\debugger.php, line 548] Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related

redirect not working

2010-10-06 Thread a17s
Hello, got a problem with using cakephp redirect. Get an error saying header already been set. Please how can I redirect to another action after processing a post. My error keeps pointing to the cake/ basic.php, and the controller/controller.php See error and code below: Error

blog tutorial Html-link problem

2010-10-06 Thread J. Argyl Plath
Hello. I am following along on the blog tutorial and I can't get my first view to work. I set up the database just fine and created my model and controller. I copy/pasted in the view code but I get this error: Notice (8): Undefined property: View::$Html Fatal error: Call to a member function

Re: blog tutorial Html-link problem

2010-10-06 Thread Jeremy Burns | Class Outfit
Are you using version 1.3? If so, replace all instances of $Html to $this-Html. You'll also need to do the same with $Form (to $this-Form) and $Session/$session (to $this-Session). You'll also need to include the Session helper and component in your app_controller: var $components =

Re: How can i access home page without login?

2010-10-06 Thread Jeremy Burns | Class Outfit
Do you have a pages controller? If so, adding: parent::beforeFilter(); $this-Auth-allow('display'); ..in your beforeFilter() ought to work. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 21:31, redleon wrote: I'm using Auth Component.

Re: Cascading Models in hasone

2010-10-06 Thread Jeremy Burns | Class Outfit
The default behaviour is called 'recursion', where the find will look for models directly related to the model you are doing the find on. This is usually one level, but by setting var $recursive = n; you'll go to n levels instead. So in theory setting var $recursive = 2; will solve your issue,

Re: Beginners question about adjusting views

2010-10-06 Thread Jeremy Burns | Class Outfit
The secret is getting the data right in the controller before you pass it down to the view. I'd recommend the Containable behaviour (see this post I just replied to) and then do this in your controller function: $contact = $this-Contact-find( 'first', array(

Re: Fatal error: Out of memory - Even when there is no memory limit

2010-10-06 Thread Jeremy Burns | Class Outfit
It looks like you have some sort of loop in your code, or your query is returning far too much data. Try putting some debug statements into the display action of your nodes_controller before rendering the view to see what's happening. Maybe there are some code and/or database differences

Re: redirect not working

2010-10-06 Thread Akeda Bagus
On Thu, Oct 7, 2010 at 4:17 AM, a17s godlyfr...@googlemail.com wrote: Hello, got a problem with using cakephp redirect. Get an error saying header already been set. Please how can I redirect to another action after processing a post. My error keeps pointing to the cake/ basic.php, and the

Re: Cakephp using flaot on part part of a website and removing it on another

2010-10-06 Thread Jeremy Burns | Class Outfit
Sounds like you need to set up a different layout file that has different div ids/classes, and then apply css appropriately. http://book.cakephp.org/view/1080/Layouts Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 20:27, ninja wrote: Hi I

Re: help to slove this

2010-10-06 Thread Jeremy Burns | Class Outfit
Cake ships with a default salt value. The salt value is used for encrypting passwords and the like. You are supposed to change it to something unique to your site. Change it in /app/config/core.php Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 6 Oct 2010,

Re: redirect not working

2010-10-06 Thread Jeremy Burns | Class Outfit
You are outputting text to the screen before you do the redirect, so it won't work. Rather than doing (and I am guessing what you are doing here) this: echo Congratulations, your new account has been successfully created; $this-redirect...etc ...place the text into the session flash:

plugin messing with existing routes

2010-10-06 Thread cricket
I'm writing a Poll plugin and have configured the following routes: Router::connect( '/polls/vote', array( 'plugin' = 'poll', 'controller' = 'polls', 'action' ='vote' ) ); Router::connect( '/admin/polls',

Re: How to keep Cake from trying to save certain form inputs ?

2010-10-06 Thread cricket
On Tue, Oct 5, 2010 at 3:25 PM, EJ funkybl...@hotmail.com wrote: Folks, I have a newbie question: I have a form that has certain inputs that just need to be ignored. For example a User may be associated (e.g. via HABTM) with a particular City The City may be associated with a State but I

Re: How to use ORDER BY within Containable Behavior

2010-10-06 Thread cricket
On Tue, Oct 5, 2010 at 6:03 PM, Paul Bricks eric.liechtenst...@googlemail.com wrote: I would like to have a sorted-array (order by) to print out in my Post- View. The Problem is, that the order-by-attribute (Category.name) lies deeper than attributes (Post.id, Tag.id, ...), which have to be

Re: Fatal error: Out of memory - Even when there is no memory limit

2010-10-06 Thread j.blotus
when you do phpinfo() from inside that view, does it still show -1 for memory limit? On Oct 5, 11:28 am, Fuitad fui...@gmail.com wrote: Hello, I'm in charge of transferring a live CakePHP application from one server to another. I'm trying to get the new site to work but I'm hitting a weird

Re: Using Form type of GET makes input elements have blank name attributes?

2010-10-06 Thread cricket
On Tue, Oct 5, 2010 at 11:16 PM, Michael T michael.to...@gmail.com wrote: Hello, I have a form in a view which is created using the FormHelper in the following way: echo $this-Form-create(False, array('action' = 'something', 'type' = 'get')); I then have an input for the form defined in

Re: Paypal integration

2010-10-06 Thread cricket
google 'cakephp paypal'. There are several plugins, components, etc. out there that handle PP's non-API IPN method. On Wed, Oct 6, 2010 at 5:17 AM, Warrior warcool1...@gmail.com wrote: Hi Guys! I am integrating my site with paypal, as per requirement I am not suppose to use the api

Re: Strange issue using mysqlnd and the character encoding

2010-10-06 Thread EJ
You might try to dump both databases and make sure the encoding on the DB/tables is the same. Depending on your system, one may default to utf8 and the other to latin1. Not sure if that's it or not but worth a look. On Oct 5, 8:54 am, 5942marine jluken...@gmail.com wrote: Okay, let me give you

Re: How to keep Cake from trying to save certain form inputs ?

2010-10-06 Thread EJ
Thanks for your help cricket! Something else might be going on as it seems to break unless I clear those values out. I'll try to do some more debugging but this definitely gives me a clue. I really appreciate your help. On Oct 6, 9:00 pm, cricket zijn.digi...@gmail.com wrote: On Tue, Oct 5, 2010