Re: Video upload and view

2007-03-30 Thread lukemack
thanks guys! i think I have everything I need. I'll post back here with the results. if anyone is interested in collaborating on something let me know! On 30 Mar, 06:57, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can anyone recommend a class/script which handles video file uploads,

Re: lost in validation

2007-03-30 Thread Dia
up to pass datas from controller to model I now do like that : // controller $this-User-data = $this-data; if ($this-User-validates()) { ... } // model function beforeValidate() { // can use $this-data } in beforeValidate I use a Sanitize object to clean datas but it changes model datas by

lack of associated data

2007-03-30 Thread mike
I've been stuggling with this problem for a while now and have come to a dead end. I could really do with some help. First of all the associations are; Quote - hasMany - Invoice Invoice - belongsTo - Quote Invoice - hasMany - Invoiceitem Invoiceitem - hasOne- Invoice Quote - hasMany -

Use off-the-shelf (bloated) open source product, or develop with cake?

2007-03-30 Thread keymaster
I'm in the middle of developing a fair size app for the travel industry using cake, so am reasonably comfortable at this point with cake. I love it, actually, for what it has taught me, and what it enables me to accomplish, and am grateful to the skilled and kind developers who give of their

Re: lack of associated data

2007-03-30 Thread AD7six
On Mar 30, 11:51 am, mike [EMAIL PROTECTED] wrote: I've been stuggling with this problem for a while now and have come to a dead end. I could really do with some help. First of all the associations are; Quote - hasMany - Invoice Invoice - belongsTo - Quote Invoice - hasMany -

Re: lost in validation

2007-03-30 Thread AD7six
On Mar 30, 10:31 am, Dia [EMAIL PROTECTED] wrote: up to pass datas from controller to model I now do like that : // controller $this-User-data = $this-data; if ($this-User-validates()) { ... } // model function beforeValidate() { // can use $this-data } in beforeValidate I use

Re: Use off-the-shelf (bloated) open source product, or develop with cake?

2007-03-30 Thread Dr. Tarique Sani
On 3/30/07, keymaster [EMAIL PROTECTED] wrote: The issue is, I'm not sure what the right decision making process is in deciding which direction to go? What's in the best interest for the client? For me everything would depend on the budget that client has at the moment and how much

Re: Can you stop a controller action from being called in beforeFilter?

2007-03-30 Thread Piotr Barszczewski
oops. forgot to mention: this post is related to http://groups.google.com/group/cake-php/browse_thread/thread/e8cc55b1275dbd1b/620ae1856fd54c2c --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To

Re: Can you stop a controller action from being called in beforeFilter?

2007-03-30 Thread AD7six
On Mar 30, 1:28 pm, Piotr Barszczewski [EMAIL PROTECTED] wrote: oops. forgot to mention: this post is related tohttp://groups.google.com/group/cake-php/browse_thread/thread/e8cc55b1... Why call requestAction at all for something the user doesn't have access to see? AD

Re: Can you stop a controller action from being called in beforeFilter?

2007-03-30 Thread Piotr Barszczewski
hmm, my last post didn't show here :/ i hope it doesn't show twice, after i add this. The requestAction forwards the requests based on a populated list or resources. It's dynamic. I want to use authorization for controllers +actions in one place, so that the ones called normally (based on the

Re: Can you stop a controller action from being called in beforeFilter?

2007-03-30 Thread Piotr Barszczewski
Some users are and some aren't supposed to view, and the authorization for each of them is done in beforeFilter, so they do/don't get the results On 30 Mar, 13:49, AD7six [EMAIL PROTECTED] wrote: On Mar 30, 1:28 pm, Piotr Barszczewski [EMAIL PROTECTED] wrote: oops. forgot to mention: this

Re: Shared ~ log4php component.

2007-03-30 Thread CraZyLeGs
This should be some kind of singleton. Because you would want to log things from the view domain, the model domain etc. On Mar 29, 10:55 pm, Samuel DeVore [EMAIL PROTECTED] wrote: So you should submit an article to the bakery for this little goody!!

Re: Can you stop a controller action from being called in beforeFilter?

2007-03-30 Thread AD7six
On Mar 30, 2:25 pm, Piotr Barszczewski [EMAIL PROTECTED] wrote: hmm, my last post didn't show here :/ i hope it doesn't show twice, after i add this. The requestAction forwards the requests based on a populated list or resources. It's dynamic. I want to use authorization for controllers

