Re: Admin Route or Admin Password

2011-02-26 Thread amarradi
i added an password from login into the mysql db and now i'm ready for
login

But where i set the hashing algorithm i dont know

On 26 Feb., 20:37, acl68  wrote:
> Hi Marcus,
>
> I tried a lot, too , until it finally worked, it is not really simple. Which
> kind of password hashing do you use?
> Try to  debug output the password from the db and the hashed password you give
> at the login form.
>
> Anja
>
> Am Samstag, 26. Februar 2011, um 20:21:16 schrieb amarradi:
>
> > Thanks a lot,
>
> > I tryed this video tutorial
> >http://tv.cakephp.org/video/jasonwydro/2011/01/29/cakephp_1_3_auth_au...
> > cation_component_tutorial_-_administrator_login This System runs also under
> > 1.3.7. But the login doesn't work
>
> > On 26 Feb., 20:08, acl68  wrote:
> > > Hi Marcus,
>
> > > you have no password automatically set. Cake is a framework an not an
> > > WCMS. You can code a user authenitication and autheticated users can be
> > > allowed to use the admin methods, but when you start you have no values,
> > > no passwords, no login.
>
> > > Have a look
> > > here:http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
> > > This is based on cake 1.2 but should work for 1.3, too.
>
> > > Hope that helps!
>
> > > Anja
>
> > > Am Samstag, 26. Februar 2011, um 19:54:38 schrieb amarradi:
> > > > Hello together,
>
> > > > when i add the admin routing to my Application, where did i set the
> > > > Password for Admin. Or an other Question. Whats the standard-Password
> > > > for Admin?
>
> > > > Many greetings
> > > > Marcus Radisch

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin Route or Admin Password

2011-02-26 Thread amarradi
Where did i found the hashing algorithm

On 26 Feb., 20:37, acl68  wrote:
> Hi Marcus,
>
> I tried a lot, too , until it finally worked, it is not really simple. Which
> kind of password hashing do you use?
> Try to  debug output the password from the db and the hashed password you give
> at the login form.
>
> Anja
>
> Am Samstag, 26. Februar 2011, um 20:21:16 schrieb amarradi:
>
> > Thanks a lot,
>
> > I tryed this video tutorial
> >http://tv.cakephp.org/video/jasonwydro/2011/01/29/cakephp_1_3_auth_au...
> > cation_component_tutorial_-_administrator_login This System runs also under
> > 1.3.7. But the login doesn't work
>
> > On 26 Feb., 20:08, acl68  wrote:
> > > Hi Marcus,
>
> > > you have no password automatically set. Cake is a framework an not an
> > > WCMS. You can code a user authenitication and autheticated users can be
> > > allowed to use the admin methods, but when you start you have no values,
> > > no passwords, no login.
>
> > > Have a look
> > > here:http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
> > > This is based on cake 1.2 but should work for 1.3, too.
>
> > > Hope that helps!
>
> > > Anja
>
> > > Am Samstag, 26. Februar 2011, um 19:54:38 schrieb amarradi:
> > > > Hello together,
>
> > > > when i add the admin routing to my Application, where did i set the
> > > > Password for Admin. Or an other Question. Whats the standard-Password
> > > > for Admin?
>
> > > > Many greetings
> > > > Marcus Radisch

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin Route or Admin Password

2011-02-26 Thread amarradi
Thanks a lot,

I tryed this video tutorial
http://tv.cakephp.org/video/jasonwydro/2011/01/29/cakephp_1_3_auth_authentication_component_tutorial_-_administrator_login
This System runs also under 1.3.7. But the login doesn't work



On 26 Feb., 20:08, acl68  wrote:
> Hi Marcus,
>
> you have no password automatically set. Cake is a framework an not an WCMS.
> You can code a user authenitication and autheticated users can be allowed to
> use the admin methods, but when you start you have no values, no passwords, no
> login.
>
> Have a look 
> here:http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
> This is based on cake 1.2 but should work for 1.3, too.
>
> Hope that helps!
>
> Anja
>
> Am Samstag, 26. Februar 2011, um 19:54:38 schrieb amarradi:
>
> > Hello together,
>
> > when i add the admin routing to my Application, where did i set the
> > Password for Admin. Or an other Question. Whats the standard-Password
> > for Admin?
>
> > Many greetings
> > Marcus Radisch

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Admin Route or Admin Password

2011-02-26 Thread amarradi
Hello together,

when i add the admin routing to my Application, where did i set the
Password for Admin. Or an other Question. Whats the standard-Password
for Admin?

Many greetings
Marcus Radisch

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: cakephp requirements question

2010-10-24 Thread amarradi
Hello,

all this things are installed and runs normally. But no pictures and
grafcs where displayed from cakephp i don't know where the fault is

On 24 Okt., 22:38, Adrian Arnautu  wrote:
> Hello,
>
> You might want to check if your apache works with php5. Also you may want to
> activate the mod_rewrite.
>
> A basic CakePHP env consists of
> - an webserver (apache or something else)
> - php5
> - mod_php5 (this depends of what webserver you use)
> - mod_rewrite (although it can easily work without it)
>
> Regards,
> Adrian
>
> On Sun, Oct 24, 2010 at 11:33 PM, amarradi  wrote:
> > Hello together,
>
> > i've set up an apache and php5 and mysql on the ubuntu-dev-pc. But no
> > pictures an no css will be display.
> > I testet it with phpmyadmin, it will be display normally.
>
> > What do you install to run the cakephp i used the 1.3.3 and 1.3.5
> > xampp is no option for me because i use my own server-system.
>
> > The error-log is this
> > [Sun Oct 24 22:17:20 2010] [error] [client 127.0.0.1] File does not
> > exist: /var/www/cakephp/css, referer:http://localhost/cakephp/
> > [Sun Oct 24 22:17:20 2010] [error] [client 127.0.0.1] File does not
> > exist: /var/www/cakephp/img, referer:http://localhost/cakephp/
> > [Sun Oct 24 22:17:21 2010] [error] mod_log_sql: insufficient
> > configuration info to establish database link
> > [Sun Oct 24 22:17:21 2010] [error] mod_log_sql: child spawned but
> > unable to open database link
> > [Sun Oct 24 22:17:21 2010] [error] [client 127.0.0.1] File does not
> > exist: /var/www/cakephp/css, referer:http://localhost/cakephp/
> > [Sun Oct 24 22:17:21 2010] [error] [client 127.0.0.1] File does not
> > exist: /var/www/cakephp/img, referer:http://localhost/cakephp/
> > [Sun Oct 24 22:17:22 2010] [error] [client 127.0.0.1] File does not
> > exist: /var/www/cakephp/css, referer:http://localhost/cakephp/
> > [Sun Oct 24 22:17:22 2010] [error] [client 127.0.0.1] File does not
> > exist: /var/www/cakephp/img, referer:http://localhost/cakephp/
> > [Sun Oct 24 22:17:23 2010] [error] [client 127.0.0.1] File does not
> > exist: /var/www/cakephp/css, referer:http://localhost/cakephp/
> > [Sun Oct 24 22:17:23 2010] [error] [client 127.0.0.1] File does not
> > exist: /var/www/cakephp/img, referer:http://localhost/cakephp/
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


cakephp requirements question

2010-10-24 Thread amarradi
Hello together,


i've set up an apache and php5 and mysql on the ubuntu-dev-pc. But no
pictures an no css will be display.
I testet it with phpmyadmin, it will be display normally.

What do you install to run the cakephp i used the 1.3.3 and 1.3.5
xampp is no option for me because i use my own server-system.

The error-log is this
[Sun Oct 24 22:17:20 2010] [error] [client 127.0.0.1] File does not
exist: /var/www/cakephp/css, referer: http://localhost/cakephp/
[Sun Oct 24 22:17:20 2010] [error] [client 127.0.0.1] File does not
exist: /var/www/cakephp/img, referer: http://localhost/cakephp/
[Sun Oct 24 22:17:21 2010] [error] mod_log_sql: insufficient
configuration info to establish database link
[Sun Oct 24 22:17:21 2010] [error] mod_log_sql: child spawned but
unable to open database link
[Sun Oct 24 22:17:21 2010] [error] [client 127.0.0.1] File does not
exist: /var/www/cakephp/css, referer: http://localhost/cakephp/
[Sun Oct 24 22:17:21 2010] [error] [client 127.0.0.1] File does not
exist: /var/www/cakephp/img, referer: http://localhost/cakephp/
[Sun Oct 24 22:17:22 2010] [error] [client 127.0.0.1] File does not
exist: /var/www/cakephp/css, referer: http://localhost/cakephp/
[Sun Oct 24 22:17:22 2010] [error] [client 127.0.0.1] File does not
exist: /var/www/cakephp/img, referer: http://localhost/cakephp/
[Sun Oct 24 22:17:23 2010] [error] [client 127.0.0.1] File does not
exist: /var/www/cakephp/css, referer: http://localhost/cakephp/
[Sun Oct 24 22:17:23 2010] [error] [client 127.0.0.1] File does not
exist: /var/www/cakephp/img, referer: http://localhost/cakephp/

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


