Re: how can access the Auth info form view

2008-04-23 Thread candesprojects
And without $session-check('Auth.User.id')) there is not helper or someting that let me use $Auth-isAuthentificate and to return true or false? If not I'm thinking to create a helper for this, that user $session and get me what I want. On Apr 22, 5:43 pm, francky06l [EMAIL PROTECTED] wrote:

Re: does Cache prefix work?

2008-04-23 Thread Krommenaas
I'm setting it where I'm using it. Since it's based on the domain name I can set it anywhere. I suppose if you store the user language in a cookie you could also read it anywhere. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: how can access the Auth info form view

2008-04-23 Thread djiize
when logged, you can pass user's data to the view $this-set('loggedin_user', $this-Auth-user()); and in your view: if (empty($loggedin_user)) { // not logged in } else { // logged in } On 23 avr, 08:14, candesprojects [EMAIL PROTECTED] wrote: And without $session-check('Auth.User.id'))

Re: Combine and compress js / css..

2008-04-23 Thread Grant Cox
Check out the following links: http://bakery.cakephp.org/articles/view/jsmin-helper-compress-and-cache-javascript http://bakery.cakephp.org/articles/view/automatic-javascript-and-css-packer https://trac.cakephp.org/ticket/2233 http://blog.bradleyboy.com/2007/07/28/assetpackager-for-cakephp/

Re: how can access the Auth info form view

2008-04-23 Thread real34
Hi, I'm new with Cake, but maybe a way could be to use : $this-Auth- user('a_boolean_activation_var') I'm currently learning to use Auth so I'm also interested in other answers ... :o) On 23 avr, 08:14, candesprojects [EMAIL PROTECTED] wrote: And without $session-check('Auth.User.id')) there

Re: How to use not in in new find() ?

2008-04-23 Thread rob30
I've tried 'conditions' = array('not' = array('id' = $model_ids; but its not ok :( it generates: WHERE NOT ((`id` IN (2, 5) )) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

php4 auto-validation

2008-04-23 Thread Hugues
Hi there, I there anyone who figured out why the auto-validation is not working on php4 ... 1. On a php4 server, when I try to enable validation on any fields (by setting the $validate variable in the model), my site just crash and I get a blank page when the validation is done. 2. If I test

Validation of related models in cake 1.2

2008-04-23 Thread ygneo
Hi everybody! I've reading the posts about validation of related models. I.E.; http://groups.google.com/group/cake-php/browse_thread/thread/856cda8e27da925f/0e414257fd9e64bb?hl=enlnk=gstq=validate+related+models#0e414257fd9e64bb I've the same problem: validation errors of related model doesn't

Re: php4 auto-validation

2008-04-23 Thread Fran Iglesias
El 23/04/2008, a las 8:40, Hugues escribió: Anyone already addressed this issues so far? First of all, check the class var $name in your models and controllers. It is needed for php4 compatibility, For exemaple: class Post extends AppModel { var $name = 'Post'; } if not present,

Re: cake 1.2 r6709 - scaffolding and german umlauts

2008-04-23 Thread MonkeyGirl
when I create an entry in the database with the scaffolding interface, it's possible to save german umlauts. The scaffolding webpages display the entered characters correct, except in input fields (if try to edit such an entry) or drop down boxes. The content is not corrupt, it's empty. It

Re: Struggling with Associations in 1.2.0.6311

2008-04-23 Thread NoelC
Thanks Aaron, that's what I was missing! It seems a little counter- intuitive, but it works, which is what is most important. On Apr 21, 10:12 pm, aaron bauman [EMAIL PROTECTED] wrote: Your HABTM relation is backwards. Course belongsTo Accreditation, and Accreditation hasMany Course. The

Re: Session ID

2008-04-23 Thread MonkeyGirl
Can you explain why you want to do this?  For what circumstance do they need a persistent unique value? The only thing I can think of is to store data on a persistent medium - ie database or file.  And in both of these cases you can easily generate a unique one (file / row), and just store

