Re: File "serving"?

2009-10-22 Thread Miles J
Or you know, use the built in Media view. http://book.cakephp.org/view/489/Media-Views --~--~-~--~~~---~--~~ 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 T

Re: Model name issues with Upload Behavior

2009-10-22 Thread Miles J
You can try my uploader system, it supports multiple uploads. http://www.milesj.me/resources/script/uploader-plugin On Oct 22, 10:25 pm, "Dr. Loboto" wrote: > This behavior can work with only one model at time. So you need or > load only needed model (MotionFile or SeeFile), or attach-detach >

Re: Model name issues with Upload Behavior

2009-10-22 Thread Dr. Loboto
This behavior can work with only one model at time. So you need or load only needed model (MotionFile or SeeFile), or attach-detach behavior manually. I think all will be fine if you remove 'MeioUpload' from $actsAs in all models and will attach it just before save: $this- >MotionFile->Behaviors->

Re: File "serving"?

2009-10-22 Thread Bert Van den Brande
No I haven't tested this code inside a Cake project :) On Thu, Oct 22, 2009 at 10:39 PM, xtraorange wrote: > > I see, yes that would work. So there's not really a CakePHP solution? > > On Oct 22, 3:22 am, Bert Van den Brande wrote: > > Below a code extract from a site that serves files not ava

Inefficient SQL queries with hasMany/belongsTo relationship

2009-10-22 Thread bonecandy
Hi, this is my first post here - I'm new to CakePHP, but not to programming or PHP. Anyway, to get acquainted with Cake I've been making a blog (I know, crazy, huh?). So, I have my posts table and model, which has a hasMany relationship with comments, and my comments table and model, which has a b

Controller Question

2009-10-22 Thread Dave Maharaj :: WidePixels.com
I have moved a few of my functions to a new controller and trying to get them to work. I have my passwords_controller where User can update thier password / forgot or what not var $uses = array('User'); //does not have its own model now in my function function forgot() {

Re: inheritance

2009-10-22 Thread Dr. Loboto
Use RequestHandler component: http://book.cakephp.org/view/174/Request-Handling On Oct 22, 3:42 pm, Paulos23 wrote: > Hi people, > I am at the end of construction of my web application and i want to > build a smart way to handle response type(e.g XML,JSON etc).My app > consist of many services T

File upload array formats

2009-10-22 Thread Nabil Alsharif
I have two file fields in a form like so: input('custom.header.image', array('label'=>'Header Image', 'type'=>'file')) ?> input('custom.steps.1.icon', array('label'=>'Step 1 icon', 'type'=>'file')) ?> There is more then one step and both 'header' and 'step.n' have a couple of other sub fields

Re: Recurring Events Model Design in a Calendar App

2009-10-22 Thread Amit
Depends on how complex you want the system to be, but I say start by reading the iCal standard. You might be able to create a data structure from it. http://www.ietf.org/rfc/rfc2445.txt On Oct 22, 8:24 pm, park wrote: > Hi all, > > I'm developing a calendar app where some events are recurring o

Re: Howto include a View into another View?

2009-10-22 Thread Lance Willett
As jacmoe said, the best practice is to put elements specific to one view into a subfolder named the same as the view. That way you aren't cluttering the elements directory with lots of files, and the element files specific to that view will be easy to find and call. Example: if the element belon

Recurring Events Model Design in a Calendar App

2009-10-22 Thread park
Hi all, I'm developing a calendar app where some events are recurring on a daily / weekly / monthly basis, just like what Google Calendar offers. I'm not quite sure how to design a model structure to support this. Is there any best practice for this? Many thanks. --~--~-~--~~---

Re: How I can integrate cakephp into Joomla.

2009-10-22 Thread jacmoe
Why not help porting Mambo to CakePhp? They started it, but haven't got very far. It would be more sound than trying to Cake-ify Joomla! (*shudder*) IMO. :) On Oct 22, 1:37 pm, "www.landed.at" wrote: > I was thinking that it was also useful to know how one might have both > frameworks working in

Re: Help with ACL/Authentication Tutorial

2009-10-22 Thread jacmoe
You either need to downgrade your PHP to 5.2, or upgrade your Cake to 1.3. :) On Oct 22, 10:07 pm, aaron wrote: > Versions: MySQL 5, PHP 5.3, Apache2 (Snow Leopard) > > I am going through:http://book.cakephp.org/view/642/Preparing-our-Application > > The pages says to "use cake bake, call 'cake

Re: Order by Contain field

2009-10-22 Thread jacmoe
What do you mean? A totally unrelated model, or ? var $paginate = array( 'fields' => array(all_fields_here), 'limit' => 15, 'order' => array( 'SomeModel.someField' => 'desc') ); Works with whatever your model $belongsTo. If that's not what you mean, explain some more. :)

