Re: Simple Form Authentication in 1.2.x.x

2007-02-24 Thread joradom
ok, after a lot of tries and errors :) i got it to work, i was trying a login funtion in my users controller with something like: if(!empty($this->data)) { $this->cleanUpFields(); if (!$this->Auth->login( $this->data))

Re: eternal routing

2007-02-24 Thread crazed_climber
I would also like to know how to implement something similar to this. On Feb 23, 2:14 pm, "Oneill" <[EMAIL PROTECTED]> wrote: > Hi All, > > Here a dutch friend which needs some wisdom.;-) > > I am trying to build my own mini cms... Who doesn't... ;-) > > I would love to get my urls like this : /w

Re: Blank page of death

2007-02-24 Thread Falagar
@topic I still haven't figured out why it didn't work but it only appeared when using scaffolding, I baked my views, controllers and models now and it works fine. I guess it is some server issue. (and yes the file index.thtml cake tries to include is on the server, in the scaffolding folder) @sub

Re: ajax imagelink

2007-02-24 Thread [EMAIL PROTECTED]:
Check this thread from the group : http://groups.google.com/group/cake-php/browse_thread/thread/5826289a9601a1e/643fb072b0eb13f1?lnk=gst&q=ajax+image+link&rnum=2&hl=en#643fb072b0eb13f1 [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you ar

ajax imagelink

2007-02-24 Thread gerbenzomp
I would like to attach an ajax-call to an image, instead of a text- link, but I can't get it to work. My code is: link('/icons/edit.png', '/posts/edit/'.$post['Post'] ['id'], array('update' => array('post_'.$post['Post']['id'], 'second'))); ?> --~--~-~--~~~---~--~---

RE: how to count articles in category ?

2007-02-24 Thread Mariano Iglesias
If you need to get how many articles are in a specific Category ID (or a group of category IDs, or all categories) then set up a model for your HABTM join table. If your models are named Category and Content, and you've set up the HABTM on Category (so your join table is named contents_categories)

Re: Simple Form Authentication in 1.2.x.x

2007-02-24 Thread joradom
Hello I think I got the idea behind "simple form authentication", I'm trying to put the new Auth component of cakephp 1.2 at work, but I am unable to make the login works. It seems it get lost somewhere in the identify function, I can see in the debug that the Auth object doesn't get a reference

Re: Simple Form Authentication in 1.2.x.x

2007-02-24 Thread rollo
Followed the same tutorial and ran into the same problems. I had to to these changes in order to get it working: > In /app/models/user.php - change line 7 into: function validateLogin($data) > In /app/controllers/users_controller.php - change line 15 into: $this->__validateLoginStatus

Re: Blank page of death

2007-02-24 Thread [EMAIL PROTECTED]
Falagar: I wish I had an answer to your question, but I don't. Still though, could I take a moment of your time and ask how you got cake running on a subdomain? I've done the same thing as you, set up a "dev" subdomain in order to experiment with cake but I can only get urls running through /ap

Re: how to count articles in category ?