swift mailer version 4.0.5 component in cakephp 1.3.3

2010-08-23 Thread amarradi
hello together i tried to update from 1.2.5 to 1.3.3
http://groups.google.de/group/cake-php/browse_thread/thread/c996425212014d17

But now i have an Problem with the swift mailer component i use the
Version 4.0.5 and the fault is this
Fatal error: Call to undefined method WishlistsController::_sendMail()
in C:\xampp\htdocs\MyWishList\app\controllers\wishlists_controller.php
on line 69

Whats wrong there

Can everyone help me please

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Migration from 1.2.5 to 1.3.3

2010-08-23 Thread amarradi
Hello!

setFlash runs :-) but there are now many other things open swift
Mailer component seems incompatible with 1.3.3 i use 4.0.5 of swift
mailer component

There are an error ...

On 23 Aug., 19:23, amarradi  wrote:
> If i add $compontens to the controller i get an error like this
>
> Warning (2): fopen(C:\xampp\htdocs\MyWishList\app\tmp\cache\models
> \cake_model_default_mahaloo_list) [function.fopen]: failed to open
> stream: Invalid argument [CORE\cake\libs\file.php, line 154]
> Code | Context
>
> $mode   =       "w"
> $force  =       false
>
> fopen - [internal], line ??
> File::open() - CORE\cake\libs\file.php, line 154
> File::write() - CORE\cake\libs\file.php, line 245
> FileEngine::write() - CORE\cake\libs\cache\file.php, line 144
> Cache::write() - CORE\cake\libs\cache.php, line 303
> DataSource::listSources() - CORE\cake\libs\model\datasources
> \datasource.php, line 241
> DboMysql::listSources() - CORE\cake\libs\model\datasources\dbo
> \dbo_mysql.php, line 611
> Model::setSource() - CORE\cake\libs\model\model.php, line 768
> Model::__construct() - CORE\cake\libs\model\model.php, line 474
> ClassRegistry::init() - CORE\cake\libs\class_registry.php, line 141
> Controller::loadModel() - CORE\cake\libs\controller\controller.php,
> line 641
> Controller::constructClasses() - CORE\cake\libs\controller
> \controller.php, line 506
> Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 186
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
> [main] - APP\webroot\index.php, line 83
>
> The helper is set in the controller
>
> On 23 Aug., 19:14, Jeremy Burns | Class Outfit
>
>  wrote:
> > Are you including both the Session helper and component?
>
> > Jeremy Burns
> > Class Outfit
>
> > jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> > On 23 Aug 2010, at 18:11, amarradi wrote:
>
> > > Hello together,
>
> > > i tried to update my app from 1.2.5 to 1.3.3. All things seems to be
> > > run normally. Only the Session->setFlash() dont't work fine
>
> > > function add($listId = null) {
>
> > >        if(!$listId) { // expecting wishlist_entries/add/${listId} or
> > > wishlist_id as hidden field in form
> > >            if(!empty($this->data['WishlistEntry']['wishlist_id'])) {
> > >                $listId = $this->data['WishlistEntry']['wishlist_id'];
> > >            }
> > >            else {
> > >                $this->Session->setFlash('No Id found');
> > >                $this->redirect(array('controller' => 'wishlists' ,
> > > 'action' => 'select'));
> > >            }
> > >        }
>
> > > Where is the fault?
>
> > > I also moved my flash.ctp from layout to element
>
> > > Here is the content of it
> > > -
> > >  > > /* SVN FILE: $Id$ */
> > > /**
> > > *
> > > * PHP versions 4 and 5
> > > *
> > > * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
> > > * Copyright 2005-2008, Cake Software Foundation, Inc. (http://
> > >www.cakefoundation.org)
> > > *
> > > * Licensed under The MIT License
> > > * Redistributions of files must retain the above copyright notice.
> > > *
> > > * @filesource
> > > * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc.
> > > (http://www.cakefoundation.org)
> > > * @link          http://www.cakefoundation.org/projects/info/cakephp
> > > CakePHP(tm) Project
> > > * @package       cake
> > > * @subpackage    cake.cake.libs.view.templates.layouts
> > > * @since         CakePHP(tm) v 0.10.0.1076
> > > * @version       $Revision$
> > > * @modifiedby    $LastChangedBy$
> > > * @lastmodified  $Date$
> > > * @license      http://www.opensource.org/licenses/mit-license.php
> > > The MIT License
> > > */
> > > ?>
> > >  > >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > > http://www.w3.org/1999/xhtml";>
> > > 
> > > charset(); ?>
> > > 
>
> > > 
> > > 
> > > 
> > > <!--
> > > P { text-align:center; font:bold 1.1em sans-serif }
> > > A { color:#444; text-decoration:none }
> > > A:HOVER { text-decoration: underline; color:#44E }
> > > -->
> > > 
> > > 
> > > 
> > > 
> > > 
> > 

Re: Migration from 1.2.5 to 1.3.3

2010-08-23 Thread amarradi
If i add $compontens to the controller i get an error like this

Warning (2): fopen(C:\xampp\htdocs\MyWishList\app\tmp\cache\models
\cake_model_default_mahaloo_list) [function.fopen]: failed to open
stream: Invalid argument [CORE\cake\libs\file.php, line 154]
Code | Context

$mode   =   "w"
$force  =   false

fopen - [internal], line ??
File::open() - CORE\cake\libs\file.php, line 154
File::write() - CORE\cake\libs\file.php, line 245
FileEngine::write() - CORE\cake\libs\cache\file.php, line 144
Cache::write() - CORE\cake\libs\cache.php, line 303
DataSource::listSources() - CORE\cake\libs\model\datasources
\datasource.php, line 241
DboMysql::listSources() - CORE\cake\libs\model\datasources\dbo
\dbo_mysql.php, line 611
Model::setSource() - CORE\cake\libs\model\model.php, line 768
Model::__construct() - CORE\cake\libs\model\model.php, line 474
ClassRegistry::init() - CORE\cake\libs\class_registry.php, line 141
Controller::loadModel() - CORE\cake\libs\controller\controller.php,
line 641
Controller::constructClasses() - CORE\cake\libs\controller
\controller.php, line 506
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 186
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
[main] - APP\webroot\index.php, line 83

The helper is set in the controller

On 23 Aug., 19:14, Jeremy Burns | Class Outfit
 wrote:
> Are you including both the Session helper and component?
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 23 Aug 2010, at 18:11, amarradi wrote:
>
> > Hello together,
>
> > i tried to update my app from 1.2.5 to 1.3.3. All things seems to be
> > run normally. Only the Session->setFlash() dont't work fine
>
> > function add($listId = null) {
>
> >        if(!$listId) { // expecting wishlist_entries/add/${listId} or
> > wishlist_id as hidden field in form
> >            if(!empty($this->data['WishlistEntry']['wishlist_id'])) {
> >                $listId = $this->data['WishlistEntry']['wishlist_id'];
> >            }
> >            else {
> >                $this->Session->setFlash('No Id found');
> >                $this->redirect(array('controller' => 'wishlists' ,
> > 'action' => 'select'));
> >            }
> >        }
>
> > Where is the fault?
>
> > I also moved my flash.ctp from layout to element
>
> > Here is the content of it
> > -
> >  > /* SVN FILE: $Id$ */
> > /**
> > *
> > * PHP versions 4 and 5
> > *
> > * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
> > * Copyright 2005-2008, Cake Software Foundation, Inc. (http://
> >www.cakefoundation.org)
> > *
> > * Licensed under The MIT License
> > * Redistributions of files must retain the above copyright notice.
> > *
> > * @filesource
> > * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc.
> > (http://www.cakefoundation.org)
> > * @link          http://www.cakefoundation.org/projects/info/cakephp
> > CakePHP(tm) Project
> > * @package       cake
> > * @subpackage    cake.cake.libs.view.templates.layouts
> > * @since         CakePHP(tm) v 0.10.0.1076
> > * @version       $Revision$
> > * @modifiedby    $LastChangedBy$
> > * @lastmodified  $Date$
> > * @license      http://www.opensource.org/licenses/mit-license.php
> > The MIT License
> > */
> > ?>
> >  >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > http://www.w3.org/1999/xhtml";>
> > 
> > charset(); ?>
> > 
>
> > 
> > 
> > 
> > <!--
> > P { text-align:center; font:bold 1.1em sans-serif }
> > A { color:#444; text-decoration:none }
> > A:HOVER { text-decoration: underline; color:#44E }
> > -->
> > 
> > 
> > 
> > 
> > 
> > ---
> > Can everyone help me please?
>
> > Many greetings Marcus
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Migration from 1.2.5 to 1.3.3

2010-08-23 Thread amarradi
Hello together,

i tried to update my app from 1.2.5 to 1.3.3. All things seems to be
run normally. Only the Session->setFlash() dont't work fine


function add($listId = null) {

if(!$listId) { // expecting wishlist_entries/add/${listId} or
wishlist_id as hidden field in form
if(!empty($this->data['WishlistEntry']['wishlist_id'])) {
$listId = $this->data['WishlistEntry']['wishlist_id'];
}
else {
$this->Session->setFlash('No Id found');
$this->redirect(array('controller' => 'wishlists' ,
'action' => 'select'));
}
}

Where is the fault?

I also moved my flash.ctp from layout to element

Here is the content of it
-
http://www.cakephp.org)
 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://
www.cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
(http://www.cakefoundation.org)
 * @link  http://www.cakefoundation.org/projects/info/cakephp
CakePHP(tm) Project
 * @package   cake
 * @subpackagecake.cake.libs.view.templates.layouts
 * @since CakePHP(tm) v 0.10.0.1076
 * @version   $Revision$
 * @modifiedby$LastChangedBy$
 * @lastmodified  $Date$
 * @license   http://www.opensource.org/licenses/mit-license.php
The MIT License
 */
?>

http://www.w3.org/1999/xhtml";>

charset(); ?>











---
Can everyone help me please?

Many greetings Marcus

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: How to search - A very strange find

2010-03-27 Thread amarradi
The Bug is found in the model i have set an forgeignKey on hasOne.

Thanks a lot for the help @everyone

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: How to search - A very strange find

2010-03-27 Thread amarradi
In Table of Model2 is the Model1_id and this id is the same like the
id in model1

How did i build the select

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: How to search - A very strange find

2010-03-27 Thread amarradi
In Table of Model2 is the Model1_id and this id is the same like the
id in model1

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: How to search - A very strange find

2010-03-27 Thread amarradi
I knwo the fault because under that id in Model2 is no entry in model1

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: How to search - A very strange find

2010-03-27 Thread amarradi
Now it runs Thanks a lot in that model.

In the other way the Model contained Model1 is empty but why?

Here is the code of my model1

 $this->Model2->Behaviors->attach('Containable');
$this->set('var1', $this->Model2->find('first',
array(
'conditions' => array('Model2.id' => $id),
'contain' => array('Model1' => array('fields'=>
array('Model1.register_password'))),
'fields' => array(
'Model2.id',
'Model1.id',
'Model1.register_password',
'Model2.id',
'Model2.description',
)
)
)
);

The debug output looks so

Array
(
[Model2] => Array
(
[model2_id] => 1
[id] => 2
[title] => Text
[description] => Text
[reservation_status] => FREE
)

[Model1] => Array
(
[register_password] =>
[id] =>
)

)

Whats wrong with it

On 27 Mrz., 12:38, amarradi  wrote:
> Hello,
>
> thanks for that idea ands that way, but after i try it, it will be
> shown the hole array of Model2.
> Where are my fault?
>
> Marcus
>
> On 27 Mrz., 06:11, Martin Radosta  wrote:
>
> > |Your question is not clear, I guess you need this:
>
> > $this->Model1->Behaviors->attach('Containable');
> > |
>
> > $this->Model1->find('first',
> >         array(
> >                 'conditions' =>  array('Model1.id' =>  $id),
> >                 'contain' =>  array('Model2' =>  array('fields' =>  
> > array('Model2.title', 'Model2.description', 'Model2.reservation_status'))),
> >                 'fields' =>  
> > array('Model1.id','Model1.title','Model1.description')
> >          )
> > );
>
> > On 03/26/2010 09:10 PM, amarradi wrote:
>
> > > I have to go to bed good night
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > > with their CakePHP related questions.
>
> > > 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
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > > To unsubscribe from this group, send email to 
> > > cake-php+unsubscribegooglegroups.com or reply to this email with the 
> > > words "REMOVE ME" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: How to search - A very strange find

2010-03-27 Thread amarradi
Now it runs Thanks a lot in that model.

In the other way the Model contained Model1 is empty but why?

Here is the code of my model1

 $this->Model2->Behaviors->attach('Containable');
$this->set('var1', $this->Model2->find('first',
array(
'conditions' => array('Model2.id' => $id),
'contain' => array('Model1' => array('fields'=>
array('Model1.register_password'))),
'fields' => array(
'Model2.id',
'Model1.id',
'Model1.register_password',
'Model2.id',
'Model2.description',
)
)
)
);

The debug output looks so

Array
(
[WishlistEntry] => Array
(
[wishlist_id] => 1
[id] => 2
[title] => Text
[description] => Text
    [reservation_status] => FREE
)

[Wishlist] => Array
(
[register_password] =>
[id] =>
)

)

Whats wrong with it





On 27 Mrz., 12:38, amarradi  wrote:
> Hello,
>
> thanks for that idea ands that way, but after i try it, it will be
> shown the hole array of Model2.
> Where are my fault?
>
> Marcus
>
> On 27 Mrz., 06:11, Martin Radosta  wrote:
>
> > |Your question is not clear, I guess you need this:
>
> > $this->Model1->Behaviors->attach('Containable');
> > |
>
> > $this->Model1->find('first',
> >         array(
> >                 'conditions' =>  array('Model1.id' =>  $id),
> >                 'contain' =>  array('Model2' =>  array('fields' =>  
> > array('Model2.title', 'Model2.description', 'Model2.reservation_status'))),
> >                 'fields' =>  
> > array('Model1.id','Model1.title','Model1.description')
> >          )
> > );
>
> > On 03/26/2010 09:10 PM, amarradi wrote:
>
> > > I have to go to bed good night
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > > with their CakePHP related questions.
>
> > > 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
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > > To unsubscribe from this group, send email to 
> > > cake-php+unsubscribegooglegroups.com or reply to this email with the 
> > > words "REMOVE ME" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: How to search - A very strange find

2010-03-27 Thread amarradi
Hello,

thanks for that idea ands that way, but after i try it, it will be
shown the hole array of Model2.
Where are my fault?

Marcus

On 27 Mrz., 06:11, Martin Radosta  wrote:
> |Your question is not clear, I guess you need this:
>
> $this->Model1->Behaviors->attach('Containable');
> |
>
> $this->Model1->find('first',
>         array(
>                 'conditions' =>  array('Model1.id' =>  $id),
>                 'contain' =>  array('Model2' =>  array('fields' =>  
> array('Model2.title', 'Model2.description', 'Model2.reservation_status'))),
>                 'fields' =>  
> array('Model1.id','Model1.title','Model1.description')
>          )
> );
>
> On 03/26/2010 09:10 PM, amarradi wrote:
>
> > I have to go to bed good night
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> > To unsubscribe from this group, send email to 
> > cake-php+unsubscribegooglegroups.com or reply to this email with the words 
> > "REMOVE ME" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: How to search - A very strange find

2010-03-26 Thread amarradi
I have to go to bed good night

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: How to search - A very strange find

2010-03-26 Thread amarradi
I want the title description and in the first version
reservation_status
i try it over contains or recursive 2 But no change



On 27 Mrz., 00:39, cricket  wrote:
> Which fields from Model2 do you want? Do you want anything from
> Model2?
>
> On Mar 26, 4:57 pm, amarradi  wrote:
>
> > The Question is how do i get the information from an/the associated
> > model

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


How to show fields from an related model

2010-03-26 Thread amarradi
Hello together,

i have two models, hasOne(Model2) hasMany(Model1) connection

now i try to search over an id in model1 the data in model2.

i try it in this way

$this->set('var1',$this->Model1->find('first', array(
'conditions' => array('Model1.id' => $id),
'recursive' => 2,
'fields' => array('Model1.foreignkey_id','Model2.id')
)));
The column Model2.id is unknown.
But it in the table.
But if i try the other controller (Model2) it still runs

$this->set('var2', $this->Model2->find('first', array(
'conditions' => array('Model1.id' => $id),
'recursive' =>  2,
'fields' => array(
'Model2.wishlist_id',
'Model2.id',
'Model2.title',
'Model1.id',
'Model2.id',
'Model2.description',
'Model2.reservation_status',

)
)
)
);

In this case it runs normally. How do i get it that a can found in all
controller, without an searchindex

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: How to search - A very strange find

2010-03-26 Thread amarradi
The Question is how do i get the information from an/the associated
model

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: How to search - A very strange find

2010-03-26 Thread amarradi
Thanks for the tip but i get this sql error
Unknown column Model2.id' in 'field list'

Because there is an array in Model2.

[0]

[1]

I dont know how do i get an coorect dataset


On 26 Mrz., 21:31, Martin Radosta  wrote:
> try
>      'recursive' => -1
>
> On 03/26/2010 05:23 PM, amarradi wrote:
>
> > I have to correct it because in the that have to be an other value
>
> >>   $this->set('variable', $this->Model1->find('first',array(
> >>                  'conditions' =>  array('Model1.id' =>  $id),
> >>                  'recursive' =>    1,
> >>                  'fields' =>
> >> array('Model1.id','Model1.title','Model1.description')
> >>              )
> >>              )
> >>              );
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > 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
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> > To unsubscribe from this group, send email to 
> > cake-php+unsubscribegooglegroups.com or reply to this email with the words 
> > "REMOVE ME" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: How to search - A very strange find

2010-03-26 Thread amarradi
I have to correct it because in the that have to be an other value
>  $this->set('variable', $this->Model1->find('first',array(
>                 'conditions' => array('Model1.id' => $id),
>                 'recursive' =>  1,
>                 'fields' =>
> array('Model1.id','Model1.title','Model1.description')
>             )
>             )
>             );

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


How to search - A very strange find

2010-03-26 Thread amarradi
Hello together

Array
(
[Model1] => Array
(
[id] => 1
[title] =>titletext
[description] => description
)

[Model2] => Array
(
[0] => Array
(
[id] => 2
[model1_id] => 1
[title] => titletext
[description] => description
[amount] => 1
[reservation_email] =>
[reservation_mail_sent] =>
[reservation_status] => FREE
[token] => 4bad0da4-da9c-426a-b639-0aa423c87734
[created] => 2009-12-30 16:59:53
[modified] => 2010-02-25 15:50:25
)

[1] => Array
(
[id] => 3
[model1_id] => 1


Thats an dump of an var-debug
Thats my call

 $this->set('model1', $this->Model1->find('first',array(
'conditions' => array('Model1.id' => $id),
'recursive' =>  1,
'fields' =>
array('Model1.id','Model1.title','Model1.description')
)
)
);
How can i get with this call(!) fields of the Model2.

The Model1.id has many Model2.ids
 if i use the fields like this way
Model2.id Model2.title it doesn't change it.
In Model2 is also an array [0][n] and this number is not the id

How do i this.
I ask because the application is very big
i tried with read but there are to many values( amount, token, ...)
which i don't need in this array so i want a smaller array

can everyone help me please?

many greeting
Marcus

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Show username and logout link when user is logged

2010-03-08 Thread amarradi
Yes,

thans a lot, thats what i'm looking for

On 7 Mrz., 17:40, cricket  wrote:
> if ($session->read('Auth.User')) {
>
> And to get the username use $session->read('Auth.User.username')
>
> (or whatever the field is)
>
> On Mar 6, 11:19 am, amarradi  wrote:
>
> > Hello together,
>
> > i tryed this tutorial 
> > (http://komunitasweb.com/2009/03/cakephp-acl-tutorial-what-and-how/
> > ) as an example. But now i want to show the username and the logout
> > link if the user is logged. how do i this?
>
> > How can i show the username and the link on the ctp files?
>
> > Many greetings, nice weekend
>
> > marcus radisch

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Show username and logout link when user is logged

2010-03-06 Thread amarradi
Hello together,

i tryed this tutorial ( 
http://komunitasweb.com/2009/03/cakephp-acl-tutorial-what-and-how/
) as an example. But now i want to show the username and the logout
link if the user is logged. how do i this?

How can i show the username and the link on the ctp files?

Many greetings, nice weekend

marcus radisch

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP installation

2010-02-26 Thread amarradi
In my case i use xampp als "Dev-Server", it works fine. After Testing
local i copy it to testing on an shared hoster. No Problems


On 26 Feb., 09:43, WebbedIT  wrote:
> > Are you teeling me to install XAMPP for windows and then I can really
> > work with cakePHP 
>
> Yes, I use WAMPServer 2 and it works a dream, only took one or two
> config changes and it is near identical to working on my production
> Redhat Linux server.
>
> HTH
>
> Paul.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP installation

2010-02-25 Thread amarradi
Hello,

i also use Windows 7 but not with an stand alone PHP, Apache etc. pp

I recommand you to use xampp because you had no configuration. Here
you find more infos
http://www.apachefriends.org/en/index.html

Tell me your decision and if you had problems

marcus

On 25 Feb., 23:16, Francisco Serôdio  wrote:
> Hi,
>
> I’m trying to install cakePHP in my PC but I’m facing some troubles.
> I’m installing in a PC with Windows 7, Apache 2,2, PHP 5 and MySQL.
> Apache it’s running correctly and PHP as well.
> I have unpacked cakePHP into the folder cake_1_2 within my web server
> folder, which I believe is – C:\Program Files\Apache Software
> Foundation\Apache2.2\htdocs
> After performing this steps I tried to execute –http://localpost/cake_1_2/- 
> and I got:
>
> If I tried to execute –http://www.example.com/cake_1_2/- and I got:
>
> What seems to be the problem  Thanks.
>
> Cumprimentos / Regards
> Francisco Serodio
> tel +351 919613316
>
>  image001.jpg
> 27KAnzeigenHerunterladen
>
>  image002.jpg
> 34KAnzeigenHerunterladen
>
>  image003.jpg
> 4KAnzeigenHerunterladen

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Question of Performance read () or findById

2010-02-25 Thread amarradi
In which case do you prefer read and in which case do you use find?

On 25 Feb., 21:00, amarradi  wrote:
> Thanks,
>
> i think i try find and read. After that i compare the performance. If
> everyone had some more informations, please post it here
>
> Marcus
>
> On 25 Feb., 19:13, "Dr. Loboto"  wrote:
>
> > They both ends with regular find. You can just check source.
>
> > On Feb 25, 9:02 pm, amarradi  wrote:
>
> > > Hello,
>
> > > i have an question to the performance of an statement. Which is better
> > > in the view of the performance.
> > > The first way i use was this.
>
> > >  $entry = $this->WishlistEntry->read(null, $this->data['WishlistEntry']
> > > ['wishlist_entry_id']);
> > > in the next step of my programming evolution i found findById.
>
> > >  $entry = $this->MyModel->findById($this->data['MyModel']
> > > ['entry_id']);
>
> > > What are the difference between this tow lines of code. Which is
> > > better for the performance
>
> > > many greetings
> > > marcus radisch

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Question of Performance read () or findById

2010-02-25 Thread amarradi
In which case do you prefer read and in which case do you use find?

On 25 Feb., 21:00, amarradi  wrote:
> Thanks,
>
> i think i try find and read. After that i compare the performance. If
> everyone had some more informations, please post it here
>
> Marcus
>
> On 25 Feb., 19:13, "Dr. Loboto"  wrote:
>
> > They both ends with regular find. You can just check source.
>
> > On Feb 25, 9:02 pm, amarradi  wrote:
>
> > > Hello,
>
> > > i have an question to the performance of an statement. Which is better
> > > in the view of the performance.
> > > The first way i use was this.
>
> > >  $entry = $this->WishlistEntry->read(null, $this->data['WishlistEntry']
> > > ['wishlist_entry_id']);
> > > in the next step of my programming evolution i found findById.
>
> > >  $entry = $this->MyModel->findById($this->data['MyModel']
> > > ['entry_id']);
>
> > > What are the difference between this tow lines of code. Which is
> > > better for the performance
>
> > > many greetings
> > > marcus radisch

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Question of Performance read () or findById

2010-02-25 Thread amarradi
Thanks,

i think i try find and read. After that i compare the performance. If
everyone had some more informations, please post it here

Marcus

On 25 Feb., 19:13, "Dr. Loboto"  wrote:
> They both ends with regular find. You can just check source.
>
> On Feb 25, 9:02 pm, amarradi  wrote:
>
> > Hello,
>
> > i have an question to the performance of an statement. Which is better
> > in the view of the performance.
> > The first way i use was this.
>
> >  $entry = $this->WishlistEntry->read(null, $this->data['WishlistEntry']
> > ['wishlist_entry_id']);
> > in the next step of my programming evolution i found findById.
>
> >  $entry = $this->MyModel->findById($this->data['MyModel']
> > ['entry_id']);
>
> > What are the difference between this tow lines of code. Which is
> > better for the performance
>
> > many greetings
> > marcus radisch

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Question of Performance read () or findById

2010-02-25 Thread amarradi
Hello,

i have an question to the performance of an statement. Which is better
in the view of the performance.
The first way i use was this.

 $entry = $this->WishlistEntry->read(null, $this->data['WishlistEntry']
['wishlist_entry_id']);
in the next step of my programming evolution i found findById.

 $entry = $this->MyModel->findById($this->data['MyModel']
['entry_id']);

What are the difference between this tow lines of code. Which is
better for the performance

many greetings
marcus radisch

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Howto publish legal notice

2010-02-23 Thread amarradi
Yes, i want edit the legal notice in the texteditor.

Do you have any howto, where i found some more informations?


On 23 Feb., 17:13, WebbedIT  wrote:
> If it's fairly static content and you are happy to edit a view file
> each time you want to make changes, install cake, add an action to the
> page controller and a view at /app/views/pages/actionname.ctp and hey
> presto.
>
> You would access this page athttp://www.website.com/pages/actionname
> and one of the default routes woulc redirect the request to /pages/
> view/actionname.
>
> HTH
>
> Paul.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Howto publish legal notice

2010-02-23 Thread amarradi
Hello,

i want publish the legal notice of my page via cakePHP. How do i this?

Without an database? Or with an database.
I want show only the page with the notice

many greetings
marcus radisch

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: The right way to save updated Database Entry

2010-02-21 Thread amarradi
The solution is the validation :-)

save(array $data = null, array $params = array())

$params = array ('validate' => false, 'fieldList' => array (),
'callback' => true);

so is it runable ;)

Thanks a lot

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: The right way to save updated Database Entry

2010-02-21 Thread amarradi
is it posible that the values will not be save because the model
validates this fields
so that the field couldn't be reset
var $validate = array(
'wishlist_id' => 'numeric',
'title' => 'notempty',
'reservation_email' => 'email'
);

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: The right way to save updated Database Entry

2010-02-21 Thread amarradi
Hello,

thanks for your code.
This way doesn't work.

Is my first way not the same like your, but only with an array in the
save () - Action.

I don't know what is wrong. My Problem is that my way only sets the
status in the dataset but no other value

Do you have any ideas? The reject-action works well, but only to save
data in the database

marcus

On 21 Feb., 18:19, John Andersen  wrote:
> WebbedIT got the right answer, just with some missing detail :)
>
> The solution missed that the values to be assigned in an array must
> use => !
> So here the corrected solution:
> [code]
> $this->WishlistEntry->read(null, $entryId);
> $this->WishlistEntry->set(array(
>    'reservation_status' => 'FREE',
>    'reservation_email' => 'NULL',
>    'reservation_mail_sent' => 'NULL',
>    'reservation_token' => String::uuid()
> ));
> $this->WishlistEntry->save();
> [/code]
> Enjoy,
>    John
>
> On Feb 21, 6:36 pm, amarradi  wrote:> Thanks, This 
> way also doesn't work. But why? I tested it in some ways.
> > I dont't know why the reject Action works only with the status field.
>
> [snip]

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: The right way to save updated Database Entry

2010-02-21 Thread amarradi
Thanks, This way also doesn't work. But why? I tested it in some ways.
I dont't know why the reject Action works only with the status field.

i should post my sourcecode here of this action. The commented area is
the code which allows to set the status free. The problem is, that
this code only works if the 3 lines are  commented. If i use this 3
lines the reject Action doesn't reject. The action don't work.

something isn't well.

Thanks for your help
To explain.

The user can add an e-mail and a code to activate an account, he gets
an e-mail with an activation link, with the uuid. If he had activated
he can use an other link the reject(give back) his activation,
The link for an activation is so.

http://localhost/mahaloo/wishlist_entries/confirm/12/token:a8caff15-41f2-4b28-9577-f5f688378806

and the link for a reject

http://localhost/mahaloo/wishlist_entries/reject/12/token:a8caff15-41f2-4b28-9577-f5f688378806
Thanks a lot

marcus

function reject($entryId = null) {

// check valid entryId
if(!$entryId) {
$this->Session->setFlash('Falsche URL.', 'default',
array('class' => 'message_error'));
$this->redirect(array('controller' => 'wishlists',
'action' => 'present'));
}
// check Token was submitted
if(empty($this->params['named']['token'])) {
$this->Session->setFlash('Falsche URL.');
$this->redirect(array('controller' => 'wishlists',
'action' => 'view', $entryId));
}

// get the data
$reservation_token = $this->params['named']['token'];
$entry = $this->WishlistEntry->read(null, $entryId);


if($entry && $reservation_token) { // valid entry && token was
submitted

// only reserved entries can be rejected
if(strcasecmp('RESERVED', $entry['WishlistEntry']
['reservation_status']) != 0) {
$this->Session->setFlash('Der Eintrag muss erst
reserviert werden, bevor die Reservierung aufgelöst werden
kann.');
$this->redirect(array('controller' => 'wishlists',
'action' => 'view', $entry['WishlistEntry']['wishlist_id']));
}

// check the token
if( strcasecmp($entry['WishlistEntry']
['reservation_token'], $reservation_token)  == 0 ) { // remove the
registration.

$this->set('status', 'success');
$this->set('entry', $entry);

// send reject mail
$this->__sendRejectMail($entry);

// save the stuff

//$this->WishlistEntry->read(null, $entryId);
//$this->WishlistEntry->save(
//array(
//'reservation_status' => 'FREE'
// //  ,'reservation_email' => null
// //   ,'reservation_mail_sent' => null
// //   ,'reservation_token' => String::uuid()
//)
//);
$this->WishlistEntry->read(null, $entryId);
$this->WishlistEntry->set(array(
'reservation_status' , 'FREE',
'reservation_email' , NULL,
'reservation_mail_sent', 'NULL',
'reservation_token' , String::uuid()
));
$this->WishlistEntry->save();
$this->Session->setFlash(
'Deine Reservierung für '.
$entry['WishlistEntry']['title']. ' wurde erfolgreich
aufgehoben',
'default',
array('class' => 'message_info')
);
$this->redirect(array('controller' => 'wishlists',
'action' => 'view', $entry['WishlistEntry']['wishlist_id']));

} else { // show the entry
 $this->Session->setFlash('Falscher Token. Die
Reservierung für das Geschenk '.$entry['WishlistEntry']
['title'].' kann nicht gelöscht werden');
 $this->redirect(array('controller' => 'wishlists',
'action' => 'view', $entry['WishlistEntry']['wishlist_id']));
}
} else {
$this->Session->setFlash('Falsche URL.', 'default',
array('class' => 'message_error'));
$this->redirect(array('controller' => 'wishlists',
'action' => 'select'));
}
}

On 21 Feb., 11:18, WebbedIT  wrote:
> OK, apologies for redirecting you to the cookbook when your initial
> entry had followed the structure explained on the Saving Your Data
> page, it's just I have never used the Model->set method to save things
> so it looked odd to me.
>
> You have taken
>
>    1.  $this->Post->read(null, 1);
>    2. $this->Post->set(array(
>    3.   'title' => 'New title',
>    4.   'published' => false
>    5. ));
>    6. $this->Post->save();
>
> and made it into
>
>    1. $this->WishlistEntry->read(null, $entryId);
>    2. $this->WishlistEntry->set(
>    3.   'reservation_status' , 'FREE',
>    4.   'reservation_email' , 'NULL',
>    5.   'reservation_mail_sent', 'NULL',
>    6.  

Re: The right way to save updated Database Entry

2010-02-20 Thread amarradi
Hello,
i tried this way now, but no data will be saved. The Older Version
saved the status but not the other values.

$this->WishlistEntry->read(null, $entryId);
   $data = array (
  'WishlistEntry' => array (
  'id' => $entryId
  ,'reservation_status' =>'FREE'
  ,'reservation_email' => null
  ,'reservation_mail_sent' => null
  ,'reservation_token' => String::uuid()
  )
);
$this->WishlistEntry->save($data);
Where re my problems?

On 20 Feb., 14:24, WebbedIT  wrote:
> You need to read the following in more 
> detail:http://book.cakephp.org/view/75/Saving-Your-Data
>
> Basically your data array must be in the format
>
> array(
>   'ModelName'=>array(
>     'fieldName1'=>'value',
>     'fieldName2'=>'value',
>     ...
>   )
> )

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: The right way to save updated Database Entry

2010-02-20 Thread amarradi
Thanks for your answer
I tried to use an array but the fields will not(!) be saved
$this->WishlistEntry->save(
array(
'reservation_status' =>'FREE'
,'reservation_email' => null
,'reservation_mail_sent' => null
,'reservation_token' => String::uuid()
)
);
Whats wrong wit it

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


The right way to save updated Database Entry

2010-02-20 Thread amarradi
Hello together,

if have a cakephp software, which sends mail to the user, to activate
an account. No great think. And it works. So now the user can
diactivate the account
The Database will be updated but not all fields only one of four. The
reservation_status is right set but the other field are not null.

 $this->WishlistEntry->read(null, $entryId);
$this->WishlistEntry->set(
'reservation_status' , 'FREE',
'reservation_email' , 'NULL',
'reservation_mail_sent', 'NULL',
'reservation_token' , String::uuid()

);
$this->WishlistEntry->save();

How do i set the reservation_email and the reservation_mail-sent to
NULL. How do i update the 4 of the 10 Fields of the table

Many greetings from an helpless cakeuser

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


design develop and programming cakephp views

2010-01-20 Thread amarradi
Hello,

i like cakePHP because its easy to develop complex Webprojects, but
how do you build the front. I mean the views. Thats very complex. Do
you have an designer or an easy way to build the front :-)

many greetings
marcus radisch
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Trigger howto

2010-01-20 Thread amarradi
Oh i forget an main fact.

You can register you for an product/article. So then you get an email
with the registration-link, after you have clicked the article is
your. When you forget to click or an other person used your email so
you wait 24h and the reserveation ist kill ;)
Util this 24h the article is pending after that without clicking the
link the aricle is free. When you click the normally the article is
fix or registrated.
I want that this usecase runs alone. In this moment i whatch ervery
day and set the status by myself...



On 20 Jan., 11:05, robustsolution  wrote:
> AFAIK, triggers in MySQL do not behave like a bomb(timer), I may be
> wrong, but this is what I know so far!
>
> As for the solution of your problem, I think every time a new user
> registers, do a simple query to delete the old registered users that
> are not activated yet and where there registration date is more than
> 24 hours ago...
>
> just keep it simple man.
>
> have a nice baking day
>
> On Jan 20, 9:08 am, amarradi  wrote:
>
> > Hello,
>
> > i need nelp by development an trigger.
> > I've an app were you can get an registration. So if you ask for one
> > you get an email with a link an the status is reserve. If you don't
> > click the link in the next 24h you will no be registrated. Your
> > reservation is killed ;)
> > The first time i think i do the job direct on the MySQL Database.  But
> > the Problem i don't have rights on the webspace from my shared hoster.
> > What can i do to trigger it?
>
> > many greetings
> > Marcus Radisch
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Trigger howto

2010-01-20 Thread amarradi
Hello,

i need nelp by development an trigger.
I've an app were you can get an registration. So if you ask for one
you get an email with a link an the status is reserve. If you don't
click the link in the next 24h you will no be registrated. Your
reservation is killed ;)
The first time i think i do the job direct on the MySQL Database.  But
the Problem i don't have rights on the webspace from my shared hoster.
What can i do to trigger it?

many greetings
Marcus Radisch
Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Eine Frage zu Tabellen Relationen( Error 1054)

2009-05-01 Thread amarradi

Hab ich gemacht danke

On 1 Mai, 04:00, davidpers...@gmx.de wrote:
> Hallo Marcus,
>
> Auf dieser Mailingliste wird leider nur Englisch gesprochen. Versuch
> es entweder auf der deutschen CakePHP Mailingliste (http://
> groups.google.com/group/cakephp-de) oder poste deine Frage nochmal auf
> Englisch neu.
>
> -David
>
> On 30 Apr., 18:59, amarradi  wrote:
>
> > Hallo zusammen,
>
> > ich habe 2 Tabellen mit folgendem Aufbau
>
> > Tabelle 1
>
> > masterdata
>
> > enthält folgende Felder id, vname, vstrasse, vpostleitzahl, vort,
> > vgericht, vmitglieder, vgenrenummer, vgenre,vansprechpartner
>
> > Tabelle 2
>
> > contacts
>
> > enthält folgende Felder id canrede, ctitel, cvorname, cname, cstrasse,
> > cpostleitzahl, cort, ctelefon, cfax
>
> > Die Idee ist die das jedem Eintrag der masterdata(Vereinsliste) genau
> > ein Ansprechpartner zugeordnet ist.
> > Sozusagen eine hasOne beziehung
>
> > mein masterdata Model sieht folgendermaßen aus
>
> > class Masterdatum extends AppModel {
>
> >         var $name = 'Masterdatum';
> >         var $hasOne = array('Contact');
>
> > }
>
> > mein contact Model sieht so aus
>
> > class Contact extends AppModel {
>
> >         var $name = 'Contact';
>
> > }
>
> > Welche Änderungen muss ich an meinem Controller Vornehmen, das es auch
> > so funktioniert. Zur Zeit bekomme ich einen SQL Fehler 1054 und einen
> > Fehler in der foeach-Schleife der index und view.ctp
> > Das cakePHP Framework ist das aktuelle 1.2.2.8120.
>
> > Kann mir diesbezüglich jemand helfen, denn die Anleitung im cakebook
> > sind dahingehend irgendwie nicht weit genug. Hat jemand eine gute
> > Anleitung wie man einfach solche Beziehungen aufbaut und versteht. Das
> > ist zur Zeit mein größtes Problem. Danke jetzt schon mal
>
> > Viele Grüße
>
> > Marcus Radisch
>
>
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Eine Frage zu Tabellen Relationen( Error 1054)

2009-04-30 Thread amarradi

Hallo zusammen,

ich habe 2 Tabellen mit folgendem Aufbau

Tabelle 1

masterdata

enthält folgende Felder id, vname, vstrasse, vpostleitzahl, vort,
vgericht, vmitglieder, vgenrenummer, vgenre,vansprechpartner


Tabelle 2

contacts

enthält folgende Felder id canrede, ctitel, cvorname, cname, cstrasse,
cpostleitzahl, cort, ctelefon, cfax

Die Idee ist die das jedem Eintrag der masterdata(Vereinsliste) genau
ein Ansprechpartner zugeordnet ist.
Sozusagen eine hasOne beziehung

mein masterdata Model sieht folgendermaßen aus

class Masterdatum extends AppModel {

var $name = 'Masterdatum';
var $hasOne = array('Contact');

}

mein contact Model sieht so aus

class Contact extends AppModel {

var $name = 'Contact';
}



Welche Änderungen muss ich an meinem Controller Vornehmen, das es auch
so funktioniert. Zur Zeit bekomme ich einen SQL Fehler 1054 und einen
Fehler in der foeach-Schleife der index und view.ctp
Das cakePHP Framework ist das aktuelle 1.2.2.8120.

Kann mir diesbezüglich jemand helfen, denn die Anleitung im cakebook
sind dahingehend irgendwie nicht weit genug. Hat jemand eine gute
Anleitung wie man einfach solche Beziehungen aufbaut und versteht. Das
ist zur Zeit mein größtes Problem. Danke jetzt schon mal

Viele Grüße

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Question to Database relations $hasMany and belongsTo

2009-02-21 Thread amarradi

Thanks

But there are no change... :( The Error is the same,

I think i implement my own searchengine, i believe this is the problem

A Question

What does this code do?

This :

$users = $this->Translate->User->find('all');
$this->set('user', $users);

many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Question to Database relations $hasMany and belongsTo

2009-02-21 Thread amarradi

Thanks for the help

here my models
 First the User

 array('notempty'),

'password' => array(
'rule' => array('between', 6,64),
'message' => 'Ihr Passwort muss mindestens 6 und darf
höchstens 64 Zeichen lang sein.',
'required' => true
),
'retry' => array(
'rule' => array('between', 6,64),
'message' => 'Ihr Passwort muss mindestens 6 und darf
höchstens 64 Zeichen lang sein.',
'required' => true
),
);

}
?>

array(
'rule'=> array('minLength', 1),
'message' => 'Bitte geben Sie das schweizer-deutsche Wort
ein.'
),
'language2'=> array(
'rule'=> array('minLength', 1),
'message' => 'Bitte geben Sie das deutsche Wort ein.'
),
'q'=>array (
'rule'=>array('minLength', 1),
'message' => 'Bitte geben Sie ein Suchwort ein.'
)
);
}
?>


My view Translate Controller 

There is no view Controller, because i use the searchable_behaviors
from cakePHP so i bringt the results based on in the browser

 function search(){


$this->set('rowCount',$this->Translate->find('count'));
//$this->Session->setFlash();

$this->set('results',$this->Translate->search($this->data
['Translate']['q']));
$results=$this->Translate->search($this->data['Translate']
['q']);
if (!empty($this->data['Translate']['q']) && empty($results))
{
$this->Session->setFlash("Diese Übersetzung gibt es noch
nicht.");
$this->redirect(array
('controller'=>'Translates','action'=>'add'), null, true);
}
else
{
   $this->set('results', $results);
//   $this->Session->setFlash("Test: ".$this->data['Translate']
['q']);

}
}

The searchable_behaviors runs normally :) (after long testing an
configurationperiod)

with the $results i go on the search.ctp und the foreach loop


--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Question to Database relations $hasMany and belongsTo

2009-02-21 Thread amarradi

Hello together,

i've an Problem

I have an Database with 2 Tables

on table called translates and one table called users

so a user can add many translations und a Translation can only be add
from one user.

How do i connect the Tables

my translates has a field user_id as forgeign key

the add is correct the user_id will be added in the translates Table
but how can i change the view to read the username not the user_id

Example after adding an word:

germanword | englischword | created | modfied | user_id

gehen | go |  |  | 8

my view

?php foreach ($results as $translate): ?>




link('Übersetzung korrigieren', array
('action'=>'edit', $translate['Translate']['id']));?>




Whats wrong here?
The Error in the last colum is
Undefined index:  User [APP/views/translates/search.ctp, line 49]

49: 

many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problems with Security Component

2009-02-20 Thread amarradi

Hello

do cakePHP on scaffolding use Formhelper? my forms are generated via
scaffolding...

Ajax is not in use this moment...

Here is my problem view

?php echo $form->create('User', array('controller'=>'users','action'
=> 'add'));?>

";
echo "Name";
echo $form->input('name',array('label' => false));
echo "";
echo "Loginname*";
echo $form->input('username',array('label' => false));
echo "";
echo "Passwort*";
echo $form->input('password',array('label' => false));
echo "Passwort Wiederholung*";
echo $form->input('retry',array('type'=>'password','label'
=>false));
?>
end('Anlegen');?>

Where is my bug?

many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: update from cakePHP 1.2.0.7692 RC3 to cakePHP 1.2.1.8004 stable

2009-02-20 Thread amarradi

Thanks a lot the was successful but

the reason for updated was that i want to use the Security Component
and i had an error. Like this

http://groups.google.com/group/cake-php/browse_thread/thread/28e619524d140ad2#

But this bug is always there. Did every know anything how i can fix
it.

many greeting

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



update from cakePHP 1.2.0.7692 RC3 to cakePHP 1.2.1.8004 stable

2009-02-19 Thread amarradi

hello together,

until this moment i develop with cakePHP 1.2.0.7692 RC3. But now is
the Situation, that one bug is in the old version which is fixed in
1.2.1.8004.

How can i easy update from an older version to the newest. Is  there
any userguide available? Or should i try it.

many greeting

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: user Profile protection howto

2009-02-19 Thread amarradi



On 19 Feb., 22:31, Future22  wrote:
> If ($this->params['id']=$this->Auth->user('id')) {
>     user can edit}
>
> else {
>     redirect...
>
> }
This doesn't run.
The if-statement had an bug. The ==
If ($this->params['id']==$this->Auth->user('id')) {
> user can edit}
>
> else {
> redirect...
>
> }

But it is no change.
Here my bug context
In line 73 is the if-statement as the first statement in the action
==
Notice (8): Undefined index:  id [APP/controllers/
users_controller.php, line 73]

Code | Context

$id =   "1"

}
function edit($id = null) {
if($this->params['id']==$this->Auth->user('id')) {

UsersController::edit() - APP/controllers/users_controller.php, line
73
Object::dispatchMethod() - CORE/cake/libs/object.php, line 116
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 259
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 213
[main] - APP/webroot/index.php, line 90

Warning (2): Cannot modify header information - headers already sent
by (output started at /opt/lampp/htdocs/cakePHP/cake/basics.php:111)
[CORE/cake/libs/controller/controller.php, line 587]

Code | Context

$status =   "Location: http://localhost/cakePHP/users";

header - [internal], line ??
Controller::header() - CORE/cake/libs/controller/controller.php, line
587
Controller::redirect() - CORE/cake/libs/controller/controller.php,
line 568
UsersController::edit() - APP/controllers/users_controller.php, line
92
Object::dispatchMethod() - CORE/cake/libs/object.php, line 116
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 259
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 213
[main] - APP/webroot/index.php, line 90

(default) 0 query took ms
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: user Profile protection howto

2009-02-19 Thread amarradi

Thanks

But how do i realize this

i tried in my user edit action such condition in the first line

f($this->data['User']['id']!=$this->Auth->user('id')) {
user can edit
} else
 ... redirect
}

But it doest run

many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Problems with Security Component

2009-02-19 Thread amarradi

Hello together,

i want test what Security Component can do. So i added it

var $components = array('Security');

and in beforeFilter

function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('index','search');
// Security Component
$this->Security->requireAuth('add','edit');
// Security Component
$this->set('id',$this->Auth->user('id'));
$this->set('username',$this->Auth->user('username'));
}

But since this moment i had some Problems

in  my controller action
Undefined index:  Translate [APP/controllers/
translates_controller.php, line 84]

This is the Action with line 84

function search(){


$this->set('rowCount',$this->Translate->find('count'));
//$this->Session->setFlash();
83  $this->set('results',$this->Translate->search($this->data
['Translate']['q']));
84  $results=$this->Translate->search($this->data['Translate']
['q']);
if (!empty($this->data['Translate']['q']) && empty($results))
{
$this->Session->setFlash("Dieser Datensatz exitiert (noch)
nicht.");
$this->redirect(array('action'=>'add'), null, true);
}
else
{
   $this->set('results', $results);
//   $this->Session->setFlash("Test: ".$this->data['Translate']
['q']);

}
}

Whats that for an error?

many greeting

Marcus Radisch

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



user Profile protection howto

2009-02-19 Thread amarradi

Hello together,

How do i protect the userprofiles?

Because i don't know how i protect the userprofiles mutually. if a
user is logged in and he visits

/cakePHP/users/edit/1 he can edit his profile. But when he typed in
his browser /cakePHP/users/edit/2 he can edit an other profile.

How can i stop this?

many greeting

Marcus Radisch

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Register on my system without login

2009-02-19 Thread amarradi

Hello together,

now i'm at the point that somebody should register on my system. There
a little problem, because the add action in my user controller need an
login, thats pointless.
in my entries Controller is an action
isAuthorized where i define the 'allows' which run without login
This runs very good...

should i implement in the UsersController also such an action.

In the system there are no groups only users in DB and foreign

many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Change view by userstate

2009-02-19 Thread amarradi

Thanks a lot,

thats the better way.

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Change view by userstate

2009-02-19 Thread amarradi

I found the solution

I set an username on an variable, and after Logout this variable i set
to null

:)

if(!empty($username)) {
  echo $html->link('Logout', array
('controller'=>'users','action'=>'logout'));
} else {
  echo $html->link('Login', array
('controller'=>'users','action'=>'login'));
}
?>

many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Change view by userstate

2009-02-19 Thread amarradi

Hello,

i want that my login link will be an logout link when a user with this
browser is login in.

When he is logout the link should show login. And if he is login the
link should show logout
I tried

debug ($session->read()); die;

but there is no state variable.

Which variable can i use for that feature?

many greeting

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Links from an other controller in my view

2009-02-19 Thread amarradi

Thanks a lot it runs very well :) :) double smile
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Links from an other controller in my view

