Re: form issue

2008-03-28 Thread damo
Have gotten a bit further, but now trying to figure out how to pass the variable inserted from my search controller to my results view. Here is my search controller (works a treat except for the search bit ;) function searchcourse() { if (!empty($this->data)) {

Re: We're under attack

2008-03-28 Thread Dr. Tarique Sani
On Fri, Mar 28, 2008 at 11:15 PM, Damon <[EMAIL PROTECTED]> wrote: > > Nothing to see here, move along > Hmmm Alan! You can ignore him for most parts - I have been following him since a long time, it is a pattern ;) Cheers Tarique -- ==

Re: Parsing a cakephp session Data row

2008-03-28 Thread Dardo Sordi Bogado
http://us.php.net/unserialize On Fri, Mar 28, 2008 at 7:26 PM, Nelson Cysneros <[EMAIL PROTECTED]> wrote: > > I'm getting the data column from the session table (DB session option) > and it looks something like this: > > > > Config|a:3:{s:4:"rand";i:6637528;s:4:"time";i:1179... > > How can I

Re: AJAX and auth redirection

2008-03-28 Thread Dardo Sordi Bogado
if isAjax() return in the view: window.location = '/url/to/redirect'; On Fri, Mar 28, 2008 at 7:07 PM, Novice Programmer <[EMAIL PROTECTED]> wrote: > Hello again, > > i am having a comments section on my website. Only registered user can post > comments. I have added Auth to my CommentsControl

Re: Named Params with RSS extension

2008-03-28 Thread Dardo Sordi Bogado
Try : /articles/index/Author:Ernest Hemingway.rss On Fri, Mar 28, 2008 at 2:16 PM, Damon <[EMAIL PROTECTED]> wrote: > > I have an articles section for which I'd like an RSS feed. This > articles section may be filtered by author, category, or both, such > that all of the following may occur:

Re: Access method of another controller

2008-03-28 Thread Dardo Sordi Bogado
> //this is wrong! why? I need admin_user_list() function from > AdminUsersController on this place. > // It's showing me this error every time: "You are seeing this error > because the private class > // method admin_user_list should not be accessed directly" Probably because of the "_". Y

Re: Run query in background while showing "Please wait"

2008-03-28 Thread b logica
I think the disparity is caused by the WHERE IN query will match first name OR last name. So, John Smith and Peggy Brown will both be returned if the import name is John Brown. The fact that the OP's query return all records is because the query is selecting them all. Of course, if there aren't e

Re: dynamic css and/or javascript

2008-03-28 Thread Sliv
my bad - ref was to webroot/js --~--~-~--~~~---~--~~ 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 to [EMAIL PRO

Re: dynamic css and/or javascript

2008-03-28 Thread Sliv
>That page doesn't say anything about the layouts/js dir, though oh rly? includeScript($script) * string $script - File name of script to include. "Includes the named $script. If $script is left blank the helper will include every script in your app/webroot/js directory. Includes the

Re: dynamic css and/or javascript

2008-03-28 Thread b logica
That page doesn't say anything about the layouts/js dir, though. I, too, have been wondering what that (and the CSS dir) is for. On Fri, Mar 28, 2008 at 9:17 AM, Sliv <[EMAIL PROTECTED]> wrote: > > http://book.cakephp.org/view/207/javascript > > > > > > --~--~-~--~~~---

Re: FCK loads iframe w/layout

2008-03-28 Thread b logica
$this->layout = false; On Fri, Mar 28, 2008 at 11:07 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm trying to adjust the famous fck article > > http://wsapi.infospace.com/clickserver/_iceUrlFlag=1?rawURL=http%3A%2F%2Fbakery.cakephp.org%2Farticles%2Fview%2Fusing-fckeditor-with-cakeph

Re: $this->redirect() crashes apache

2008-03-28 Thread b logica
httpd version? PHP version? OS? Does Apache's error log say anything significant? On Fri, Mar 28, 2008 at 5:54 PM, villain189 <[EMAIL PROTECTED]> wrote: > > OK...this shouldn't be this difficult. > > I'm creating my login..everything works fine up to the redirect. I've > stepped through it wit

Re: .po files not being read suddenly

2008-03-28 Thread b logica
On Fri, Mar 28, 2008 at 6:49 PM, Aaron Shafovaloff <[EMAIL PROTECTED]> wrote: > > For some reason my app will read and use for translation: > > locale/eng/eng.po > > but not > > > locale/eng/LC_MESSAGES/default.po > Strange. What version are you running? It's as if i18n.php isn't setting the

Re: Form Helper

2008-03-28 Thread Sliv
datetime works, so you're using 1.2. well the warning message says that the method 'date' does not exist in the formhelper. as shocking as it sounds, the method 'date' does not exist in the form helper: http://api.cakephp.org/1.2/class_form_helper.html --~--~-~--~~~-

Re: Cakephp query have all conditions in join

2008-03-28 Thread AD7six
On Mar 28, 9:54 pm, c3k <[EMAIL PROTECTED]> wrote: > UP "alternatively explain what you mean. " that means show the sql you are talking about ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To

Form Helper

2008-03-28 Thread shabba
I'm trying to use the form helper to display drop down menu date fields. Now if I want to display datetime it works, but when I try and do the same thing for date I get this error: Warning (512): Method FormHelper::date does not exist [CORE/cake/libs/ view/helper.php, line 148] The code from my

Re: Pagination "Group By" Problem

2008-03-28 Thread phpjunk
i think you can find your answer at the following site: http://www.littlehart.net/atthekeyboard/2008/03/04/custom-cakephp-12-pagination-queries/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To p

Named Params with RSS extension

2008-03-28 Thread Damon
I have an articles section for which I'd like an RSS feed. This articles section may be filtered by author, category, or both, such that all of the following may occur: /articles/index/Author:Ernest Hemingway/ /articles/index/Author:Ernest Hemingway/Category:Old Men,Bodies of Water/ /articles/ind

Re: document root in shared hosting

2008-03-28 Thread Галкин Николай
I think yes! Create the file .htaccess in the root directory and write string: RewriteBase /new_root_folder But in your hosting must be enabled module mod_rewrite. Sorry for my English. I am from Russian. > Can I change document root in shared hosting? --~--~-~--~~~--

Re: We're under attack

2008-03-28 Thread Damon
Actually, it looks like he's just barking. Most of his 'complaints' sound like stuff I've heard from C++ developers using Java: "This is too complex", "Why can't I just use a pointer?", etc. Never mind that it enforces good design patterns, or that the inheritance you can use in CakePHP really i

Re: Files folder?

2008-03-28 Thread Галкин Николай
try /pdf/example.pdf or www.example.com/pdf/example.pdf > I am building a website for a client and they have a large amount of > PDF's so I decided I would put them in: app/webroot/files/pdf but when > I navigate to: www.example.com/files/pdf/example.pdf i get: > > Error: FilesController coul

Re: .po files not being read suddenly

2008-03-28 Thread Aaron Shafovaloff
For some reason my app will read and use for translation: locale/eng/eng.po but not locale/eng/LC_MESSAGES/default.po Any ideas? On Mar 26, 8:29 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Solved! When I added the Auth stuff yesterday, I included some > settings in AppController::bef

document root in shared hosting

2008-03-28 Thread Raistlin Majere
Can I change document root in shared hosting? --~--~-~--~~~---~--~~ 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

Parsing a cakephp session Data row

2008-03-28 Thread Nelson Cysneros
I'm getting the data column from the session table (DB session option) and it looks something like this: Config|a:3:{s:4:"rand";i:6637528;s:4:"time";i:1179... How can I parse this to get the session variables I need. I need this for an external application, so I can't use cake methods, but if

AJAX and auth redirection

2008-03-28 Thread Novice Programmer
Hello again, i am having a comments section on my website. Only registered user can post comments. I have added Auth to my CommentsController and provided an ajax element called as ajax_login(asking user name and password to it) which Cake renders if the user is not logged in but still tries to po

$this->redirect() crashes apache

2008-03-28 Thread villain189
OK...this shouldn't be this difficult. I'm creating my login..everything works fine up to the redirect. I've stepped through it with die()'s and it's fine up until the redirect. I've tried redirecting everywhere, including google.com, with no success. Every time it crashes apache..I have to stop

Access method of another controller

2008-03-28 Thread herc
How can I access method of another controller? There is controller: AdminUser->findAll('ORDER BY AdminUser.position'); return $results; } } ?> and second controller is: requestAction('/admin_users/admin_user_list'); some code- } } ?> How can I solve this? --~--~-~--~~--