Re: Howto include a View into another View?

2009-10-22 Thread robustsolution
Dear @Jayarjo If I understand very well your Question, I think you should read a little bit about requestAction with 'return' extra parameter On Oct 22, 2:13 pm, jayarjo wrote: > I'm getting a huge View and I'm thinking now of splitting it into > separate pieces and include them into the main Vi

Re: Paginator helper in Cake 1.3

2009-10-22 Thread jacmoe
I tried Mootools, jQuery and Prototype - no luck. :) Prototype and Mootools seems to be ignored by Cake.. 'Js' => array('Prototype') or 'Js' => array('Mootools') I only get regular, non-Ajaxed pagination. However, when choosing jQuery, the links stops working. By that I mean: they are dead. Nothin

Model name issues with Upload Behavior

2009-10-22 Thread benjam
I'm currently using the MeioUpload Behavior from http://github.com/josegonzalez/MeioUpload/tree/master in a couple of my models on a project of mine and am running into an issue. When I try to upload a file in one of my models (MotionFile), it says the index cannot be found "SeeFile". SeeFile is

Help with ACL/Authentication Tutorial

2009-10-22 Thread aaron
Versions: MySQL 5, PHP 5.3, Apache2 (Snow Leopard) I am going through: http://book.cakephp.org/view/642/Preparing-our-Application The pages says to "use cake bake, call 'cake bake all'... (in the yellow at the bottom of the page) I get a lot of errors like: Deprecated: Assigning the return valu

Re: building the app - routing and model

2009-10-22 Thread jacmoe
It's simple enough: Put any static pages in app/views/pages. :) If you put about.ctp in there, you can visit your_site/about and *it just works* - no need to route anything. And, yes: you can have model-less controllers. It's easy, too: just be sure to use no model in the controller, like this: v

Re: File "serving"?

2009-10-22 Thread xtraorange
I see, yes that would work. So there's not really a CakePHP solution? On Oct 22, 3:22 am, Bert Van den Brande wrote: > Below a code extract from a site that serves files not available in the > webroot. > The key part is setting the right headers and then using fpassthru() to > stream the conten

Re: Paginator helper in Cake 1.3

2009-10-22 Thread jacmoe
I forgot to mention, that by 'isn't working' I mean no reaction at all: the links are recognised (I can see them in the status bar) but they do nothing. When I comment out the $paginator->options line, it works (as plain old linky pagination without any Ajax stuff). Of course, I'll try and see if

Re: Paginator helper in Cake 1.3

2009-10-22 Thread jacmoe
Strange, but if I comment out the following line, it works (without Ajax, of course) : options(array('update' => 'listing', 'indicator' => 'spinner', 'url' => $this->passedArgs)); ?> I'll look at the source to see if I can spot the error. Something changed in the way you configure the Paginator h

Re: creating layout with multiple view

2009-10-22 Thread kamiseq
ok but then you break cake's logic, dont you? --~--~-~--~~~---~--~~ 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

building the app - routing and model

