Re: ACL bug when Auth::authorize = 'actions'? 1.2.4.8284

2009-09-04 Thread housebolt
't know if this will reassure you or frustrate you - but it's not > a bug in db_acl.Aclwith Auth->authorize = 'actions' works nicely for > me for a long time, including in 1.2.4.8284. May I ask, in your > AppController::beforeFilter, to what you have set the Auth- > &g

Re: Automatically rendering element using RequestHandler - possible?

2009-09-04 Thread housebolt
One way to do it is in your AppController::beforeFilter() set a view var like $this->set('isAjax', $this->RequestHandler->isAjax()); Then in your layout file (or view file) add if(!$isAjax) { echo } GB On Sep 4, 4:48 am, eagerterrier wrote: > Hi > > I have a problem that I just can't get m

ACL bug when Auth::authorize = 'actions'? 1.2.4.8284

2009-08-26 Thread housebolt
Hi All, Currently using version 1.2.4.8284 I spent a good half-day trying to get the Auth and Acl components to play nicely with the Auth::authorize var equal to 'actions' and a single root ACO node of 'controllers', accessible by the ARO that is connected to a Group model, which has many users

Re: how to view the image on page from database

2009-02-04 Thread housebolt
echo $html->image($this->data['Model']['image_url'], array ('alt'=>'description')); Make sure you have pulled the image url into a view var first (like $this->data or by using $this->set() in your controller), and also make sure the htmlhelper is activated in your controller under the $helpers ar

Re: Select MAX(date)

2009-02-03 Thread housebolt
Methinks you're thinking a little too hard on this one. I'm pretty sure you don't even need to use MAX(). $this->Model->find('first', array('order'=>'Model.date DESC')); Try that, I think that's what you're looking for. If not explain a bit more and I'll see if I can help. On Feb 3, 3:53 pm, g

Re: book on cake?

2007-11-03 Thread housebolt
There isn't one that I'm aware of. There was one in the process of being published but it fell apart at the last minute. Most people have trouble initially getting the hang of MVC. You really need to focus on the MVC structure. Read over the "Basic Concepts" section of the manual very carefully.

Re: Rails Envy

2007-08-26 Thread housebolt
LOL On Aug 25, 8:45 am, RichardAtHome <[EMAIL PROTECTED]> wrote: > http://www.youtube.com/watch?v=GQXqWkWqnSw > > I lol'ed :-D --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group

Re: need some help in understanding error messages

2007-08-23 Thread housebolt
The easiest way to do this is by using $this->Session- >setFlash('Username already exists'); in your controller. The error message will show up at the top of the page or wherever you put "if ($session->check('Message.flash')) $session->flash();" in your layout. On Aug 23, 7:33 am, rtanz <[EMAIL P

Re: Session doesn't die ... it just freezes!!

2007-08-23 Thread housebolt
Can you post your controller method and view to see what we've got here? This is very intriguing to me. On Aug 23, 10:18 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thanks for you answer!! > > I've already set "Content-Disposition: attachment; filename=\"$filename > \"", and also an opti

Re: HtmlHelper and html entities

2007-08-19 Thread housebolt
All fixed! : ) On Aug 19, 4:02 am, nitifixis <[EMAIL PROTECTED]> wrote: > Hi! > > I'm using the htmlhelper in my cake 1.1 app and I'm having problems > with strings with html entities. Example: > > $html->submit('télécharger'); > > cake is replacing all & symbols with & entities. How am I suppo

Re: Model not found?

2007-08-19 Thread housebolt
y('TalentDetail'); to the top of your controller. Your controller would look like this: $uses will then load talentdetail as a variable you can use in your controller. Hope this helps :) housebolt On Aug 19, 2:22 pm, peterhf <[EMAIL PROTECTED]> wrote: > A table in th

Re: Help With $ajax->link. Can I Slide instead of Hide?

