Re: admin routing

2008-12-06 Thread dravid
hello grigri thanks for ur message after i added this line i got following error please letme know what to add in controller.php Router::connect('/admin/',array ('controller'='administrators','action'='index','admin'='true','prefix'='admin')); Router::connect('/admin/*',array

Handling Multiple Checkbox in Pagination

2008-12-06 Thread krishna
Handling Multiple Checkbox in Pagination Hi Cake Bakers, In my project i am having a users table. In the admin, i have an option for the admin to message to particular users based selection. This selection is based on the pagination. Now my problem is that, when the admin selects 3 users(say)

Re: HABTM on multiple DB---Please help me

2008-12-06 Thread Mauricio Morales
Hi Marco, I think that you can't do it with official methods, however you can implement this functionality. On Dec 5, 11:27 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have this question that I can't resolve. I hope that someone can help me. How can I set a HABTM relation between table

Re: Handling Multiple Checkbox in Pagination

2008-12-06 Thread gearvOsh
Perhaps you can save them into an array and place the array into a session. On Dec 6, 1:26 am, krishna [EMAIL PROTECTED] wrote: Handling Multiple Checkbox in Pagination Hi Cake Bakers, In my project i am having a users table. In the admin, i have an option for the admin to message to

Re: Custom queries/sql in models/behaviors

2008-12-06 Thread Adam Royle
Add: var $actsAs = array('Containable'); to your Team model. Then add this before your find() call: $this-Team-contain('TeamMember' = array('User'), 'TeamGame'); Cheers, Adam On Dec 6, 12:51 pm, gearvOsh [EMAIL PROTECTED] wrote: Ok thats weird, I dont have foreign keys really setup but it

Adding extra user info to session

2008-12-06 Thread WebbedIT
Hi all, I am still a newbie to CakePHP and have given myself a huge test by recoding one of my clients large active applications as my first CakePHP project. This application allows my client (a national homeless charity) to offer a management system to its regional affiliated Schemes. The

Re: store i18n data in database

2008-12-06 Thread Günther Theilen
Hi, thanks for the answers but the don't really cover my problem. Maybe my explanation was a bit blurry... Let's say I have a link like this: $html-link(__('edit data', true), array(...)) This works fine with the translations for 'edit data' in the po-files. But in my application I have to

Multiple Instances of TinyMCE

2008-12-06 Thread Arak Tai'Roth
So I've been playing around with the TinyMCE Helper located in the bakery and so far it's been pretty awesome. However I do have one problem. In one of my areas there are two text boxes that need editing, and so I would like TinyMCE to control both text boxes. This is my code for that part of the

Re: Data Validation error message fails on $this-redirect

2008-12-06 Thread Smelly_Eddie
Why are you using two actions to begin with? It seems like your inviting issues using such a manner. Have you considered sending all the data to the same action, and on successful validation redirect to the next action? Seems like a cleaner way to go about things. On Dec 6, 1:20 am,

How to have each instance of a model access all elements of another table

2008-12-06 Thread Iris Diaz
Hello, I'm new to CakePHP and PHP in general. I turned to the mailing list for help because I'm stuck and couldn't find what I need from searching the internet, so I hope you guys could help me out. [Sorry if this happens to turn out too easy. Like I said, I'm new to Cake and PHP in general, so

Re: How to add line break in text mail layout?

2008-12-06 Thread majna
Just write \n Examples: ?php echo \n;? ?php echo $name . \n;? On Dec 5, 1:44 pm, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: Well...that's not supposed to happen. Can you check the mail source and mime headers? Maybe you're not sending your email in plain text..? On Dec 5, 1:11 pm,

Re: Question on localization

2008-12-06 Thread majna
Use domains: __d() search group for multiple po files: http://groups.google.com/group/cake-php/browse_thread/thread/5b32124747245651/0a19edff3a199ca1?lnk=gstq=multiple+po+files#0a19edff3a199ca1 On Dec 5, 9:31 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I have a question on localization

Re: Adding extra user info to session

2008-12-06 Thread WebbedIT
I assume that I would do this by adding some code somewhere in the AppController, but where and how would I call it? I don't think it would go in beforeFilter() as that would try and run even if a user wasn't authorised, or would I put a call in there that first checked if the user was

Re: ORM, fetching related rows of corresponding model: undefined index..

2008-12-06 Thread Tanay
Tanay wrote: i have two dbs questions , and answers.. corresponding models questions has many answers answers belogns to questions in questions_controller, i have this home function function home() { $this-Question-recursive = 1; $this-set('questions',

how to trigger an ajax update?

2008-12-06 Thread Juan
Hi all, Is there a way I can ask the ajax helper to update a div? I mean, like using $ajax-link (), but without waiting for the click on the link. I just want to update a div once the view has finished loading. any help will be very much appreciated. thanks.

Re: how to trigger an ajax update?

2008-12-06 Thread schneimi
Hi, I think your are looking for $ajax-remoteFunction(). On 6 Dez., 19:13, Juan [EMAIL PROTECTED] wrote: Hi all, Is there a way I can ask the ajax helper to update a div? I mean, like using $ajax-link (), but without waiting for the click on the link. I just want to update a div once the

Re: ORM, fetching related rows of corresponding model: undefined index..

2008-12-06 Thread thatsgreat2345
I see you are using the Packt Publishing book, ensure that your model relations aren't misspelled or anything else it won't load the answers and thus won't exist, in the controller do a debug on the find, that or in the view do a pr($questions) before the foreach this will display the array and

Re: how to trigger an ajax update?

2008-12-06 Thread Juan
That's exactly what I was looking for. It's great because I can pass effects in the options array in the same way as $ajax-link () thanks scheimi On Dec 6, 7:23 pm, schneimi [EMAIL PROTECTED] wrote: Hi, I think your are looking for $ajax-remoteFunction(). On 6 Dez., 19:13, Juan [EMAIL

Re: Custom queries/sql in models/behaviors

2008-12-06 Thread gearvOsh
So I have this method within the model. The same array is returned from above but I get a mysql error for the contain. SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'contain' at line 1

Auth/Acl Limitations..

2008-12-06 Thread AussieFreelancer
Hi all, I am working on a site which currently has around 12000 members. I am converting it to a cake site, and am using the Auth and Acl components. Now that I have imported all the users, an issue I am coming up against, is that where I am creating or deleting an aro, the page actually hangs.

Re: Custom queries/sql in models/behaviors

2008-12-06 Thread Adam Royle
http://cakebaker.42dh.com/2008/05/18/new-core-behavior-containable/ On Dec 7, 8:27 am, gearvOsh [EMAIL PROTECTED] wrote: So I have this method within the model. The same array is returned from above  but I get a mysql error for the contain. SQL Error: 1064: You have an error in your SQL

Well formed XML for RESTful web services ...

2008-12-06 Thread Rob
I'll probably get no response or flames telling me to just set debug to 1, but I've set up my VolunteerCake code to be a RESTful web service by using the Router::parseExtensions() and Router::mapResources() magic. This works fine as long as debug is not greater than 1. When debug is

Well formed XML for RESTful web services ...

2008-12-06 Thread Rob
I'll probably get no response or flames telling me to just set debug to 1, but I've set up my VolunteerCake code to be a RESTful web service by using the Router::parseExtensions() and Router::mapResources() magic. This works fine as long as debug is not greater than 1. When debug is

Creating and Using True Self-referential Joins

2008-12-06 Thread Tony
I'm working on an application where people can sign up to use a service and can refer others into the network. I'm wanting to use a self-referential join table where I have one table with of course an ID and an associate id where that will join to a parent record within that table. So if Jane

admin routes prefix routing paginator problems..

2008-12-06 Thread Andras Kende
Hello, Im trying to do an app with 3 areas admin routes which requires login /admin/ /nurse/ /practice/ routes.php: Router::connect(/admin/:controller/:action/*, array (prefix=admin, admin=true)); Router::connect(/nurse/:controller/:action/*, array (prefix=nurse, nurse=true));

SQL error with Auth Component?

2008-12-06 Thread gearvOsh
So Im working with the auth component, heres my AppController. class AppController extends Controller { var $components = array('Auth'); function beforeFilter() { // Authenticate if (isset($this-Auth)) {

Custom Helper not Working

2008-12-06 Thread Sapslabs
I am trying to add a helper to my app like this: class ElapsedHelper extends AppHelper { function test() return $this-output('test'); } } this helper is saved as views/helpers/elapsed.php and included on my controller with var $helpers = array('Elapsed'); The problem is

Re: Problem with foreignKey in cake PHP

2008-12-06 Thread orion . century
But this case is common in MSSQL, and I need use it. -.-! 2008/12/5 teknoid [EMAIL PROTECTED] There is no support for composite keys in CakePHP. Add an 'id' column to your table. On Dec 5, 3:34 pm, Sabinas [EMAIL PROTECTED] wrote: Hi, I dont speak englis very well but I will try. Mi

simple write to database

2008-12-06 Thread mike
I have a simple example below. I just want a form that saves stuff to the database. Its never getting to log test2 I guess the data is not in the right format but how am I supposed to do it? I've already spent a considerable amount of time debugging this and other problems, please help!

Custom Helper not Working

2008-12-06 Thread Sapslabs
I am creating a custom helper like this class ElapsedHelper extends AppHelper { function test(){ return $this-output('test'); } } Which is save under views/helpers/elapsed.php I am including this on my controller using var $helpers = array('Elapsed'); but when I try it I

Ordering search results by best match

2008-12-06 Thread Clay
My app has the following: Genus hasMany Species Species hasMany CommonName and the corresponding belongsTo relationships as well. Each of these models has a name field, and Genus and Species have several other fields. Say for example I have a Species Acer rubrum. This Species belongsTo Genus

Re: Data Validation error message fails on $this-redirect

2008-12-06 Thread Renesistemic
I've certainly considered the option of submitting to the same action and on success redirecting. My problem is that the page the user modifies data on also serves as an index page for certain functions: Skipping the post, activating the post and deleting the post. As I want to build out entirely

Re: Custom Helper not Working

2008-12-06 Thread gearvOsh
Missing php open/close tags? On Dec 6, 1:00 pm, Sapslabs [EMAIL PROTECTED] wrote: I am creating a custom helper like this class ElapsedHelper extends AppHelper {     function test(){              return $this-output('test');     } } Which is save under views/helpers/elapsed.php I am

Re: Well formed XML for RESTful web services ...

2008-12-06 Thread James K
Not sure I understand the problem. Do you expect Cake to format it's debug information based on the content type? It's debug information - it's meant for debugging. You can type Configure::write('debug', 0) at the top of any action in order to lower the debug level selectively per action without

Re: SQL error with Auth Component?

2008-12-06 Thread gearvOsh
It seems this works below, but my previous code does not. $this-Auth-allowedActions = array('signup', 'reset', 'verify', 'forgot'); Perhaps something wrong with the docs? http://book.cakephp.org/view/247/AuthComponent-Methods#allow-382 --~--~-~--~~~---~--~~ You

Re: SQL error with Auth Component?

2008-12-06 Thread thatsgreat2345
Checkout at the bottom of this http://www.studiocanaria.com/articles/cakephp_auth_component_users_groups_permissions_revisited It seems to work, basically allows everything in the beforeFilter in the app, then in the users_controller you recall parent::beforeFilter () , then set the allow. I'm

bug in Containable?

2008-12-06 Thread brian
cake_1.2.0.7692_RC3 I think I've found a bug where 2 different elements are called on a page, each for different controllers, and each method uses a contain block in find conditions. I've just spent several hours trying to figure out why Containable was refusing to fetch data from a particular

Re: Well formed XML for RESTful web services ...

2008-12-06 Thread Rob
No, I don't expect Cake to format the output at all since we are doing MVC. I want to use the debug output without it affecting my HTTP stream. The bug/problem is that if debug 1, the content type gets flipped to text/html, and the SQL debug gets appended to the XML (after the end of the HTML

Re: bug in Containable?

2008-12-06 Thread brian
I forgot to mention that this problem exists with the latest nightly (1.2.x.x_06.12.2008) as well. On Sat, Dec 6, 2008 at 11:24 PM, brian [EMAIL PROTECTED] wrote: cake_1.2.0.7692_RC3 I think I've found a bug where 2 different elements are called on a page, each for different controllers, and

Re: Problem with foreignKey in cake PHP

2008-12-06 Thread brian
It's common with a lot of databases. Again, the workaround is to add an ID column. On Sat, Dec 6, 2008 at 12:33 PM, [EMAIL PROTECTED] wrote: But this case is common in MSSQL, and I need use it. -.-! 2008/12/5 teknoid [EMAIL PROTECTED] There is no support for composite keys in CakePHP. Add

Re: ORM, fetching related rows of corresponding model: undefined index..

2008-12-06 Thread Tanay
it seems no relationships are working with my cakephp. has it got anything to do with my version of php5? i have got struck at this for a long time. help will be very greatly appreciated. here is the var_dump of $questions as seen in home.ctp array(2) { [0]= array(1) { [Question]= array(5) {

Re: ORM, fetching related rows of corresponding model: undefined index..

2008-12-06 Thread thatsgreat2345
Post your model code so we can see if you are doing your associations correctly, or if they are spelled correctly. On Dec 6, 9:50 pm, Tanay [EMAIL PROTECTED] wrote: it seems no relationships are working with my cakephp. has it got anything to do with my version of php5? i have got struck at