Re: Manipulating the right hand side of the conditions array in find/findAll queries

2007-02-21 Thread AD7six
On Feb 21, 8:54 am, ianh [EMAIL PROTECTED] wrote: Hi all, I'm working on an app to allow people to book courses online. I want users to be able to select courses by the day on which they are held. I have a start date (in datetime format) and have been trying to create a conditions array a

Re: Manipulating the right hand side of the conditions array in find/findAll queries

2007-02-21 Thread ianh
Worked a treat - thanks so much. Ian On 21 Feb, 00:04, AD7six [EMAIL PROTECTED] wrote: On Feb 21, 8:54 am, ianh [EMAIL PROTECTED] wrote: Hi all, I'm working on an app to allow people to book courses online. I want users to be able to select courses by the day on which they are held.

invalidate for certain actions within beforevalidate()

2007-02-21 Thread MaxPower
Hello all, I'm trying to set up validation to check for existing values within the beforeValidate() function. What I'm aiming for is to do a check to make sure the username email isn't already taken when the user is signing up. But when the user is editing their info I don't want an error thrown

Re: invalidate for certain actions within beforevalidate()

2007-02-21 Thread Dr. Tarique Sani
On 2/21/07, MaxPower [EMAIL PROTECTED] wrote: if ($this-params['action'] == 'add') { // do the above code } else if ($this-params['action'] == 'edit') { // check to see if username/email in $this-data is the same as the existing records for the given $id } Try checking if the

Re: $helpers doesn't work for java script function in layouts files but it work on views index files.

2007-02-21 Thread mindcharger
Isn't there any way to purge the groups posts? There would be cool to have some kind of moderation that eliminated duplicate questions and posts in other languages than English... I know that moderating is a time consuming task, but there are ways to distribute the load (a moderator for every

Re: Include Js file in layouts

2007-02-21 Thread CraZyLeGs
The head helper isn't part of the core. it was written by rossoft and it's available in his blog On Feb 20, 9:33 am, GreyCells [EMAIL PROTECTED] wrote: If you're using 1.2, then take a look here: http://cake.insertdesignhere.com/posts/view/17 The HeadHelper functionality is implemented in

Re: CakePHP and LiveGrid (Rico)

2007-02-21 Thread CraZyLeGs
http://en.wikipedia.org/wiki/Scaffolding On Feb 20, 3:44 pm, anselm [EMAIL PROTECTED] wrote: Would be nice from the doc team should to clarify if scaffold is or not OK for production... That's not really up to them to tell you -- because this is a process problem, not a technical problem.

Re: CakePHP and LiveGrid (Rico)

2007-02-21 Thread jitka
http://www.cakepeople.com/ --~--~-~--~~~---~--~~ 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

Re: invalidate help

2007-02-21 Thread Grzegorz Pawlik
where do You call this function? Is it in some of your controllers method or callback? On Feb 21, 2:44 am, josesquared [EMAIL PROTECTED] wrote: I am using the invalidate function in the controller and it is not triggering the tagErrorMsg. I also tested and it doesn't seem to block the save

seaching various feilds

2007-02-21 Thread mike
Hi, I have implimented a search using the code below which works well, but it only searches one field. What I'd like is a drop down box in the view to select the feild to be searched (name, address, postcode, etc). However i'm not sure how to reflect this in the controller code. I wonder if

Re: View Caching of Home Page

2007-02-21 Thread PaulV
On Feb 21, 1:49 am, lloydhome [EMAIL PROTECTED] wrote: The easiest solution off the top of my head is to use mod_rewrite to force ^$ and ^/$ to go to your custom controller/action RewriteRule ^$ index.php?url=/mycontroller/myaction [QSA,L] RewriteRule ^/$

Re: Associations cross databases

2007-02-21 Thread safl
Grant Cox's reply solved my issue. Having a db config setup with persistent = false is REQUIRED for it to work (as nate states) but it is not sufficient. Login/pass needs to be different (at least with MySQL DBMS) for each dbconfig as Grant Cox states. Then associations across databases works.

created and modified fields with SQL Server 2000

2007-02-21 Thread fire
Hi all! In reply to an old thread that I found (couldn´t answer there, just send it to the author?). I think this could help others running CakePHP against SQL Server 2000: I know that this thread is quite old, but I just had the same problem on Windows Server 2003 and SQL Server 2000. Create

Specifying plugin in a route?

2007-02-21 Thread joelmoss
I have a plugin setup in 1.2, yet it seems that routes don't seem to recognise them. Router::connect('/switchboard/blog/1', array('plugin' = 'switchboard', 'controller' = 'blog', 'action' = 'read')); The above code tries to access the blog_controller within the app's controllers and not within

Re: launched a small cake site...weird problem

2007-02-21 Thread :uic
Hi...im having the same problem..and i found this is only happening when the conten i try to load in $contentforlayout is smaller than the content in the layout.. i have a sidebar in the layout and when i load a content shorter than this sidebar, the problem appears..i duplicate the content and

Mail function

2007-02-21 Thread [EMAIL PROTECTED]
In my project after registration completed i want to send a mail to that user and admin.Give me an examples --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: Mail function

2007-02-21 Thread AD7six
On Feb 21, 2:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: In my project after registration completed i want to send a mail to that user and admin.Give me an examples At the very least, you are missing the magic word. http://www.google.com/search?q=cakephp+send+email

Re: habtm does not work with find when I specify fields

2007-02-21 Thread AD7six
On Feb 20, 7:01 pm, codecowboy [EMAIL PROTECTED] wrote: Thank you. Can you elaborate a little on that last paragraph? Are you talking about adding code to the CollegeDepartment model? Hi Codecowboy, Although not mentioned in the manual you can define the fields for an association (at

Re: Rendering views of another ojbect with AJAX

2007-02-21 Thread jamieh
Hi again [EMAIL PROTECTED], Eventually managed to get back onto this. I am a little lost now as I don't understand why i would need to use: $uses = array(Users, Projects); My biggest problem is the understanding of AJAX and how models work together within AJAX operations! Would the best

RE: seaching various feilds

2007-02-21 Thread Mariano Iglesias
First set the options in the controller as to the available fields the search can use (you can do so on your AppController::beforeRender() method if the search form is displayed directly on the layout): $fields = array ( 'surname' = 'Surname', 'name' = 'Name' );

Re: Twisting a little bit afterSave() use...

2007-02-21 Thread mindcharger
Hello! Many thanks to Mariano and Wood for your inputs. You know, I'm having a little trouble making the function afterSave() { if (!isset($this-data[$this-name]['id']) || empty($this-data[$this-name]['id'])) { // We just created the record } }

Re: Bake fatal error

2007-02-21 Thread knuwe1
Hi, I tried to use cake_1.2.0.4451alpha from nigthlybuild ... but unfortunately I always get this Fatal error: Class 'Model' not found in ... bake.php line 437. The name of the Model should be ok ... Sportler? About the lines that Toby mentioned to uncomment: Which lines are affected? Thanks a

Re: seaching various feilds

2007-02-21 Thread mike
That's great works a treat thanks. I thing..could you tell me the advantage of putting it the AppController::beforeRender() method rather than just in the controller. Thanks again. On Feb 21, 2:31 pm, Mariano Iglesias [EMAIL PROTECTED] wrote: First set the options in the controller as to the

Re: launched a small cake site...weird problem

2007-02-21 Thread [EMAIL PROTECTED]
Hey walker, I tried your site in IE6.0, IE7.0 and FireFox2, all running on WinXP SP2. In each case everything worked fine. Must be a Mac/IE thing... cook On Feb 7, 12:29 pm, Walker Hamilton [EMAIL PROTECTED] wrote: Lance, Thank you thank you thank you. I was only able to use one system

hasMany/belongsTo

2007-02-21 Thread Kathrin
Hello, ich have Problems to save data in a hasMany/belonsto Users_ProfilesTable. Sie Array is OK. My source: View User: ?php // echo $html-hidden('User/user_id', array('value' = $post['User']['id']));? post to User/Controller save the data and post user_id to Profile/ controller View/Profile

CakePHP configuration on WAMP - directory path settings?

2007-02-21 Thread spheroid2007
I successfully set up Cake on my LAMP hosting to have multiple applications on one hosting account (http://bakery.cakephp.org/ articles/view/141). Now, I'm not sure the settings on my WAMP (local computer) for the directory of the application. On my local system, I've set up cake in the

Sorting on Related Field with Sub-Query - Is There A Better Way?

2007-02-21 Thread NOSLOW
I was able to sort my related data on field that was another level deep in the relationship, but I'm not sure if it's the Cake way since it required me to write a very specific SQL fragment (subquery) . Let me try to explain with a simple example: Let's say I have a dynamically generated

Re: Twisting a little bit afterSave() use...

2007-02-21 Thread mindcharger
Hello again!! I think I've found a way to solve my problem... I do the table creation before saving (using beforeSave() as opposed to afterSaave()) and use the $this-exists() method to check wheter or not my Model instance already exists... I think it's pretty straightforward...but I might

Re: Bake fatal error

2007-02-21 Thread Steve W
I had the same problem using bake.php from 1.1.x.x/SVN. I discovered that Model.php wasn't being included and I added the following at line 131: require_once (CORE_PATH.'cake'.DS.'libs'.DS.'model'.DS.'model.php'); On 21 Feb, 17:06, Michael Gartner [EMAIL PROTECTED] wrote: I have the latest

Re: invalidate help

2007-02-21 Thread josesquared
It is inside a method. On Feb 21, 1:51 am, Grzegorz Pawlik [EMAIL PROTECTED] wrote: where do You call this function? Is it in some of your controllers method or callback? On Feb 21, 2:44 am, josesquared [EMAIL PROTECTED] wrote: I am using theinvalidatefunction in the controller and it is

pagination issue in 1.2

2007-02-21 Thread isk
I have this code in the AgentsController var $paginate = array('limit' = 2, 'page' = 1); ... function index() { .. $this-set('table', $this-paginate('Agent')); .. } and this in the view: ?= $paginator-prev(' Previous', null, null, array('class' = 'nav- dis')) ? |?= $paginator-next('Next ',

Re: [C] Problem with custom validation

2007-02-21 Thread abba bryant
If you are using the validator class from CheeseCake or others ( I assume here - not sure if it Tariq's or someone else's and he is simply using it. ) the correct method is to use echo $validator-tagErrorMsg( 'Project/start_date' ); I am NOT sure if this is the codebase you are working with

Re: Bake fatal error

2007-02-21 Thread Michael Gartner
I have the latest nightly build and I also get this error when baking a model. My error reads: Fatal error: Class 'Model' not found in C:\Program Files\xampp\cake \cake\scripts\bake.php on line 437 and when I try and bake a controller named Student: Fatal error: Class 'Student' not found in

othAuth, what next

2007-02-21 Thread peter stranney
Hi there, I have implemented othAuth and all is working fine. When I log in it attemps to go to admin/index. After writing an admin_controller stub it now complains about 'No Database table for model Admin (expected admins)' I am a newbie to cakPHP and I have looked though the manual. Could

RE: seaching various feilds

2007-02-21 Thread Mariano Iglesias
If the form was available throughout your site (like setting it in the layout or through an element) then that variable was needed on beforeRender(). But if you are only showing the form on the search view, then there's no need for that. -MI

Re: using models in elements

2007-02-21 Thread nate
Woodsman, The helper grabs the metadata of the model behind-the-scenes. This does not involve access or manipulation of the model data itself, it simply introspects static data about the model. Subtle difference. On Feb 21, 3:05 pm, the_woodsman [EMAIL PROTECTED] wrote: Ad7six, Thans for

Re: habtm does not work with find when I specify fields

2007-02-21 Thread AD7six
On Feb 21, 7:44 pm, codecowboy [EMAIL PROTECTED] wrote: 1) By defining it in the association directly ?php class CollegeDepartmentextends AppModel { var $name = 'CollegeDepartment'; var $hasAndBelongsToMany = array('Organization' = array(

Re: habtm does not work with find when I specify fields

2007-02-21 Thread codecowboy
1) By defining it in the association directly ?php class CollegeDepartmentextends AppModel { var $name = 'CollegeDepartment'; var $hasAndBelongsToMany = array('Organization' = array( 'fields' = array('user_id','name')

Re: Old release downloads and subversion history...

2007-02-21 Thread TheIdeaMan
Ah. Thanks, Grant. I suppose I should have realized that I could use the revision numbers from the back of the release numbers. I had been looking for taged copies, but revision numbers should work just fine. I'll give the upgrade another try. To date it hasn't been as easy as hoped or promised,

Configure Object as global variable storage

2007-02-21 Thread jyrgen
hi there, i've utilized the Configure class in cake to store some app wide settings, which are accessed in views as well as controllers. now i would like to avoid initialising them as follows: $this-set('rechte_values',Configure::read('rechte_values'));

Re: using models in elements

2007-02-21 Thread AD7six
On Feb 21, 9:05 pm, the_woodsman [EMAIL PROTECTED] wrote: Ad7six, Thans for your input, but to be honest i'm still confused! To quote from that link you posted: In Cake 1.2, we're transitioning to an approach to form building that is more directly model-oriented, and according to the

Populate select field from a db?

2007-02-21 Thread MickeU
Hi there, my first post here, and also new to cakephp, so bear with me. In my app that i´m trying to build i´m using two separate tables for populating two select fields in a register form. Is there a simple way using form helpers to accomplish this?

Re: 1.2: Can I use new validation class in a component?

2007-02-21 Thread nate
For the most part, the methods of the Validation class can be accessed statically, i.e. to validate a date, you can just do Validation::date($date). There's also an optional $format parameter which defaults to 'ymd'. On Feb 21, 2:09 pm, Cynthia [EMAIL PROTECTED] wrote: I'm writing a component

pagination component / question / typo

2007-02-21 Thread jyrgen
i installed this pagination component: http://bakery.cakephp.org/articles/view/65 which does a fine job, but i'm not getting further with query constraints that i would like to maintain across pages. i have selectbox with different time intervals constraining the data amount being pulled from

Looking for DB2, Cloudscape, Derby alpha testers

2007-02-21 Thread Daniel Krook
DB2, Cloudscape, Derby developers: The first version of the DB2 driver built on the ibm_db2 extension (db2_* functions) has been committed to the 1.2 branch: https://trac.cakephp.org/changeset/4519 https://svn.cakephp.org/repo/branches/1.2.x.x/ Please try it out and submit your bug reports to

Re: pagination issue in 1.2

2007-02-21 Thread isk
thanks Preloader, I saw your trick in the groups - but it does not work for me (I use 1.2.0.4451alpha), parameters stay repeated even I do unset($this- params['pass']['page']) in the view before all paginator calls. when I add filtering parameters by array('url' = $this- params['pass']) my

Re: othAuth, what next

2007-02-21 Thread Jon Bennett
Hi there, I have implemented othAuth and all is working fine. When I log in it attemps to go to admin/index. After writing an admin_controller stub it now complains about 'No Database table for model Admin (expected admins)' I am a newbie to cakPHP and I have looked though the manual. Could

Re: Populate select field from a db?

2007-02-21 Thread Cynthia
If those tables and your models are properly related you can do something like this: $one = $this-Whatever-Oneofyourtable-generateList(); $two = $this-Whatever-Othertable-generateList(); $this-set(compact('one', 'two')); On Feb 21, 4:38 pm, MickeU [EMAIL PROTECTED] wrote: Hi there, my first

Re: 1.2: Can I use new validation class in a component?

2007-02-21 Thread Cynthia
Hi Nate :-) After just having learned about using the Inflector statically I hoped that this would do the trick ... but when I call Validation from my component this way I get: Fatal error: Call to undefined function: __reset() :( On Feb 21, 3:43 pm, nate [EMAIL PROTECTED] wrote: For the

Re: Installing a CakePHP application on an existing site

2007-02-21 Thread Wey
Hi, I'm actually trying to do exactly this. I don't know .htaccess that well, so I how would I configure it to serve up directories and files if they exist? TIA On 15 Feb, 21:39, Dat Chu [EMAIL PROTECTED] wrote: In .htaccess, you can specify that if the URL is a correct file/ directory path,

Re: pagination issue in 1.2

2007-02-21 Thread Cynthia
Try it with: var $paginate = array( 'limit' = 2); I don't set any page value and it works *great* for me :) On Feb 21, 3:34 pm, isk [EMAIL PROTECTED] wrote: thanks Preloader, I saw your trick in the groups - but it does not work for me (I use 1.2.0.4451alpha), parameters stay repeated even

setting directories...

2007-02-21 Thread [EMAIL PROTECTED]
I'm new to cakephp and very confused about setting directories... I want to create a development directory and place the app and cake folders inside of it. I created a database called contactos and a table called bookmarks..I created the bookmark.php inside dev/app/models/ and the

RE: Configure Object as global variable storage

2007-02-21 Thread Mariano Iglesias
Set the names of your config vars in the form of: App.variable So instead you would have: $this-set('rechte_values',Configure::read('App.rechte_values')); $this-set('texttyp_values',Configure::read('App.texttyp_values')); $this-set('ressort_values',Configure::read('App.ressort_values'));

file upload

2007-02-21 Thread bingo
Hi, I want to allow users to upload files on to the server...however, I got all the code..but have some problem in providing a link to the user.. my configuration is as follows mysite -- app -- cake -- file //in this folder I will keep all the uploaded files however, if I create a

RE: setting directories...

2007-02-21 Thread Mariano Iglesias
If you do: http://www.jhinestrosa.com/dev you don't get anything, but if you do: http://www.jhinestrosa.com/dev/ You do, there's an issue on your server. Regarding the model error, that's because you may be setting User as a model in your controller but don't have the table created yet. Can

Re: Custom Validate

2007-02-21 Thread Seb
Hey, You might want to give this article from the bakery a look; http://bakery.cakephp.org/articles/view/55 I've been using it and extending it for months now and it works like a charm! Hope this helps! Seb. Grant Cox wrote: I haven't really looked at the new Validation options, but the

Re: pagination component / question / typo

2007-02-21 Thread Seb
Hey there, For I have use that same pagination helper, I'm almost sure there is no way to add more param/value pairs to the generated Url. However I extended it to add a 'filterBy' and it ended up being fairly simple (minimal coding). I haven't had the time to have a good look at the new

RE: file upload

2007-02-21 Thread Mariano Iglesias
Put file inside your webroot folder instead. Still link it as /file/demo.pdf, but file folder should be inside webroot. This is why: your /.htaccess file reads: IfModule mod_rewrite.c RewriteEngine on RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] /IfModule

Re: file upload

2007-02-21 Thread bingo
Hi thanks to all your reply..I got file upload working..however there is one problem.. Now anyone can see the directory structure and all the files.. I am not sure how to manipulate htaccess so users can only use the link provided by the application and do not have access to other files

Re: file upload

2007-02-21 Thread Jon Bennett
is there a way to avoid cakephp taking control over file the folder why not follow Cake's conventions and save the files in: mysite/app/webroot/files which will be publically accessible via: www.mysite.com/files/filename.ext hth jon -- jon bennett t: +44 (0) 1225 341 039 w:

Re: file upload

2007-02-21 Thread bingo
Hi, I think i found solution to my problem.. I created a .htaccess file and placed it inside files folder with the following line #prevent directory listing IndexIgnore * and now it doesn't allow browsing...great Regards, Ritesh On Feb 21, 8:31 pm, bingo [EMAIL PROTECTED] wrote: Hi thanks

Re: Custom Validate

2007-02-21 Thread Grant Cox
I haven't really looked at the new Validation options, but the traditional way is to do this in your model beforeValidate callback. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this

Re: file upload

2007-02-21 Thread lloydhome
You need to put it under the webroot mysite -- app - webroot file HTH, David Lloyd -- lloydhome consulting, inc http://lloydhome.com On Feb 21, 6:58 pm, bingo [EMAIL PROTECTED] wrote: Hi, I want to allow users to upload files on to the server...however, I got all the

RE: file upload

2007-02-21 Thread Rhett Waldock
Hi Ritesh, Try placing: Options -Indexes In your .htaccess file. That should disable directory listings. Rhett -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bingo Sent: Wednesday, February 21, 2007 7:41 PM To: Cake PHP Subject: Re: file

Re: hasMany/belongsTo

2007-02-21 Thread Seb
Uuummm, I must say I don't really understand what your problem precisely is, however I can spot a few mistakes in the code you provided; * using the HtmlHelper the tagName param should be User/id, not User/ user_id (that's if you're using the cake naming conventions) * also if your relations

Re: pagination component / question / typo

2007-02-21 Thread jyrgen
Hello, thanks for your answer ! i found that AD7six, Andy Dawson created that component, so let's hope he looks over this thread... hehe Well, i *bet* there is a way of extending the helper methods _generateUrl / _generateLink but i need some idea to get started. in the meantime, yes, post

Re: pagination component / question / typo

2007-02-21 Thread jyrgen
i found that any pre-existing GET parameters are automatically sorted out and re-appended during the pagelink generation. that's really nice, because you just have to pass an initial extra parameter like this: http://localhost/cake/index.php/articles/index?myparam=1 the next button link will

Extracting Anchor string from URL

2007-02-21 Thread aranworld
I am familiar with CakePHP's $params array which can give me the GET values from a URL. However, does CakePHP keep track of the anchor text in a URL? For example, if my URL is: http://www.usa.gov/billofrights/#amend10 Referring to the in-page anchor named amend10, can I access this

Custom Validate

2007-02-21 Thread Petry
Hi All Why i Create a custom function for valide only uploaded imagem files? In cake/libs/validators.php is possible create a custom validade, but only using regular expressions, right? I'd like to create a custom validade for example which these code: ?php function validateImage($field){

Re: CakePHP configuration on WAMP - directory path settings?

2007-02-21 Thread Grant Cox
In windows you can't start a path with a backslash. Try: if (!defined('ROOT')) { define('ROOT', 'C:'.DS.'wamp'.DS.'apps'); } if (!defined('APP_DIR')) { define('APP_DIR', 'cakeApp1' ); } if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('CAKE_CORE_INCLUDE_PATH',

RE: Extracting Anchor string from URL

2007-02-21 Thread Rhett Waldock
I think you would have to use JavaScript to extract an anchor value and send the information to Cake through AJAX. I could be mistaken but as far as I know, the anchor portion of a request URL is not even passed to the server. Rhett -Original Message- From: cake-php@googlegroups.com

RE: Extracting Anchor string from URL

2007-02-21 Thread Mariano Iglesias
Anchors are dealt on the browser side, there's nothing going on the server side. 1. If you are on page /controller/action and you have a link like so: a href=#anchor then the browser would look for anchor #anchor on the current loaded page. 2. If you are on page /controller/action and you have

Re: 1.2: Can I use new validation class in a component?

2007-02-21 Thread Cynthia
Looking at the new test file I think I have it. On top: uses('Validation'); then before use: $Validation = new Validation(); Then it works :-) On Feb 21, 6:07 pm, Cynthia [EMAIL PROTECTED] wrote: Hi Nate :-) After just having learned about using the Inflector statically I hoped that

Re: Extracting Anchor string from URL

2007-02-21 Thread nate
http://us2.php.net/parse_url On Feb 21, 9:26 pm, aranworld [EMAIL PROTECTED] wrote: I am familiar with CakePHP's $params array which can give me the GET values from a URL. However, does CakePHP keep track of the anchor text in a URL? For example, if my URL is:

Re: Extracting Anchor string from URL

2007-02-21 Thread mariano.iglesias
Sorry mate I misunderstood your question. I thought you were asking if Cake was doing something about the anchor ;) -MI --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send

Re: View Caching of Home Page

2007-02-21 Thread MattC
PaulV, I've encountered a similar problem. For now I've worked around it by putting the following AT THE BOTTOM of my .htaccess file: RewriteRule ^$ /controller/action [R,L] RewriteRule ^/$ /controller/action [R,L] If you want to read all the gory details on why this is

Re: Mail function

2007-02-21 Thread Dr. Tarique Sani
On 2/21/07, AD7six [EMAIL PROTECTED] wrote: On Feb 21, 2:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: In my project after registration completed i want to send a mail to that user and admin.Give me an examples At the very least, you are missing the magic word. Hint: Request, don't

RE: Extracting Anchor string from URL

2007-02-21 Thread Rhett Waldock
parse_url() would work well for this IF you could pass a full URL including the anchor to it, but the HTTP request sent to the server does not include the anchor. Javascripts in the view would have access to the location URL including the anchor... so you could send that information to the

Re: Rendering views of another ojbect with AJAX

2007-02-21 Thread Dr. Tarique Sani
On 2/21/07, jamieh [EMAIL PROTECTED] wrote: Hi again [EMAIL PROTECTED], Eventually managed to get back onto this. I am a little lost now as I don't understand why i would need to use: $uses = array(Users, Projects); You would need that if your User and Project are not associated. and you

Re: [C] Problem with custom validation

2007-02-21 Thread Dr. Tarique Sani
On 2/22/07, abba bryant [EMAIL PROTECTED] wrote: If you are using the validator class from CheeseCake or others ( I assume here - not sure if it Tariq's or someone else's and he is simply using it. ) the correct method is to use The class is ours (cheesecake team) but heavily draws from

Re: Installing a CakePHP application on an existing site

2007-02-21 Thread Dr. Tarique Sani
On 2/22/07, Wey [EMAIL PROTECTED] wrote: Hi, I'm actually trying to do exactly this. I don't know .htaccess that well, so I how would I configure it to serve up directories and files if they exist? I just solved a similar situation where in I wanted the http://mysite.com/ (and in turn urls

Directory Separators / Best Practice?

2007-02-21 Thread Rhett Waldock
Hello Everyone, Another thread here made me want to raise a question of best practices when defining directory paths - it really applies both in Cake and in general. I notice that the Cake convention when defining paths is to create a concatenated string for the path using the DS constant for

Re: [C] Problem with custom validation

2007-02-21 Thread abba bryant
Well now. * I * have used it some for my own development / learning cycles a number of times. The one thing I noticed is the order of the errors and messages in the validation arrays matters. You need to put them in the specific order you want the tests checked. IE valid not empty needs then the

Re: [C] Problem with custom validation

2007-02-21 Thread abba bryant
It would also seem useful to add an html helper or override the html-tagErrorMsg so that it could accept both the old and the cheesecake methods. That would make it more portable. I have been caught ( about 20 minutes ago ) attempting to use the validator and still had $html-tagE.. in my views

Re: [C] Problem with custom validation

2007-02-21 Thread Dr. Tarique Sani
On 2/22/07, abba bryant [EMAIL PROTECTED] wrote: minutes ago ) attempting to use the validator and still had $html-tagE.. in my views that I missed. Oops. Thanks for the feedback. If you use the latest SVN version it is 100% backwards compatible (or atleast thats what we tried to make it) A

Cake 1.2 pagination using hasAndBelongToMany association!

2007-02-21 Thread Vu Nguyen
I'm having this problem with cake 1.2 pagination: Things work well if I just want to search and paginate data on 1 model (i.e: $this- paginate(Entry, $condition);) However, if Entry can have and belong to many Tags (I have table entries_tags and table tags), I want to search and paginate all