2007-08-08 Thread housebolt
link('Ajax', '/contact/', array('update'=>'changediv', 'indicator'=>'loaddiv', 'loading'=>"showById('loading'); hideById('changediv');", 'complete'=>"slidedown I believe that's how you do it. I can't remember if you need to add the "function() { " to it, but I don't have enough time to test i

Re: CakePhp development usability

2007-08-07 Thread housebolt
Langdon's right. Bake.php is the end all be all of cake model/view/ controller generation. Also, take a look at this article: http://www.littlehart.net/atthekeyboard/2007/07/11/why-code-generation-just-works-damnit/ On Aug 7, 12:21 am, modfather <[EMAIL PROTECTED]> wrote: > Hello ladies and gent

Re: Model->find with large datasets

2007-08-07 Thread housebolt
I'd be interested to see the difference in performance between cake's find() and a straight up php mysql call. I personally don't think cake will have much of a problem handling this. I would try both and see how long it takes to execute (and the memory usage) for a simple SELECT statement. You c

Re: problem implementing user - session login system

2007-08-05 Thread housebolt
type in your view and look for something called Config.rand. This sets a unique random identifier in the form of a number, which you can use as a reference in your database. You can access it by typing Session->read('Config.rand'); ? > in your controller. On Aug 5, 5:19 pm, phpcurious <[EMAIL PR

Re: Is it reasonably easy to do this sort of inline editing with CakePHP

2007-08-05 Thread housebolt
Check out this tutorial: http://cakephp.org/screencasts/view/3 On Aug 5, 3:52 pm, walterbyrd <[EMAIL PROTECTED]> wrote: > I'm still framework shopping. One thing I like about Qcodo is this > inline editing feature: > > http://examples.qcodo.com/examples/dynamic/inline_editing.php > > Is that sor

Re: Help with Advanced Installation

2007-08-05 Thread housebolt
I'm with kabturek on this one. I'd stick with the initial download setup until you learn the ins and outs of cake and its structure. It's simple, just drop the whole download into a folder accessible by your browser, make sure mod_rewrite is on, set up your database.php file in /app/config/ and yo

Re: Levelling Order

2007-08-05 Thread housebolt
I believe you can do it this way: for level 1: $this->Category->findAllByParentId(0, null, 'Category.id ASC'); // Third argument for findallby in your model, in the 'Childnode' array, add 'order'=>'Childnode.name ASC' (or DESC depending on what you want) to the array. var $hasMany = array(

Re: find empty text field & addslashes

2007-08-05 Thread housebolt
You probably have magic_quotes and magic_quotes_gpc set to "ON" in your PHP.ini file. Google "magic_quotes" and "magic_quotes_gpc". On Aug 5, 2:56 am, jyrgen <[EMAIL PROTECTED]> wrote: > hello, > > i'm having problem with slashes being added by cake when > trying to find empty text columns in th

Re: setting pear for cakephp

2007-08-03 Thread housebolt
Download PEAR.php from the pear site and put it in your vendors folder. That should do the trick. On Aug 2, 9:24 am, rtanz <[EMAIL PROTECTED]> wrote: > im trying to use pear with cakephp, i installed it using the uniserver > installer so now pear is located at W:\home\admin\www\plugins\pear/ > PE

Re: progress report matrix

2007-08-02 Thread housebolt
That's way too much to try to explain in a google group post. If you don't know how to implement this you probably need to do some reading. http://safari.oreilly.com/browse?category=itbooks.prog.php http://www.w3schools.com/ http://manual.cakephp.org On Aug 1, 4:26 pm, rtanz <[EMAIL PROTECTED]>

Re: About Associations : example

2007-08-02 Thread housebolt
http://manual.cakephp.org/chapter/models On Aug 1, 4:40 am, Ghanshyam Rathod <[EMAIL PROTECTED]> wrote: > Hello friends, > > I am newbie to the cakePHP frameworks and want to learn association > in good way. > kindly send me SQL script with model, controller and view code. > > i mean running ex

Re: uploading files

2007-08-02 Thread housebolt
PEAR has one of the easiest uploaders to use: http://pear.php.net/package/HTTP_Upload drop the file into your vendors folder, and then follow this: In your view: - form('/wherever/', 'POST', array('enctype'=>'multipart/form-data')); ?> In y

Re: A quick note about BakeSale

2007-08-01 Thread housebolt
e > > thinking about using BakeSale, make sure that you take a good look at > > the code before you use it, especially if you're going to be saving > > credit card numbers in your database. > > Bakesale does NOT store CC information, it uses external payment > gat

Re: A quick note about BakeSale

2007-07-31 Thread housebolt
about the danger of using BakeSale "straight out of the box". I would be fine if they were marketing it as a basic starting point for building a shopping cart, but they're making it out to be a complete product. On Jul 31, 7:30 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]>

Re: your own class files location?

2007-07-31 Thread housebolt
Usually yes, although if you want to use third party classes you can put them into the vendors folder. You'll have to change a few things in your code in order to use your library or class as a component, but in most cases it's not much of a change. On Jul 31, 6:25 pm, Aaron Thies <[EMAIL PROTEC

A quick note about BakeSale

2007-07-31 Thread housebolt
I was just taking a look at bakesale for some ideas on building my own shopping cart. Please don't use bakesale in its current form without looking into its security issues. This has nothing to do with Cake, and everything to do with the fact that BakeSale currently has NO security measures whats

Re: Cake PHP running dead slow

2007-07-31 Thread housebolt
) On Jul 31, 10:55 am, PiLLo <[EMAIL PROTECTED]> wrote: > Hi housebolt, I would like to know a tool capable of simulate a heavy > load on the server in order to identify which part of the code is > producing a bottle neck. > > On development environment everything seems ok,

Re: Number displayed under flash messages

2007-07-31 Thread housebolt
Hmm, could you post some of the source code of the flash message that gets rendered on your page in html? I went back to look at this and I don't see it. It's probably a css thing. That 1 may be a 1 pixel X 1 pixel line that's supposed to be a css underline. Try getting rid of or changing #flashM

Re: Help with project design

2007-07-31 Thread housebolt
I can't get too specific since I don't know all of the details involved, but here's what I do know, You'll want to create models for ALL of your tables. The reason behind this is the nature of ActiveRecord, which is the main structure for data abstraction in Cake. You use activerecord in cake to

Re: Home Page?

2007-07-30 Thread housebolt
http://manual.cakephp.org/chapter/configuration - See section 3 "Routes Configuration" Also checkout the "pages" folder in /app/views/pages/. Anything you put in there can be accessed from the browser at /pages/your_page/ (which is equal to /app/views/pages/your_page.thtml [or .ctp]) and anythi

Re: Reducing prototype?

2007-07-30 Thread housebolt
I'd also recommend taking a look at the jQuery library. http://jquery.com You can't use Cake's helpers, but the ajax is basically all the same. I haven't used jquery yet, but I've looked at the documentation and it's very impressive, and it's just as easy to use as scriptaculous (maybe even easi

Re: Is this not a security issue?

2007-07-30 Thread housebolt
Oh, hehe I get it now. Sorry, I was assuming you were trying to add a value that you actually did want to add/change in your database. Larry's right (as usual), you can limit the fields can get changed by the third param in $this->Model->save(). On Jul 30, 3:24 pm, morecakepls <[EMAIL PROTECTED

Re: Is this not a security issue?

2007-07-30 Thread housebolt
Hmm... well usually what you'd want to do is put the secret value into a session variable, $this->Session->write('secretvalue', 'whateverthesecretvalueis'); Once the person has posted the value from the hidden input tag, you can then check it against the secret value to make sure that they're th

Re: Cake PHP running dead slow

2007-07-30 Thread housebolt
ink that's when they introduced lazy loading?), but it still does affect load times on shared servers, especially overloaded shared servers. On Jul 29, 4:30 pm, Grant Cox <[EMAIL PROTECTED]> wrote: > On Jul 29, 4:45 pm, housebolt <[EMAIL PROTECTED]> wrote: > > > $usesis

Re: Cake PHP running dead slow

2007-07-30 Thread housebolt
> loadModel('user'); > loadModel('profile'); > > i wondered what's the performance difference. > > On Jul 30, 1:30 am, Grant Cox <[EMAIL PROTECTED]> wrote: > > > On Jul 29, 4:45 pm, housebolt <[EMAIL PROTECTED]> wrote: > > > >

Re: How do you usually create admin area on site with CakePHP?

2007-07-29 Thread housebolt
Well, that's a matter of opinion, but the other way you can do this is by putting your cake core into a root folder, and then referencing your cake app folder config files to that cake core location, so you can have a separation of production and admin interfaces. You'd just have to make sure your

Re: Cake PHP running dead slow

2007-07-29 Thread housebolt
It probably is your server. I ran a couple of apps on a godaddy shared server (with CGI) and the load on the server was already so high that adding a large app load on top of all of it made the thing slow, but not nearly as slow as what you've got going. I used to have an app with about 30 tables

Re: help with form input with multiple objects of same name/class/model

2007-07-29 Thread housebolt
The easiest way to do this is identifying the email/lastname/firstname by a number, rather than trying to create a new array within the array. i.e. tagErrorMsg('User/firstname1', 'First name is required'); ?> in other words: input('User/lastname'.$i),"\n"; echo $html->tagErrorMsg(User/las

Re: symfony

2007-07-16 Thread housebolt
Look at it this way, Cake keeps its structure simple and completely php-based so you don't have to use the command line if you don't want to, which symfony has you doing all of the time. The only time I use the command line is at the beginning of a project, and that's using the bake.php script. B

Re: Validate $html->radio how to ?

2007-07-15 Thread housebolt
Oops, typo, it's if(!isset($this->data['Bloodbank']['gender'])) { ... Sorry ; ) On Jul 14, 6:10 pm, housebolt <[EMAIL PROTECTED]> wrote: > You'll want to put this tag before your $html->radio tag: > > hidden('Bloodbank/gender',

Re: Security Best Practice

2007-07-15 Thread housebolt
I highly recommend "Essential PHP Security" by Chris Shiflet, published by O'reilly. He talks alot about "filter input/escape output" and gives some good examples. You can read it at http://www.oreilly.com if you get a safari account (in my opinion something essential to all php programmers).

Re: Get the Session Id being generated

2007-07-15 Thread housebolt
I believe you can just use the php function session_id() http://www.php.net/session_id I haven't tested it in cake-created sessions mode, but I believe this will work with that as well. On Jul 14, 8:31 pm, r557 <[EMAIL PROTECTED]> wrote: > after debugging the session object, it outputted the fo

Re: Validate $html->radio how to ?

2007-07-15 Thread housebolt
You'll want to put this tag before your $html->radio tag: hidden('Bloodbank/gender', array('value'=>'')); ?> Gender: radio('Bloodbank/gender',array('Male','Female')) ?> tagErrorMsg('Bloodbank/gender', 'gender is required') ?> The reason for this is that if a radio button is not selected, the va