Re: Test suite 1.2: Is there a report for the Core Test Cases fails?

2008-03-28 Thread Sliv
There's a clean install of 6311 here: http://clean.cakephp.dk/ http://clean.cakephp.dk/app/webroot/test.php I've no idea who owns it or how their server is configured, but you may find some sort of value in comparing your test results to the ones that are there... --~--~-~--~~-

Re: Cakephp query have all conditions in join

2008-03-28 Thread c3k
UP http://groups.google.com/group/cake-php/browse_thread/thread/7ca543c3832c075b/e271da3dad4b2e98 On 5 Mar, 16:18, c3k <[EMAIL PROTECTED]> wrote: > On 5 Mar, 13:32, AD7six <[EMAIL PROTECTED]> wrote: > > > Based on what logic would you like cake to ignore the conditions you > > are explicitly tell

Re: how can i create forms on the fly using ajax without requiring a div container to be previously created?

2008-03-28 Thread Baz
To my knowledge, not from within CakePHP (but this is off the top of my head), because you can only do DOM element updates. You'd have to do some manual Ajax through your JS framework. To catch the ajax response and do an Append to the DOM element instead of a the Replace. Doesn't help much, I'm

how can i create forms on the fly using ajax without requiring a div container to be previously created?

2008-03-28 Thread miuuzn
i've been looking for a way to make a variable number of forms and manage them(add or remove) on the client using 2 buttons i found the way to update div, but it does not fit my requirement... as if i update the whole div i would have to recreate all the forms. And i can't have a div for each fo

