Re: api.cakephp.org still broken

2009-05-14 Thread AD7six
On May 15, 5:58 am, Mr-Yellow wrote: > Anyone want to place bets on how long it is before the tickets are > deleted and ignored? How about we place bets on how long until: 1) You create them in the right place 2) You submit patches AD --~--~-~--~~~---~--~~ You

Configure::write('Session.start', true); does *NOT* turn sessions on but session_start() does.

2009-05-14 Thread Charles
Any idea why this would be happening? The session section of my conf: /** * The preferred session handling method. Valid values: * * 'php'Uses settings defined in your php.ini. * 'cake' Saves session files in CakePHP's /tmp directory. * 'database' Use

Re: Threaded count

2009-05-14 Thread Bogdan I. Bursuc
I know that, product_count is the counter_cache, but only for the subcategories the ones that have a parent_id from the categories, is a threaded model, and when i select the main categories i want to know the count of the products in all the subcategories :). That's my dilemma. Thx. On Thu, 200

Re: Auth -> How to show a message "logged in as John' when the user is already logged in

2009-05-14 Thread Kyo
This might help: http://groups.google.ch/group/cake-php/browse_thread/thread/ee9456de93d2eece/7c930c0b46b7eafc?lnk=gst&q=isAuthed#7c930c0b46b7eafc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To p

Re: How to extend ajax helper?

2009-05-14 Thread Kyo
Use require_once() before the class statement and it'll do the trick. require_once LIBS . 'view'. DS . 'helpers' . DS . 'ajax.php'; class MyAjaxHelper extends AjaxHelper { } hth --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: Using SMTP Email Component

2009-05-14 Thread brian
On Thu, May 14, 2009 at 8:52 PM, randalle2 wrote: > As far as I concern... Cakephp has built-in email component, which I > used here. Once again: can you confirm that PHP's mail() function works as expected? If you can't send mail through a simple PHP script--and there can be number of reasons

Auth -> How to show a message "logged in as John' when the user is already logged in

2009-05-14 Thread mig_akira
Hello! I'm using auth to authenticate users and it's working fine. The only problem is that the user can't know if he's already logged in, since the login and password boxes are still there even if he logged. How can I show a message instead of the login box saying something like "you are logg

Re: api.cakephp.org still broken

2009-05-14 Thread Mr-Yellow
Anyone want to place bets on how long it is before the tickets are deleted and ignored? -Ben On May 15, 1:57 pm, Mr-Yellow wrote: > New Tickets: > > API Documentation fails in IEhttps://trac.cakephp.org/ticket/6376 > > API Documentation fails in FFhttps://trac.cakephp.org/ticket/6377 > > -Ben

Re: api.cakephp.org still broken

2009-05-14 Thread Mr-Yellow
New Tickets: API Documentation fails in IE https://trac.cakephp.org/ticket/6376 API Documentation fails in FF https://trac.cakephp.org/ticket/6377 -Ben On May 15, 1:49 pm, Mr-Yellow wrote: > Yeah guys dropping IE is the best bet. Seeing FF doesn't work either. > > What I should really do is

Re: api.cakephp.org still broken

2009-05-14 Thread Mr-Yellow
btw there were tickets for this but I guess they were deleted months back when this error was first reported. -Ben On May 15, 1:49 pm, Mr-Yellow wrote: > Yeah guys dropping IE is the best bet. Seeing FF doesn't work either. > > What I should really do is stop testing in the browser that the VA

Re: api.cakephp.org still broken

2009-05-14 Thread Mr-Yellow
Yeah guys dropping IE is the best bet. Seeing FF doesn't work either. What I should really do is stop testing in the browser that the VAST majority of my surfers use. Take your browser fanboy crap elsewhere, I just want the documentation fixed so it can be viewed in a browser, any one will do.

Re: Multiple groups per user and ACL

2009-05-14 Thread Mr-Yellow
You can hack ACL.php to allow this. Make it return TRUE for ALLOW, FALSE for DENY, and '' (empty string) for "NOT SET". This way code that is looking for a boolean will still detect the empty string as false. Having this option of "no permissions" allows you to have groups which don't specifica

ACOS in database

2009-05-14 Thread Dave Maharaj :: WidePixels.com
How should the ACOS table look after running buildAcl function? My concern is all the model and foreign_keys are null.is this normal? I see idparent_idmodelforeign_key aliaslftrght id 1 thru xxx parent_id null, 1,2,2,2 mod

Re: Application setup where each customer has own database

2009-05-14 Thread Dr. Loboto
> 1. Can I link tables between database configs? Yes, but Cake will always run separate queries, no any joins. > 2. How to automate the database table selection? Method on link you provided looks too complex for your situation. If each company have own databases with completely same structure, th

Re: Constructing my $conditions array

2009-05-14 Thread Dr. Loboto
Tnx for this. Never saw such thing in doc. On May 14, 5:52 pm, grigri wrote: > Why not do it this way? > > $conditions = array( >   'MATCH(Product.title) AGAINST (? IN BOOLEAN MODE)' => array($blah) > ); > > I find this notation to be very convienient for this sort of thing > (automatic sanitizi

Re: Question about how manage particular data in session

2009-05-14 Thread Dr. Loboto
Service should be identified by URL. Session should only identify user, regardless of service. On May 14, 6:17 pm, byqsri wrote: > Why the design of such application > is wrong initially? > How can I manage many services from a single portal? > > On 14 Mag, 10:15, "Dr. Loboto" wrote: > > > Yes,

Re: How do I pass data from my javascript in 'before' to my controller?

2009-05-14 Thread Dr. Loboto
Ask on JavaScript forums. Read a book. Etc. It is JavaScript question already, not Cake one. On May 15, 12:23 am, Jared wrote: > Thanks for the response, but how do you append to a form with > javascript? > > On May 14, 1:00 am, "Dr. Loboto" wrote: > > > Append collected data to form as hidden

Re: Using SMTP Email Component

2009-05-14 Thread randalle2
As far as I concern... Cakephp has built-in email component, which I used here. On May 14, 11:18 pm, brian wrote: > Are you certain that a "normal" PHP script can sendemailfrom that server? > > On Thu, May 14, 2009 at 2:03 AM, randalle2 wrote: > > > Hello guys, > > > I need some help here... I m

Routes regarding -> e-book by Matt Curry

2009-05-14 Thread Dave Maharaj :: WidePixels.com
In the section regarding the add / edit functions in 1 he has the routes Router::connect('/:controller/add', array('action' => 'edit')); How would you configure this for the admin routing? I tried Router::connect('/:controller/add', array('action' => 'edit')); or Router::connect('/:controlle

Re: Problem with cache filename lenght when using oracle_dbo in a Linux server

2009-05-14 Thread Marcelo Andrade
On Thu, May 14, 2009 at 11:06 AM, Omarq wrote: > > Warning (2): touch() [function.touch]: Unable to create file ./app/ > tmp/cache/models/ The user which the webserver runs must have write permission in the /app/tmp and /app/tmp/cache. http://book.cakephp.org/view/31/Permissions The best w

belongsTo conditions in model

2009-05-14 Thread emmexx
Hi everybody, I started using cakephp yesterday and I find it very "smart". I have a problem trying to filter the results of a table used in a model. I have 2 tables, segments and parameters. Parameters is defined as the following: id name type_id Segments id defined as the following: id name

Re: a question on model relationships

2009-05-14 Thread PaulMan
You should analize you problem realy good, I has a similar problem, on a Food Chain Distribution B2b Site and it worked 5 Stars for me. Good Luck... On May 14, 4:28 pm, brian wrote: > On Thu, May 14, 2009 at 6:50 AM, PaulMan wrote: > > > No, > > I Tree has unique branches.. > > A Table for Di

Data Validation message

2009-05-14 Thread Singleman
I can't use special characters in Spanish in data validation messages.Can somebody give me a solution? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@go

How to extend ajax helper?

2009-05-14 Thread Nancy
I found some code which extends the AjaxHelper I dropped it into the app/views/helpers directory and called it myajax.php and it complains: Fatal error: Class 'AjaxHelper' not found in C:\xampp\www\pdkhi\app \views\helpers\myajax.php on line 2 Here's the header at the top: http://groups.google.c

Re: Threaded count

2009-05-14 Thread majna
there is "counter cache" counter_cache property. check manual. On May 14, 4:41 pm, "Bogdan I. Bursuc" wrote: > I have the following model: >         categories: >                 - id, >                 - parent_id, >                 - name, >                 - product_count > So, the model is

Application setup where each customer has own database

2009-05-14 Thread doze
Hello, I would like to get an advice on how to build an application with CakePHP where there are multiple customers (companies) using the application and each have their own database, but also some common tables in another database. Let me explain the database structure: Tables in common databas

Re: Database Associations Not Linking Up

2009-05-14 Thread daoustm...@gmail.com
I am using scaffolding, so there is no code used there... I have figured this out, though. I needed to define an action to tell the action to find all records and their recursive items. Here is the action I defined: function index(){ $this->Profile->recursive = 1; $profiles

Re: Ajax related question

2009-05-14 Thread Nancy
Oh hmmm... maybe this answers my question... I'm going to have to decipher all the code that got sanitized :p http://cakebaker.42dh.com/2006/06/29/how-to-update-multiple-divs-with-ajax/ On May 14, 10:50 am, Nancy wrote: > This isn't necessarily a Cake question but maybe someone here can give > m

Re: Performance question about Cache against database query

2009-05-14 Thread dr. Hannibal Lecter
I use this method to store my global settings: http://dsi.vozibrale.com/articles/view/simple-db-based-configuration-for-cakephp-apps And also cache them so they are fetched from the database only when changed from the app, as you can see here: http://github.com/lecterror/neutrinocms/blob/da9a1f7

Re: Ajax related question

2009-05-14 Thread Nancy
So this could update a different view? Here's a simple example, lets say you have two tables: Fruits Fruitproperties. In the view for Fruits I show the color of the fruit, which comes from fruitproperties. In fruitproperties I show all the properties. First index view on the page is like this

Re: Ajax related question

2009-05-14 Thread Misplacedme
I don't do a lot of ajax, so this may be an over-simplified method of updating the view. setTimeout ( expression, timeout ); Add that to the end of the ajax function that updates the views. Timeout is the amount of time it waits in MS before it runs expression. Set expression to the ajax functio

Ajax related question

2009-05-14 Thread Nancy
This isn't necessarily a Cake question but maybe someone here can give me an idea of how to solve this. I have a display with a lot of individual index views being generated by ajax. Each of these indexes has a ajax links to forms (related to that table) that'll update the DB and then show an up

How create a unique ACL for multiples apps?

2009-05-14 Thread Celso
How create a unique ACL for multiples apps? Because we have many apps to migrate to CakePHP, these apps actually uses a unique "ugly" auth for all apps... Thanks, Celso --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: How do I pass data from my javascript in 'before' to my controller?

2009-05-14 Thread Jared
heres my code: echo $ajax->link($html->image("/images/units/".$unit['Unit'] ['race']."/".$unit['Unit']['unit'].".gif",array('class' => 'builder_icon')), array('controller' => 'units', 'action' => 'getUnits', $unit['Unit']['id']), a

Re: How do I pass data from my javascript in 'before' to my controller?

2009-05-14 Thread Jared
Thanks for the response, but how do you append to a form with javascript? On May 14, 1:00 am, "Dr. Loboto" wrote: > Append collected data to form as hidden inputs with cake-style names. > You'll receive it in $this->data > > On May 14, 11:48 am, Jared wrote: > > > I want to analyze some forms i

Performance question about Cache against database query

2009-05-14 Thread Pixelastic
Hello, My app needs a couple of "settings" to work, settings I have to fetch on every page request (like the default metadescription, and some other strings and booleans I will need in every views). These settings are global (they are the same for every page and for every user), and I have to cha

Re: Poll: what do you hate about CakePHP?

2009-05-14 Thread jitka (poLK)
'field' => 'title' --~--~-~--~~~---~--~~ 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 from this group, send email to cake-php+unsu

Re: Poll: what do you hate about CakePHP?

2009-05-14 Thread jitka (poLK)
> To get all the translations for all the languages is a nightmare. Solution exists. $this->Article->Behaviors->attach('Translate', array('title' => 'Title')); $article = $this->Article->find('first'); You'll get title for returned article in current locale, and also result of 'hasMany Title' a

Multiple groups per user and ACL

2009-05-14 Thread Misplacedme
I'm needing a slightly tougher method of verifying a users access. There will be 3 tables. Users (id,username, password) Groups (id, group_name) group_users (id, user_id, group_id) I'm assuming that the acos, aros, and acos_aros tables will be used as well, or some variation of it. All access i

Re: Other name for created/modified fields

2009-05-14 Thread brian
It's hard-coded. Have a look at the source for Model::save(). 2009/5/14 Lukáš Pirkl : > Hi, > is there a way how to use another name for created and modified fields in > database tables? Set some model property or something like that? > thanks for answers > Lukáš Pirkl > > > > --~--~-~--

Re: Null value for tinyint field

2009-05-14 Thread brian
On Thu, May 14, 2009 at 1:51 AM, John Andersen wrote: > > Hi Brian, > > I agree that NULL can be used, if you are not specifically tracking/ > looking for a "Not answered" value. > > If the specification is to have the possibility to know that a field > has the value of either "Not answered", "No

Re: base path route don't work

2009-05-14 Thread Alex
I have the same problem. I'm not very familiar with mod_rewrite, cake or apache in general so it's a bit hard to figure out. I can access my website at http://localhost/site1/ but can't find how to change settings to http://localhost. When I open http://localhost it shows an empty page instead of

Problem with cache filename lenght when using oracle_dbo in a Linux server

2009-05-14 Thread Omarq
Hi, I'm accessing my oracle db through a load balanced oracle url that is quite long; when the Model is set wiyh: var $cacheSources = true; I get the following error: Warning (2): touch() [function.touch]: Unable to create file ./app/ tmp/cache/models/ cake_model_default___d_e

Re: 400 Bad Request when URL contains %

2009-05-14 Thread rich...@home
After even more testing: Add the following to AppController beforeRender(): // HACK: double encode $this->passedArgs to get round % in url bug foreach($this->passedArgs as $key=>$value) { $this->passedArgs[$key] = urlencode(urlencode($val

Re: Constructing my $conditions array

2009-05-14 Thread brian
On Thu, May 14, 2009 at 6:52 AM, grigri wrote: > > Why not do it this way? > > $conditions = array( >  'MATCH(Product.title) AGAINST (? IN BOOLEAN MODE)' => array($blah) > ); > > I find this notation to be very convienient for this sort of thing > (automatic sanitizing works fine) > I agree. Thi

Re: a question on model relationships

2009-05-14 Thread brian
On Thu, May 14, 2009 at 6:50 AM, PaulMan wrote: > > No, > I Tree has unique branches.. > A Table for Dining Room , is not a table for a Living Room but i > think if you reverse the order you will get more organized > put > > Tables( id:5 ) -> Living Room ( id:6 ) > Tables( id:5 ) -> Dinning R

Re: No ID returning from the model when inserting new record

2009-05-14 Thread brian
$documentid = $this->Document->getInsertId(); On Thu, May 14, 2009 at 4:15 AM, oly.yates wrote: > > Ok well the problem defiantly seems to be cake to getting the document > sequence as it all works fine when i do this: > if($this->Document->saveAll($this->data)){ >            if(!$this->Document

Re: Using SMTP Email Component

2009-05-14 Thread brian
Are you certain that a "normal" PHP script can send email from that server? On Thu, May 14, 2009 at 2:03 AM, randalle2 wrote: > > Hello guys, > > I need some help here... I making a contact form using Cakephp 1.2. > The problem upon sending email..The notification was successful but I > couldn't

Re: 400 Bad Request when URL contains %

2009-05-14 Thread rich...@home
Edit after more testing: Still not good, paginator links doen't double encode so it breaks when a pagination link is clicked :-( On May 14, 3:42 pm, "rich...@home" wrote: > More investigation: There's a related ticket open: > > https://trac.cakephp.org/ticket/5751 > > I've fixed it in the short

Re: 400 Bad Request when URL contains %

2009-05-14 Thread rich...@home
More investigation: There's a related ticket open: https://trac.cakephp.org/ticket/5751 I've fixed it in the short turn by double urlencoding my parameters :- S urlencode(urlencode($value)) Here's my code: function _buildFilter() { $url = array("action"=>"index");

Threaded count

2009-05-14 Thread Bogdan I. Bursuc
I have the following model: categories: - id, - parent_id, - name, - product_count So, the model is threaded: exists main categories and subcategories that's it, but only subcategories contain products so only for subcatego

Re: 400 Bad Request when URL contains %

2009-05-14 Thread rich...@home
I'm back trying to fix this issue and it's starting to be a bit of a pain :-( This is definitely a problem with the default CakePHP setup because if I create a simple php file: index.php: http://example.com/index.php?a=% and don't get a bad request (even though technically it IS a malformed url)

Complex possibility?

2009-05-14 Thread Dave Maharaj :: WidePixels.com
Just thinking here of ways to remove the many HABTM tables I have in my db set up and thought of this and just wondering if this makes sense or is even possible. A normal HABTM table saves id user_idskill_id 112 215 3

Re: Auto escaped variables?

2009-05-14 Thread Misplacedme
Ah, thank you very much. I'm use to having to explicitly say I need something escaped before it's done, and it confused me that it was done automaticly :| On May 14, 3:07 am, "Dr. Loboto" wrote: > When you pass variables to model function normally (as in your > example) Cake properly escape valu

RE: ACL issue

2009-05-14 Thread Dave Maharaj :: WidePixels.com
Hey, Thanks for your help. What I did was re-configure index keys in the db for the ones most used, cleared app/temp/cache/models and it worked. Thought it seems for me to run buildAcl again I have to clear the cache or I get the error again. Thanks, Dave -Original Message- From: Joh

Other name for created/modified fields

2009-05-14 Thread Lukáš Pirkl
Hi, is there a way how to use another name for created and modified fields in database tables? Set some model property or something like that? thanks for answers Lukáš Pirkl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

ACL question (again)

2009-05-14 Thread harpax
Hi everyone .. I am trying (for the first time) to implement ACL in my app. While I think I have generally understood how to do that, from reading the manual and different tutorials, I still have some basic questions: 1. I will need groups. So far I only have a User-model and was planning to map t

Re: For Set::combine experts...

2009-05-14 Thread Kyo
It seems that Set::combine() won't solve your problem. I recommend that you should not use the model's query() method to retrieve the data. So, try $this->Product->find() with recursive set to -1 --~--~-~--~~~---~--~~ You received this message because you are subsc

What the... with behavior?

2009-05-14 Thread vla...@gmail.com
I have trouble with not working behavior in belongsTo relationship... And now I see - If I use Translate behavior - I couldn't made sort by field in I18n table ;-( I have posts with fields (id, created) and l18n - for post. I can make paginate for posts and sort posts by id, created... But cann

Re: OS X cake bake woes

2009-05-14 Thread harrzack
JOY AT LAST! Thanks so much. When I saw there was no mysql in var I was considering making the dir to just fake it out... but wasn't sure if I'd need something in it. Was also checking to see if the ln command was ok, but reading man files at 7am (in NJ) is not the best fun... Now I'm off to fi

Re: Question about how manage particular data in session

2009-05-14 Thread byqsri
Why the design of such application is wrong initially? How can I manage many services from a single portal? On 14 Mag, 10:15, "Dr. Loboto" wrote: > Yes, there are a lot of problems as whole design of such application > is wrong initially. > > On May 14, 2:25 pm, byqsri wrote: > > > And you supp

Re: OS X cake bake woes

2009-05-14 Thread Graham Weldon
Create the directory. mkdir /var/mysql ln -s /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock /var/mysql/mysql.sock Note that I switched the ln command arguments around. I made a mistake before. Try that. Cheers, Graham harrzack wrote: > Hmm - I'd seen the ln trick elswhere but forgot!

Re: For Set::combine experts...

2009-05-14 Thread PaulMan
Hey Jonh, Thanks but, what i'm looking for is a solution for this kind of problems with CakePHP's Set class Can you give it? Where are the experts? :) On May 14, 12:04 pm, John Andersen wrote: > Add "recursive" => -1 to your find conditions! > Enjoy, >    John > > On May 14, 1:55 pm, PaulMan wro

Re: OS X cake bake woes

2009-05-14 Thread harrzack
TYPO!! :-( On May 14, 7:07 am, PaulW wrote: > Do you really have a file called my.cnf.ini or is that a typo? > (normally be either my.cnf or my.ini) > > On May 14, 11:38 am, harrzack wrote: > > > and my.cnf.ini has: > > > # The following options will be passed to all MySQL clients > > [client

Re: OS X cake bake woes

2009-05-14 Thread harrzack
Hmm - I'd seen the ln trick elswhere but forgot! Gave it at try ln -s /var/mysql/mysql.sock /Applications/XAMPP/xamppfiles/var/mysql/ mysql.sock ln says: ln: /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock: File exists I went to /var and there is no mysql directory there either! WTF?? :-)

Re: OS X cake bake woes

2009-05-14 Thread PaulW
Do you really have a file called my.cnf.ini or is that a typo? (normally be either my.cnf or my.ini) On May 14, 11:38 am, harrzack wrote: > and my.cnf.ini has: > > # The following options will be passed to all MySQL clients > [client] > #password       = your_password > password        = xyzzy >

Re: For Set::combine experts...

2009-05-14 Thread John Andersen
Add "recursive" => -1 to your find conditions! Enjoy, John On May 14, 1:55 pm, PaulMan wrote: > Hello, > This technique is new to me, and i cant make set::combine to work the > way i want... > > here is; > I Have > Array > ( >     [0] => Array >         ( >             [products] => Array >  

For Set::combine experts...

2009-05-14 Thread PaulMan
Hello, This technique is new to me, and i cant make set::combine to work the way i want... here is; I Have Array ( [0] => Array ( [products] => Array ( [id] => 19430 [code] => 000117 [b

Re: OS X cake bake woes

2009-05-14 Thread Graham Weldon
You can always create a symlink to solve your issues. ln -s /var/mysql/mysql.sock /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock That will create a symlink to the location that PHP is looking for the MySQL socket. And it means you can revert to the default settings for php.ini and my.cn

Re: Constructing my $conditions array

2009-05-14 Thread grigri
Why not do it this way? $conditions = array( 'MATCH(Product.title) AGAINST (? IN BOOLEAN MODE)' => array($blah) ); I find this notation to be very convienient for this sort of thing (automatic sanitizing works fine) hth grigri On May 14, 4:30 am, "Dr. Loboto" wrote: > You should properly es

Re: a question on model relationships

2009-05-14 Thread PaulMan
No, I Tree has unique branches.. A Table for Dining Room , is not a table for a Living Room but i think if you reverse the order you will get more organized put Tables( id:5 ) -> Living Room ( id:6 ) Tables( id:5 ) -> Dinning Room ( id:7 ) * ids are only examples and on the categories_produc

Re: afterFind on model behavour not working ... please help.

2009-05-14 Thread PaulMan
o.k. I pulled the trigger hehe.. $this->Brand->Product->Behaviors->Trigger(&$this->Brand- >Product,"afterFind",array('results'=>$queryResult,'primary'=>true)); thanks, On May 14, 10:42 am, Jon Bennett wrote: > Hi Paul, > > > it there a reason for it? am i missing something? > > Callbacks are

Re: OS X cake bake woes

2009-05-14 Thread harrzack
Graham - Thanks - but still no joy! :-( When I cd to the app directory, do 'cake bake', the do a C for Controller I still get the flood of warnings that start: "Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' " My undersandting is that messa

Re: a question on model relationships

2009-05-14 Thread Beedge
Now that I think about it, would a tree structure mean that each sub category can only appear in one tree? e.g a furniture shop might have Living room > tables and Dining Room > tables so can the sub category tables appear in both trees? --~--~-~--~~~---~--~~

Re: FREE CakePHP e-book by Matt Curry

2009-05-14 Thread Jon Bennett
> Congrats ,for the great job, can you please provide me the link of > this e-book link is at the top of the blog post linked to originally. j > > On May 14, 1:05 pm, Nate wrote: >> Hey everyone, >> >> Matt Curry (of CakePHP Digest fame) has just published a *free* e-book >> on advanced develo

Re: a question on model relationships

2009-05-14 Thread Beedge
Thats great thanks, looking at the cook book section on tree's and although I dont quite get it at first glance, it looks like its exactly what I need Thanks again, Kevin On May 14, 10:49 am, PaulMan wrote: > Try Tree Behavior for category->SubCategory->SubCategory , > and "workit" all in the

Re: FREE CakePHP e-book by Matt Curry

2009-05-14 Thread cbhan
Congrats ,for the great job, can you please provide me the link of this e-book On May 14, 1:05 pm, Nate wrote: > Hey everyone, > > Matt Curry (of CakePHP Digest fame) has just published a *free* e-book > on advanced development techniques with CakePHP.  If you're already a > seasoned Cake develo

Re: a question on model relationships

2009-05-14 Thread PaulMan
Try Tree Behavior for category->SubCategory->SubCategory , and "workit" all in the same model "Category" ... Product Model public $hasAndBelongsToMany = array('Category'); Category Model public $hasAndBelongsToMany = array('Product'); public $hasMany = array('SubCategory'=> array

Re: afterFind on model behavour not working ... please help.

2009-05-14 Thread Jon Bennett
Hi Paul, > it there a reason for it? am i missing something? Callbacks are not fired for models/behaviours when you use raw SQL. hth Jon > > Best regards, > > here some more extra info.. > > brand model: > public $hasMany = array('LineItem', 'Product' => >                       array('classNa

afterFind on model behavour not working ... please help.

2009-05-14 Thread PaulMan
Hello, from brands_controller with $queryResult=$this->Brand->Product->Query($query); it never gets to sap behavior afterFind , but if i use with $queryResult=$this->Brand->Product->Find('list'); it works it there a reason for it? am i missing something? Best regards, here some more extra inf

a question on model relationships

2009-05-14 Thread Beedge
Hey all, I have (or plan to have!) an app that will allow users to view products by category. Each category can have a sub category and each sub category can have further sub categories.. eg. sports>tennis>rackets>wooden There is no limit to the dept of sub categories.. (like in Ebay) I plan t

Re: Question about how manage particular data in session

2009-05-14 Thread Dr. Loboto
Yes, there are a lot of problems as whole design of such application is wrong initially. On May 14, 2:25 pm, byqsri wrote: > And you suppose that in a page I have some simultaneous  ajax call? > With this system I lost the right referer whene these ajax calls > happen > > On 14 Mag, 09:21, byqsr

Re: No ID returning from the model when inserting new record

2009-05-14 Thread oly.yates
Ok well the problem defiantly seems to be cake to getting the document sequence as it all works fine when i do this: if($this->Document->saveAll($this->data)){ if(!$this->Document->id){ $documentid = $this->Document->query("SELECT documentid_seq.currval FROM dual");

Re: Ajax before and after options

2009-05-14 Thread Dr. Loboto
With Cake AJAX helper you can only pass data through global variable and live in fear that it will re-written by consecutive AJAX call. With hand-written JavaScript for AJAX call it is possible. Ask on prototype forums. On May 14, 8:26 am, Jared wrote: > Is it possible to pass the values of vari

Prototype include in default layout

2009-05-14 Thread Cjo
Hi guys, Well I have been trying to implement the Ajax Paging in my Users list and for that I have gone through the steps provided in bakery and it worked. For this I have included the prototype file using echo $javascript->link(array('prototype')); in the index.ctp of the Users. The actual list

Re: Auto escaped variables?

2009-05-14 Thread Dr. Loboto
When you pass variables to model function normally (as in your example) Cake properly escape values. When Cake put POST data into controller's $this->data it respects magic_quotes settings and always put clean values there. You should not want anything other. BTW, 'adsf\'\'\'' is the proper way t

FREE CakePHP e-book by Matt Curry

2009-05-14 Thread Nate
Hey everyone, Matt Curry (of CakePHP Digest fame) has just published a *free* e-book on advanced development techniques with CakePHP. If you're already a seasoned Cake developer, this book will help you pick up many new tricks and best-practice solutions, as well as highlighting many little-know

Re: How do I pass data from my javascript in 'before' to my controller?

2009-05-14 Thread Dr. Loboto
Append collected data to form as hidden inputs with cake-style names. You'll receive it in $this->data On May 14, 11:48 am, Jared wrote: > I want to analyze some forms in the 'before' code execution of my ajax > call, then pass the collected data to my controller action to decide > what to do.  

Re: No ID returning from the model when inserting new record

2009-05-14 Thread oly.yates
Thx for the tip with "set". Starting to suspect that the problem lies with my database and cake not being able to get the current value of the sequence (I'm using Oracle), does cake rely on any naming conventions for sequences or indexes? I get the following errors: Notice (8): Undefined index:

Re: Question about how manage particular data in session

2009-05-14 Thread byqsri
And you suppose that in a page I have some simultaneous ajax call? With this system I lost the right referer whene these ajax calls happen On 14 Mag, 09:21, byqsri wrote: > Ok > But you suppose that user (with page1 and page2 opened) clicks another > link on page1 that opens page3 how can I to

Re: Question about how manage particular data in session

2009-05-14 Thread byqsri
Ok But you suppose that user (with page1 and page2 opened) clicks another link on page1 that opens page3 how can I to know that page3 is relative to the service of page1 (in session I have "page2" => $service_id and not "page1" => $service_id ) On 14 Mag, 05:02, "Dr. Loboto" wrote: > Example of