Re: New to CakePHP

2008-10-17 Thread imran k
Thanks guys... it worked. I did exactly what both of you said. thanks a lot. On Oct 13, 5:16 am, qwanta [EMAIL PROTECTED] wrote: Also, don't forget to restart apache after making the httpd.conf changes. On Oct 12, 2:16 pm, imran k [EMAIL PROTECTED] wrote: Hi everyone! I am Imran k and

Re: How to use helpers??

2008-10-17 Thread xelios
Upgraded to 1.2 and everything is ok now... Thx everybody. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this

Re: Object not found! error...

2008-10-17 Thread xelios
Upgraded to v1.2 and everything is ok now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

Re: call store procedure in cakephp

2008-10-17 Thread spub
You want to call a view from a mysql stored procedure? You could probably make a request to a controller. Without a controller you wouldn't have much in your view!! On Oct 17, 6:31 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i want to convert my whole system in store procedure, so that

Re: validating checkboxes in habtm

2008-10-17 Thread dr. Hannibal Lecter
As far as I know, you can invalidate in controller just by calling $this-YourModel-invalidate(...) Does that help? On Oct 16, 11:38 pm, cem [EMAIL PROTECTED] wrote: Hi ;   I am trying to build a freelancer script with cakephp . I made categories and projects. One project can have more than

Re: Index libraries for Word, Pdf, Rtf, etc... files

2008-10-17 Thread oleonav
The application has to be installed on a existing shared linux webhosting the client is using. So Windows like functions is no option in this case. Furthermore would we like to incorporate these functions in future apps and 90% of the the time servers hosting our apps are of the type Linux. On

passing data between pages

2008-10-17 Thread .
what is the proper way to pass data between pages? Let's say I want to display a message that a database save is successful, or failed. Right now, I am passing the information as a parameter in the URL ( localhost/blah?success=1 ). Is there a better way to do it? I've thought about using a

Re: passing data between pages

2008-10-17 Thread dr. Hannibal Lecter
If you want to pass on the message maybe setFlash is the best option (possibly with a custom key): http://book.cakephp.org/view/568/flash Although I don't see anything wrong with using your own session keys. Either way, I'd stay away from URL parameters as they can be faked by the end users,

Re: testAction data not resetting between tests

2008-10-17 Thread Christof Damian
Well, I have a question. If I understand the testAction with fixturize = true correctly, it copies the tables from the default connection and then calls the specified URL. So it doesn't use the fixtures I have written in my test directory. Is this correct ? I would prefer if all the tests

Table Rename Join Error

2008-10-17 Thread MDB
Being new to cake (became the owner of 2 cakephp applications), I dont think I am getting something simple. First, I have three tables, customers (PK ID int), services (PK ID int) and then customers_services (customer_id int, service_id int). I then have the 2 models below. I am in the process

xmlwriter

2008-10-17 Thread Liebermann, Anja Carolin
Hi everybody, I try to follow the sitemap tutorial, but have problems with the layout. If I call http://localhost/myapp/sitemap.xml it tries to use the default.ctp in the layouts root, which results in a complete mess. If I add function index (){

Re: xmlwriter

2008-10-17 Thread David Persson
Try to put the RequestHandler into the components property. It detects which content type is requested and sets the layout path according to that. If you want to set the layout and layoutPath manually do it this way: class PostsController ... function index() {

Re: Accessing Cake elements in the webroot directory?

2008-10-17 Thread [EMAIL PROTECTED]
I am not aware of a way to rendering an element without actually bringing all of Cake to life. A few ideas that may be more of less suitable to you. The quick and hacky way: $_GET['url'] = '/controller/action/param'; require_once('path/to/cake/app/webroot/index.php'); This is an old way to get

AW: xmlwriter

2008-10-17 Thread Liebermann, Anja Carolin
First error fixed, but still stuck with the rest: Correct syntax is of course 8 or at least not obviously wrong): $this-layoutPath = 'xml/'; $this-layout = 'default'; -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im

Re: Accessing Cake elements in the webroot directory?