Re: Catching MySQL errors

2008-03-28 Thread MattC
I've tried to catch the duplicate entry error a bunch of times, but have never had any luck. I would love to see a solution for this. I realize I can check before trying the save, but if I'm importing some large amount of data it would cause an extra query for every record. As for using IsUniqu

Re: We're under attack

2008-03-28 Thread Sliv
The web site design really screams "I know what I'm doing, trust me." I am especially fond of the custom banner graphic - really it should be featured on deviantART. By the way, I wrote this post using PEAR. --~--~-~--~~~---~--~~ You received this message because y

Re: Catching MySQL errors

2008-03-28 Thread Greg Baker
Thanks Jon, the unique field is actually a pairwise uniqueness. So I believe I do need a custom method. I just did a $this->findCount() in my model with the fields that need to be unique. Works well. On Mar 28, 2:36 pm, jonknee <[EMAIL PROTECTED]> wrote: > > Dardo beat me to it...I was going t

Re: Unit Testing of cakephp 1.1 (not cakephp 1.2)

2008-03-28 Thread Sonic Baker
There is a test suite in cakeforge for 1.1. IIRC there are instructions for installing it there. I've only used it to test models and there are no fixtures. I use Selenium then to test my controllers indirectly through the UI. Let me know if you need more help. Might not be able to reply till Monda

Re: Advice about a Calendar

2008-03-28 Thread Sonic Baker
If it's an actual 'date picker' popup calendar for easily selecting dates you're looking for then here's the one I use: http://marcgrabanski.com/code/ui-datepicker/ If it's an actual server side calendar application then I don't know. I'd be interested to see one though. The one Chris suggested lo

Re: We're under attack