2009-10-22 Thread kamiseq
can somebody clarify this things to me, cos I started to develop my site and Im so confused now. 1)I copied pages_controller to my app/controllers/ and added index() and about() method and added index.ctp layout to app/view/layouts (and changed in app/config/routes.php - Router::connect('/', arra

Re: Question Concerning Nested Relationships

2009-10-22 Thread Andrew
Nice! Thanks a lot. On Oct 22, 3:20 am, Bert Van den Brande wrote: > Use the Containable behavior :http://book.cakephp.org/view/474/Containable > > On Wed, Oct 21, 2009 at 7:32 PM, Andrew wrote: > > > > > > > I've got a Post model set up that has a BelongsTo relationship to a > > Group model. Th

www.find68.com cheaper nike shoes g-satr kidrobot hoodies ed hardy star red monkey gino green global true religion ed-hardy kidrobot jeans hoodies china supplier wholesaler exporters,manufacture

2009-10-22 Thread sfbd bndfb
Get Nike Shoes at Super Cheap Prices Discount Ed hardy tshirt (www.find68.com) Discount Ed hardy jean (www.find68.com) Discount Ed hardy shoes (www.find68.com) Discount Ed hardy handbag (www.find68.com) Discount Ed hardy other porduct (www.find68.com) Discount Nike air jordans (www.find68.co

Problem with association model

2009-10-22 Thread Wladiston Paiva
Hi friend, i have a problem in the recovery of related objects. exemple: $this->Pessoa->find('all', array("fields" => array("codigo"), "conditions" => $a)); /* Return: array(1) { [0]=> array(3) { [0]=> array(1) { ["codigo"]=> int(15) } ["Areainteresse"]=> a

Re: Order by Contain field

2009-10-22 Thread ark0n3
Hi Melanie thanks for your kind reply. I meant general sorting, not necessarily in the view, something like SELECT * FROM User inner join Group order by Group.name I think it's quite amazing such a basic feature could not be achieved with CakePHP, a workaround has to exist (different from manuall

Re: Paginator helper in Cake 1.3

2009-10-22 Thread mark_story
I have, and I haven't been having any issues. Perhaps you could more clearly define what "isn't working" means. -Mark On Oct 21, 11:47 pm, jacmoe wrote: > I just tried to upgrade my existing Cake app from 1.2 to 1.3. > And my Ajax powered paginator stopped working. :( > > I load the 'Js' helper

Re: Conditions in hasMany

2009-10-22 Thread John Andersen
Your relationship between Member and Sport are many to many, thus a hasAndBelongsToMany in CakePHP terms. Member hasAndBelongsToMany Sport Sport hasAndBelongsToMany Member Suggest you to look into the Containable behaviour which will make your life easier. http://book.cakephp.org/view/474/Contai

Re: Cakephp autocomplete

2009-10-22 Thread nurvzy
You could modify your view to show something like: "Customer.id : Customer.first Costomer.last" in the ajax dropdown so when the submitted data came through all you'd have to do is grab the first string to the : sign for the id. A cleaner approach I've used in the pass is a beforeSave() in the mo

Conditions in hasMany

2009-10-22 Thread SuMiT KuMaR
I have a situation when I have to filter members based on the sports that they play. This is a one to many relation. Member play many Sports the table structures would be conventional Table: members id, name and so on... Table: sports id, sport Table: member_sports id, member_id, sport_id I

Re: Order by Contain field

2009-10-22 Thread Melanie Sommer
> Hi > does anyone know if it's possible to order by a contained fields? It > seems to me like a simple task but I'm unable to manage it.. I have a > User model associated with a Group field and I'd like to order User by > Group.name. Do you mean paginator function sort() ? There you simpy need t

RE: Is Ajax request

2009-10-22 Thread Dave Maharaj :: WidePixels.com
Yeah all links are the same. Same class and jquery grabs by the class to load it ajax. But I said screw it and just included 'all' into the filterByType function so it will pull it that way. -Original Message- From: John Andersen [mailto:j.andersen...@gmail.com] Sent: October-22-09 7:42

Order by Contain field

2009-10-22 Thread ark0n3
Hi does anyone know if it's possible to order by a contained fields? It seems to me like a simple task but I'm unable to manage it.. I have a User model associated with a Group field and I'd like to order User by Group.name. Thanks Nicola --~--~-~--~~~---~--~~ You

xml-rpc in cakephp

2009-10-22 Thread Bryan
Hi guys. I'm new to cakephp. Is it possible for cakephp to handle stored procedures and XML-RPC? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegr

problems with paginator

2009-10-22 Thread Persivo Cunha
Hi, i have an action and for $this->data i've passed one word for search. This search is done and it has returned the results through paginate. But, after i change page, the word isn't passed and my search became wrong, because it didn't use the filter. what should i do? Thanks. --~--~-~

Re: Howto include a View into another View?

2009-10-22 Thread jacmoe
What's wrong with using elements/controller/some_element ? Or elements/controller/somegroup/another_element ? I works nicely for my projects :) On Oct 22, 1:13 pm, jayarjo wrote: > I'm getting a huge View and I'm thinking now of splitting it into > separate pieces and include them into the main

Re: How I can integrate cakephp into Joomla.

2009-10-22 Thread www.landed.at
I was thinking that it was also useful to know how one might have both frameworks working in the same folder structure but no bridge so to speak. Advantages could be that joomla provides a very good looking easy to administer website.then cakephp provides some really cool bespoke applications

Re: Best method for storing images?

2009-10-22 Thread www.landed.at
Hi I would be keen to know more about this as well even conceptually or best practise industry standard. I have seen images stored as hex too, I think this is similar to a blob ? I do have to say I like the idea with having images in a directory though and storing the ref to the image. I will need

Re: Cakephp auth component allow problem

2009-10-22 Thread Zahidur Rahman
I also thought such way.but i wanted to do all the think in app_controller.php. Ok. thanks for suggestion. 2009/10/22 jayarjo > > > > hmm it's working if i use array. I am using version 1.2 > > I hope my query was confusing for u. > > Probably it will work either way. > > Oh, that's interesting

Howto include a View into another View?

2009-10-22 Thread jayarjo
I'm getting a huge View and I'm thinking now of splitting it into separate pieces and include them into the main View, as I will need them. I know I can create Elements and include them, but the problem is that those smaller Views that I'd like to create are specific to this main View only. So tha

Re: Cakephp auth component allow problem

2009-10-22 Thread jayarjo
> hmm it's working if i use array. I am using version 1.2 > I hope my query was confusing for u. Probably it will work either way. Oh, that's interesting by the way. I guess we can allow access for common actions in app_controller.php, right? Correct me please if not, I'm total newbie on cake y

Re: Retrieve schema of model

2009-10-22 Thread emmexx
On 22 Ott, 12:28, emmexx wrote: > On 22 Ott, 12:04, Jon Bennett wrote: > > The easiest way would be to use ClassRegistry::init('ModelName')->_schema; For the record: This works with php5: ClassRegistry::init('ModelName')->_schema; With php4 use: $obj = ClassRegistry::init('ModelName'); $fi

Re: Retrieve schema of model

2009-10-22 Thread emmexx
On 22 Ott, 12:04, Jon Bennett wrote: > The easiest way would be to use ClassRegistry::init('ModelName')->_schema; > > hth It did help! Thank you. I had tried that but my code was messed up and it hadn't worked. maxx --~--~-~--~~~---~--~~ You received thi

Re: Is Ajax request

2009-10-22 Thread John Andersen
How is the HTML looking? Does it look the same as the other links? Enjoy, John On Oct 21, 6:59 pm, "Dave Maharaj :: WidePixels.com" wrote: > I have this function where its first called normally by a link (http > request). Once loaded the pagination links are done via Ajax. I have 'all', > 'ne

Re: Before render being called twice?

2009-10-22 Thread Bert Van den Brande
I remember a similar question some time ago on this mailing list, in the end it turned out that the use of 'requestAction' was triggering this behavior ... On Thu, Oct 22, 2009 at 7:17 AM, jacmoe wrote: > > I am not a CakePhp expert, but if one or more controllers have this: >function before

Re: Retrieve schema of model

2009-10-22 Thread Jon Bennett
Hi Maxx, > I tried with > loadModel($selectedModel); > $this->$selectedModel->_schema > but this syntax is wrong in php (and I don't know php classes well). > I can't use php 5 syntax. The easiest way would be to use ClassRegistry::init('ModelName')->_schema; hth jon -- jon bennett - www.jb

anyone know and able to help with cakeamfphp

2009-10-22 Thread www.landed.at
It seems no longer supported at its page http://cakeforge.org/projects/cakeamfphp/ I can understand amfphp ok but dont understand what this cakeamfphp is for or how to use it. I'm quite new to cake too. If I can understand what cakeamfphp is doing then I can get started. At first I thought it w

Retrieve schema of model

2009-10-22 Thread emmexx
I need to retrieve the schema of the fields associated with a model. I know there's the _schema property but I don't know how to access it. The problem is I need the schema inside the controller and I want a list of the fields of any of the models. I'm creating a page where the user can select on

inheritance

2009-10-22 Thread Paulos23
Hi people, I am at the end of construction of my web application and i want to build a smart way to handle response type(e.g XML,JSON etc).My app consist of many services Timezone Service,Weather Service and so on,which they manipulate data in XML or JSON.Now i want to reuse code and not building

Re: File "serving"?

2009-10-22 Thread Bert Van den Brande
Below a code extract from a site that serves files not available in the webroot. The key part is setting the right headers and then using fpassthru() to stream the contents. Maybe other options are available but this has worked fine for me. GetRow('SELECT * FROM artikelen WHERE id = '.$dataId) )

File "serving"?

2009-10-22 Thread xtraorange
Howdy all, First of all, let me apologize for the awkward wording of my subject, but I don't know what the technical term is for what I want to do (I'd be most appreciative if someone happened to know the right word and could share that). Basically, what I'm looking to do is securely serve files

Re: Setting cookie for cached pages?

2009-10-22 Thread Bert Van den Brande
I haven't done this before, but I think you need to do your caching manually in each controller. http://book.cakephp.org/view/764/Cache This way you can set the cookie in your controller and then display the cached content. On Wed, Oct 21, 2009 at 3:22 PM, Kana wrote: > > I need to set a cooki

Re: Question Concerning Nested Relationships

2009-10-22 Thread Bert Van den Brande
Use the Containable behavior : http://book.cakephp.org/view/474/Containable On Wed, Oct 21, 2009 at 7:32 PM, Andrew wrote: > > I've got a Post model set up that has a BelongsTo relationship to a > Group model. This Group is related by HABTM to 1+ Media models. > > The Post model has other Belongs

Re: has many validation

2009-10-22 Thread Bert Van den Brande
http://book.cakephp.org/view/150/Custom-Validation-Rules On Wed, Oct 21, 2009 at 10:24 PM, kangur91 wrote: > > Hello, I've got table with Fields > "Name" and "file_id" > > If I add data to the table, should execute validation. And not add to > the table if this 2 fields will repeat. > > Anyone k