2009-02-19 Thread amarradi

Hello together,

i have 2 Controller EntriesController and UsersController.

And i have views for the Entries and views for the user.

If i set an link like in an view from Entries i will get an link to
add new Entry

$html->('Add Entry', array('action'=>'add'));

But what have i to do to get an link to Add new User into the Entry-
View ? I tried

$html->('Add User', array('action'=>'Users.add'));

But is doesn't run

Many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: The logged in username on view a Question about the AuthComponent

2009-02-19 Thread amarradi

Thanks a lot :) Its so easy...

My next question is coming
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



The logged in username on view a Question about the AuthComponent

2009-02-19 Thread amarradi

Hello together,

my Controller has the following action
function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('index','search');
}

if i click on the add Action e.q. i will be automatic redirect to the
login screen. Thats ok.

But how can i set the logged in username on the views? Thanks a lot

many greetings

Marcus Radisch


--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



get an @opendir error in the folder.php

2009-02-16 Thread amarradi

Hello together,

i tried and tried the improved captcha
http://groups.google.com/group/cake-php/browse_thread/thread/1e313f6904b37f1e


Now i see an error and i found an error in the folder.php
The Error came from the Captcha-Component

http://bakery.cakephp.org/articles/view/improved-captcha-component
out of the
function __getFonts() {

$fonts = array();

if ($handle = @opendir($this->fontpath)) {

while (($file = readdir($handle)) !== FALSE) {

$extension = strtolower(substr($file, 
strlen($file) - 3, 3));

if ($extension == 'ttf') {

$fonts[] = $file;

}

}

closedir($handle);

} else {

return null;

}

if (count($fonts) == 0) {

return null;

} else {

return $fonts;

}

} //getFonts