2008-03-28 Thread John David Anderson (_psychic_)
On Mar 28, 2008, at 10:51 AM, Stephen Orr wrote: > > 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 l

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: Adding meta description tags on a view page

2008-03-28 Thread Rusty
Oh no! I feel so dumb. I use two computers... my laptop where I do most of my work, and then a desktop... So I did the upgrade to version 1.2 with my laptop, and noticed that extensions were changed to .ctp This is where I was doing the changes, but on my desktop I didn't have the .ctp files

Re: Catching MySQL errors

2008-03-28 Thread jonknee
> Dardo beat me to it...I was going to suggest the same thing:  a custom > validation method to make sure you have a unique "slot name" No need to make it custom, it's built into 1.2 Model::isUnique() and can be accessed as a validation rule: 'rule' => 'isUnique' It works great, I'm using it fo

Re: Catching MySQL errors

2008-03-28 Thread Greg Baker
yah, okay.. I just figured that since I _could_ do it in the database schema, I _should_ do it there. I'll make a custom method. thanks On Mar 28, 2:12 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Fri, Mar 28, 2008 at 12:09 PM, Dardo Sordi Bogado > > <[EMAIL PROTECTED]> wrote: > > > Wo

Re: Adding meta description tags on a view page

2008-03-28 Thread Rusty
Thank you both for your posts... I tried both suggestions, went through what you had posted on your blog as well Guillaume, but still having the same results. I have the echo $scripts_for_layout in the heading, and using the $html->meta() in my view doesn't put anything in there... I also tried

Re: Catching MySQL errors

2008-03-28 Thread Chris Hartjes
On Fri, Mar 28, 2008 at 12:09 PM, Dardo Sordi Bogado <[EMAIL PROTECTED]> wrote: > > Wouldn't be better to validate the uniqueness before saving the data? > Dardo beat me to it...I was going to suggest the same thing: a custom validation method to make sure you have a unique "slot name" -- Chr

Re: Catching MySQL errors

2008-03-28 Thread Dardo Sordi Bogado
Wouldn't be better to validate the uniqueness before saving the data? On Fri, Mar 28, 2008 at 12:58 PM, Greg Baker <[EMAIL PROTECTED]> wrote: > > How can I capture a MySQL error like the following: > > Warning (512): SQL Error: 1062: Duplicate entry > 'TestSlot-47e9547d-6570-4e3e-9834-16b88699

Catching MySQL errors

2008-03-28 Thread Greg Baker
How can I capture a MySQL error like the following: Warning (512): SQL Error: 1062: Duplicate entry 'TestSlot-47e9547d-6570-4e3e-9834-16b88699522c' for key 2 [CORE/cake/ libs/model/datasources/dbo_source.php, line 459] Basically I have a unique key set across two fields in a table so that if I a

Re: Files folder?

2008-03-28 Thread Sliv
files is a special folder that should work for direct links to files within it, without needing to modify routes/rewrite from a default install, but you will get a filescontroller error for a bad link --~--~-~--~~~---~--~~ You received this message because you are

Re: CakePHP Auth Component and Authorization

2008-03-28 Thread Zoltan
That's essentially what I'm doing on two web apps. I've got 3 levels (guest,user,admin) and it seems to work fine for me. Zoltan www.nachogrid.ca - Toronto Nachos On Mar 27, 9:47 pm, Grzesiek <[EMAIL PROTECTED]> wrote: > Hello, > > I`m building simple web app with users, profiles and so on. > >

Re: Files folder?

2008-03-28 Thread Sam Sherlock
RewriteEngine on RewriteRule (_taste|files|phpmyadmin)/(.*) - [L] RewriteRule^$webroot/[L] RewriteRule(.*) webroot/$1[L] On 28/03/2008, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > > On Fri, Mar 28, 2008 at 10:49 AM, Kyle Decot <[EMAIL PROTECTED]> wrote

FCK loads iframe w/layout

