Re: treeBehavior level (Nested set)

2009-06-16 Thread Madis
Thank you very much. You are a savior. Thats exactly what I was looking for. I think it is a very useful feature and should also be part of the treeBehavior. I already created a loop that counts the depth but getting it from the database sure is faster. On Jun 17, 8:53 am, AD7six wrote: > On Ju

Re: treeBehavior level (Nested set)

2009-06-16 Thread AD7six
On Jun 16, 10:06 pm, Madis wrote: > Hello! > I was wondering if there is a possibility to save the level of each > node into the database? And how would this be done? > I used Doctrine with symfony and they had this automized. But with > cake it seems not to be a feature. > > I know that it is

Re: Problem with Large Datasets

2009-06-16 Thread AD7six
On Jun 16, 6:54 pm, Femi Taiwo wrote: > Hi James, > Yes, you  understand the scenario correctly. > The problem with using contain in particular situation  is that multiple > queries are being generated in that find, and variables are being passed back > and forth between php and mysql - this

Re: Advanced(?) Behavior question

2009-06-16 Thread brian
Model::find() only triggers Behavior callbacks on the main model, not those associated with it. However, I'm certain that I've seen at least one Behavior that got around that by running through its Model's associations and, for those that implemented the same Behavior, did its thing (whatever it w

Re: $conditions 'reset' key in terms of Containable