I use the 1.2.0.7692 RC3 Version, but in the final version i see the
same Problem

Can everyone help me?

Many greetings

Marcus Radisch

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Looking for a good spam - protection Component

2009-02-15 Thread amarradi

Hello.

this looks very interessing, i will try it :)

Thans a lot, and if i have question, the i ask you :)


--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Looking for a good spam - protection Component

2009-02-13 Thread amarradi

Yes i'm looking for spam-protection, for comment spam. But i don't
know anything about akismet. I search a tool that is easy to use and
good again, so i tried the Improved Captchas... But it doesn't run...
Why? I dont't know...

What do you think about such mathematical protection like?

Whats 5+6 =>

Is such algorithm to easy?




--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Looking for a good spam - protection Component

2009-02-13 Thread amarradi

Hello together,

i'm looking for a good spam-protection. I tried

http://bakery.cakephp.org/articles/view/improved-captcha-component

but with this component i had some Problems, please look in this
thread.

http://groups.google.com/group/cake-php/browse_thread/thread/1e313f6904b37f1e

So now is the time that my first cakePHP Project goes online and i
don't wan't spam in my DB.

Which component do you use? Which is the best Technology(Captchas or
oher

Many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How long run the sql statement?

2009-02-09 Thread amarradi

Thanks a lot. I know this configuration, but is there any other way to
get the process time? So i can customize is easier... I don't need the
sql statement, only the time for running

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How long run the sql statement?

2009-02-08 Thread amarradi

Hello together,

is there any easy way in cakePHP to count how long my sql-statement
runs?(like on google.com) And if yes, where i do find more
informations

many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: An complex DB SQL Statement Condition

2009-02-08 Thread amarradi



On 8 Feb., 17:41, Alfredo Quiroga-Villamil  wrote:
> Marcus:
>
> If I understood the question correctly what you are looking for is the
> following:
>
> If a user goes to make an entry into the table you've created, and the
> column1-column2 combination already exists for that particular user
> then you want to stop them from being able to re-enter it.
>
> If that is the case, one possible solution would be to simply check
> and see if column1 and 2 exist for that particular user id, if it
> does, then let them know they already have such combination.
>
> $iTotal = $this->Model->find('count',
>    array(
>       'conditions' => array(
>          'user_id' => $iUserId
>          ,'col1'    => $sCol1
>          ,'col2'    => $sCol2
>       )
>    )
> );
>
> if ( $iTotal > 0 ) {
>    // User has that combination} else {
>
>    // Enter the combination into the Table, new entry.
>
> }
>
> I wrote this very quickly and off the top of my head; I am pretty new
> to cakephp so the syntax might not be right; but I think that's the
> overall idea assuming I correctly understood your requirement.
>
> Regards,
>
> Alfredo
>
Great Alfredo,

That way is easy but and very good. Great Thank you!!

many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



An complex DB SQL Statement Condition

2009-02-08 Thread amarradi

Hello together,

i've an DB - Table with two interessting columns. So now i want check
if somebody enter the same Words. Let me explain a little bit more

column 1 | column 2
Table | Chair

So if somebody enter the same combination in the Textfield the line
souldn't add to Table

My prefered Test-construct is
$results = $this->MyModel->find(
'AND' => array
(array(
'column1'=> $this->data['MyModel']['column1']),
'column2'=> $this->data['MyModel']['column2'])
);
But if somebody Type Table | Wall e.q. That is correct. Only the same
String-combination

In http://book.cakephp.org/view/73/Retrieving-Your-Data i found not
really help. Can everyone help me
How does it run correctly?

Many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How get i the return into my view

2009-02-08 Thread amarradi

Thanks a lot, it runs very well :)