2008-03-28 Thread [EMAIL PROTECTED]
I'm trying to adjust the famous fck article http://wsapi.infospace.com/clickserver/_iceUrlFlag=1?rawURL=http%3A%2F%2Fbakery.cakephp.org%2Farticles%2Fview%2Fusing-fckeditor-with-cakephp&0=&1=0&4=207.97.206.18&5=72.54.164.58&9=6edf9510a9c84d6990bdc556a190c801&10=1&11=pch.blingo&13=search&14=867530&

Re: Files folder?

2008-03-28 Thread Chris Hartjes
On Fri, Mar 28, 2008 at 10:49 AM, Kyle Decot <[EMAIL PROTECTED]> wrote: > > I am building a website for a client and they have a large amount of > PDF's so I decided I would put them in: app/webroot/files/pdf but when > I navigate to: www.example.com/files/pdf/example.pdf i get: > > Error: Fil

Re: Files folder?

2008-03-28 Thread Sliv
double check the url is accurate - you'll get this error if the target is unreachable/doesn't exist - if the file is there and the url is accurate it should work. try with a simple test.txt file in the root of files On Mar 28, 10:49 am, Kyle Decot <[EMAIL PROTECTED]> wrote: > I am building a web

Re: Test suite 1.2: Is there a report for the Core Test Cases fails?

2008-03-28 Thread Sliv
I also googled "testFieldDoubleEscaping cakephp" this morning as it was something failing I wanted to investigate, which brought me to changeset 6476 https://trac.cakephp.org/changeset/6476/branches/1.2.x.x --~--~-~--~~~---~--~~ You received this message because yo

Re: Test suite 1.2: Is there a report for the Core Test Cases fails?

2008-03-28 Thread Sliv
I'm not personally aware of an official report of 1.2.6311 expected test case results, but one thing I have done is do a search of the changesets on trac for the strings "failing" and "tests" as it tends to reveal important information related to changes made by the core devs with regards to the t

Files folder?

2008-03-28 Thread Kyle Decot
I am building a website for a client and they have a large amount of PDF's so I decided I would put them in: app/webroot/files/pdf but when I navigate to: www.example.com/files/pdf/example.pdf i get: Error: FilesController could not be found. How can I make it allow me access to this folder. Or

Re: looking for a hosting company

2008-03-28 Thread SeanW
I once had a Godaddy VPS, it started off pretty well but eventually the disk latency became absurd. I presented some tests showing 2 *seconds* for a single disk access in a ticket and was told that's within their tolerances. I canceled the VPS after that. Sean On Mar 28, 6:51 am, phpjoy <[EMAI

Re: is it possible to insert a variable number of records using the same view?

2008-03-28 Thread Chris Hartjes
On Fri, Mar 28, 2008 at 12:31 AM, miuuzn <[EMAIL PROTECTED]> wrote: > > i wanna know if its possible with ajax + cakephp to make like subforms > that can be created on the fly > at page load it should have only one address form by default > then if the user clicks on a button(link or whatever)

Re: CakePHP Auth Component and Authorization

2008-03-28 Thread Sliv
Browse the acl/auth stuff here as a starting point, look at acl behavior as well: http://groups.google.com/group/cake-php/web/frequent-discussions --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To

Re: dynamic css and/or javascript

2008-03-28 Thread Sliv
http://book.cakephp.org/view/207/javascript --~--~-~--~~~---~--~~ 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

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

2008-03-28 Thread Chris Hartjes
On Fri, Mar 28, 2008 at 4:07 AM, Raistlin Majere <[EMAIL PROTECTED]> wrote: > > If my site is at http://www.toreadandtowrite.com/CakePHP/toreadandtowrite > and I can not change the document root, do I have to edit the paths in > app/webroot/index.php? If so, how do I properly edit the paths? h

Re: Auth Component and Authorization

2008-03-28 Thread Chris Hartjes
On Thu, Mar 27, 2008 at 9:42 PM, Grzesiek <[EMAIL PROTECTED]> wrote: > My question is: is this correct approach? Maybe I should authorize > against model? If yes - how would you do it ? Nothing wrong with your code -- you're correctly saying "if the authorized user's id matches the id we want t