2008-10-17 Thread gravyface
If it's just basic blogging functionality, you might be better off sticking with the various blogs that have been built using CakePHP and/or building your own. [EMAIL PROTECTED] wrote: I am not aware of a way to rendering an element without actually bringing all of Cake to life. A few ideas

xmlwriter

2008-10-17 Thread Liebermann, Anja Carolin
Except the routing it works now: Wow... I am really amazed by myself :cD A hint for another poor soul trying this: 1. set the debug level to the usual 1 or 2, but not 0 as long as you are not sure that your output is correct. 2. validate the expected output in an online validator like

Re: Table Rename Join Error

2008-10-17 Thread scs
Cake handles the join table naming convention based off the tables used, rename your join table to customers_scheduler_services On Oct 17, 8:22 am, MDB [EMAIL PROTECTED] wrote: Being new to cake (became the owner of 2 cakephp applications), I dont think I am getting something simple.  First, I

Re: Table Rename Join Error

2008-10-17 Thread MDB
Thank you, that fixed the error however now the services are not showing for the customer. Is there something else that I am missing? On Oct 17, 9:14 am, scs [EMAIL PROTECTED] wrote: Cake handles the join table naming convention based off the tables used, rename your join table to

request for debugging advice

2008-10-17 Thread RyOnLife
I've been using the firecake.php helper to aid in my debugging. I primarily use it to drill into the values held in those big nested arrays that result from running recursive find() on models. Was working great, but now I'm getting unterminated string literal errors on the fbout['Variables']

Re: Auth: deleted user still logged in

2008-10-17 Thread on24nl
The (not existing but still logged in) user should not have any access at all! I solved it by putting this into the AppController's beforeFilter: if($checkuser = $this-Session-read('Auth.User.id')) { if( !$this-Auth-identify($checkuser) ) { $this-Auth-logout();

Re: request for debugging advice

2008-10-17 Thread RyOnLife
Just to clarify... What I really like about firecake.php and the FireBug output is that the arrays are expandable/collapsible. That's the functionality I'd like to find in another debugging solution. RyOnLife wrote: I've been using the firecake.php helper to aid in my debugging. I

Re: Sending config options to fckconfig.js in fckeditor

2008-10-17 Thread bartez
Anyone got any ideas? Cheers Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL

Re: Table Rename Join Error

2008-10-17 Thread MDB
Okay, here is what I have now and I am no longer getting any error but the services for the cusomer are no longer showing. table customers is now scheduler_customers table services is now scheduler_customers table customers_services is now scheduler_customers_sheduler_services. My customer

Re: Table Rename Join Error

2008-10-17 Thread MDB
I finally figured it out. I changed the table name (scheduler_customers_sheduler_services) but I didn't change the column names to scheduler_customer_id and scheduler_service_id. Once I did that it started working again. Thanks again for your help. On Oct 17, 10:00 am, MDB [EMAIL PROTECTED]

Re: request for debugging advice

2008-10-17 Thread grigri
You could check out Krumo : http://krumo.sourceforge.net/ It's a php debugging solution; makes expandable variables and stuff. I've used it in the past with good results. hth grigri On Oct 17, 3:05 pm, RyOnLife [EMAIL PROTECTED] wrote: Just to clarify... What I really like about firecake.php

Re: request for debugging advice

2008-10-17 Thread RyOnLife
Sweet! Just what I was looking for. Thanks. grigri wrote: You could check out Krumo : http://krumo.sourceforge.net/ It's a php debugging solution; makes expandable variables and stuff. I've used it in the past with good results. hth grigri On Oct 17, 3:05 pm, RyOnLife [EMAIL

Re: request for debugging advice

2008-10-17 Thread grigri
I think there's a bakery article on it... yep, here it is: http://bakery.cakephp.org/articles/view/nicer-print_r-with-krumo I couldn't get the skin images to work with that, but it was a long time ago - cake has got better since. Let us know how you get on, if it works well I might start

Re: request for debugging advice