Re: Ajax request loads my default layout !

2008-04-23 Thread Neveldo
ok, I found my problem ! In fact, I already load a default admin template in a beforeRender() method in the AppController :p Thank a lot ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to

Re: HABTM and conditions ?

2008-04-23 Thread Neveldo
Anybody has a solution ? thank ! Cordially, Neveldo :http://www.neveldo.fr --~--~-~--~~~---~--~~ 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

Re: Trying to use Component polymorphism, How do I load a component on the fly?

2008-04-23 Thread mixersoft
I'm trying to follow your suggestion, but with adjustment so that the component instance is created in either a startup or beforeFilter method, instead of calling new in every action that needs this component. I think I have it done properly, but now I get an error when the Component tries to

Re: 1.2 Beta Manual

2008-04-23 Thread sike
Thanks, i tried that but the pdf stayed all wrong ... I managed to get the correct .css and now its just like the online one. Thanks again. On Apr 22, 6:56 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: In Mac OS X pdf-support is built into the printing dialog. If you are using Windows you

Re: HABTM and conditions ?

2008-04-23 Thread inma
Take a look at: http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/ Regards. On 23 abr, 11:41, Neveldo [EMAIL PROTECTED] wrote: Anybody has a solution ? thank ! Cordially, Neveldo :http://www.neveldo.fr --~--~-~--~~~---~--~~

Error During Sending Of an Email

2008-04-23 Thread Rocky
I am getting Error when I send email through PHPMAILER Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/bidlower/app/vendors/phpmailer/class.smtp.php on line 122 Warning: fsockopen() [function.fsockopen]:

Re: Error During Sending Of an Email

2008-04-23 Thread Renan Gonçalves
Where is the CakePHP there? Try the PHPMailer support. http://phpmailer.codeworxtech.com/ []'s On Wed, Apr 23, 2008 at 8:55 AM, Rocky [EMAIL PROTECTED] wrote: I am getting Error when I send email through PHPMAILER Warning: fsockopen() [function.fsockopen]:

Re: How to use not in in new find() ?

2008-04-23 Thread Chris Hartjes
On Wed, Apr 23, 2008 at 3:44 AM, rob30 [EMAIL PROTECTED] wrote: I've tried 'conditions' = array('not' = array('id' = $model_ids; but its not ok :( it generates: WHERE NOT ((`id` IN (2, 5) )) Of course it works. Let's say I have a table called 'teams'. ibl_stats=# select count(*)

Re: Validation of related models in cake 1.2

2008-04-23 Thread James K
I haven't had this problem in 1.2 - even models which are nested several levels all get picked up by the form helper. Are you sure you're naming your form elements using the correct dot notation? Model.RelatedModel.FieldName You also have to either explicitly call validates() on each model, or

Re: Error During Sending Of an Email

2008-04-23 Thread James K
Sounds like your server is denying outbound connections on port 25 On Apr 23, 7:55 am, Rocky [EMAIL PROTECTED] wrote: I am getting Error when I send email through PHPMAILER           Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not

Re: Possible Bug Identified - Re: belongsTo relationship killing my app

2008-04-23 Thread aaron bauman
I'm using cake 1.2 and i have many 2 or 3 word models with abundant belongsTo relationships and I haven't run into this problem. jump on the bandwagon /a On Apr 22, 8:27 pm, Langdon Stevenson [EMAIL PROTECTED] wrote: I have finally nailed down the issue and am pleased to find that I am not

Ajax::observeField

2008-04-23 Thread Davide
Hello everybody I'm trying to use the method in subject with no result. CakePHP 1.1.18. The PHP code in thtml is: ... echo $html-input(Project/name,array(maxlength=50,class=)); ... echo $ajax-observeField( ProjectName, array( update=web,

Getting the HTTP host ?