Re: ACO::setParent adds an empty record

2008-03-28 Thread Marcel
I got it working like this, but isn't there an easier way using setParent? In the menu_controller that handles the reparent action: //get aco of the node to move (thisAco) and the new parent (otherAco) //The 0 says we do not want to get the aros (if any) $thisAco = $this->Menu->Aco->find(array(

How to set ARO Aliases when using the shell

2008-03-28 Thread nanoman
Hello, I'm trying to create some aros via the AclShell shell. It works fine, but i just don't get how I'm supposed to define an alias. i.e. I'm using cake acl create aro Group.1 User.1. I want the newly created node to have an alias. I don't really understand the explanation in the help for this

Re: looking for a hosting company

2008-03-28 Thread phpjoy
any experience with godaddy anyone? i had some, wonder what was yours. On Mar 26, 3:53 pm, Zoltan <[EMAIL PROTECTED]> wrote: > Just wondering if anyone has a hosting company they'd recommend. > I've personally hosted a few sites on DreamHost, speed is ok, but > getting Cake sites up and running i

ACO::setParent adds an empty record

2008-03-28 Thread Marcel
Helllo! I can't get setParent on an aco to work using the console: Menu: id | title 1 | websites 2 |mysite.nl 3 | admin 5 | news 4 | www Aco: id | parent_id | model | foreign_key 17 | null | Menu | 2 18 | 17 | Menu | 3 19 | 17 | Menu |

Re: translate behavoiur + not fetching translations on recursive fields

2008-03-28 Thread cakeFreak
Anyone about this issue? Dan --~--~-~--~~~---~--~~ 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 to [EMAIL PROTE

dynamic css and/or javascript

2008-03-28 Thread dishwasher
Hi, is it possible to create CSS or Javasciprt dynamically? And if, how to do it in Cake the smartest way? in app/views/layouts/ I find a folder named "js" but I can't find any explanation how to use ist... --~--~-~--~~~---~--~~ You received this message becaus

Re: emailComponent question

2008-03-28 Thread gbk *
hi, i have the same problem, i don't understand why the path contains 2 views. (app/views/views/elements/email/html/forgottenpassword.ctp) any idea? On márc. 12, 15:34, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote: > Ouch, my bad... I made a slight mistake.. The templates should be > there,

Re: 1.2 validation - may be blank, but if filled in must be a decimal

2008-03-28 Thread Tim W
Ah that's even better, thank you grrigri, you've made my life a little easier :-) Tim On Mar 28, 10:40 pm, grigri <[EMAIL PROTECTED]> wrote: > All validation entries have an `allowEmpty` parameter that says > whether the field must be filled in or not. An empty field will *not* > go through the

Re: 1.2 validation - may be blank, but if filled in must be a decimal