On 8 Feb., 14:45, majna  wrote:
> http://book.cakephp.org/view/57/Controller-Methods
>
> function example () {
>    $this->set('my_value', $val);
>
> }
>
> VIew:
> 
>
> On Feb 8, 1:24 pm, amarradi  wrote:
>
> > Hello together,
>
> > now i've an function in my controller class that returns an numbered
> > value. This value i want show on my view.
>
> > my controller class looks so...
> >  > class myController extends AppController {
> > ...
> > function example () {
>
> > return $val
>
> > }
> > ...
> > }
>
> > I think i should do it so in my view.
>
> > example ?>
>
> > How do i get it from the controller correctly in the view
>
> > many greetinngs
>
> > marcus radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How get i the return into my view

2009-02-08 Thread amarradi

Hello together,

now i've an function in my controller class that returns an numbered
value. This value i want show on my view.

my controller class looks so...
example ?>

How do i get it from the controller correctly in the view

many greetinngs

marcus radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How get i the return into my view

2009-02-08 Thread amarradi

Hello together,

now i've an function in my controller class that returns an numbered
value. This value i want show on my view.

my controller class looks so...
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: select count * from with cakePHP

2009-02-08 Thread amarradi

Hello,

thanks a lot, the cookbook is new for me. I will read it :)