2008-10-17 Thread RyOnLife
Having trouble getting it to work. I just dropped the class into my include_path, required it, then tried both krumo($var) (call to undefined function) and krumo::krumo($var) (class not found) with no luck. What's the best way to make it work with Cake? Do I have to turn it into a helper?

Re: request for debugging advice

2008-10-17 Thread RyOnLife
Took less than 5 minutes for me to give it a crack, but the Bakery article seems to be a bit outdated: I'm getting a fatal error because the krumo class cannot be found. I changed from vendor() to App::import in the helper, but couldn't find anything else. I'm thinking I'm missing another change

Re: call store procedure in cakephp

2008-10-17 Thread mark_story
look at Model::query() You can run arbitrary SQL through that. -Mark On Oct 17, 1:31 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i want to convert my whole system in store procedure, so that place guide me how can i call store procedure, how can i call view from mysql.

What is the proper way of adding script to the layout?

2008-10-17 Thread Robert
I want to add some scripts from views, elements, helpers to the header. Header is in layout of course. What is the proper way to do that? Two examples: - css - I want to include some css files only when I use Elements or helpers they are used by. Is it any way to do this in cakephp? Or have I

Re: Newbie: What is the proper way of rendering views within views?

2008-10-17 Thread Robert
What is the proper cake-way of doing this? I think You don't need views for inquiries, only elements. Views are for separate pages, to render inquires on customer page use elements or even some kind of helper... anyway thats the way I do it. :) Robert

ACL - Not checking the user's group

2008-10-17 Thread WebbedIT
Hi, I have applied Acl and Auth as instructed in the example tutorial of the book. The first user I created is a member of user_group = 1 which has access to all controllers using: $group-id = 1; $this-Acl-allow($group, 'controllers'); But when I login and try to access anything I keep

Re: Newbie: Moving away from the tutorial apps and encountered first issue

2008-10-17 Thread WebbedIT
More info for someone, could still do with some help though. After a nights rest I was more capable of reading the notice properly and debug where the problem was occurring. It seems that my user model is failing to read the primary key of the user_group model. When accessed by the following

Re: Newbie: What is the proper way of rendering views within views?

2008-10-17 Thread Stan
What bugs me is that they are conceptually different views of a model, not reusable web page elements -- i.e. they are not menus, sidebars, headers, footers... With that kind of architecture, I'd end up with customer controller retrieving and passing inquiry data to customer view, which then

Re: Newbie: Moving away from the tutorial apps and encountered first issue

2008-10-17 Thread WebbedIT
[resolved] A night of sleep gave me a fresh pair of eyes that alerted me to where the problem was and I quickly worked out that I was not requesting the id field when specifying fields to be fetched during model association. Thought they came through by default, but I was wrong, they have to be

Use Ajax without using library: like prototype.js, jquery.js

2008-10-17 Thread bookme
Hi, I am using jquery for ajax in my application.. and was getting very good results using it. But when I was working on a registration page then this jquery is not providing me seamless effect. There is two select box - drop down 1 State 2 City when ever a user select a state correspondingly

Re: Auth: deleted user still logged in

2008-10-17 Thread Mathew
This is a security issue, and not an identity authentication issue. The Auth component is designed to make it easy to confirm someone's identity, but not to manage security or permissions for a website. You could use ACL or do it yourself. Anytime a user does something that requires a level of

Re: Auth: deleted user still logged in

2008-10-17 Thread xavierunited
Both of the methods are the same only you use controller. On 10/17/2008, Mathew [EMAIL PROTECTED] wrote: This is a security issue, and not an identity authentication issue. The Auth component is designed to make it easy to confirm someone's identity, but not to manage security or

Re: ACL - Not checking the user's group

2008-10-17 Thread xavierunited
Ok is this for the user Block? On 10/17/2008, WebbedIT [EMAIL PROTECTED] wrote: Hi, I have applied Acl and Auth as instructed in the example tutorial of the book. The first user I created is a member of user_group = 1 which has access to all controllers using: $group-id = 1;

Re: Use Ajax without using library: like prototype.js, jquery.js