2008-03-28 Thread grigri
All validation entries have an `allowEmpty` parameter that says whether the field must be filled in or not. An empty field will *not* go through the validation rule itself and will be validated or failed depending on the `allowEmpty` parameter (not to be confused with the `required` parameter, whi

Dynamic Menu With ACL.

2008-03-28 Thread LepinskiWA
(If you reading this and thinking. OMG! He doesn't speak english... Yes, you are right. Sorry about bad english) I'm trying to make a dynamic admin menu like Worpress menu. If a User don't have access to an specific section, the link to this section doesn't *NOT* have to be showed. Figuring out

Re: routes.php is not working as expected

2008-03-28 Thread Nicolás Dujovne
I hope its not too late to answer your question. I had the same problem and i fix it with the guideline on this page about mod_rewrite: http://manual.cakephp.org/appendix/blog_tutorial (Look for the "A Note On mod_rewrite" title). Hope it helps On Mar 9, 9:20 pm, DierRe <[EMAIL PROTECTED]> w

CakePHP Auth Component and Authorization

2008-03-28 Thread Grzesiek
Hello, I`m building simple web app with users, profiles and so on. I`m using Auth Component for user authentication. I ran into a problem - how to prevent logged user from i.e. editing another user profile? It turns out that Auth Component is capable of simple authorization without the need fo

Auth Component and Authorization

2008-03-28 Thread Grzesiek
Hello, I`m building simple web app with users, profiles and so on. I`m using Auth Component for user authentication. I ran into a problem - how to prevent logged user from i.e. editing another user profile? It turns out that Auth Component is capable of simple authorization without the need fo

Re: Cakephp 1.2 on PHP 4.3.10/Apache/2.0.49 (Fedora)

2008-03-28 Thread AL
I still have the same error with index.php/pages/home Fatal error: Maximum execution time of 60 seconds exceeded in /var/www/ html/staging_web/cake/libs/view/view.php on line 634 Fatal error: Call to a member function on a non-object in /var/www/ html/staging_web/cake/libs/cache.php on line 208

is it possible to insert a variable number of records using the same view?

2008-03-28 Thread miuuzn
i know the topic isn't quite explanatory so... here's the deal: i need to store a client data and he can have many addresses a variable number... so i have a table called clients and another called addresses i wanna know if its possible with ajax + cakephp to make like subforms that can be creat

Re: Adding meta description tags on a view page

2008-03-28 Thread Rusty
Sorry really new, and looking for an easy way to do it. I don't have a controller set up at all, and after some research, it looks like that is how I am going to have to do it to get it to work. Please forgive me... I looked and looked, and just came across a possible solution... of course after

Re: Adding meta description tags on a view page

2008-03-28 Thread Guillaume
Hello Rusty, >From the code at the end of the $html->meta helper method, I guess that it uses the $scripts_for_layout var you have to echo between the head tags. You can read a bit about it on my blog. Guillaume CakePHP blog: http://cherryonthe.popnews.com/ On 28 mar, 02:08, Rusty <[EMAIL PR

Re: 1.2 custom validation methods for multiple fields

2008-03-28 Thread Tim W
I've worked this one out myself - and it was pretty obvious: use a beforeValidate method. I've included one below in case anyone else searches and needs the answer /** * Returns true if all is ok, false if something failed validation */ function beforeValidate() { echo '';

Re: Adding meta description tags on a view page

2008-03-28 Thread djiize
in the head section of your layout, add this line: it will be replaced by all $html->meta(), $meta->css() and $javascript- >link() with inline to false On 28 mar, 02:08, Rusty <[EMAIL PROTECTED]> wrote: > Hi, > > I'm not sure if I am doing something wrong, but I am trying to add a > meta tag on

1.2 custom validation methods for multiple fields

2008-03-28 Thread Tim W
Hi all, Say I have a check box and a text field on a form. If the check box is checked the form has to have a number in it. If the check box isn't checked then it must be empty. Does anyone know how to do this validation in 1.2? I could write a custom validation method but I can't work out how to

Re: 1.2 validation - may be blank, but if filled in must be a decimal

2008-03-28 Thread Tim W
In case anyone else wants to know how i've done it, it's as simple as this Model var $validate = array( 'fieldName' => array('integer_optional' => array('rule' => array('optionalInteger', 'fieldName'))) ); // NB: integer_optional is the key to look up the error message function optionalIntege

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

2008-03-28 Thread Raistlin Majere
If my site is at http://www.toreadandtowrite.com/CakePHP/toreadandtowrite and I can not change the document root, do I have to edit the paths in app/webroot/index.php? If so, how do I properly edit the paths? On Mar 27, 4:29 pm, Stephen Orr <[EMAIL PROTECTED]> wrote: > I know this might seem illo

1.2 validation - may be blank, but if filled in must be a decimal

2008-03-28 Thread Tim W
Hi all, I have some data that's optional, but if it's filled in it must be a decimal. Is there an easy way to do this with 1.2 validation? My current though is that I might create a custom validation rule, and from their if the field isn't blank then send it through to the built in validation cod