2008-04-23 Thread Neveldo
hi all , I would like to know if any view attribute exists to get the HTTP host from an cakephp install ( = http://www.example.com ) ? (I don't find it in the API ...) Or must I simply use $_SERVER['HTTP_HOST'] ? Thank ! Cordially, Neveldo : http://www.neveldo.fr

Re: Getting the HTTP host ?

2008-04-23 Thread Davide
Neveldo wrote: ... Or must I simply use $_SERVER['HTTP_HOST'] ? Don't know, I always use the $_SERVER variable. Bye Davide -- Live life like you're gonna die. Because you're gonna. William Shatner

Re: Getting the HTTP host ?

2008-04-23 Thread Sliv
you can use env('HTTP_HOST') --~--~-~--~~~---~--~~ 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: Ajax::observeField

2008-04-23 Thread Davide
Davide wrote: ... everything works except that it's returned to me that is missing argument 1 for the controller action. Solved at moment making the function argument as optional and testing for the existence of $this-data[Project][name] thank and bye davide -- Live life like you're gonna

Problem with ajax

2008-04-23 Thread mkaelkael
hello, I have this js function updateopt(id){ id= document.getElementById(id).innerthHTML; new Ajax.Updater('div2', '/listlevel.thtml', { parameters: { id: id }}); } listlevel.thtml is a views and in the same directory than the index.thml index.thtml h1Secteur/h1 ?php echo

Re: Problem with ajax

2008-04-23 Thread Davide
mkaelkael wrote: ... listlevel.thtml is a views and in the same directory than the index.thml Don't know if it's right to refer directly to a thtml file, but try remove the initial slash from /listlevel.. so linking to listlevel... Bye Davide -- Live life like you're gonna die. Because

Re: Possible Bug Identified - Re: belongsTo relationship killing my app

2008-04-23 Thread DyingFetus_666
Actually this sounds like the problem I was describing in my post: http://groups.google.com/group/cake-php/browse_thread/thread/ea10ef81a0d82741# And effectively, it looks like a problem in Cake handling some two- word table relationships. The problem I had was with tables called users and

Cake 1.2 not making instances of classes as expected.

2008-04-23 Thread mafiacooper
Hello all, I am a seasoned developer and have been building apps with Cake for some time. Today I came up against a bug that I cannot figure out - Cake just STOPPED working. I'm using the 1.2 beta on php 5.x and all has been well throughout this dev. However, I moved a block of code into the

Re: Ajax::observeField

2008-04-23 Thread Davide
A strange thing regarding this topic. I can't understand where's the problem. Everytime I call the method with the observeField, all my Session data is lost and so I'm disconnected. It's the first time I'm using Ajax+AjaxHelper+Cake, so I could do something wrong. When I remove the

Re: Ajax::observeField

2008-04-23 Thread Chris Hartjes
On Wed, Apr 23, 2008 at 11:37 AM, Davide [EMAIL PROTECTED] wrote: A strange thing regarding this topic. I can't understand where's the problem. Everytime I call the method with the observeField, all my Session data is lost and so I'm disconnected. You might have to change some stuff

Re: Ajax::observeField

2008-04-23 Thread Davide
Chris Hartjes wrote: You might have to change some stuff in your config/core.php file. Look for Session.checkAgent Often you have do Configure::write('Session.checkAgent', false); to preserve sessions when using Ajax Session.checkAgent is not defined in my core.php. I tried defining it

Re: Session problem

2008-04-23 Thread creationsings
Did you ever find a solution to this? I think I am experiencing a similar problem. I can write to a session variable, but I can only read the valid value if I do so before the action completes. Once the action completes and a new one is called, the session information is gone. I am extremely

Re: Ajax::observeField

2008-04-23 Thread Chris Hartjes
On Wed, Apr 23, 2008 at 11:52 AM, Davide [EMAIL PROTECTED] wrote: Some other ideas? Cake version 1.1.18. D'oh -- that stuff I posted is Cake 1.2 specific. I don't use Cake 1.1 at all, so can't help you there. -- Chris Hartjes Internet Loudmouth Motto for 2008: Moving from herding elephants

Simple Ajax issue

2008-04-23 Thread Neveldo
Hi all, I'm trying myself with some ajax ... My problem is simple : I want to insert in a page the rendered view of an action (which contain an ajax pagination). To do that, I use requestAction() method. Right now, it works fine. But I want to use a different layout for the action if it is an

Re: Simple Ajax issue

2008-04-23 Thread Neveldo
Ok, I'm sorry ... I just found the $this-params['requested'] method which make what I want :) Codially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

Re: Why custom model functions inside plugin models are not called?

2008-04-23 Thread aranworld
Thanks. I knew I was doing something slightly wrong, but since what I had worked, I sort of left it alone. -Aran On Apr 22, 2:14 pm, biesbjerg [EMAIL PROTECTED] wrote: Hi Aranworld, You should use var $belongsTo = array('Comment' = array('className' = 'PluginName.Comment')) On Apr 22,

Having unusual problem with Model-del() in CakePHP 1.2

2008-04-23 Thread graedus
Hi, I'm having a very strange problem with Model-del() in CakePHP 1.2. I've not experienced this before. This code worked well on 1.1, but I can't see how a porting issue could have come into play here. Here is my code: $this-Resource-del($id); // where id is provided as an argument to the

Re: Simple Ajax issue

2008-04-23 Thread Neveldo
... but I've now another problem :p Is it possible to load a view which is not the default view of the action ? I try by using $this-view or $this-load-view, but it seems to doesn't work :( thank ! --~--~-~--~~~---~--~~ You received this message because you are

Format date field in 3 select

2008-04-23 Thread avairet
Hi everybody, I'm searching for a day how format a date field from Mysql (-MM-- DD) to 3 form's selects: - date from mysql : 2008-04-23 - my form fields are build like this: for ($i=0;$i11;$i++) { $form-day('DixDate.'.$i.'.date',null,array('id'='date-sel'.$i.'- dd')).'-'.

Does CakePHP's ACL have anything like Zend_Acl's Assert functionality?

2008-04-23 Thread mcjustin
Does CakePHP's ACL have anything like Zend_Acl's Assert functionality? http://framework.zend.com/manual/en/zend.acl.advanced.html Our application will have a large number of business rules, which we need to limit access based on various non-constant criteria. If not built into cake's ACL, could

Re: php4 auto-validation

2008-04-23 Thread Hugues
Yes it is present. I doubled checked with different classes ... and finally realized that this is issue is only present when I try to validate some model with HABTM relations ... IS this a known issue? Hugues On Apr 23, 1:49 am, Fran Iglesias [EMAIL PROTECTED] wrote: El 23/04/2008, a las

Re: Simple Ajax issue

2008-04-23 Thread Axel Ariel Arroyo Braconi
if you need use a view of the same controller try with: $this-render('name_of_view'); but remember only if you need use a view of the controller if you want render a element or a view in of other controller try this $this-viewPath = 'route_of_view_folder';

Re: Validation Problem

2008-04-23 Thread plinto
Thanks, I understand what you are saying but what I need is to be able to edit mutliple items at once. For example if I have to edit 20 countries, clicking on every one, editing it and saving it would take me alot more time then selecting the ones I need to edit and having them presented in 1

Re: Cakephp 1.2 Schema could not be loaded

2008-04-23 Thread aaady
I updated CakePHP 1.2 of latest nightly built version. The command, cake acl initdb, has revived. Successfully the above 3 tables will be created. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Re: Router::queryString issue in 1.2 beta

2008-04-23 Thread Chris Hartjes
On Wed, Apr 23, 2008 at 2:04 PM, phpappdev256 [EMAIL PROTECTED] wrote: Possible Solutions: - Modify Router::queryString and have it pass a default delimiter - Modify http_socket-httpSerialize($data) function to call http_build_query() directly with a delimiter File a ticket on

Router::queryString issue in 1.2 beta

2008-04-23 Thread phpappdev256
I don't know if this has been addressed yet, but this is a problem... In router.php the method queryString uses http_build_query($q). There are 2 problems... 1) http_build_query is a PHP5-only function 2) the delimiter is not passed in the router function, so it defaults to

Re: Combine and compress js / css..

2008-04-23 Thread Mech7
Thanks i fouind this one seems quite good.. the one from bradleyboy looks ok too.. except it did not work with latest version of cake. http://sandbox2.pseudocoder.com/demo/asset The only thing that i had a hard time was with prototyope.. it will not work with jsmin... so i found a cope of:

Changing username of Authenticated user

2008-04-23 Thread Zoltan
I've got a section where I'd like to let a user change their username, with something like: e.g. $this-Auth-user('username') = $this-data['User']['name']; However this gives an error, is there a way to do this properly? Zoltan www.YYZtech.ca

$this-data disappearing

2008-04-23 Thread Kyle Decot
I am doing print_r($this-data) in my appController in the beforeFilter() and I get: Array ( [User] = Array ( [username] = kyle [password] = sample ) ) but when I do it in the UsersContoller in the login() I get: Array ( [User] = Array ( [username] = kyle ) ) Does anyone know why password data

Re: Combine and compress js / css..

2008-04-23 Thread Sam Sherlock
Also there is this built on top of the packer http://marcgrabanski.com/code/asset-mapper/ On 23/04/2008, Mech7 [EMAIL PROTECTED] wrote: Thanks i fouind this one seems quite good.. the one from bradleyboy looks ok too.. except it did not work with latest version of cake.

Re: Combine and compress js / css..

2008-04-23 Thread MattC
Hey Mech7, The asset helper is my code. Sorry about the whole packed directory image thing. It's definitely something to be fixed. I generally use absolute paths in the css files, so it hasn't been a high priority for me to fix. -Matt www.pseudocoder.com On Apr 23, 2:31 pm, Mech7 [EMAIL

Re: Changing username of Authenticated user

2008-04-23 Thread Marcin Domanski
Hey, Shouldn't you change it in db and update the auth data from the db ? look at Auth/session how the data is stored. HTH, On Wed, Apr 23, 2008 at 8:38 PM, Zoltan [EMAIL PROTECTED] wrote: I've got a section where I'd like to let a user change their username, with something like: e.g.

Re: $this-data disappearing

2008-04-23 Thread Marcin Domanski
are you using the AuthComponent ? afaik Auth unsets the password data after login. HTH, On Wed, Apr 23, 2008 at 9:10 PM, Kyle Decot [EMAIL PROTECTED] wrote: I am doing print_r($this-data) in my appController in the beforeFilter() and I get: Array ( [User] = Array ( [username] = kyle

Elementary Data Validation??

2008-04-23 Thread Jee
I have a form for which the following validation rules don't work. There are other validation rules that do work including a custom regular expression which makes me wonder if it is the fact that these are not text inputs that is the problem. Any help is greatly appreciated! Jee My code is as

Re: cake and JS question

2008-04-23 Thread byBartus
Try addScript() - http://api.cakephp.org/1.2/class_view.html#42c9e03d9fa609bd09d9530d9ee8266b You can use it like that: ?php $this-addScript($javascript-link(array('jquery','ui.tabs'))); ? ?php $this-addScript($javascript-codeBlock('$(function() { $ (#album-data ul).tabs(); });')); ? ?php

Forms that add/edit Multiple Models part II

2008-04-23 Thread Jee
Can anyone give me any suggestions for adding and editing multiple models from one form in Cake 1.2? I found a post on the topic here: http://groups.google.com/group/cake-php/browse_thread/thread/77183ca04771e348 but I get the following when I attempted it:

Re: Simple Ajax issue

2008-04-23 Thread Neveldo
Thank Axel, this is what I'm looking for ! In fact, I need for one action an normal view and an ajax view ! thank ! Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

problems with scaffolding after submit

2008-04-23 Thread miraz
Hi, I'am experimenting with the blog tutorial from cookbook in the cakephp 1.2.0.6311 I tried to change the tutorial controller to a scaffolded one in posts_controller.php: ?php class NotesController extends AppController { var $scaffold; } ? Everything is working fine up to the moment

Re: Possible Bug Identified - Re: belongsTo relationship killing my app

2008-04-23 Thread Langdon Stevenson
Hi Aaron Given that this problem has only turned up in the the last release of 1.1 (the site was working happily prior to that), moving to 1.2 would be overkill (just refactoring alone would take weeks of work). For now I am moving back to an earlier release, but I would rather find the bug

Re: Possible Bug Identified - Re: belongsTo relationship killing my app

2008-04-23 Thread Langdon Stevenson
Hi DF It would be interesting to see if that problem still presents in a previous release of 1.1. It certainly sounds like they are related. Regards, Langdon DyingFetus_666 wrote: Actually this sounds like the problem I was describing in my post:

Re: testing with phpunit

2008-04-23 Thread Renan Gonçalves
Why CakePHP choose SimpleTest for their Test Suite? Because, I wanna use PHPUnit too. PHPUnit has a extension called Selenium that test web applications (html, javascript, ajax, etc... website). I'ts perfect for Web 2.0!!! Well ... Why CakePHP choose SimpleTest for their Test Suite? []'s On

Re: Validation Problem

2008-04-23 Thread b logica
I'm a dough-head. Sorry, I didn't read your post correctly. But, would you really need to change the name f any countries? Those don't change too often. And when one did, I'd think you'd want to update the main DB record for it rather than the association to some other model. If what you want

Re: Format date field in 3 select

2008-04-23 Thread James K
FormHelper's datetime input type already done exactly this. You don't have to manually put together the day/month/year fields. On Apr 23, 12:43 pm, avairet [EMAIL PROTECTED] wrote: Hi everybody, I'm searching for a day how format a date field from Mysql (-MM-- DD) to 3 form's selects:

Re: Does CakePHP's ACL have anything like Zend_Acl's Assert functionality?

2008-04-23 Thread James K
Cake provides perfectly generic, free-form ACL rules. It has built-in support for controller or action based ACL via the Auth Component, but you don't need to use either. I have very fine grained ACOs, and use AROs as roles. When I do an ACL check, I can write something like $this-Acl-

Re: Why custom model functions inside plugin models are not called?

2008-04-23 Thread Max
Great info... Thanks a lot. On Apr 22, 11:38 pm, biesbjerg [EMAIL PROTECTED] wrote: I'll bet echo get_class($this-Review) will output 'AppModel'. The reason is you need to define $uses like this when accessing plugin models: var $uses = array('User', 'Reviews.Review'); You should do the

Re: Possible Bug Identified - Re: belongsTo relationship killing my app

2008-04-23 Thread Langdon Stevenson
Rolling back to Cake version 1.1.5850 fixes this problem. There are a lot of changes to model code in the next revision and something in there breaks Cake as described below. My PHP knowledge is not strong enough to be able to work out the problem and successfully fix it. So if anyone

Re: Using pagination helper on a view element

2008-04-23 Thread Elmo
Can I add to this and say ditto? On Apr 7, 10:19 pm, Juan Luis Baptiste [EMAIL PROTECTED] wrote: Hi, I'm trying to make a view element and reuse it in various views. The element uses the pagination helper, the problem is that the element can't see the paginator helper object: : Undefined

Re: Why custom model functions inside plugin models are not called?

2008-04-23 Thread Max
Can't we also load behaviors same way? Inside /app/models/video.php var $actsAs = array('Upload' = array('field' = 'video', 'type' = 'video',