2008-10-17 Thread xavierunited
You may want to post this in the AJAX groups also! On 10/17/2008, bookme [EMAIL PROTECTED] wrote: Hi, I am using jquery for ajax in my application.. and was getting very good results using it. But when I was working on a registration page then this jquery is not providing me seamless

How to save recursively with a hasOne relation

2008-10-17 Thread ORCC
I have the following models: Users (id, name, ...) Preferences (id, user_id, ...) With the relationships User hasOne Preference and Preferences belongsTo User set in each model. I created a form with all fields for either users and preferences. $form-create('User',Array('action' =

CakePHP CMS

2008-10-17 Thread gemmes
Hi All, Intending to build a small CMS for my own site.I have heard of WildFlower CMS. Can anyone reccommend it or others? Im new to using CakePHP and a CMS that is simple and easy to use would be great. many thanks gemmes --~--~-~--~~~---~--~~ You received

Re: What is the proper way of adding script to the layout?

2008-10-17 Thread ORCC
- css - I want to include some css files only when I use Elements or helpers they are used by. Is it any way to do this in cakephp? Or have I include all css files into all pages? I prefer to include all css scripts in the head. It has tow advantages: - The includes are made in one place in

Re: What is the proper way of adding script to the layout?

2008-10-17 Thread Sam Sherlock
see this http://snook.ca/archives/cakephp/elemental_conditional_content_with_cakephp/ 2008/10/17 Robert [EMAIL PROTECTED] I want to add some scripts from views, elements, helpers to the header. Header is in layout of course. What is the proper way to do that? Two examples: - css - I want

Re: Effect.Fade and Effect.Appear

2008-10-17 Thread scs
Could you use a setTimeout() to get what you want? On Oct 17, 12:17 pm, Arak Tai'Roth [EMAIL PROTECTED] wrote: Okay, so I've been going back and forth now for awhile. The guys in the scriptaculous group are able to help but not in a fashion that is overly helpful using CakePHP. So I'm

Authentication and blank pages

2008-10-17 Thread mcphisto
Hi all, I've this problem. I've a username and password login to enter my application. When I test it on localhost everything works fine. The problem is that if I put a link to a blank page, the session falls on the original page and in the new blank one. Why it happens only on my extarnal server

Re: Question on the best way to proceed and stay true to MVC/CakePHP philosophy

2008-10-17 Thread ORCC
Set the name attribute into the CommandParser class (If your are using PHP 4 the name attribute is mandatory as it is in models and controllers). class CommandParserComponent extends Object { var $name = CommandParser; //the rest of the code. }

Re: Effect.Fade and Effect.Appear

2008-10-17 Thread Arak Tai'Roth
Okay, so I've been going back and forth now for awhile. The guys in the scriptaculous group are able to help but not in a fashion that is overly helpful using CakePHP. So I'm wondering yet again, if anyone else on here has run into this problem and has a solution. I can't imagine that I am the

Re: Auth: deleted user still logged in

2008-10-17 Thread [EMAIL PROTECTED]
When a user is removed from the Users table, remove them from ACL. That way when (or if) they try and do something, ACL will deny them. It doesn't matter that they are still logged in since they are logged in as a user that can't do anything. Mark Story has a GREAT 3 part ACL tutorial and there

Re: Use Ajax without using library: like prototype.js, jquery.js

2008-10-17 Thread bookme
Thanks Xavieruni!! Here problem is not in AJAX logic because everything is working fine in webroot folder if I don't use concept of controller. I think problem is in cake. because Cake is not generating XML correctly .. I read some manual for cake XML also..but still in problem. Please help

Re: Use Ajax without using library: like prototype.js, jquery.js

2008-10-17 Thread [EMAIL PROTECTED]
Bookme, You really should go back to jQuery. Thousands of man hours have been put into making that cross platform (its not an easy task.) This task can be accomplished by jQuery without much strain. Go look through the jQuery documentation. This is a case of you asking someone to give you fish,

Re: Cake is incorrectly parsing URL's or I'm doing something wrong

2008-10-17 Thread MaxCzap
Hi guys, Thanks for the help. Bernhard, I took your advice and changed the rss controller to a feeds controller which works now. I pointed /rss to / feeds in routes so now either one works. Here's my new problem: We want to have multiple feeds. Press releases, video, etc. So I was planning

Re: Cake is incorrectly parsing URL's or I'm doing something wrong

2008-10-17 Thread MaxCzap
Nevermind my last question! I looked up the syntax and I'm using this: $Route-connect('/rss/:action', array('controller' = 'feeds', 'action' = 'index')); which works fine. -Max On Oct 16, 9:03 pm, Adam Royle [EMAIL PROTECTED] wrote: What I would do is add a feed() action into your Articles

Re: Newbie: What is the proper way of rendering views within views?

2008-10-17 Thread Stan
Thanks, Robert. What happens when you introduce ajax into the equation, and now you want to dynamically reload one of these elements (for example, customer had 5 inquiries, you're showing one at a time through ajax). Do you now have to create an action/view for each of these elements anyway so

multiuser by same app, same db and different prefix

2008-10-17 Thread [EMAIL PROTECTED]
Hari, I have an existing cake 1.1 based app. I would like to add a new multi user feature. There would be a database and in the database there would be the tables prefixed by usernames, like user1_maintable, user1_optionstable, user2_maintable, user2_optionstable, etc I just want to give an

Re: Authentication and blank pages

2008-10-17 Thread xavierunited
I think it hits the external sever first and the the local. On 10/17/2008, mcphisto [EMAIL PROTECTED] wrote: Hi all, I've this problem. I've a username and password login to enter my application. When I test it on localhost everything works fine. The problem is that if I put a link to a

Re: Use Ajax without using library: like prototype.js, jquery.js

2008-10-17 Thread xavierunited
Try going back to the JQUERY also instead of xml try rss. On 10/17/2008, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Bookme, You really should go back to jQuery. Thousands of man hours have been put into making that cross platform (its not an easy task.) This task can be accomplished by

Re: Auth: deleted user still logged in

2008-10-17 Thread xavierunited
That has already been said! On 10/17/2008, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: When a user is removed from the Users table, remove them from ACL. That way when (or if) they try and do something, ACL will deny them. It doesn't matter that they are still logged in since they are logged

Re: Effect.Fade and Effect.Appear

2008-10-17 Thread Arak Tai'Roth
I am not sure, I have never seen that function or know its use. I will look into it though. On Oct 17, 10:40 am, scs [EMAIL PROTECTED] wrote: Could you use a setTimeout() to get what you want? On Oct 17, 12:17 pm, Arak Tai'Roth [EMAIL PROTECTED] wrote: Okay, so I've been going back and

Re: Use Ajax without using library: like prototype.js, jquery.js

2008-10-17 Thread qwanta
For a pure javascript/ajax template, go here http://ajaxphp.packtpub.com/ and download the sample chapter http://ajaxphp.packtpub.com/1825_01_Final.pdf This should give you a basic working xmlhttprequest that should be easy to modify to do what you need. On Oct 17, 11:57 am, bookme [EMAIL

Re: Form returned by ajax response

2008-10-17 Thread nightfallvt
Doh! Putting the form tag inside the table instead of wrapping it is a no no. On Oct 7, 9:39 am, nightfallvt [EMAIL PROTECTED] wrote: My index tables have aformbelow the heading to allow users to filter data. When using ajax pagination theformdisappears after the first request. Normal

Foreach loop with data from other model

2008-10-17 Thread nomex
Hey, I have 2 Tables: pictures ratings every rating belongs to a picture and every picture has many ratings. (just a normal rating DB) i want to make a list of every picture with it's average rating in the picture view. Therefor i had made a avgRating function (gets the id of the picture and

Schema and CakePHP with PostgreSQL

2008-10-17 Thread andersoncafe
Hy, I have something to work with schemas and PostgreSQL. I would like to make join between tables of different schemas, but from the same database. Someone can work this way? Anderson Brazil. --~--~-~--~~~---~--~~ You received this message because you are

Schema with CakePHP and Postgresql

2008-10-17 Thread andersoncafe
Hy, I have something to work with schemas and PostgreSQL. I would like to make join between tables of different schemas, but from the same database. Someone can work this way? Anderson Brazil. --~--~-~--~~~---~--~~ You received this message because you are

Update the content of a div a form is in after submit

2008-10-17 Thread heavylu
Hi everyone, I have been working on this problem for many weeks and I have not solved it yet: I have 3 divs in a layout and I want the three of them to update when I submit an ajax form I put into one of them, but when I send the form (even if I just use a bare ajax link) the resultant layout

Re: What is the proper way of adding script to the layout?

2008-10-17 Thread Stan
Both $html-css() and $javascript-link() have an $inline parameter, and if you set that to false they will not be displayed inline, but added to a $scripts_for_layout variable. Then, you just need ?php echo $scripts_for_layout; ? in your head, and you're good to go. I think that's what you're

Bakery bug

2008-10-17 Thread ilozka
Hi, Cannot post comment to Bakery, http://bakery.cakephp.org/comments/add/360, it says the title field cannot be left blank but I have completed it:( Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

Re: Bakery bug

2008-10-17 Thread xavierunited
Sounds like a browser problem. On 10/17/2008, ilozka [EMAIL PROTECTED] wrote: Hi, Cannot post comment to Bakery, http://bakery.cakephp.org/comments/add/360, it says the title field cannot be left blank but I have completed it:( Thanks. -- Xavier A. Mathews

Re: Foreach loop with data from other model

2008-10-17 Thread hydra12
If you have the relationship setup correctly, you don't have to use the ratings model. You can do this in your controller: $this-set('ratings', $this-Picture-Rating-avgRating($id)); That's all off the top of my head, but it should work. HTH, hydra12 On Oct 17, 4:22 pm, nomex [EMAIL

Re: Foreach loop with data from other model

2008-10-17 Thread nomex
thanks for your help, but this gives me a Mysql error. my avgRatings function looks like this: function getRating($id=null) { if ($id) { $avg_rating = $this-query(select avg(rating) from ratings where picture_id = '.$id.'); $avg_rating1 =

Model callback question

2008-10-17 Thread lazyeye
I'm trying to modify model data before it gets sent to the controller by using the afterFind callback. I am able to modify the data in the model whose find method has been called however any associated models do no have their afterFind called. For example I has a Post with some Comments, I ask

Newbie questions about model relations

2008-10-17 Thread Marritza
Hello! I'm using Cake for several days now, I'm still under big impression of its capabilities. Nevertheless, I have faced a problem, to which solution, which I have found, feels not logical in the Cake ways of doing things. First, let me show you my table structure: (btw, I'm using

Re: Newbie questions about model relations

2008-10-17 Thread teknoid
You shouldn't break conventions when naming your primary keys. Cake will expect your primary key to be named 'id'... So Design.id and Status.id. Of course you can override those by setting a $prmaryKey = 'myOwnKey'; in the model, but why make your life more difficult? On Oct 17, 8:17 pm,

lots of element templates ... is this a good thing?

2008-10-17 Thread aranworld
As I work on my CakePHP based projects, I find that my views/elements directory gets more and more filled. I really like putting view logic in elements even in cases where I am not actually re-using the element. I find I am treating elements almost like functions, so that when I have a fairly

Recursive HBTM relationship - Problem

2008-10-17 Thread imu
Hi, I have problem with ORM (m-n) to relationship. http://farm4.static.flickr.com/3171/2950137747_b098638c67.jpg?v=0 ERD image The table categories is related to itself using m-n relationship. To make this possible I created a new mapping table called as categories_categories. This is the

Re: What is the proper way of adding script to the layout?

2008-10-17 Thread Robert
Yes Stan, thats exactly what I've been looking for :) Thanks a lot. Elemental is also nice, I forgot about it. Thank You all! On 17 Paź, 23:31, Stan [EMAIL PROTECTED] wrote: Both $html-css() and $javascript-link() have an $inline parameter, and if you set that to false they will not be