2009-06-16 Thread eric.winch...@gmail.com
Arrghh I'm feeling stupid now. Here's how you use HABTM Containable and paginate all at once: $this->paginate['AreaAlbum'] = array( 'conditions'=>$conditions, 'limit' => 4, 'page' => 1, 'order'=>'AreaAlbum.album_id desc',

Re: Slug instead of ID

2009-06-16 Thread brian
On Tue, Jun 16, 2009 at 11:33 PM, phpcurious wrote: > > why do you have to use slugs, why not try using their usernames the > users provided or assigned to them by the system? A slug is merely any string that's been modified to be both useful and readable in a URL. So, the slug may very well be b

Re: $conditions 'reset' key in terms of Containable

2009-06-16 Thread eric.winch...@gmail.com
Not documented as far as I know. It's just Containable weirdness, probably having to do with binding. Anyone know why Containable doesn't work with HABTM 'with' relationships? I had it working when it was a 3rd party behavior, but it's definitely not working now. For me, "deep" SQL queries is the

Re: $conditions 'reset' key in terms of Containable

2009-06-16 Thread brian
There's a 'reset' param? Is that documented anywhere? On Tue, Jun 16, 2009 at 11:23 PM, eric.winch...@gmail.com wrote: > > Can anyone describe why 'reset'=>false must be in $conditions for > Containable usage of any complexity? I have queries that go from > taking an unbearable 20 seconds to an a

Re: $conditions 'reset' key in terms of Containable

2009-06-16 Thread eric.winch...@gmail.com
Something I just discovered and maybe the more important question - why doesn't Containable work on HABTM 'with' relationships? On Jun 16, 10:23 pm, "eric.winch...@gmail.com" wrote: > Can anyone describe why 'reset'=>false must be in $conditions for > Containable usage of any complexity? I have

Re: array extraction

2009-06-16 Thread brian
On Tue, Jun 16, 2009 at 9:44 PM, Adam Royle wrote: > > $this->set() doesn't return a value. so $transaction_amount_total will be > null. Try something like this: > > $data = $this->Jurisdiction->Transaction->find('all', array( >  'conditions' => array('Transaction.jurisdiction_id =' => $id), >  'f

Re: Slug instead of ID

2009-06-16 Thread phpcurious
why do you have to use slugs, why not try using their usernames the users provided or assigned to them by the system? On Jun 17, 7:24 am, "Dave Maharaj :: WidePixels.com" wrote: > I am using custom slugs that the user creates when they sign up. > > USER: > id > slug > . > > When a User m

$conditions 'reset' key in terms of Containable

2009-06-16 Thread eric.winch...@gmail.com
Can anyone describe why 'reset'=>false must be in $conditions for Containable usage of any complexity? I have queries that go from taking an unbearable 20 seconds to an almost unbearable 3 seconds, but I don't understand what 'reset' has to do with it. The ones where it really counts are using up

Re: Advanced(?) Behavior question

2009-06-16 Thread Adam Royle
And both models had the behavior attached to them? - Original Message - From: "Brendon Kozlowski (Realm)" To: "CakePHP" Sent: Wednesday, June 17, 2009 1:09 PM Subject: Re: Advanced(?) Behavior question That's what I was hoping too. Unfortunately that didn't seem to be the case. I d

Re: Advanced(?) Behavior question

2009-06-16 Thread Brendon Kozlowski (Realm)
That's what I was hoping too. Unfortunately that didn't seem to be the case. I did a users/posts/comments example site to test functionality. User's email address was encrypted in the DB, and when viewing the index page, it was decrypted (working for user model). Post's title was encrypted (just

Re: How to suppress authorisation error

2009-06-16 Thread Jules
That's it! Thanks --~--~-~--~~~---~--~~ 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+unsubscr...@go

Re: MySQL function escape with multiple conditions

2009-06-16 Thread Kyo
That's useful. Thanks for sharing. Kyo --~--~-~--~~~---~--~~ 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 ca

Re: I want to add a parameter to the PaginatorHelper's link, where is the best to add?

2009-06-16 Thread Rimoe
[?][?] Thank you, I 'll try it 2009/6/16 Stu > > ps: I think the code you might be looking for is: > > var $paginate = array('page' => 1); > > try adding this on top of the app_controller > > > --~--~-~--~~~---~--~~ You received this message because you are sub

Re: Thanks! who know that the file of app\views\helpers\paginator.php' cache at where

2009-06-16 Thread Rimoe
Thank for your help.I delete all the tmp file. but it has no been solved. when I delete the file of cake\libs\view\helpers\paginator.php. the question been solved. It isn't a good way, but it has been solved. Thank you very much 2009/6/17 brian > > Look in app/tmp/cache. > > On Tue, Jun

Re: How to suppress authorisation error

2009-06-16 Thread Kyo
This might work: function login() { if (empty($this->data)) { $this->Session->del('Message.auth'); } } hth --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to

Re: MySQL function escape with multiple conditions

2009-06-16 Thread Adam Royle
If I am doing something like this I generally just create a string and pass it through. Make sure to encapsulate it in parenthesis () in case you have other conditions. $event_conditions = array( '(Event.start BETWEEN DATE_SUB(CURDATE(), INTERVAL 1 DAY) AND DATE_ADD(CURDATE(), INTERVAL 7 D

Re: array extraction

2009-06-16 Thread Adam Royle
$this->set() doesn't return a value. so $transaction_amount_total will be null. Try something like this: $data = $this->Jurisdiction->Transaction->find('all', array( 'conditions' => array('Transaction.jurisdiction_id =' => $id), 'fields' => array('Transaction.id','SUM(Transaction.amount) AS Am

Re: Organization issues and more...

2009-06-16 Thread Adam Royle
Wow. Sorry, I didn't read your entire email. But a few things.. 1) Yes, generally you have just one table per model per controller. 2) A more flexible solution is to have your menu heirarchy to be separate from your controller/action heriarchy. This will allow you to separate your visual naviga

How to suppress authorisation error

2009-06-16 Thread Jules
Can anyone help? I'd like to suppress the "You are not authorized to access that location" message when I try to visit a page that I'm not authorised for. I'm happy with the redirection to the login page, I'd just like to hide the error. I can't hide it with CSS, because the same CSS selector i

Re: Advanced(?) Behavior question

2009-06-16 Thread Adam Royle
I am fairly certain that each related model will take care of it's own beforeSave and afterFind callbacks, so you should just need to handle encryption/decryption for the primary model, and each other model that is saved/found will handle its own as well. Cheers, Adam - Original Message -

RE: Form help

2009-06-16 Thread Dave Maharaj :: WidePixels.com
Nope That renders: I have a custom controller action which uses 1 form and 1 action to allow a user to update various sections. So rather than build multiple forms/actions I use 1 which builds the form based on the section they choose to update and is working fineexcept I need to edit

Slug instead of ID

2009-06-16 Thread Dave Maharaj :: WidePixels.com
I am using custom slugs that the user creates when they sign up. USER: id slug . When a User makes an entry / post or other actions on the site everything is tied to the slug in the URL and in the controller get the Auth->ID of the user for that slug as that's the foreign key ID, t

Problem with $this->Session->setFlash when using caching

2009-06-16 Thread Steve
Hello everybody, I have a problem with some cakephp (version 1.2.3.8166) code. It concerns using $this->Session->setFlash in a controller action. Part of the controller code: $this->Session->setFlash(__('Everything fine.', true), 'flashinfo'); $this->redirect(array('controller'=>'users','action'

MySQL function escape with multiple conditions

2009-06-16 Thread eric.winch...@gmail.com
$event_conditions = array( 'Event.start'=>array('< -!DATE_ADD(CURDATE(), INTERVAL 7 DAY)', '> -!DATE_SUB(CURDATE(), INTERVAL 1 DAY)') ); Cake is producing an IN() statement. I'm wondering how to use MySQL functions with more than one condition? --~--~-~--~~~---~--~

Re: Best way to have dynamic actions

2009-06-16 Thread Steve
Ya, that's what I'm doing now, but it just seems like a pain to keep track of it and make sure the menus are consistent based on the group parameter. The other option was keeping it in a session, but that creates a problem with not having direct access to a resource through a url itself. On Jun 1

Re: reading sessions!?

2009-06-16 Thread foldiman
Correction, I'm using read()); ?> On Jun 16, 4:20 pm, foldiman wrote: > I just started a new CakePHP project with a new download of Cake. If I > place the following in my home.ctp in my pages directory, I see my > session. > > > > But it doesn't work on any view page that's linked to a contr

Organization issues and more...

2009-06-16 Thread Phil
My questions aren't exactly about CakePHP, but more so around the MVC architecture. I couldn't find my particular answer through searching, but at least I discovered that this seems like an acceptable question here. I have a main menu. For each main menu item, there is a sub menu. To me, it made

Re: Territory routing question

2009-06-16 Thread Jim Wiberley
I like the idea of prefix routing, although wouldnt it require a lot of additional functions to work? ie, uk_view() { } fr_view(){ } rather than just a single view() function? I've found this seems to have done the trick, seems fairly simple Router::connect('/:region/:controller/:action/*')

Advanced(?) Behavior question

2009-06-16 Thread BrendonKoz
I've been writing an encryption/decryption behavior that will automatically encrypt and decrypt model data on-the-fly, according to settings defined for the behavior (per model) within the model. I have it working for DEEP finds (set recursive to 5 just to test) on all fields for the current mode

Re: Form help

2009-06-16 Thread thatsgreat2345
create($model, array('type' => 'post', 'url' => '/update')); ?> On Jun 16, 12:10 pm, "Dave Maharaj :: WidePixels.com" wrote: > I have > create($model, array('type' => 'post',  'action' => > '/update')); ?> > > which renders method="post"> > > Is there a way to get it to look like this? > > >

treeBehavior level (Nested set)

2009-06-16 Thread Madis
Hello! I was wondering if there is a possibility to save the level of each node into the database? And how would this be done? I used Doctrine with symfony and they had this automized. But with cake it seems not to be a feature. I know that it is also possible to count the levels in a loop but th

reading sessions!?

2009-06-16 Thread foldiman
I just started a new CakePHP project with a new download of Cake. If I place the following in my home.ctp in my pages directory, I see my session. But it doesn't work on any view page that's linked to a controller. For example, I have a 'cars_controller' and a 'cars' folder in the 'views' folde

Re: Best way to have dynamic actions

2009-06-16 Thread Andreas
Hi Steve, why dont you just pass the group_id as a parameter to the index action? Like: www.mydomain.com/videos/index/groupname2 greets Andreas Steve schrieb: > I'm trying to determine the best way to have dynamic actions but > hopefully the community can help. > > What I mean by dynamic action

Best way to have dynamic actions

2009-06-16 Thread Steve
I'm trying to determine the best way to have dynamic actions but hopefully the community can help. What I mean by dynamic actions is that many actions like /posts/ index/, /videos/index/, are all dependent on the variable "group_id". In other words, those actions are only supposed to list all pos

Form help

2009-06-16 Thread Dave Maharaj :: WidePixels.com
I have create($model, array('type' => 'post', 'action' => '/update')); ?> which renders Is there a way to get it to look like this? Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group.

Re: caching in cakephp

2009-06-16 Thread Miles J
Well how long did you set the cache to last for? --~--~-~--~~~---~--~~ 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 ema

Re: array extraction

2009-06-16 Thread kwameda...@gmail.com
Hi Adam: I tried it but it wouldn't work. Can anybody else help, please. the original array is an output from a calculated find('all') as in: $transaction_amount_total = $this->set('transaction_amount_total', $this->Jurisdiction->Transaction->find ( 'all',array('conditions

Re: caching in cakephp

2009-06-16 Thread Claudiu Apetrei
Hello, I am using cacheAction. The same as in the tutorial. Claudiu On Jun 15, 4:55 pm, Miles J wrote: > Well what type of cache are you using exactly? There are many types. > > cacheAction, persistModel, cacheQueries, etc. --~--~-~--~~~---~--~~ You received thi

Re: Territory routing question

2009-06-16 Thread Miles J
Use prefixes: http://book.cakephp.org/view/46/Routes-Configuration#Prefix-Routing-544 --~--~-~--~~~---~--~~ 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

Re:

2009-06-16 Thread Marcelo Andrade
On Tue, Jun 16, 2009 at 8:56 AM, lakers fan wrote: > Hello, > I want to write a recursive function in my users controller which will > be called from the url. > > http://localhost/cake/users/recfunction/param1/param2 > > This recfunction will call itself if needed.. > > function recfunction(p

Re: array extraction

2009-06-16 Thread kwameda...@gmail.com
Hi Adam: I tried it but it wouldn't work. Can anybody else help, please. the original array is an output from a calculated find('all') as in: $transaction_amount_total = $this->set('transaction_amount_total', $this->Jurisdiction->Transaction->find('all',array('conditions'=>array ('T

Re: New To cakephp

2009-06-16 Thread Marcelo Andrade
On Tue, Jun 16, 2009 at 2:43 AM, Netram Dhakar wrote: > > Hi, > I am new with CakePHP.How to install and configure. > > Please help me. That's a very common question when you're starting. According to cookbook... "Installation preparation consists of the following steps: * Downloading a copy of

Re: Problem with model import and find conditions

2009-06-16 Thread Marcelo Andrade
On Mon, Jun 15, 2009 at 6:28 AM, VVilku wrote: > (..) > > But when I try to use it after the import model in to another > controller, I receives an error. > > (..) > SQL Error: 1054: Unknown column 'User.status' in 'where clause' > > > I understand that the imported model is not somehow related to

Re: grr help with cron/shell tabs

2009-06-16 Thread Marcelo Andrade
On Mon, Jun 15, 2009 at 5:25 AM, Miles J wrote: > (..) > > Also tried using exec php -q and some other commands and nothing. Have you installed php-cli? Best regards. -- MARCELO DE F. ANDRADE Belem, PA, Amazonia, Brazil Linux User #221105 http://mfandrade.wordpress.com --~--~-~--~

Re: Call model method from view

2009-06-16 Thread brian
Use the model's afterFind() method to add the age to your data. Also, your calculation is not very robust. Try this: function afterFind($results) { if (isset($results[$this->alias]['birthdate'])) { $results[$this->alias]['age'] = $this->getAge($this->alias]['birth

Re: Problem with Large Datasets

2009-06-16 Thread Femi Taiwo
Yep. a custom query is seemingly the way forward on this. I use containable a lot for other areas. Pagination is not applicable in this scenario because I'm not displaying the results to anybody :) The resultant user ids are saved in another table for a cron job to notify the users. Giving the

Re: Problem with Large Datasets

2009-06-16 Thread Femi Taiwo
Hi James, Yes, you  understand the scenario correctly. The problem with using contain in particular situation  is that multiple queries are being generated in that find, and variables are being passed back and forth between php and mysql - this much I see from the sql logsso I would be  ki

Re: Filepath question

2009-06-16 Thread brian
On Tue, Jun 16, 2009 at 8:56 AM, lakers fan wrote: > Hello, >    I have a form input of type 'file' to choose a file > >  input('sourcedir', array('div' => false, 'label' => > false, 'class' => 'text', 'type' => 'file')); ?> > > Is it possible to select a directory instead of file?. If not how

Re: Problem with Large Datasets

2009-06-16 Thread brian
On Tue, Jun 16, 2009 at 8:40 AM, James K wrote: > > If I understand correctly, you're running some finds to produce a > giant array of user ids that match the conditions submitted by the > user. THEN you're trying to take that list of user ids and pass them > as a condition to a separate find to r

Re: variable is undefined when I pass it from a javascript file to a php file

2009-06-16 Thread brian
How is this a CakePHP question? Ensure that both versions are in sync (eg. use rsync). Maybe the code is on the server but some other file has not included it. If you view source, do you see your code? On Tue, Jun 16, 2009 at 7:51 AM, Tamanna Afroze wrote: > Hi everybody, > I am new in this group

Re: Territory routing question

2009-06-16 Thread brian
Assuming the territory will always be a 2-letter, lowercase code ... Router::connect( '/:territory/news', array( 'controller' => 'news', 'action' => 'index' ), array( 'territory' => '[a-z]{2}', 'pass'

Re: Thanks! who know that the file of app\views\helpers\paginator.php' cache at where

2009-06-16 Thread brian
Look in app/tmp/cache. On Tue, Jun 16, 2009 at 1:05 AM, Rimoe wrote: > add > a little mistake > > my core.php like but my core.php is Configure::write('debug', 0); > and  the file of app\views\helpers\paginator.php has been new create, > so it has been cached > > what if you can help me, > > Than

Call model method from view

2009-06-16 Thread Saibot
Hi, Suppose you have a model class 'Person' which has a attribute 'birthdate' and a method 'get_age()'. function get_age() { return (int)date('Y') - self.birthdate; } How can I call the get_age() method in my Person views? Thanks in advance. --~--~-~--~~~---~--

Re: Preppulate username from User Model into a controller for Model Listing

2009-06-16 Thread brian
On Mon, Jun 15, 2009 at 4:00 PM, Ashu wrote: > > Thanks. > > This is what I did in my view for add.ctp > > echo $form->input('user_id',array('value' => $user['User']['id'])); > > > But, I would like to make this statement invisible, as I am pulling > this data for a logged-in user and he does not

Problem with a behavior and a Controller test

2009-06-16 Thread Fran Iglesias
Hi, I'm writing a Controller test, that uses a Model that Acts As a Behavior. I'm using the "hard way" methodology by Mark Story to build the controller in the test case. My problem is as follows: The controller method being tested makes a call to a Model method implemented by the behavi

Re: Change the content-type

2009-06-16 Thread jperras
Use the RequestHandlerComponent::respondAs method. This should set the appropriate content-type headers based on the $type that you give it. http://api.cakephp.org/class/request-handler-component#method-RequestHandlerComponentrespondAs -j. On Jun 15, 4:15 pm, Miles J wrote: > But it doesn't wo

Re: Models Not Being Loaded

2009-06-16 Thread CharlesTMunger
That was it. Amazing. Thanks. On Jun 16, 6:31 am, "Dr. Loboto" wrote: > Check models filenames - they must be lowercased. Same about all other > cake files. > > On Jun 16, 11:41 am, CharlesTMunger wrote: > > > I have developed a site on my windows machine and it is working > > great.  I uploa

App.base and routing problem

2009-06-16 Thread Greg Baker
I'm writing a facebook app and am having problems with my routing. First off I changed App.base to point to my facebook canvas path: Configure::write('App.base', '/my_app'); I did this so I could use $html->url() to construct my URLs in my views. It works great except for one problem.

Re: Question about Xml and how make it appear on my needs

2009-06-16 Thread Rick
Try phpclasses.org Rick On Jun 15, 2:56 pm, Paulos23 wrote: > Hi Cake people, > I have a question about Xml.I am using httpSocket to hit a specific > url in order to get some data.The url ishttp://www.geonames.organd i > received details about destinations in order to implement > geocoding.The

Caching Static Images

2009-06-16 Thread Galdan
Hi together, me again sorry ;-) I've a little problem with my static images which don't get cached by the browser. You see in this screenshot for example the image "4.jpg": http://files.getdropbox.com/u/31281/20090616_153337.png it's included normally by $html->image tag into the page. The i

Re: Media View and Caching

2009-06-16 Thread Galdan
Hi together, thank you for the responses. Link-Protection is not the only reason why i use them. I also use Media Views for counting the hits on the images. I changed the application in the way that thumbnails dont get loaded by mediaview and only the high-res pictures (which should get counte

Filepath question

2009-06-16 Thread lakers fan
Hello, I have a form input of type 'file' to choose a file input('sourcedir', array('div' => false, 'label' => false, 'class' => 'text', 'type' => 'file')); ?> Is it possible to select a directory instead of file?. If not how can I get the full filepath.. i checked the $this

Re: Problem with Large Datasets

2009-06-16 Thread James K
If I understand correctly, you're running some finds to produce a giant array of user ids that match the conditions submitted by the user. THEN you're trying to take that list of user ids and pass them as a condition to a separate find to return the user details for each of those ids? First off,

Re: I want to add a parameter to the PaginatorHelper's link, where is the best to add?

2009-06-16 Thread Stu
ps: I think the code you might be looking for is: var $paginate = array('page' => 1); try adding this on top of the app_controller --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this gr

Re: I want to add a parameter to the PaginatorHelper's link, where is the best to add?

2009-06-16 Thread Stu
I usually add them from the app_controller: var $paginate = array(''); http://api.cakephp.org/class/paginator-helper If you want it for a view in particular, you could manually set them there as seen here: http://book.cakephp.org/view/166/Pagination-in-Views Hope this helps Good Luck! --~--~

Re:

2009-06-16 Thread Martin Westin
This? As in $this->recfunction... On Jun 16, 1:56 pm, lakers fan wrote: > Hello, > >      I want to write a recursive function in my users controller which will > be called from the url. > > http://localhost/cake/users/recfunction/param1/param2 > > This recfunction will call itself if needed.

hint about mapActions

2009-06-16 Thread Paulos23
Hello cakemen, I have a question about mapActions.I am trying to use Acl (not working at the moment) and i dont know if it's besto to use mapActions.I want to have 3 groups 1.Admin, 2.User_Premium , 3.User_Guest and i want to set their permissions.I have 2 controllers User,Profiles with plenty

variable is undefined when I pass it from a javascript file to a php file

2009-06-16 Thread Tamanna Afroze
Hi everybody, I am new in this group. The following code works well in my local machine. if(top.upper.securityOptions.generate_instant_message) { securityOption=top.upper.securityOptions.generate_instant_message; securityDelete = top.upper.securityOptions.delete_instan

[no subject]

2009-06-16 Thread lakers fan
Hello, I want to write a recursive function in my users controller which will be called from the url. http://localhost/cake/users/recfunction/param1/param2 This recfunction will call itself if needed.. function recfunction(param1, param2) { if(condition == true) {

Routing question...

2009-06-16 Thread Fivetwentysix
Hey I'm building my site with cakephp and I love it, cakephp has made it fun again. However I do use phpbb3 and would like to continue using it as it has never let me down yet. My directory is like this ./index.php <-- cake ./cake ./app So I would like to know what I would have to do to get ph

Re: Models Not Being Loaded

2009-06-16 Thread Dr. Loboto
Check models filenames - they must be lowercased. Same about all other cake files. On Jun 16, 11:41 am, CharlesTMunger wrote: > I have developed a site on my windows machine and it is working > great.  I uploaded the entire cake directory to my ubuntu server and > it appears to be working ok, ex

Trouble with Ajax and Session

2009-06-16 Thread Roland B
Hi, I have a web application using cakephp-1.2 and jQuery-1.2.6.. Ajax calls are being made to dynamically fetch more data from cake. My problem is that the ajax requests invalidate the current session if Security.level is set to high. It works fine with medium. After searching the web for simil

Re: EAV (Entity-Attribute-Value) Data Model with CakePHP

2009-06-16 Thread Maine
Just did this recently. I found the following resources valuable: - Expandable Behavior: http://debuggable.com/posts/unlimited-model-fields-expandable-behavior:48428c2e-9a88-47ec-ae8e-77a64834cda3 - EAV Plugin: http://github.com/morrislaptop/cakephp-eav/tree/master - Dynamic Data Fields: Practical

Routing question...

2009-06-16 Thread Fivetwentysix
Hey I'm building my site with cakephp and I love it, cakephp has made it fun again. However I do use phpbb3 and would like to continue using it as it has never let me down yet. My directory is like this ./index.php <-- cake ./cake ./app So I would like to know what I would have to do to get ph

Re: Problem with Large Datasets

2009-06-16 Thread Martin Westin
If you want to stay in Cake-land as much as possible try making use of the joins key in your options for find(). Nate wrote a nice article showing how to get going: http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-model-find General advice (apart from your big search functi

Re: routing to control layout

2009-06-16 Thread Greg Baker
Yes I will be using fbml also. I guess I can use explicit URLs. No big deal. Thanks for the excellent help. On Jun 15, 11:49 pm, "Adam Royle" wrote: > Sorry, I never used reverse routing like that. Maybe someone else with more > experience can help out? > > With my facebook app I used fbml so

Re: Problem with Large Datasets

2009-06-16 Thread Adam Royle
It's possible to use a combination of cake's magic and raw sql together, which I use occasionally when I need something a bit out of the ordinary but still want to use the cake methods (to make use of model binding, etc). eg. function getHomepageArtists() { $query = array( 'fields'

Re: Problem with Large Datasets

2009-06-16 Thread Femi Taiwo
Thanks for replying. Actually, I've got everything properly indexed and closely followed standards on that. I honestly just wanted to avoid writing a custom query (lazy me). Was only hoping that there was a way to avoid custom queries. Will give that a try then. Thanks! Femi Adam Royle wr

Re: Problem with Large Datasets

2009-06-16 Thread Adam Royle
Hi Femi, You should really just use one query for that with a number of joins and let the database do all the work. My advice is to get someone familiar with sql and construct the raw query and get it running at a decent speed inside the mysql console, and then find a way to get that sql into c

Problem with Large Datasets

2009-06-16 Thread Femi Taiwo
Hi all, I'm having a scalability problem, and urgently need to refactor. The project is just 2 months old and already has over 20,000 users. How do you handle passing an array with 5000+ values as a condition e.g. $conditions = array('User.id'=>$bigArray); As the records grow bigger, it tak

Re: New To cakephp

2009-06-16 Thread Andreas Derksen
Hi Netram, please read the Cookbook at least once, it will really help you in the future. There is also the installation manual in there. Follow this link: http://book.cakephp.org/ greets Andreas Netram Dhakar schrieb: > Hi, > > I am new with CakePHP.How to install and configure. > > Please he

Re: Help with CSS Rollover Links

2009-06-16 Thread Andreas Derksen
Lol, please quote the parts where i was ugly to him. I just gave him an advice AND helped him with his problem! I was constructive, not like you. Please don't bother me..thx greets Andreas red mcgee schrieb: > Re: Andreas: > > that's a foul way to respond to someone. > please don't browse the f

Re: EAV (Entity-Attribute-Value) Data Model with CakePHP

2009-06-16 Thread j0n4s.h4rtm...@googlemail.com
PolymorphicBehavior and one or multiple "Attributes" models that you bind to every model you need to. Just my thought. On Jun 15, 11:39 pm, "marco.rizze...@gmail.com" wrote: > Hi > I must use a EAV schema for my web app but I have no idea about how > realizate this in cake? > I have a table with

cron job question..

2009-06-16 Thread internetchris
Hey everyone, Forgive me if I sound like an idiot. I haven't setup a cron job in the past and I feel I am either missing files or I simply don't understand. For a school project a friend of mine is trying to setup a web application(written in cake php). I'm trying to give him a hand, but I'm not

New To cakephp

2009-06-16 Thread Netram Dhakar
Hi, I am new with CakePHP.How to install and configure. Please help me. Thanks & Regards Netram dhakar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php

Re: Problem with model import and find conditions

2009-06-16 Thread VVilku
Nobody? :/ --~--~-~--~~~---~--~~ 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+unsubscr...@googlegro

Re: Containable recursive find problem

2009-06-16 Thread Andreas Derksen
Hi Wilson, thats how my query looks like: $checklist = $this->Checklist->find('first', array('conditions' => array('Checklist.id' => $id), 'contain' => array( 'Prod