Re: SQL or Cakephp

2007-05-25 Thread hashkash
class User extends AppModel { var $name = 'User'; var $primaryKey = 'username'; var $hasMany = array ('Equipment'=> array('className' => 'Equipment', 'conditions'=> 'Equipment.owner='$logged_in_username', >how do I get this va

SQL or Cakephp

2007-05-25 Thread hashkash
HI, I have 2 models User and equipment(the owner is a field in the user table). user hasMany equipment equipment belongsTo user equipment hasOne owner. I need to display all equipment that a user owns when he logs in. Even if I were to specify it in the conditions part of the association how d

recursive delete with HABTM

2007-05-25 Thread [EMAIL PROTECTED]
Can anyone suggest how I could have a recursive delete (aka dependent) join between two tables? IE Posts HABTM Tags If a post is deleted all tags associated with that post are deleted If a tag is deleted all posts associated with that tag are deleted I know it seems like a strange thing to

Re: session data being lost

2007-05-25 Thread [EMAIL PROTECTED]
I had a similar sounding problem - mine turned out to be that that I was redirecting to a slightly different domain name - in my case I was loosing session data when I redirected from http://www.domainname.com to say https://domainname.com (no www in domain name). Bottomline is make sure your doma

Re: Interactive Console screencast

2007-05-25 Thread Dr. Tarique Sani
On 5/26/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote: > > You sound grumpy. > Grumpy is the new Good :P T -- My motto for everyone else - "Just shut up, damnit!!" = PHP for E-Biz: http://sanisoft.com ===

Master detail with cakephp

2007-05-25 Thread [EMAIL PROTECTED]
to create a master detail you create your models for example Models/master.php array( 'className'=>'Detail', 'foreignKey'=>'id_master') ); } ?> ---

Re: CakePHP php5?

2007-05-25 Thread nate
Okay, seriously, why are people sooo ignorant about this issue??? There is nothing, no thing, not *anything* preventing you from writing PHP5-only apps with Cake, even though we support PHP4. The one and only thing you *cannot* do with a Cake app is run it in E_STRICT mode. That's it, that's al

session data being lost

2007-05-25 Thread tyhilltx
I've been pouring over all the posts I can find about session data being lost between requests and trying many things to no avail. I know my sessions are working having tried small scripts posted here as well as my own. The session data is being set before the redirect but not there afterwards (

Re: Load Javascript on the fly

2007-05-25 Thread chess64
Check out the NiceHead Helper in the bakery. On May 12, 12:53 pm, dom <[EMAIL PROTECTED]> wrote: > Hi everybody. > I wonder if it is possible to load a javascript file outside the > section of the layout. I have only one layout, default.thtml, > as all the calls are Ajax calls. So I have only on

MultipleDisplayFields Behavior - possible solution to handling multiple fields in $displayField

2007-05-25 Thread Travis Cline
Not claiming any beauty, efficiency or adequate testing here... : http://bin.cakephp.org/view/1976615209 This includes henthoca's beforeFind check as well. @see http://groups.google.com/group/cake-php/browse_thread/thread/d4aa1929ce4d61c7/edcacb9354ff1f7a I've assumed a default of "{first_name}

Re: CakePHP php5?

2007-05-25 Thread Chris Hartjes
On 5/25/07, Mech7 <[EMAIL PROTECTED]> wrote: > > When will CakePHP be turned to PHP5 code? > You can build CakePHP apps with PHP 5 already. -- Chris Hartjes My motto for 2007: "Just build it, damnit!" @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart

CakePHP php5?

2007-05-25 Thread Mech7
When will CakePHP be turned to PHP5 code? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email t

CakePHP php5?

2007-05-25 Thread Mech7
When will CakePHP be turned to PHP5 code? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email t

Re: Filtering/Searching/Sorting

2007-05-25 Thread phpsmitty
AD i downloaded and started working with the pagination class. Do you think there is a way to mod it to give me a a search box at the top. I'm looking for something like: Drop Down Box Of Fields | Drop Down of Operators | Text box for search critera | Search Button --Bryan On May 9, 4:04 am, A

Re: mod_rewrite not working in all cases

2007-05-25 Thread furiouslettuce
It turns out that the documentation at http://manual.cakephp.org/chapter/installing is wrong - you have to add RewriteBase /~username/ to both the .htaccess as the root and in /app/webroot, wheras the documentation says to only include it in the root .htaccess. I'm not sure how to get it changed,

Re: Issue on software design / good practice

2007-05-25 Thread tawm
Wow Felix! Didn't think of that one yet. That's actually a very smart way of achieving exactly the functionality I wanted, with all the benefits of the design I wanted. Actually, since a model class in CakePHP will never have more than one instance (at a time) using static methods is practically i

Re: Issue with Sitepoint Article

2007-05-25 Thread Merc
Currently, I am running from /b13ed.com/app/webroot/. I used your suggested .htaccess and no improvement. Any other ideas? Thank you! On May 25, 10:43 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > is your document root set to your cake folder, or cake/app, or cake/ > app/webroot? > > Try

Re: Issue with Sitepoint Article

2007-05-25 Thread Merc
I believe so, I am running Wordpress on the same server; and using mod_rewrite for "pretty" URL's. Sample referred to above: http://www.wercshop.com/2007/05/22/ben-blogged/ On May 25, 8:35 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 5/25/07, Merc <[EMAIL PROTECTED]> wrote: > > > > > Ye

RE: Interactive Console screencast

2007-05-25 Thread Mariano Iglesias
You sound grumpy. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original

Interactive Console screencast

2007-05-25 Thread Chris Hartjes
Hey guys, I've been working with gwoo on another shell to add to the growing collection you can access via the command-line. I've posted a screencast to my blog of me giving a very quick demonstration of it. http://www.littlehart.net/atthekeyboard/2007/05/25/screencast-interactive-console-for-c

Re: Load Javascript on the fly

2007-05-25 Thread hydra12
You can load scripts from within your views, too. I'm playing with ajax, jquery, and ext.js, and I had similar problems. Put something like this at the bottom of your view: link('myScript.js'); ?> NOTE - you have to but this at the bottom of the view. I tried putting it at the top, but the sc

Re: Load Javascript on the fly

2007-05-25 Thread Pablo Viojo
I use to load javascript files on the fly using a **synchronous** connection (using XMLHttpRequest) sUrl="http://example.com/scriptftoload.js";; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); if ( typeof xmlhttp.overrideMimeType != 'undefined') { xmlhttp.over

Re: Invalidating model from another model

2007-05-25 Thread [EMAIL PROTECTED]
Thanks for that.. hadn't see it before. It seems interesting, but I'm not sure it's exactly what I'm looking for. It seems well suited for making models observable to components and the like though. It seems logical that if several models are associated with one another (ie: the model PartyParti

Re: Load Javascript on the fly

2007-05-25 Thread John - PostalService
The Head helper is non existant. Do you have a custom helper that you are using? Thanks, John On May 12, 11:08 am, stacey <[EMAIL PROTECTED]> wrote: > You can call like this from the view: > > js('customborders/cb'); ?> > > and you need to include the 'head' helper in your controller: > > var

mod_rewrite not working in all cases

2007-05-25 Thread furiouslettuce
I've been attempting to follow the blog tutorial, simply to see what Cake entails, but I'm finding that I can't get the URLs to work - I keep getting 404's. I'm fairly sure it's a mod_rewrite issue, but it appears to be working normally. I have cake installed to ~/public_html/. If I put a file, e

Re: Issue with Sitepoint Article

2007-05-25 Thread [EMAIL PROTECTED]
is your document root set to your cake folder, or cake/app, or cake/ app/webroot? Try setting it to: cake/app/webroot and then change your .htaccess file (cake/app/webroot/.htaccess) to: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f Rew

RE: Restricted Directory only accessible through Cake(PHP)

2007-05-25 Thread Mariano Iglesias
Look over at htaccess statements. You can simply create an .htaccess file on a folder (inside webroot) and then add there: Order allow,deny Deny from all And you won't be able to access that directory through apache (hence through a browser), so you'll be left with readfile() and stuff from PHP

Re: Problem storing Binary Data over 900K in Field

2007-05-25 Thread rockit
oh ok, sorry never noticed this post you had left, i reposted under a new topic. i'm newer to cake, is there somewhere's you might be able to direct me for more information? ie. tutorial or example. On May 25, 11:29 am, francky06l <[EMAIL PROTECTED]> wrote: > If you have installed your applicat

Restricted Directory only accessible through Cake(PHP)

2007-05-25 Thread rockit
I'm working on an app where a an end user needs the ability to upload mp3 files to the server (basic i know). then, it will become available to purchase via a pay-per-download. all of the concepts of downloading, pay-per-download are pretty straight forward and aren't really an issue. the chall

Re: Pagination component misbehaving in php4

2007-05-25 Thread Bernardo Vieira
AD7six escreveu: > No idea. but as I develop with both php4 and 5 I am pretty sure it is > not specific to the (aging) pagination code. Sounds like more > debugging is needed ;). > > Cheers, > > AD AD, Boy I *really* hoped for a reply like "this is a simple issue, just do Pagination->foo = 'ba

Re: Issue with Sitepoint Article

2007-05-25 Thread Chris Hartjes
On 5/25/07, Merc <[EMAIL PROTECTED]> wrote: > > Yes, sir. Mod_rewrite is running and set-up as directed. Is there a > test file or test project available that can help me to troubleshoot? > The biggest issue is that I am not getting a helpful error message. > I know it's a silly question, but do

Re: help with findAllthreaded - navigation menu

2007-05-25 Thread Penfold
Hi Luke, Have a look at this http://bakery.cakephp.org/articles/view/threaded-lists atricle it think it will cover what your wanting, there is also this article. http://bakery.cakephp.org/articles/view/coding-a-self-join-in-a-cake-application Penfold On 25 May, 12:00, luke BAKING barker <[EMA

Re: Issue with Sitepoint Article

2007-05-25 Thread Merc
Yes, sir. Mod_rewrite is running and set-up as directed. Is there a test file or test project available that can help me to troubleshoot? The biggest issue is that I am not getting a helpful error message. -- .htaccess file -

Re: Problem to insert date in Database

2007-05-25 Thread Gilles Dubois
I don't think so. I think it is not a normal behaviour that you can't made a find and a save just after without lose some data. Is it normal that the date format of the find() is not the same that the date format of the save() ? If Yes, where is defined the date format of the find ? If i have a

Re: Problem to insert date in Database

2007-05-25 Thread yannouz
sorry just post 2 times with the logon of a friend :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group,

Re: Problem storing Binary Data over 900K in Field

2007-05-25 Thread francky06l
If you have installed your application outside the public_html (it should be) you can use some of the cake php variables to access your files (ie : APP_DIR etc ...) On May 25, 3:59 am, rockit <[EMAIL PROTECTED]> wrote: > ya that's what i'm thinking. > > i was thinking of placing the area that sto

Re: 1.2 - Paginating data other than Model records

2007-05-25 Thread Zoltan
I've seen models that don't use a database table too, but an example of how to load in data (say the apples and oranges are the result of some kind of search) into a model for pagenation would be helpful. Zoltan On May 25, 3:29 am, AD7six <[EMAIL PROTECTED]> wrote: > On May 24, 5:01 pm, gmwebs <

Re: Issue with Sitepoint Article

2007-05-25 Thread Chris Hartjes
On 5/25/07, Merc <[EMAIL PROTECTED]> wrote: > > > I would be grateful for any direction that will help my to > troubleshoot the issue. Is mod_rewrite enabled for your site? Please follow the installation and configuration instructions in the manual very carefully. -- Chris Hartjes My motto fo

Re: Beginner's question, about model

2007-05-25 Thread Chris Hartjes
On 5/10/07, Ming <[EMAIL PROTECTED]> wrote: > Is this var ($name) mandatory? In view, I have ['id']; ?>. Does ['Post'] here refer to the $name var? I'm sorry, but you are a help vampire(1) if I ever saw one. I suggest the following: 1) learn about PHP 4's object model since that is what CakePH

Re: Problem to insert date in Database

2007-05-25 Thread Chris Hartjes
On 5/25/07, yannouz <[EMAIL PROTECTED]> wrote: > If i execute a save directly after that : $project->save($data) > The begin date is replace in the database by 1970-01-01 00:00:00 > because 21/02/07 is not valid, the system need a d.m.Y format date. > > The original code was not made by me, so may

Re: Problem to insert date in Database

2007-05-25 Thread yannouz
> If i execute a save directly after that : $project->save($data) > The begin date is replace in the database by 1970-01-01 00:00:00 > because 21/02/07 is not valid, the system need a d.m.Y format date. Ho sorry i made a mistake, the last sentence is "the system need a m.d.Y format date" --~--

menu

2007-05-25 Thread Oscar Burgos
I´m trying to develop a menu based on a Categories tables. The elements of the menu are in a tabla called Items. In Items table there is FK categories_id to relate each item with his category. I want to show something like this Category 1 Item 1 C1 Item 2 C1 Category 2 Item 1 C2 Item 1

Problem to insert date in Database

2007-05-25 Thread yannouz
Hello All, I'm pretty new in the Cake world so excuse me if my question is a noob one, but i haven't find any similar question. I will simplify my example to be understandable : My Oracle Database have a Projects table which contains some data and a begin_date field which is a date id|

help with findAllthreaded - navigation menu

2007-05-25 Thread luke BAKING barker
Hi So in cake 1.2 I am wanting to bake my model for a db table Links, which will basically hold navigation menu items and their subitems (via using parent_id) [ I want to build a tree menu for navigation from it , essentially. ] So links has fields id, parent_id (default 0), path, name, and pri

Re: Issue on software design / good practice

2007-05-25 Thread Felix Geisendörfer
Here is one of my favorite approaches to this is do use static function calls on Models: - class User extends AppModel { function name($user) { if (isset($user['User']) {

Re: 1.2 - Paginating data other than Model records

2007-05-25 Thread gmwebs
Yeah, but how would a model that doesn't use db tables present data for Paginate() to use? Sorry if this is an obvious question, but I am seriously not getting this concept :( Thanks, Graham On 25 May, 08:29, AD7six <[EMAIL PROTECTED]> wrote: > On May 24, 5:01 pm, gmwebs <[EMAIL PROTECTED]> wro

Re: Sub-folders in pages controller

2007-05-25 Thread gmwebs
I have a work around, but I had to add in a route for each product group. It is working now though... As for the reason behind making the pages static, they only have 8 products and they just want an exact copy and paste from the old to the new site. Also, they want to be able to edit the xhtml t

Re: Complex SQL Conditions (multiple ORs)

2007-05-25 Thread AD7six
On May 24, 10:21 pm, squidliberty <[EMAIL PROTECTED]> wrote: > Fabulous! That works perfectly for most of my queries. But why won't > it work in the following? > > $conditions['NOT'] = array('Listing.expiration' => "BETWEEN 1 AND > ".mktime()); > $conditions[0]['OR'] = array("Listing.title" => "

Re: help, error with '../' into a render.

2007-05-25 Thread AD7six
On May 21, 10:35 pm, Kurt <[EMAIL PROTECTED]> wrote: > Hi, i use one view file for many controllers. This view saved in views > folders and into the controllers i uses: > > $this -> render('../anyViewFile'); > > this works well in my localhost with easyphp 2.0(with PHP5), but when > I upload to

Re: help, error with '../' into a render.

2007-05-25 Thread AD7six
On May 21, 10:35 pm, Kurt <[EMAIL PROTECTED]> wrote: > Hi, i use one view file for many controllers. This view saved in views > folders and into the controllers i uses: > > $this -> render('../anyViewFile'); > > this works well in my localhost with easyphp 2.0(with PHP5), but when > I upload to

Re: Sub-folders in pages controller

2007-05-25 Thread AD7six
On May 22, 1:05 am, gmwebs <[EMAIL PROTECTED]> wrote: > How do I configure the following? I am using 1.2.0.5137 > > I want to organise my static pages in subfolders so that views/pages/ > products/product1 points towww.mydomain.com/products/product1. it does that as it comes out of the box, unl

Re: Inside vs. Outside of CAKE?

2007-05-25 Thread AD7six
On May 22, 8:51 pm, Fluxx <[EMAIL PROTECTED]> wrote: > I have a script that downloads an mp3 file off my server. If I throw > the code inline in to a PHP file and run it, the mp3 file downloads > just fine and plays happily in iTunes, WMP, etc. If I take that same > code, and put it in a funct

Re: requestAction issue

2007-05-25 Thread AD7six
On May 23, 4:41 pm, Repsah <[EMAIL PROTECTED]> wrote: > Yes, I was thinking as well about using a component but I wanted to make > sure this was the wisest choice. > I'll need a whole lot of them ;) Maybe useful http://www.noswad.me.uk/MiBlog/MiniControllers hth, AD --~--~-~--~~

Re: How paginate results of search?

2007-05-25 Thread AD7six
On May 23, 4:48 am, hostdesigner <[EMAIL PROTECTED]> wrote: > Like know how paginate results of search with cakePHP, I know do with > PHP, but in cakePHP... > > Thanks! There's an example in the 1.1 pagination demo which is available here: http://cakeforge.org/projects/noswad . The exact same p

Re: GET-like request sent as POST returns a 404 when debug == 0 ?

2007-05-25 Thread AD7six
On May 24, 4:46 pm, "Gonzalo Servat" <[EMAIL PROTECTED]> wrote: > Hi All, > > I've noticed this behaviour only when debug = 0 (ie. production mode). I had > an Ajax call that worked fine in dev but failed in production. After lots of > troubleshooting, I looked at the Apache logs and noticed tha

Re: 1.2 - Paginating data other than Model records

2007-05-25 Thread AD7six
On May 24, 5:01 pm, gmwebs <[EMAIL PROTECTED]> wrote: > Hi, > > Is there any way to paginate data other than Model records using the > Paginator helper? For instance, I want to paginate an array, not the > actual Model records. > > Something like: > > Pseudo Code * > > var $paginate = a

Re: Pagination component misbehaving in php4

2007-05-25 Thread AD7six
On May 25, 4:10 am, Bernardo Vieira <[EMAIL PROTECTED]> wrote: > Hi all! > I have a project that uses the Pagination component. It works perfectly > in my development environment, however when I uploaded the project to > the production server things went sour. The component seems to do it's > jo

Re: Bug with - /cake/libs/router.php :: stripEscape() - cakephp.v.1.1.15.5144

2007-05-25 Thread AD7six
On May 25, 7:10 am, alan <[EMAIL PROTECTED]> wrote: > https://trac.cakephp.org/ticket/2640#preview > > The new method in router.php is: stripEscape($param) The way it's > currently written, it can run into problems with highly nested > arrays basically it assumes that there's a text value in

Re: Including a cake ajax form in a non cake php page

2007-05-25 Thread AD7six
On May 25, 6:36 am, chewie124 <[EMAIL PROTECTED]> wrote: > I have an ajax driven form in cake, that works like a champ. it's > really pretty simple: When you submit the form, it sends the request > to the controller and then updates the div containing the html form > with the response from the

Re: problemns with search on models

2007-05-25 Thread AD7six
On May 24, 11:56 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 5/24/07, Kamik <[EMAIL PROTECTED]> wrote: > > > > > any idea? > > Bumping a post is considered bad manners on this list. Be patient, if > someone has an answer for you they will post it... Yeah. especially on the same day. K

Re: Beginner's question, about model

2007-05-25 Thread yolabingo
On May 10, 5:02 pm, Ming <[EMAIL PROTECTED]> wrote: > Hi there, > > I am new to cake and I have several questions. :) > > >From the blog tutorial: > 1) > //AppModel gives you all of Cake's Model functionality > class Post extends AppModel > { > // Its always good practice to include this vari