On 8 Feb., 11:13, Miles J  wrote:
> Perhaps you should read the cookbook.
>
> http://book.cakephp.org/view/73/Retrieving-Your-Data
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



select count * from with cakePHP

2009-02-08 Thread amarradi

Hello together,

I've an existing DB-Table and i want to count the rows. In PHP without
cake i do 'select count * from Tablename'. How do i this with cakePHP
1.2?
Thanks a lot

many greetings

Marcus Radisch


--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Need help with the Improved Captcha Component

2009-02-06 Thread amarradi

Which lines of Code should i change now, i found me bug,(I changed the
incorrect if-condition) but there is no code verification. How i can
get it?

unction add(){
$this->Captcha->case = true;
if(!empty($this->data)) {
$this->Translate->create();
if($this->Translate->save($this->data) && $this->Captcha-
>protect()) {
$this->Session->setFlash('The Translation has been
saved');
$this->redirect(array('action'=>'index'),null, true);
} else {
$this->Session->setFlash('The Translation has not been
saved. Try again');
}
}
}
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Filter empty Textfields

2009-02-06 Thread amarradi



On 6 Feb., 16:45, amarradi  wrote:
> Hello together,
>
> i have a form with the inputfield and a button, the input ist named
> 'q' How can i filter if the form will loaded(when i klick on the view
> with the forn) And the Textfield is empty? I don't know how i get the
> values of the iput area?
>
> many greetings
>
> Marcusa Radisch

Thanks i found it out

$this->data[Model]['field']


--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Need help with the Improved Captcha Component

2009-02-06 Thread amarradi

Hello

i've tried this Captcha Components

http://bakery.cakephp.org/articles/view/improved-captcha-component

Great the captcha is show in my browser :) Yeah.
But no captcha checking. How do i get it, that the captcha will
checked
This are my directories and files first
/cakePHP/app/controllers/components/captcha.php
/cakePHP/app/controllers/my_controller.php

this are the changes of my_controller.php
var $components = array ('Captcha');
var $helpers = array('Html','Form','Time', 'Datum','Captcha');
The Function i added..

function captcha(){
$this->Captcha->show();
}

into my_controller is an action to write an new entry into my db-table
function add(){
$this->Captcha->case = true;
if(!empty($this->data) && [b]$this->Captcha->protect()[/b]) {
$this->Translate->create();
if($this->Translate->save($this->data)) {
$this->Session->setFlash('The Translation has been
saved');
$this->redirect(array('action'=>'index'),null, true);
} else {
$this->Session->setFlash('The Translation has not been
saved. Try again');
}
}
}

/cakePHP/app/views/helpers/captcha.php
/cakePHP/app/views/translates/add.ctp

The last line of my add.ctp is
input(); ?>

So the code is downloaded and added into my cakePHP Framework. The
Captcha is showing when i call the add.ctp view.

How can i get it that the captcha will be checked.

The only change from me in my add action was the "bold" condition.

Can everyone help me please?

many greetings

marcus radisch
as

--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Filter empty Textfields

2009-02-06 Thread amarradi

Hello together,

i have a form with the inputfield and a button, the input ist named
'q' How can i filter if the form will loaded(when i klick on the view
with the forn) And the Textfield is empty? I don't know how i get the
values of the iput area?

many greetings

Marcusa Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: howto build an form where the Textfield and buttons are side by side

2009-02-06 Thread amarradi



On 5 Feb., 20:55, John Andersen  wrote:
> On Feb 4, 10:28 pm, amarradi  wrote:
>
> > Hello together,
>
> > i tried it since my start with cakePHP. How get i my forms in an
> > "normal" view. Textfield and the button, all what can in this time is
> > to build an form where the textfield is over the button..
>
> > many greetings
>
> > Marcus Radisch
>
> Hi Marcus,
>
> Attach a style sheet to handle the layout of the textfield and the
> button.
>
> Enjoy,
>    John

Hello John,

thanks a lot, i will try it
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



howto build an form where the Textfield and buttons are side by side

2009-02-04 Thread amarradi

Hello together,

i tried it since my start with cakePHP. How get i my forms in an
"normal" view. Textfield and the button, all what can in this time is
to build an form where the textfield is over the button..

many greetings

Marcus Radisch
--~--~-~--~~~---~--~~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---