Re: count no of rows.

2008-12-29 Thread Stephen Orr
Your brackets aren't balanced. One of the earlier replies had the correct syntax though. Try: $count = $this->Project->Message->find('count', array ('Message.project_id' => $MyProjectId)); On Dec 29, 6:09 am, piyushsharmajec wrote: > Hai, >  Thanks for your help however i find error as >  unex

Re: How to remove ugly markup from helper? ( )

2008-09-14 Thread Stephen Orr
This is in there because Cake's forms can support the additional methods such as PUT and DELETE that are needed for RESTful applications, but that aren't supported by browsers as yet. Originally the input field was not inside a fieldset, however that (according to the W3C validator, amongst others

Re: Sharing tmp with other applications

2008-06-19 Thread Stephen Orr
I can't be the only one thinking this while reading this thread - but it sounds like the server operator is excessively paranoid, keeping the system locked down far beyond what it needs to be. I'd suggest finding an alternate place to host your sites, it just sounds like this is going to cause nig

Re: 503 5.5.2 Send hello first (email component)

2008-06-12 Thread Stephen Orr
I think the thinking is that, by not including external solutions wherever possible, it keeps the licensing clean, making it easier for bigger companies to adopt for their own projects. The trouble with including most external libraries is that they're GPLed, which tends to mean that the entire so

Re: Admin section without using admin routing

2008-06-05 Thread Stephen Orr
Or you could do what I've done in the past on several occasions and create a plugin called 'admin', which will allow you to have URLs such as /admin/users/add. Works fairly well, and you can define a separate layout just by including in your plugin a /views/layouts/default.ctp file. On Jun 5, 6

Re: App Controller Fails to Load

2008-06-02 Thread Stephen Orr
I used "RewriteBase /" after RewriteEngine on, and the Cake apps I've deployed to our 1&1 hosting seem to work fine. You'll need to insert the RewriteBase directive in each of the 3 .htaccess files. On Jun 2, 9:08 pm, robbie <[EMAIL PROTECTED]> wrote: > Hello All, > > I have a problem, my local A

Re: ShadowBox / Ajax Link Problem

2008-06-02 Thread Stephen Orr
I'm only guessing here, but perhaps the layout being used to render the shadowbox doesn't including the JS libraries in the header? I can't be sure, I no longer use the Ajax helper as I prefer jQuery to Prototype :) On Jun 2, 8:09 pm, Kyle Decot <[EMAIL PROTECTED]> wrote: > I am using an ajax lin

Re: How to dynamically add fields to model

2008-05-31 Thread Stephen Orr
My suggestion would be to go with your initial idea. It's workable, it'd take some fiddling with the code to make it work correctly however. But you could achieve most of what you'd need with a bit of code in the afterFind method of your model. On May 31, 4:26 pm, spamec <[EMAIL PROTECTED]> wrot

Re: SelectTag in Array

2008-05-28 Thread Stephen Orr
If you're trying to bring an old website into Cake, now is the time to use 1.2 instead of the old 1.1. It'll be stable very soon now (I have faith in the dev team), so you're best off sticking with the newest and best. To get the information out that you're looking for, try using (in 1.2): $i =

Re: $this->Auth->user() cached? - Cake 1.2

2008-05-22 Thread Stephen Orr
Basically, it looks like the Auth data is not refreshed on each page load. I can understand why you wouldn't want to do this - performance notwithstanding - but I've run into a few issues with it myself (primarily dealing with having an online store where the customer could change their email addr

Re: Saving NOW() in model

2008-05-21 Thread Stephen Orr
I believe I used this method: 'last_login' => '!-NOW()' Which makes Cake stop trying to quote it. But I'm pretty sure the latest SVN revision recognises NOW() and doesn't quote it anyway. Maybe I'm confused. Steve On May 22, 2:12 am, Alex Ciobanu <[EMAIL PROTECTED]> wrote: > Zifnab wrote: > >

Re: Form posting with type=get

2008-05-18 Thread Stephen Orr
uirement that search results > can be bookmarked so the easy way to do this is using GET. > > Hope this info helps :-) > > On 17 mei, 00:56, Stephen Orr <[EMAIL PROTECTED]> wrote: > > > I'm having trouble understanding why you'd want to use GET for > >

Re: Form posting with type=get

2008-05-16 Thread Stephen Orr
I'm having trouble understanding why you'd want to use GET for something... what's the specific situation you're attempting? Steve On May 16, 7:48 pm, the_woodsman <[EMAIL PROTECTED]> wrote: > > But it just doesn't make any sense to me that input names > > are stripped to the column names of a t

Re: Can't get Save() to save certain fields

2008-05-16 Thread Stephen Orr
I think it depends which Cake version you're using, but I'm pretty sure now the preferred method of saving is: $this->Model->create($this->data); $this->Model->save(); I'm not sure if this changed between 1.1 and 1.2, but I'm using 1.2 and this technique works perfectly. I usually wrap it in a c

Re: Is the documentation at book.cakephp.org open source?

2008-05-06 Thread Stephen Orr
The answer seems to be because some people believe that a wiki is the solution to all of mankind's problems. I'd rather see people contributing to the main docs personally, since it was launched the Book has really helped me get answers faster (there's still some things I need to refer to the API

Re: a couple of small things I can't figure out

2008-04-19 Thread Stephen Orr
> findAll(array('Table.categoryt' <> "A" ) This definitely won't work. The array('Table.categoryt' => 'A') part follows PHP syntax, where => denotes a relationship between the key of the array and the value. To have a condition where you want rows that DON'T match, use array('Table.categoryt' =>

Re: Which versions of MySQL compatible with CakePHP 1.1.9.6305?

2008-04-15 Thread Stephen Orr
gt; run in MySQL properly. Shouldn't cake be producing rather similar SQL > from 1.1 to 1.2? It's a simple query after all. > > Or are there strict version compatibilities between Cake versions and > MySQL versions? Is that documented? > > I > > On Apr

Re: |OT| What is your preferred URL structure?

2008-04-15 Thread Stephen Orr
Of course, there's no reason you couldn't achieve those preferred URLs by using custom routes. Stephen On Apr 15, 4:00 pm, "R. Rajesh Jeba Anbiah" <[EMAIL PROTECTED]> wrote: > On Apr 10, 1:18 am, majna <[EMAIL PROTECTED]> wrote: >> My suggestion is controller/action/slug solution. Sometimes

Re: architecture - organizing related models (?)

2008-04-15 Thread Stephen Orr
oding something up, I could be wrong. Stephen On Apr 15, 3:47 pm, "R. Rajesh Jeba Anbiah" <[EMAIL PROTECTED]> wrote: > Stephen Orr wrote: > > I can't answer all your points, but in theory, you could probably > > achieve what you're aiming for in (2) by

Re: Which versions of MySQL compatible with CakePHP 1.1.9.6305?

2008-04-15 Thread Stephen Orr
What it sounds like is that he's trying to use the updated $this- >Model->find('all'.) syntax from Cake 1.2 in the older version. Best bet is to either upgrade, or use the old $this->Model- >findAll($conditions) syntax. Steve On Apr 15, 8:44 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote

Re: Problem with plugins

2008-04-15 Thread Stephen Orr
Without knowing exactly what files you have there, I can't really solve the problem. But, to make a plugin work, this is what you need: A folder in plugins called whatever your plugin should be called (hereafter referred to as $plugin). Within that folder, 2 files - $plugin_app_controller.php a

Re: id = 0 or id ='0' not allowed in cakephp?

2008-04-14 Thread Stephen Orr
MySQL specifically disallows an ID of 0. I've tested this manually by inserting a test row with an ID of 0 into an auto_incremented column. It ignores it, and gives it an ID of 1 instead. So, not a CakePHP bug at all. Steve On Apr 14, 9:37 pm, Defranco <[EMAIL PROTECTED]> wrote: > nobody? > > /

Re: architecture - organizing related models (?)

2008-04-09 Thread Stephen Orr
I can't answer all your points, but in theory, you could probably achieve what you're aiming for in (2) by making SearchEngine a factory class which instantiates the other classes on demand. But you'd probably do better with a different architecture. My suggestion would be to use a call such as $

Re: cakephp 1.2 form helper,how to create() form without ugly inline css

2008-04-07 Thread Stephen Orr
The CSS is there because of a ticket I posted - in XHTML it's invalid to have any input elements within a form element that aren't also enclosed by a block-level element (so, a fieldset, a paragraph, a div). The inline CSS is purely there to allow you to have valid XHTML and not break your layout

Re: WAMP and CakePHP

2008-04-03 Thread Stephen Orr
I second the recommendation of Wampserver. Only problem I've found is that it doesn't include a mail server by default - which means, if you're running under Vista, you can't send emails from your localhost. Steve On Apr 3, 7:04 pm, dw <[EMAIL PROTECTED]> wrote: > i use wampserver and like it.h

Re: How can I user jQuery insted of prototype?

2008-04-03 Thread Stephen Orr
I agree - there's no need for a helper - it seems pointless to add extra load to PHP processing when you can just add the extra scripting to your views and layouts directly. jQuery is concise enough that you don't need to code a helper for it :) On Apr 3, 1:08 pm, "[EMAIL PROTECTED]" <[EMAIL PRO

Re: document root in shared hosting

2008-04-03 Thread Stephen Orr
MAIL PROTECTED]> wrote: > I am hosting with StoneRocket.net > > On 30 mar, 06:20, Stephen Orr <[EMAIL PROTECTED]> wrote: > > > Which, so long as your RewriteBase directive takes the form of: > > > RewriteBase /directory > > > Will be exactly right. If th

Re: mutliple domains on 1 site

2008-04-02 Thread Stephen Orr
For the database side all I use is a constructor DATABASE_CONFIG(), which checks whether or not the site is running on localhost. If it is, I use the settings I've previously defined in the file (following the same convention as the default setup). I'm working on expanding my overall concept at t

Re: works in localhost, not works in www.toreadandtowrite.com

2008-04-01 Thread Stephen Orr
Probably. Suggestion - ask your HOST what the correct settings should be. On Apr 1, 11:23 pm, Raistlin Majere <[EMAIL PROTECTED]> wrote: > I replaced the line: > > 'host' => 'localhost', > > with: > > 'host' => 'www.toreadandtowrite.com', > > Is it wrong? > > On 31 mar, 01:59, "[EMAIL PROTECTED]

Re: mutliple domains on 1 site

2008-04-01 Thread Stephen Orr
t; <[EMAIL PROTECTED]> wrote: > If you could share that code, I'll happily look at creating a patch to > tart it up a bit. > > simonhttp://www.simonellistonball.com/ > > On Apr 1, 3:09 pm, Stephen Orr <[EMAIL PROTECTED]> wrote: > > > I'd love to see

Re: mutliple domains on 1 site

2008-04-01 Thread Stephen Orr
I'd love to see this sort of functionality in there - I've just built a component to handle that side of things, it's not perfect but it does work. On Apr 1, 12:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > See! That's the beauty of cake. It can look awfully restrictive with > all this

Re: Parsing a cakephp session Data row

2008-03-31 Thread Stephen Orr
Trouble is, as he says in the original post, this is for an external application. So he can't use Cake methods. That doesn't mean there's not an easier way to do it, however I can't think of one :) On Mar 31, 6:06 am, jonknee <[EMAIL PROTECTED]> wrote: > > Thanks for your repleys. I got it work

Re: document root in shared hosting

2008-03-30 Thread Stephen Orr
Which, so long as your RewriteBase directive takes the form of: RewriteBase /directory Will be exactly right. If this isn't working for you, I suggest contacting your hosting company for further support. Cake has worked successfully for me every time, deploying onto many different servers and ho

We're under attack

2008-03-28 Thread Stephen Orr
I'm sure I won't be the first person to have seen this... or the last to respond to it: http://www.akbkhome.com/blog.php/View/161/CakePHP_taking_it_apart_and_the_better_written_world_of_sinners.html Seems like this guy just doesn't like frameworks. Ours in particular. --~--~-~--~~---

Re: "Your database configuration file is not present."

2008-03-27 Thread Stephen Orr
I know this might seem illogical to you - but ALL the information you need to get Cake working is in the docs. Hell, in most cases all you have to do is upload the files as downloaded either from the site or from SVN. This is all I've ever had to do. Rename app/config/database.default.php to data

Re: looking for a hosting company

2008-03-27 Thread Stephen Orr
Perhaps I came down a little hard on them. I had a bad experience with their support the other day, which has resulted in me moving a client site to Webfusion instead. Stupidity really. On Mar 27, 2:31 pm, SumanRS <[EMAIL PROTECTED]> wrote: > I've had the same experience as Miki. You need to be g

Re: looking for a hosting company

2008-03-26 Thread Stephen Orr
Avoid 1and1 for Cake like the plague. It's a bloody nightmare. I had to change the .htaccess files, the databases were slow as hell... and their helpdesk support is pathetic. We're migrating all our sites away from them now. Steve On Mar 26, 5:59 pm, Rob Russell <[EMAIL PROTECTED]> wrote: > Any

Re: Trailing Whitespace Prevented a Session From Being Started

2008-03-09 Thread Stephen Orr
Is Zend Framework a big enough open-source project for you? They follow this convention. Steve On Mar 8, 8:31 pm, Guy Rutenberg <[EMAIL PROTECTED]> wrote: > Hi rtconner, > > On Mar 8, 1:52 am, rtconner <[EMAIL PROTECTED]> wrote: > > > FYI, It might be a good practive not to use the '?>' to close

Re: Baking Cake with EasyPHP

2008-03-05 Thread Stephen Orr
Well, it could also be that EasyPHP just isn't very good. So far, my recommended WAMP setups are either XAMPP or Wampserver. I've had problems with several others, including Bitnami WampStack and EasyPHP. Steve On Mar 5, 9:15 pm, "Juan Luis Baptiste" <[EMAIL PROTECTED]> wrote: > On Wed, Mar 5,