2007-02-24 Thread Nookie
sorry, this is my code: array('className'=> 'Content', 'joinTable'=> 'contents_categories', 'foreignKey' => 'category_id', 'associationForeignKe

Re: how to count articles in category ?

2007-02-24 Thread Nookie
No it's not. i want to put one article into many categories. now i've put $hasAndBelongsToMany into my Category model so i get categories but with all articles.I need ONLY number of articles in category and i dont want to use count($data['Article']) in PHP !! --~--~-~--~~---

RE: how to count articles in category ?

2007-02-24 Thread Mariano Iglesias
I think Nookie had originally intended to let Articles belong to more than one category, and each category could have more than one article. That's why HABTM relations exist. -MI --- Remember, smart coders answer ten questi

Re: how to count articles in category ?

2007-02-24 Thread Sergei
Your problem is wrong designed DB. It should be like this: categories: - id - name articles - id - category_id - title - contnet There is no need in join table here. On 25 фев, 08:36, "Nookie" <[EMAIL PROTECTED]> wrote: > my tables: > > categories: > - category_id > - name > > articles > - a

how to count articles in category ?

2007-02-24 Thread Nookie
my tables: categories: - category_id - name articles - article_id - title - contnet articles_categories: - article_id - category_id now i want to get all categories with the number of articles in it. now in my Category model i have something like this : public function countContents($catego

Re: CakePHP+JpGraph

2007-02-24 Thread YoLoL
Hi, thanks for your help. Here's some feedback on the issue. I checked the settings for session.auto_start and it's set to off, what I did is to add "php_value session.auto_start 1" in a .htaccess file on the subdirectory since I don't have access to php.ini What I did is to separate the JpGrap

RE: PEAR HTML_QuickForm and cakephp

2007-02-24 Thread Mariano Iglesias
My vendor folder looks like this: vendors/PEAR: all PEAR inside, so you can find: vendors/PEAR/Cache/* vendors/PEAR/Translation2/* vendors/PEAR/PEAR.php etc. Then on vendors/pear.inc.php I have a file with this: define('PEAR_PATH', dirname(__FILE__) .

Re: Bake not baking Controllers

2007-02-24 Thread lukemack
try commenting out the associations in your model. then try a bake. if it works, you probably have your associations set up incorrectly. On 24 Feb, 22:43, "Seb" <[EMAIL PROTECTED]> wrote: > The only thing I can say... if anyone else runs into that, is have a > look at the assumptions Bake makes i

Re: PEAR HTML_QuickForm and cakephp

2007-02-24 Thread lukemack
Thanks - do you just have a simple vendor file doing the includes for the packages in their standard locations or move the individual packages into subfolders under vendors? On 24 Feb, 18:45, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > I have used all sorts of PEAR packages as vendors in Cake

RE: generateList for unused items only?

2007-02-24 Thread Mariano Iglesias
If you have Number -> belongsTo -> Person, have you tried: $this->Number->generateList(array('Number.person_id'=>null)); Can you set your DEBUG to 2 and dump the SQL generated by the above query? -MI --- Remember, smart c

generateList for unused items only?

2007-02-24 Thread Cynthia
*sight* this framework is great but makes me feel very blonde :) I have: numbers BELONGS TO persons In the Add Person I have $this->Person->Number->generateList(); Now I get *all* telephone numbers of course. I only want to list the ones which aren't assigned yet. Feeding it additional conditio

Re: Bake not baking Controllers

2007-02-24 Thread Seb
The only thing I can say... if anyone else runs into that, is have a look at the assumptions Bake makes in regards to associations... a guy on IRC had the same issue, and forced a $belongsTo instead of $hasOne (as was his data model) and it worked... hth, Seb. On Jan 16, 3:46 am, "lucaspirola"

Re: The secret of sorting a selectbox

2007-02-24 Thread clemos
probably 'Pretensao.descricao ASC' instead of 'descricao ASC' ? don't you have any SQL messages when turning DEBUG to 3 ? clement On 2/24/07, Norman <[EMAIL PROTECTED]> wrote: > > Is there any black magic on sorting select boxes? > > In the controller, Im trying: > > $this->set('pretens

Re: variable number of items in one table

2007-02-24 Thread djiize
Hi you need another table, call it orderlines for instance, with these fields: order_id item_id quantity ... and maybe some more and a belongsTo Order association When you retrieve an Order, you'll get its Orderlines too On 24 fév, 16:18, "mike" <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a

Re: Menu element

2007-02-24 Thread Mech7
Thanks it is almost working now.. it works pretty much everywhere except for pages like home.thtml.. Also when there is an error it destriys the entire page and i don't see the messages anymore 0_o On Feb 19, 9:04 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > > Well what i want accomplish is pre

Re: How to update model with NULL value in decimal field

2007-02-24 Thread Michal Bilcik
Nazdar, 24. 2. 2007, Mariano Iglesias napisal: > Set the value on $this->data to null for that field: Great, it works perfectly. Thanks a lot. if ($this->data['Waypoint']['altitude'] == '') { $this->data['Waypoint']['altitude'] = null; } $this->Waypoint->save($this->data) Only my suggestio

RE: PEAR HTML_QuickForm and cakephp

2007-02-24 Thread Mariano Iglesias
I have used all sorts of PEAR packages as vendors in CakePHP with no problem. These are some of the packages I used in different CakePHP applications: * PEAR::Cache * PEAR::File * PEAR::HTTP * PEAR::Mail * PEAR::Translation2 * PEAR::Net * PEAR::PayPal * PEAR::Validate All of them as CakePHP vend

RE: How to update model with NULL value in decimal field

2007-02-24 Thread Mariano Iglesias
Set the value on $this->data to null for that field: $this->data['Waypoint']['altitude'] = null; $this->Waypoint->save($this->data); You can see this on cake/libs/model/datasources/dbo_source.php: function update(&$model, $fields = array(), $values = array()) { // ... if ($value

How to update model with NULL value in decimal field

2007-02-24 Thread Michal Bilcik
Hello, I have database model with field "altitude". This field is in MySQL defined as: `altitude` decimal(5,1) default NULL, So this field can be NULL. But when in edit form user leave this field empty and I try update model: $this->Waypoint->save($this->data) CakePHP generates this wrong quer

Re: Beta testing invitation

2007-02-24 Thread 4e4en
Ye, i want to wiew ir! 2007/2/23, ianh <[EMAIL PROTECTED]>: > > > Hi all, > > I've been putting together an online event registration system in > CakePHP that will be a hosted, commercial web app. I'd love to hear > from anyone who is interested in testing the app in its current form, > even use i

Re: CakePHP + Relationships

2007-02-24 Thread [EMAIL PROTECTED]:
On 2/24/07, Mech7 <[EMAIL PROTECTED]> wrote: > > > Is there any tutorial or documentation how i can work with > relationships in Cake. For example from the blog tutorial i would like > to add a tag system so i would have the tables: > > - posts > - tags > - tags2posts > > One post can have many tag

Re: base url ?

2007-02-24 Thread [EMAIL PROTECTED]:
On 2/24/07, Mech7 <[EMAIL PROTECTED]> wrote: > > > Is there a constant or variabele to find out what the base url for the > cakephp directory is ? for if it is not in the root? > > http://manual.cakephp.org/chapter/constants Go to section 3: CakePHP Path Constants [EMAIL PROTECTED] --~--~---

variable number of items in one table

2007-02-24 Thread mike
Hi all, I have a small problem and wonder if I could get some advice on the best way to overcome it. What I want is an orders table where I can input data such as items, order reference, notes, delivery date etc. The table will be linked to a customer table. What I'm stuck on however if the best

Re: Can cake (or php) handle huge amounts of data?

2007-02-24 Thread AD7six
On Feb 24, 3:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > John, I was definitely getting memory errors. But DEBUG set at 3 would > not show the error, just a blank page would return. Debug of 3 will dump the controller, and everything linked to the controller to the screen. With debu

CakePHP + Relationships

2007-02-24 Thread Mech7
Is there any tutorial or documentation how i can work with relationships in Cake. For example from the blog tutorial i would like to add a tag system so i would have the tables: - posts - tags - tags2posts One post can have many tags, but one tag can have many posts. How can i filter this sort o

base url ?

2007-02-24 Thread Mech7
Is there a constant or variabele to find out what the base url for the cakephp directory is ? for if it is not in the root? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, se

The secret of sorting a selectbox

2007-02-24 Thread Norman
Is there any black magic on sorting select boxes? In the controller, Im trying: $this->set('pretensoes', $this->Candidato->Pretensao- >generateList(null,'descricao ASC')); The related "pretensoes" table have a "descricao" column. Im using var $displayField = 'descricao' at the pretensoes model.

Re: Can cake (or php) handle huge amounts of data?

2007-02-24 Thread [EMAIL PROTECTED]
John, I was definitely getting memory errors. But DEBUG set at 3 would not show the error, just a blank page would return. The pagination component saved my life, I am succesfully browsing 40,000+ records doing ajax calls (50, 100 or 200 at a time). On Feb 24, 6:03 am, "mindcharger" <[EMAIL PROT

image problem

2007-02-24 Thread anandrv
Hi all i have using $html->file in upload function i need only upload only for image how to validate in javascrpt and cakephp Thanks and Regards, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To

Re: Menus Controller Looking for Plural Model

2007-02-24 Thread Eric C Blount
What's the error message? Eric On 2/23/07, crazed_climber <[EMAIL PROTECTED]> wrote: > > > I have double checked all my naming conventions numerous times and for > some reason my controller (Menus) is looking for a Model looking Menus > instead of Menu. Any help will be greatly appreciated. > >

Re: Can cake (or php) handle huge amounts of data?

2007-02-24 Thread mindcharger
Also, you can increase the memory assigned to a PHP script (just look into php.ini) so the script can use more memory, which in your case means extra capabilities to hanlde more data... Cheers On Feb 23, 9:36 pm, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Feb 23, 2007, at

Re: Notice: Undefined variable

2007-02-24 Thread mindcharger
Yep...Tarique's absolutely right!! You want to see all the "notices" while developing...because "notices" are something you don't want your customer tonotice!! :-) I think that it would be pretty straightforward to correct those "notice" causes... cheers On Feb 24, 4:24 am, "Dr. Tarique Sa

Re: Blank page of death

2007-02-24 Thread mindcharger
Hello, Do you have a valid index.thtml page for the model "Article"? Sorry to ask such a stupid question, but sometimes when stupid things happens you must ask stupid quesions... Your problem is interesting, because when you access http://dev.reya.de/articles you actually have a page returned, b

Re: eternal routing

2007-02-24 Thread Oneill
Hi Andy, Thanks for the reply! You mean when adding a page to the database you should insert the url?? But how about when I insert a new module, like a news module?? Than it shouldn't be connected to the pagescontroller... Correct me if I'm wrong... How will those things work together? Greetz,

PEAR HTML_QuickForm and cakephp

2007-02-24 Thread lukemack
hi, i'm interested in integrating the HTML_Quickform PEAR package into cakephp. The reason is to use its functionality for multipage forms. there are a couple of old threads in the group about this but nothing to convince me that this is a good / bad idea. i read somewhere that pear packages wil

Showcase: inbeatstore.com using Cake.

2007-02-24 Thread Tazz
Who ever is interested. I completed my first site using cake. It's for a local record store here in Montreal. www.inbeatstore.com Cake Version: 1.1.13.4450 Additional Components: - ob_Auth for login to administration panel. - Pagination from paging through "news letters" and record releases. -

Re: Cake on Hosting Provider not loading models.

2007-02-24 Thread AD7six
On Feb 24, 5:42 am, "Jeff B" <[EMAIL PROTECTED]> wrote: > I'm trying move a cakephp site to a new host. Bluehost.com and I have > a problem where I'm not sure the origin. > > It appears not to be loading the objects for the models that i'm > trying to include in $uses. What would be keeping it