Re: ACL Questions

2009-01-06 Thread vikas
hey Fred... can u give me some idea about your aco table's entry??? I am trying to implement ACL in my project but little bit confused over aco table's entry...I have also users and group tables. so I hope u can help me... plz help me out... --~--~-~--~~~---~--~

how to distinguish param and action in cakephp's URL

2009-01-06 Thread Rimoe
hi, everyone. how to distinguish param and action in cakephp's URL for example I have write [Router::connect('/', array('controller' => 'books', 'action' => 'show', 'home'));] in my file of routes.php I can use the link[http://www.mysite.com/] to visit the action but if I plus a param 'texts

How To Display Page When Cannot Connect To Database

2009-01-06 Thread Kyle Decot
How would I go about displaying a page when cakePHP cannot connect to the database. Would I do this in the AppController? Thank you for any help you can provide? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePH

Re: Data validation doesn't work

2009-01-06 Thread Nature Lover
Hi, @Lucas => For compulsory fields in a form the validation in model will be like: var $validate = array( 'field_name' => array( 'notEmpty' => array( 'rule' => 'notEmpty',

Re: ACL Questions

2009-01-06 Thread eMarcus
Hi Fred, To get the id of a specific group you should use $data = $group->find ('first', array ('conditions' => array ('name' => 'admins'))); $id = $data['Group']['id']; bye me. On Jan 6, 11:34 pm, Fred wrote: > I am new to Cake and have read the Cookbook, tutorials, searched here, > etc. and

Re: Data validation doesn't work

2009-01-06 Thread josnidhin
Hi, I am also experiencing the same problem. I dont know how to get the messages to show in the view when the validation fails. On Jan 4, 12:31 am, Lucas wrote: > Hi gearvOsh, > > Unfortunately nothing happens again :( > I tryed with both options (required = true and notEmpty rule) and > nothing

Validation Failed even while entering correct data. Please help!

2009-01-06 Thread Nature Lover
Hi! This post is long due to code referred, the problem might be small for others. I am a newbie and have implemented validation rules for site_admin_id, email, password and main [enum type] fields. But while submitting the form it fails when even entered correct data. The rules are specified as

Re: Templates

2009-01-06 Thread tekomp
There are a ton of free template websites out there. http://www.oswd.org/ is a good place to start. And since they're templates, I guess you can say they're designed exactly for CakePHP. ;) -Tekomp On Jan 6, 9:44 pm, jandro wrote: > I want something else other than the default template with c

Re: how to get the find result more convenience?

2009-01-06 Thread Rimoe
Thanks.[?]This is a very good answer. 2009/1/7 Adam Royle > > Without seeing your sql code, it's hard to help, but I recommend you > learn the Model methods available to you, as it can often shorten the > amount of code needing to be written. Often I use a mixture between > arrays and strings

Re: Combine model fields for form select

2009-01-06 Thread tekomp
http://teknoid.wordpress.com/2008/09/04/findlist-with-three-or-combined-fields/ http://bakery.cakephp.org/articles/view/add-formatted-lists-to-your-appmodel On Jan 6, 9:57 pm, Chris Gallop wrote: > Hi > > I have a model called 'Client' that has a HABTM relationship with > another model called '

Combine model fields for form select

2009-01-06 Thread Chris Gallop
Hi I have a model called 'Client' that has a HABTM relationship with another model called 'Project'. On my project edit view I am using the FormHelper to create a select box populated by the clients names so they can be selected and linked to the project. However as the client first name and la

Templates

2009-01-06 Thread jandro
I want something else other than the default template with cakePHP but don't want to make my own. Do you know of any websites that offer free templates designed for cakephp? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: how to get the find result more convenience?

2009-01-06 Thread Adam Royle
Without seeing your sql code, it's hard to help, but I recommend you learn the Model methods available to you, as it can often shorten the amount of code needing to be written. Often I use a mixture between arrays and strings for my conditions, etc, depending on how complicated the query is. $unr

Re: Can a webpage tell the source IP of a message? (no-ip.com like appliction)

2009-01-06 Thread Bernardo Vieira
In that case you want the router's ip, not the server's private ip behind the router, and this is exactly what $_SERVER['REMOTE_ADDR'] yields. You'll also have to set up some portfowarding on the target router to give you access to whatever port/protocol you want to use for your remote access.

Re: Does saveAll() saves HABTM related models

2009-01-06 Thread Amit Badkas
This bug was reported at https://trac.cakephp.org/ticket/4389 and also fixed at https://trac.cakephp.org/changeset/7789. For me, saveAll() is working fine for HABTM data with this fix 2009/1/6 AL > > Hello! > > I am trying to save a model with HABTM using saveAll. > > hasOne, hasMany related mod

Re: Can a webpage tell the source IP of a message? (no-ip.com like appliction)

2009-01-06 Thread Aus
The deal is not that i want to get an anonymous users IP, instead, i have several servers that i want to keep them accessable all the time. some of them are behind NAT, or proxy. if only one server have static publich IP, i can use it to collect real-time information about the other server and ho

Re: How to upgrade to a new release?

2009-01-06 Thread Brenda
So just the cake folder... I don't have to update anything in my apps folder, or docs, or vendors? (I'm haven't changed anything in docs or vendors). On Jan 6, 9:40 pm, teknoid wrote: > All you have to do is replace your 'cake' core dir. > There aren't any major changes between RC3 and RC4. > ..

Re: how to get the find result more convenience?

2009-01-06 Thread Rimoe
because write an sql is very convinence. if I use the $this->find(), can I get value more convinence? 2009/1/7 teknoid > > why are you using $this->query() and not $this->find()? > > On Jan 6, 8:38 pm, Rimoe wrote: > > hi,everyone! > > > > I'm a newbie. > > > > I have saw In the bake view,

Re: How to upgrade to a new release?

2009-01-06 Thread gearvOsh
Yeah you basically just copy'n'paste the new folders/files and overwrite the old ones. But any custom changes you made will be overwritten. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to

Re: How to upgrade to a new release?

2009-01-06 Thread teknoid
All you have to do is replace your 'cake' core dir. There aren't any major changes between RC3 and RC4. ... All that being said you should upgrade (again by simply replacing the cake dir) from RC3 directly to 1.2 Final, without any problems. On Jan 6, 7:05 pm, Brenda wrote: > I'm working on my

Re: how to get the find result more convenience?

2009-01-06 Thread teknoid
why are you using $this->query() and not $this->find()? On Jan 6, 8:38 pm, Rimoe wrote: > hi,everyone! > > I'm a newbie. > > I have saw In the bake view, If you want to use the resultset, > only use the $form->input('mail'), > > but the find result () > In the controller > $unreadcounts==$this->

Aptana users, make your voice heard!

2009-01-06 Thread teknoid
Let's vote for CakePHP integration (or any PHP framework, for that matter) into this excellent IDE! http://www.aptana.com/roadmap/2009/survey1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To pos

how to get the find result more convenience?

2009-01-06 Thread Rimoe
hi,everyone! I'm a newbie. I have saw In the bake view, If you want to use the resultset, only use the $form->input('mail'), but the find result () In the controller $unreadcounts==$this->query($sql); $this->set(compact('unreadcounts')); in the view, I must to get the result use the $unreadcoun

Re: New Install Does Not Show Graphics

2009-01-06 Thread reidster
Thanks again. I ran the configure for apache again this time with "-- enable-rewrite=shared". Big, duh! there. I am not an apache expert by any stretch of the imagination. So, now the rewrite module is there. I have loaded the module in the httpd.conf. Here is the output of the dump_modules.

Re: IIS7 + CakePHP + URL Rewrite

2009-01-06 Thread The_Saint
On Jan 6, 6:17 pm, blake wrote: > Just noticed your post after replying to my own from a couple weeks > back. I'm having the same rewrite issues, but from the little bit of > testing I did, it worked fine without pretty URL's. I believe I hit > one or two of my pages using javascript links and th

Re: How to specify bind condition?

2009-01-06 Thread Brenda
Have you tried using containable? It makes it much easier than binding and unbinding all over the place. http://book.cakephp.org/view/474/Containable --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group.

How to upgrade to a new release?

2009-01-06 Thread Brenda
I'm working on my first Cake project. I started with 1.2 RC3, and now I'd like to upgrade to 1.2 RC4. Can someone point me to some instructions? I wasn't able to find anything in the cookbook, though perhaps I wasn't looking in the right place. Thank you for your help. --~--~-~--~~---

database relations

2009-01-06 Thread The_Saint
Just for my own sanity I need some confirmation. I'm not new to making databases but usually make the tables on the fly and build statements with joints if necessary. Now starting with cake and the relations in the models are driving me nuts. I've used mySQL workbench to create the tables (as a I

Re: Modifying WWW_ROOT path in Cake Console

2009-01-06 Thread aranworld
OK, I figured it out now. I just had to call my console script with a 'webroot' parameter set like this: cake -webroot ../www nameofscript This is what I should do if my directory structure is like this /superblog /app /www On Jan 6, 3:15 pm, aranworld wrote: > I am trying to create

How to specify bind condition?

2009-01-06 Thread Arthur Pemberton
I am trying to bind a ModelC based on its relationship to ModelB which is related to ModeA (my main mode). If I set recursive to 2, i get all the data, but I can't seem to include the second level items in the field list. So I would like to bind ModelC to ModelA accordingly, however, cake is add

Re: Can a webpage tell the source IP of a message? (no-ip.com like appliction)

2009-01-06 Thread Brenda
And some people use privacy software to block their IP, in which case REMOTE_ADDR shows up blank. If I use it in an application, I also make sure it is not a required piece of information. --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Modifying WWW_ROOT path in Cake Console

2009-01-06 Thread aranworld
I am trying to create a cake console script, but I am running into a problem with the default paths the Cake Console creates. The Cake Console assumes that your WWW_ROOT is at APP_PATH/webroot What do I do if my WWW_ROOT is NOT at APP_PATH/webroot? How do I dynamically modify constants defined

Re: validating and comparing dates with models

2009-01-06 Thread fly2279
Thanks for the "step in the right direction". I might be back after the suggested reading and searching. On Jan 6, 4:02 pm, Webweave wrote: > You can definitely do queries in the validation, and it sounds like > you're on the right track. > > Readhttp://book.cakephp.org/view/152/Custom-Validatio

ACL Questions

2009-01-06 Thread Fred
I am new to Cake and have read the Cookbook, tutorials, searched here, etc. and have a few questions on ACL. I have created ARO/ACO's as they do in the tutorial and that works great.I can then get things to work as such: $group =& $this->User->Group; //Allow admins to everything

Re: validating and comparing dates with models

2009-01-06 Thread Webweave
You can definitely do queries in the validation, and it sounds like you're on the right track. Read http://book.cakephp.org/view/152/Custom-Validation-Methods and it will give you some ideas. I think your other question is how to write a query that will tell you if the range overlaps an existing

Re: Can a webpage tell the source IP of a message? (no-ip.com like appliction)

2009-01-06 Thread Webweave
Well, since I'm not sure what you want the IP address for, I'm not sure I can answer your question, but ... In order to get the client IP address, you have to ask the client for it (javescript, executable, etc). That said, the address may be completely useless to you. Take an example of a NAT n

i18n / p28n components - retrieve locale from i18n table for a specific record?

2009-01-06 Thread Frank Guthorel
Hello, new to cakephp, but a seasoned programmer - and then I encountered i18n and p28n components in Cake ... it's giving me a headache - and while researching the posts here, I could not really find an answer - so I thought I'd post the conundrum that lead to getting stuck before pasting any c

Re: Can a webpage tell the source IP of a message? (no-ip.com like appliction)

2009-01-06 Thread Aus
Webweaves, thanks for your answer, is there any ´solution to access back servers behind NATs and proxies? Aus On Jan 6, 9:56 pm, Webweave wrote: > Note that this can be misleading for people using proxy servers, since > you'll get the IP address of the proxy instead of the actual machine > in

Re: Problem after uploading to host - mod_rewrite is enabled apparently

2009-01-06 Thread Webweave
OK, you should be able to validate if mod_rewrite is loaded by looking at the server-info page of your server, or contacting your hosting provider if they don't give you access to that. You definitely should be able to look at your logs to see where the problem lies, most often on a hosting servi

Re: Problem after uploading to host - mod_rewrite is enabled apparently

2009-01-06 Thread Webweave
Try modifying the .htaccess files as described here: http://bakery.cakephp.org/articles/view/mod-rewrite-on-godaddy-shared-hosting The RewriteBase fixed similar problems for me. On Jan 6, 3:11 am, Erik Pettersson wrote: > I'm having the same problem, and I'm sertain that mod_rewrite is > enable

Re: Auth Login Component not working :(

2009-01-06 Thread Webweave
And then you will be very, very, very secure ;-) On Jan 6, 6:34 am, mark_story wrote: > Don't allow('login') you will never be able to login, just like the > docs say. > > -Mark > > On Jan 5, 4:15 pm, Darren884 wrote: > > > Hi I am trying to return a rendered element so I have to customize the

Re: Unterminated String Literal in Javascript

2009-01-06 Thread Webweave
OK maybe I'm just being obtuse, but why would you put in newlines in the string you're building and then str_replace them out ? If you're going to pull them out anyway, why not just build the string without them in the first place: # $js_ret = '$("task-' js_ret .= $task['Task']['id']; $js_ret .=

Re: get error duting 'cake acl initdb '

2009-01-06 Thread Webweave
Check your /config/core.php file and verify that it has the following lines unchanged: /** * The classname and database used in CakePHP's * access control lists. */ Configure::write('Acl.classname', 'DbAcl'); Configure::write('Acl.database', 'default'); If so, validate you hav

Re: Problem with "multiple display fields" behavior, trying to use Joins

2009-01-06 Thread Webweave
Your paste shows the Evaluation model, with a belongsTo for the Utilisateur, but your find appears to be from the Autorisation controller (since you have $this->Autorisation->Evaluation). I would think at a minimum, your find should be using: $this- >Autorisation->Evaluation->Utilisateur, or $thi

Re: Can a webpage tell the source IP of a message? (no-ip.com like appliction)

2009-01-06 Thread Webweave
Note that this can be misleading for people using proxy servers, since you'll get the IP address of the proxy instead of the actual machine in most cases. Same is true for NAT based IP addresses, you will typically get a single IP address for a NAT subnet. On Jan 6, 11:53 am, Aus wrote: > Fantas

Re: include calculated data in the model

2009-01-06 Thread Webweave
Depends on your model. If you always fetch the data for the related orders, it would be fairly simple to create a "virtual field" by adding some code in your afterFind and/or beforeSave methods. The Unobtrusive Date Picker uses this method to create a date formatted date for the page to use (see:

validating and comparing dates with models

2009-01-06 Thread fly2279
I am new to cake and was wondering if someone could help point me in the right direction. I am trying to create something similar to a weekly planner with additional rules. Each user has many "time blocks" that they can enter (something like a punch clock where you enter a start and end time of yo

Re: ModelBaker ... umm... yummy

2009-01-06 Thread Webweave
It's on their web site now: 399 for an individual license. Hope they at least donated to CakePHP On Jan 4, 6:03 pm, Webweave wrote: > Yeah, CakeApp, that was it (although webbaker looks interesting too). > > Anybody have an idea whether ModelBaker is going cost anything? > > On Jan 4, 7:35

Re: Long polling example

2009-01-06 Thread majna
PHP is stateless, use Java or... On Jan 6, 7:57 pm, bondo wrote: > I'm interested in implementing long polling on my web site to simulate > server push but am not sure where to start. I've successfully > implemented polling at regular intervals using $ajax->remoteTimer() > but this creates unnec

Re: debug a failed save()

2009-01-06 Thread brian
Gee, do I feel (extra) stupid. Not only was that the problem, but the msg I sent last night explaining this was sent to myself, not the group. Here's the msg: -- snip -- Arrgghhh! PEBCAK all the way! I created a behavior for dealing with different types of users, which I'm using in addition to Ex

Re: include calculated data in the model

2009-01-06 Thread Yannis
Thank you for the advice. Indeed that's a solution. Do you think that's better than calculating the amount on the fly? What method should I create in the order model? Where should I put the call to this method? thank you again! On Jan 6, 3:40 am, Adam Royle wrote: > Just add a physical "amou

Re: Can a webpage tell the source IP of a message? (no-ip.com like appliction)

2009-01-06 Thread Aus
Fantastic!! works just fine Cheers mate! Aus On Jan 6, 9:10 am, Graham Weldon wrote: > $_SERVER['REMOTE_ADDR'] should tell you what you need. > > Cheers, > Graham > > > > Aus wrote: > > I'm writing an application like no-ip.com , the user will send a _POST > > message includes the domain name

Long polling example

2009-01-06 Thread bondo
I'm interested in implementing long polling on my web site to simulate server push but am not sure where to start. I've successfully implemented polling at regular intervals using $ajax->remoteTimer() but this creates unnecessary traffic to the server when nothing has changed. Does anyone have an

Re: Problem with "multiple display fields" behavior, trying to use Joins

2009-01-06 Thread Jimmy Bourassa
Bump? :( On 26 déc 2008, 17:05, Jimmy Bourassa wrote: > Hello, > > I'm trying to get the multiple display fields behavior to work using > Cosmin Cimpoi's version (comment #7 from the bakery > :http://bakery.cakephp.org/articles/view/multiple-display-field-3#comm...). > > Everything works fine i

Re: IIS7 + CakePHP + URL Rewrite

2009-01-06 Thread blake
Just noticed your post after replying to my own from a couple weeks back. I'm having the same rewrite issues, but from the little bit of testing I did, it worked fine without pretty URL's. I believe I hit one or two of my pages using javascript links and they worked, but I'm not positive on that.

Re: IIS7 Rewriting

2009-01-06 Thread blake
Well, I suppose nobody around here is forced into using IIS7. So, in general, does anyone have any idea what might be going on based on the symptoms I described? On Dec 23 2008, 9:56 am, blake wrote: > Has anyone been successful at using IIS7 with Microsoft's built in > rewrite module? I can onl

Re: Validation problem

2009-01-06 Thread dbennett
Be careful using the alphaNumeric and money validation rules as they require UTF-8 support for PCRE. On a stock Centos 5 install (or Redhat ES5) I have PCRE 6.6 06-Feb-2006 compiled in.The following script fails (the alphaNumeric test from CakePHP 1.2 validation.php): If you don't need U

Re: Convention Problem

2009-01-06 Thread Andras Kende
Hello try this: Contrioller $this->User->id = 1; $this->User->saveField("active",0); Model var $primarykey = "user_id" Andras On Tue, Jan 6, 2009 at 11:55 AM, ohneworte wrote: > > Hello together, > > I have a little Convention Problem, here a sample code - I want to > update a single field i

IIS7 + CakePHP + URL Rewrite

2009-01-06 Thread iplat
Has anyone gotten URL Rewrite to work with CakePHP on IIS7? I'm also having a tough time getting CakePHP to work on IIS7 without pretty URL's. I uncommented the line below in core.php. Some of the linking works, like images and css. However, when using the javascript link routine it doesn't put a

Convention Problem

2009-01-06 Thread ohneworte
Hello together, I have a little Convention Problem, here a sample code - I want to update a single field in the User model: $this->User->id = 1; $this->User->saveField("active",0); How do I have to change this code if the primary key of my User model is not "id" but "user_id". I already tried:

Initializing form inputs after validation

2009-01-06 Thread jc_mich
Hi! I'm having a problem with validation process. I've created a form which its fields must be validated, after validation all fields return initialized to view except checkboxes. Is there someone who had this problem? -- View this message in context: http://www.nabble.com/Initializing-form-i

Re: Checking for existence of entry before editing

2009-01-06 Thread will
Works great, thanks. Sorry for the noob question :) On 6 Jan, 16:03, Bernardo Vieira wrote: > try Model::exists() > > will wrote: > > Hi there, > > > Cake's baked controllers don't seem to include a check to see if an > > entry exists before you edit it.  You can "edit" entries that aren't > >

Re: Checking for existence of entry before editing

2009-01-06 Thread Bernardo Vieira
try Model::exists() will wrote: > Hi there, > > Cake's baked controllers don't seem to include a check to see if an > entry exists before you edit it. You can "edit" entries that aren't > there. > > Is there a better (less resource-intensive) way of checking for the > existence of an entry than:

Checking for existence of entry before editing

2009-01-06 Thread will
Hi there, Cake's baked controllers don't seem to include a check to see if an entry exists before you edit it. You can "edit" entries that aren't there. Is there a better (less resource-intensive) way of checking for the existence of an entry than: if ($this->Model->read(null,$id)){

Checking for existence of entry before editing

2009-01-06 Thread will
Hi there, Cake's baked controllers don't seem to include a check to see if an entry exists before you edit it. You can "edit" entries that aren't there. Is there a better (less resource-intensive) way of checking for the existence of an entry than: --~--~-~--~~~---

Pagination url changes problem

2009-01-06 Thread Claudiu Apetrei
Hello, I'm new to cakephp, after reading the documentation and messing around with the examples now started working on a project. Everything worked out well but now I'm having some problems with the pagination. The site I am developing is in Romanian and I really care about S.E.O and the gene

Can Routes Handle HTTPS?

2009-01-06 Thread Rob Wilkerson
In my network configuration, SSL is negotiated by the load balancer which then communicates with the servers in the cluster via regular old, port 80 HTTP. Within my app, then, I can't use any of the traditional means of detecting whether a request is under SSL protection (at least none that I know

get error duting 'cake acl initdb '

2009-01-06 Thread vikas
Hi all when I am trying to create ACL's table using command in unix: 'cake acl initdb', I got this error Welcome to CakePHP v1.2.0.5875 pre-beta Console --- Error: -- Error: Your current

Does saveAll() saves HABTM related models

2009-01-06 Thread AL
Hello! I am trying to save a model with HABTM using saveAll. hasOne, hasMany related models are saved correctly. But the HABTM model is not saved. It looks like it is fixed in 1.2 final release. Have anyone successfully save their HABTM with saveAll() ? This is my $data. Array ( [Student]

Re: Call static function in bootstrap.php

2009-01-06 Thread oliver.pra...@googlemail.com
Might also be of interest to create a component that will handle this for you, which you just need to add to your app_controller ... On Jan 6, 11:52 am, cyberscorp wrote: > Thank you so much. I'll test these proposals and report back. > > On Jan 6, 9:16 am, gearvOsh wrote: > > > It will work fi

Unterminated String Literal in Javascript

2009-01-06 Thread BarbarianGeek
I'm working on a tasklist in an application for my job. I'm trying to create something like the lists in Backpack. I have an AJAX request that fires off when a checkbox is clicked (and has evalScript set to true). Javascript is returned but never executes. When I paste the returned javascript int

Re: how to set up the relationship from 1 coulmn to 2 tables/entities

2009-01-06 Thread James
Thanks Marcelius. This looks like a good way to solve my problem. On Jan 6, 8:31 pm, Marcelius wrote: > projects >   id >   name >   resource_id > > resources >   id >   resource_category_id > > resource_categories >   id >   name //Tools, People, > > On 6 jan, 13:07, James wrote: > > > I have

Re: Auth Login Component not working :(

2009-01-06 Thread mark_story
Don't allow('login') you will never be able to login, just like the docs say. -Mark On Jan 5, 4:15 pm, Darren884 wrote: > Hi I am trying to return a rendered element so I have to customize the > login() function on the controller I am using, however its not running > the query right even though

Re: Paginate two sets of data from the same model

2009-01-06 Thread Bernardo Vieira
Thanks majna, I'll look into it. majna wrote: > http://debuggable.com/posts/how-to-have-multiple-paginated-widgets-on-the-same-page-with-cakephp:48ad241e-b018-4532-a748-0ec74834cda3 > > On Jan 6, 2:51 pm, Bernardo Vieira wrote: > >> Hi all, >> I'm trying to paginate two sets of data in the sa

AW: selecttag

2009-01-06 Thread Liebermann, Anja Carolin
echo $form->select('kette_id',$kettes, $kette_idselected, array(),true); HTH Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag von paddu Gesendet: Dienstag, 6. Januar 2009 07:31 An: CakePHP Betreff: selecttag can you tell me ho

Re: Paginate two sets of data from the same model

2009-01-06 Thread majna
http://debuggable.com/posts/how-to-have-multiple-paginated-widgets-on-the-same-page-with-cakephp:48ad241e-b018-4532-a748-0ec74834cda3 On Jan 6, 2:51 pm, Bernardo Vieira wrote: > Hi all, > I'm trying to paginate two sets of data in the same view, I have done it > before with data from different m

AW: How to set logout time for user

2009-01-06 Thread Liebermann, Anja Carolin
Hi Vikas, As far as I understand it the session timeout is set for everybody in the core.php. But I don't understand at the moment what the logout time is for. Your session gets updated with every reload and without a reload of the paage, the users gets kicked anyway. Or is it a feature to rem

Re: selecttag

2009-01-06 Thread Adriano Varoli Piazza
On 6 ene, 04:30, paddu wrote: > can you tell me how to set default option in cakephp http://api.cakephp.org/class_form_helper.html#5171e675468c9665db0653c165b6c89c -- Saludos Adriano --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Changing user groups and ACL

2009-01-06 Thread Liebermann, Anja Carolin
Hi everybody, I use Cake 1.2 RC3 with Auth and ACL. And ... Hoooray... It finally works. Now I want to change the group a user belongs to and run into the problem mentioned here: http://realm3.com/articles/setting_up_user_groups_with_acl_and_auth_in_c akephp_1.2 "Changing a users group does not

Re: HABTM relationships and ORDER

2009-01-06 Thread Rob Wilkerson
On Jan 6, 9:04 am, Jonathan wrote: > On Jan 5, 12:42 am, Rob Wilkerson wrote: > > > Did you ever find a solution to this? > > Not really. I ended up writing my own SQL-queries (using model- > > >query). > > (Note that the return data from the "query" contains table names - not > model names as

Re: HABTM relationships and ORDER

2009-01-06 Thread Jonathan
On Jan 5, 12:42 am, Rob Wilkerson wrote: > Did you ever find a solution to this? Not really. I ended up writing my own SQL-queries (using model- >query). (Note that the return data from the "query" contains table names - not model names as with "find"). M.v.h. Jonathan --~--~-

Paginate two sets of data from the same model

2009-01-06 Thread Bernardo Vieira
Hi all, I'm trying to paginate two sets of data in the same view, I have done it before with data from different models and then specifying the target model when calling the paginator methods, of course this fails when the two datasets come from the same model. A sample usage scenario would be

How to set logout time for user

2009-01-06 Thread vikas
hello all... I want to add one functionality in my project... when user get login he has facility called check in and check out time.. The check in time is the time when he gets login and at that time he can set his logout time.. so, he gets alert when that "set logout time" comes.. So can any

Re: debug a failed save()

2009-01-06 Thread Adam Royle
Can you show your model & app model code? I'm guessing somewhere you're not returning true from a beforeValidate() or beforeSave() method. Eg. you should do something like this if that's the case. function beforeSave() { if ( ) { // cancel the save return false; } e

Re: 404 error

2009-01-06 Thread sarahlou
Ok, think I've solved this. It appears the problem was with the word 'users'. If I put the 'register' view file in the pages folder instead of the users folder, I could see it fine, which then led me to rename the whole lot (view, controller, model, db table). It now appears to be working fine.

Re: how to set up the relationship from 1 coulmn to 2 tables/entities

2009-01-06 Thread WebbedIT
@ Marcelius: Can you explain the reasoning behind that suggested solution? To me it would seem much easier and flexible to employ two join tables tools_projects and people_projects as you can then have a varying number of resources using a basic HABTM association. --~--~-~--~~

Re: Repeating dates / events

2009-01-06 Thread WebbedIT
This isn't really a discussion related to CakePHP as it's more of an application concept or database scheme query. Dealing with repeat events is normally the difference between a basic calendar and an advanced calendar and I did some research into this some time back with various google searches

Re: Auth Redirect And Routes

2009-01-06 Thread Novice Programmer
Hey... I dont know but there is a different treatment for constructing the url in auth.php that will be stored for the purpose of restoring the redirection url. Around line number 270 in auth.php if (is_array($this->loginAction)) { $params = $controller->params; $keys = ar

Re: how to set up the relationship from 1 coulmn to 2 tables/entities

2009-01-06 Thread Marcelius
projects id name resource_id resources id resource_category_id resource_categories id name //Tools, People, On 6 jan, 13:07, James wrote: > I have a  Project table containing two fields resource1 and resource2. > Each resource_id could map to either tool table or people table. >

Re: Problem after uploading to host - mod_rewrite is enabled apparently

2009-01-06 Thread Erik Pettersson
I'm having the same problem, and I'm sertain that mod_rewrite is enabled. Do I have to connect a DNS directly to my project for it to work? When clearing the root htaccess I get to the CakePHP-info page. On 6 Jan, 10:44, will wrote: > Thanks for this, > > I've read that, just to clarify, I don'

Re: 404 error

2009-01-06 Thread sarahlou
Thanks. That would make sense, but the view, controller and model files for both apps (i.e. posts and users) are in exactly the same place. I.e. the controller files are in /apps/controllers/, the view files are in /apps/views/posts/ & /apps/views/users/ and so on. I'm using the default file st

selecttag

2009-01-06 Thread paddu
can you tell me how to set default option in cakephp --~--~-~--~~~---~--~~ 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, sen

Re: Paginate forcing a LEFT JOIN to a HABTM table

2009-01-06 Thread WebbedIT
I think this should help http://teknoid.wordpress.com/2008/08/06/habtm-and-join-trickery-with-cakephp/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-p

Re: how to set up the relationship from 1 coulmn to 2 tables/entities

2009-01-06 Thread WebbedIT
That is not a normalised database as there is no unique way of knowing which table to link the foreignKeys with. Consider that you enter two rows to your table Row #1 (adding links to Tool id 1 and 2) INSERT INTO Project (resource1_id, resource2_id) VALUES (1, 2) Row #2 (adding links to Person i

Re: Auth Redirect And Routes

2009-01-06 Thread Novice Programmer
Hey WebWeave, I dont know but loginRedirect should not cause any issues for routing.. Its there only to handle the cases if there is nothing in the session variable Auth.Redirect. I just saw the code which stores Session.redirect Around line number 289 in components auth.php $url = Router::normal

Re: Paginate using multiple tables/associations

2009-01-06 Thread WebbedIT
> What about using containable to filter the results? I think containable is what is causing the problem, although I'm confused by this as I don;t have containable applied to any of my models. In order for paginate to reorder the fetched results by a field from the Person model it needs to run a

how to set up the relationship from 1 coulmn to 2 tables/entities

2009-01-06 Thread James
I have a Project table containing two fields resource1 and resource2. Each resource_id could map to either tool table or people table. What's the relationship? class Project extends AppModel { var $name = 'Project'; var $belongsTo = array( 'resource1' => array( 'clas

Paginate forcing a LEFT JOIN to a HABTM table

2009-01-06 Thread Aidan Lister
I'm trying to do the following query: $query = 'select Paper.* from papers as Paper left join volumes as Volume on (Paper.volume_id = Volume.id) left join users_volumes as UsersVolume on (UsersVolume.volume_id = Volume.id) where UsersVolume.user_id = %d or Paper.user_id = %d';

Repeating dates / events

2009-01-06 Thread ernst.mayerhofer
Hi everybody, I got an events database, and i need to define for every event: - is it once or is it repeated? -if its repeated, are there several dates or is it in a system (e.g. every thursday, every first monday of a month, every last monday, every five years, every month on the

Re: Call static function in bootstrap.php

2009-01-06 Thread cyberscorp
Thank you so much. I'll test these proposals and report back. On Jan 6, 9:16 am, gearvOsh wrote: > It will work fine in your AppController beforeFilter(). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" gr

  1   2   >