Re: Shared ~ log4php component.

2007-03-30 Thread cc96ai
Yep, I try to register to bakery but never got any activiation email :( so no way to login into bakery --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: saving HABTM posts-tags

2007-03-30 Thread davyke
i don't know how it works, i saw the code of cheeseCake but i still no understand. let me explain: i have a YpItem model var $hasAndBelongsToMany = array('YpTag' = array( 'className' = 'YpTag' ) ); YpTag model

Re: Can you stop a controller action from being called in beforeFilter?

2007-03-30 Thread Piotr Barszczewski
Ive made a little break and it came to me that You're right from the beginning :) I'll just override the requestAction in AppController to make it look like this (just to illustrate the idea): function requestAction( $url, $extra = array() ){ $tmp = new Object(); $tmp-plugin =

Re: Proposal for killer app

2007-03-30 Thread John
These are great ideas flying around. I really do think that a simple but complete application would be really useful for new bakers - all things considered the manual + bakery + this group are a pretty damn good resource - BUT it can be hard pulling things together and integrating. Ideally it

Re: Link / URL Best Practices

2007-03-30 Thread jonathan.snook
That said, I've never had it not work because the default php.ini setting is on. But if you don't have control over your server, or the code is for wide distribution, it's not the best idea. I hear this argument repeatedly, about using the short form, but why would it not be enabled? What

Re: Link / URL Best Practices

2007-03-30 Thread Walker Hamilton
On Mar 30, 9:03 am, jonathan.snook [EMAIL PROTECTED] wrote: I hear this argument repeatedly, about using the short form, but why would it not be enabled? What has been the percentage of people that have actually had a problem with using the short form? You'd be surprised. People tending to

Re: Link / URL Best Practices

2007-03-30 Thread AD7six
On Mar 30, 4:03 pm, jonathan.snook [EMAIL PROTECTED] wrote: That said, I've never had it not work because the default php.ini setting is on. But if you don't have control over your server, or the code is for wide distribution, it's not the best idea. I hear this argument repeatedly,

Re: Data validation problem

2007-03-30 Thread christianandradet
this is the code: /***MODEL***/ class Note extends AppModel { var $name = 'Note'; var $validate = array( 'title' = VALID_NOT_EMPTY, 'body' = VALID_NOT_EMPTY, ); } /VIEW***/ h1Add Note/h1 form

Re: logging cake errors

2007-03-30 Thread Charles Schaefer
Thanks all, but i think that solutions is only for that errors of PHP. I'm needing a way of to log the errors of cake, i.e. a table not found in the database. When occurrs an error like that, the cake throw a 404 - not found, but, i think, it don't log this automatically. Exists some way of to

Cakephp Databases

2007-03-30 Thread christianandradet
Hi, I know that cakephp works with this 3 databases(mysql,posgresql,sqlite), but is there a way that i can use this incredible framework with databses like sql server or oracle?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Proposal for killer app

2007-03-30 Thread digital spaghetti
That's a pretty short n' sweet list of what I think we would need, not anything more. Probably 99% of apps built will use this, or a modified version, of this functionality. I'm thinking we could call it our shake and bake pakage - all the ingredients are ready made to be baked into something

Re: Link / URL Best Practices

2007-03-30 Thread nate
On Mar 29, 7:09 pm, rtconner [EMAIL PROTECTED] wrote: To get to an image or stylesheet I do this... style type=text/css media=all @import url(?=$html-url('/css/base.css')?); /style Okay, you definitely don't need to go through all that. For CSS, you can either do

Re: Cakephp Databases

2007-03-30 Thread nate
Yes, and yes. Cake 1.2 supports both SQL Server and Oracle. You can set the 'driver' in app/config/core.php to 'mssql' or 'oracle'. On Mar 30, 10:23 am, christianandradet [EMAIL PROTECTED] wrote: Hi, I know that cakephp works with this 3 databases(mysql,posgresql,sqlite), but is there a way

Edit problem

2007-03-30 Thread christianandradet
Iam trying to edit a Cliente an i have this in my model 'Cliente': var $name = 'Cliente'; var $hasOne = array('Naturale' = array('className'= 'Naturale', 'conditions' = '', 'order'= '',

Re: Cakephp Databases

2007-03-30 Thread christianandradet
Sorry, i have read better and cakephp can do what i want On 30 mar, 09:23, christianandradet [EMAIL PROTECTED] wrote: Hi, I know that cakephp works with this 3 databases(mysql,posgresql,sqlite), but is there a way that i can use this incredible framework with databses like sql server or

Session variables in a model

2007-03-30 Thread fr3nch13
Is there a way to access the session component in a model? I store a user's information in the session [$this-Session- read('User')] and when the user edit's their information, i want it to be able to update the session. I would do it in the controller, but there are 3 different ways to edit a

error creating ARO in SQL Server200

2007-03-30 Thread Christian Quispe Quispe
Hi, for create the ACL table in MSSQL2000 I apply the change, https://trac.cakephp.org/changeset/4706 and create the ACL table, but when I try to create an ARO, the following error shows: C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\intranet\cake\scriptsphp acl.php

Re: Session variables in a model

2007-03-30 Thread Piotr Barszczewski
You clould pass the reference of the Session component to the model's function. Controller: $this-myModel-myModelMethod( $this-Session ); Model: function myModelMethod( $sessionComponent ){ $sessionComponent-read( 'session.var' ); } It should work, theoretically On 30 Mar, 17:07, fr3nch13

Re: Ajax Sortable List Confusion

2007-03-30 Thread fr3nch13
You have: ?php echo $ajax-sortable('questions', array('url' ='saveOrder')); ? Shouldn't the url be /controller/action? so like this: ?php echo $ajax-sortable('questions', array('url' ='/faq/ saveorder/')); ? --~--~-~--~~~---~--~~ You received this message

RE: Session variables in a model

2007-03-30 Thread Peter Brenner
Session information is not available in the model. I had a similar requirement where I needed to get user information out of the session for auditing purposes when records are updated. I solved the problem by implementing an Observable Model. Have a look at this article for information on how

Re: Use off-the-shelf (bloated) open source product, or develop with cake?

2007-03-30 Thread Christopher E. Franklin, Sr.
I would have to agree with Dr. Sani. You can always pump out a basic cake site pretty quick if they did not want e-commerce but, for me that is a pain in the butt. What I have found is, always try to make plug ins for everything that you can re-use. E-commerce, user login/ auth functions,

Re: Link / URL Best Practices

2007-03-30 Thread rtconner
Nate, hey cool thanks. Though when I tried it out ? echo $html-css(array(reset, fonts, base, layout, nav), import); ? Produced style type=text/css@import url(/tire/thirstytire/css/reset.css);/ style style type=text/css@import url(/tire/thirstytire/css/fonts.css);/ style style

Re: how to populate a second select-box by selecting a first with ajax ?

2007-03-30 Thread Lou
Hi, I am facing exactly the same problem and do not know at the moment how I can solve it. The selectbox added with Ajax does not post data to the controller! Fred: Have you meanwhile solved this item? Thanks to all for help! --~--~-~--~~~---~--~~ You

Re: Link / URL Best Practices

2007-03-30 Thread savagekabbage
The whole point of Cake is for rapid application development. You shouldn't modify your PHP/logic programming in order for it to change the way it outputs the HTML if it's just going to work the same.. I personally would prefer 1 line of code to 7 lines =) On Mar 30, 10:54 am, rtconner [EMAIL

Re: Edit problem

2007-03-30 Thread savagekabbage
Did you try to throw a few pr()'s in the controller before the save to see what the values were set at? On Mar 30, 9:47 am, christianandradet [EMAIL PROTECTED] wrote: Iam trying to edit a Cliente an i have this in my model 'Cliente': var $name = 'Cliente'; var $hasOne = array('Naturale' =

RE: Shared ~ log4php component.

2007-03-30 Thread Mariano Iglesias
Why haven't you reported this as a Bakery issue on the trac so other people could avoid the same problem? https://trac.cakephp.org -MI --- Remember, smart coders answer ten questions for every question they ask. So be

RE: error creating ARO in SQL Server200

2007-03-30 Thread Mariano Iglesias
Please report it to the trac: https://trac.cakephp.org https://trac.cakephp.org/ -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE

How to show an error when you try to access a content that doesn't exists

2007-03-30 Thread Alberto Lopez Rubio
Hi everyone, I'd like to know how to do CakePHP show an error when you try to access a content that doesn't exists. For example, with the next code, if I try to acces /group/view/3 and doesn't exists the Group with id=3 in the database, it shows the view.thtml with error from database. class

RE: How to show an error when you try to access a content that doesn't exists

2007-03-30 Thread Mariano Iglesias
Alberto, This has been answered to you on the spanish google group, no need to re-post here. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your

Re: error creating ARO in SQL Server200

2007-03-30 Thread Christian Quispe Quispe
Ok, that's the ticket https://trac.cakephp.org/ticket/2312 Now, I try to connect using adodb and show a different error , creating the ACL table: C:\Arch.\cake\scriptsphp acl.php initdb Initializing Database... Creating access control objects table (acos)... Creating access request objects

Admin routes + CMS

2007-03-30 Thread carbonize42
I am currently working on a site that needs a few different CMS tools built in for the client. I decided to try the admin routes, which works great for each one of the modules, but now I have run into one problem. If I use the 'admin' for admin routes, then I can't figure out how to set up just

Re: Admin routes + CMS

2007-03-30 Thread [EMAIL PROTECTED]
What I usually do is create a dashboard controller with no associated model, then set up a route in config/routes.php , to redirect. ie. $Route-connect('/admin', array('controller' = 'dashboard', 'action' = 'index')); btw, if you are using any sort of user auth , i would suggest doing the

need suggestion on caching

2007-03-30 Thread bingo
Hi bakers, I never used caching before in my life...so this is something new for me..On my website, I have left column which displays list of all tags that a user has in his library (check the diagram below). Since it expensive to do this query and render the view all the time, I ended up using

cake searches the HATBM join table in the wrong database when using $useDbConfig

2007-03-30 Thread RayChicago
Hi all ! My (unfortunate) Situation : I have a Model X in one Database D1, and a Model Y in a Database D2, a HABTM relationship between them like outlined below, and the jointable x_y is in D2. class X extends AppModel { public $name = X; public $useTable = 'xtable'; public $useDbConfig

Re: cake searches the HATBM join table in the wrong database when using $useDbConfig

2007-03-30 Thread RayChicago
i just tried these additional things : - gave the config different user-credentials (usernam/pw) - switched to mysql_connect ... and i'm still none the wiser :( cheers, ray --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: cake searches the HATBM join table in the wrong database when using $useDbConfig

2007-03-30 Thread RayChicago
hi again ! i tried giving different credentials to the two db-configs (different username/pw) and i also tried switching to mysql_connect... none of this has helped so far... i'm still at a kind of loss... cheers, ray --~--~-~--~~~---~--~~ You received this

Re: need suggestion on caching

2007-03-30 Thread Chris Hartjes
On 3/30/07, bingo [EMAIL PROTECTED] wrote: looking forward for some ideas.. Regards bingo This is just my own experiences, but I hope it helps... When you have a web page that has a mix of static and cacheable information, you will want to consider breaking the content down into elements

CakePHP on shared hosting

2007-03-30 Thread Aldo Nievas
Hi, I've just installed a CakePHP application on a shared hosting that supports MySQL 5.x and PHP 5.2.1, but when I tried to access it I've got the following error: Warning: Invalid argument supplied for foreach() in path-to-the-application/cake/libs/model/dbo/dbo_mysql.php on line 171 Does

Re: lost in validation

2007-03-30 Thread Dia
hi and thanx for paying attention to my problem this piece of code is for user registration it's just a little program to begin using CakePHP note : I use a nightly build 1.1.x.x of a few days ago I call validates() in an if condition if it's ok, I check if this username is already used then,

Re: saving HABTM posts-tags

2007-03-30 Thread Dr. Tarique Sani
Your $this-data looks fine to me. Take a look at the table and column names and ensure that you have followed the conventions. also use the simplest var $hasAndBelongsToMany = array('YpTag' ); let us know how that goes Cheers Tarique On 3/30/07, davyke [EMAIL PROTECTED] wrote: here

Re: Shared ~ log4php component.

2007-03-30 Thread Dr. Tarique Sani
On 3/30/07, Mariano Iglesias [EMAIL PROTECTED] wrote: Why haven't you reported this as a Bakery issue on the trac so other people could avoid the same problem? Yep! you should else you will bring the wrath of the OSS gods upon you :P Tarique --