Configue::lisObjects($type,$path,$cahe) ; Seems $path doesnt work????

2010-02-08 Thread cherif_Gsoul
look at this code snipest :


$controllers = Configure::listObjects('controller');
$plugins = Configure::listObjects('plugin');
if (!empty($plugins)) {
foreach ($plugins as $plugin) {
$pPath= APP . 'plugins' . DS. $plugin . DS . 
'controllers' . DS;
$pluginControllers = 
Configure::listObjects('controller',
$pPath  ,false);
if (!empty($plugincontrollers)) {
foreach ($pluginControllers as 
$controller) {
$models[] = 
"$plugin.$controller";
}
}
}
}
return $controllers;


i want to retreive every controller in my app even the plugins
controller and in 1.2.X i can do it easily with the Configure class
and it's listObjects method like in this snipest but it doesnt work
with plugins controllers and as you see i think that the path is
correct for every plugin but it returns nothing if you see where i am
wrong please help or test the code to check if the $path varible works
well in the core of cake.

nb: the result is great for app/controllers.

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


expiration date page (was- Fwd: Hello Sir)

2010-02-08 Thread Marcelo Andrade
-- Forwarded message --
From: r sai lingeswara reddy 
Date: Mon, Feb 8, 2010 at 1:31 PM
Subject: Hello Sir

Hello Sir,
How are you?
I have a doubt regarding the php(I'm using cakephp framework). What I
need to do is...I have to set the expiration date a certain page. For
example.
I am creating a christmas party page.
1) I need to first set the user login page
2) then redirect it to the main party page
3) And I need to close the page on a particular date
  for example:- the party page shud be available on from dec 1st 2010
to dec 27th 2010
    How do i do it sir? Can u guide me..Do I have to make use
of session--put ---get?? Do u have any examples that I can go
through...Thank u in advance...have a nice day

Looking forward to ur reply...

Sincerely,
Sai

-- 
MARCELO F ANDRADE
Belem, Amazonia, Brazil

"I took the red pill"

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: Calling Controller Methods from Another Controller

2010-02-08 Thread Miles J
Yes, anything to do with model/database logic should be placed in the
model.

The controller is used to pass the data from the model into the
correct view.

On Feb 8, 6:56 pm, dtirer  wrote:
> Actually, just read something about putting such methods in the Model,
> rather than the Controller
>
> So my 'foreign' is_user() method should go in my User Model.  Since
> all it does is check and pull info from the DB.
>
> Does that make sense?
>
> On Feb 8, 9:48 pm, dtirer  wrote:
>
> > Here's my situation.  Users are searching for items.  I have an Items
> > controller, and a Users controller.
>
> > When a user enters the Item they want, and their email on the /items/
> > index page, I first want to check if they are a user.
>
> > So what seemed logical to me was something like the following:
>
> > ItemsController extends AppController
> > {
> >         function index()
> >         {
> >                  if (!empty($this->data))
> >                 {
> >                          // See if the user email already exists in
> > the DB
> >                          if (!$user_id = 
> > $this->Item->User->is_user($this->data['User']['email']))
>
> >                         {
> >                                    // then do this
> >                         }
> >                               // then process item search stuff
> >               }
> >        }
>
> > }
>
> > And of course, in the UsersController, I have an is_user() function
>
> > However, I get an error SQL syntax errors where the foreign controller
> > functions come up.  I know the foreign functions work cause I tested
> > them standalone.
>
> > Is this not the correct way to have this type of functionality?

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: Calling Controller Methods from Another Controller

2010-02-08 Thread dtirer
Actually, just read something about putting such methods in the Model,
rather than the Controller

So my 'foreign' is_user() method should go in my User Model.  Since
all it does is check and pull info from the DB.

Does that make sense?

On Feb 8, 9:48 pm, dtirer  wrote:
> Here's my situation.  Users are searching for items.  I have an Items
> controller, and a Users controller.
>
> When a user enters the Item they want, and their email on the /items/
> index page, I first want to check if they are a user.
>
> So what seemed logical to me was something like the following:
>
> ItemsController extends AppController
> {
>         function index()
>         {
>                  if (!empty($this->data))
>                 {
>                          // See if the user email already exists in
> the DB
>                          if (!$user_id = 
> $this->Item->User->is_user($this->data['User']['email']))
>
>                         {
>                                    // then do this
>                         }
>                               // then process item search stuff
>               }
>        }
>
> }
>
> And of course, in the UsersController, I have an is_user() function
>
> However, I get an error SQL syntax errors where the foreign controller
> functions come up.  I know the foreign functions work cause I tested
> them standalone.
>
> Is this not the correct way to have this type of functionality?

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


Calling Controller Methods from Another Controller

2010-02-08 Thread dtirer
Here's my situation.  Users are searching for items.  I have an Items
controller, and a Users controller.

When a user enters the Item they want, and their email on the /items/
index page, I first want to check if they are a user.

So what seemed logical to me was something like the following:

ItemsController extends AppController
{
function index()
{
 if (!empty($this->data))
{
 // See if the user email already exists in
the DB
 if (!$user_id = $this->Item->User->is_user($this-
>data['User']['email']))
{
   // then do this
}
  // then process item search stuff
  }
   }
}

And of course, in the UsersController, I have an is_user() function

However, I get an error SQL syntax errors where the foreign controller
functions come up.  I know the foreign functions work cause I tested
them standalone.

Is this not the correct way to have this type of functionality?

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: validation of serialized data

2010-02-08 Thread euromark
no
thats usually never a good idea

you cant really edit them properly
or search by them, etc...

use the cakeish "hasMany" relations
if you bake your mvc, you will be amazed how easy and yet powerful
your forms gonna be in almost no time

and its very easily extendable - if you plan that some day


On 8 Feb., 21:12, bujanga  wrote:
> Just some thinking and a question or two, please tell me if I am
> totally off base.
>
> I would like to store multiple email addresses and phone numbers per
> user. Using a serialized field might work for this. Is that a good
> usage?
>
> Next, how does one validate the data and properly save and find the
> data. Here is what I am thinking (not tested).
>
> Validate the Model using a custom validation function:
>
> var $validate = array(
>         'emails'        => array(
>                 'is_email'      => array(
>                         'rule' => array('g_isEmail'),
>                         'required'              => TRUE,
>                         'allowEmpty'    => FALSE,
>                         'message' => 'You must enter at least 1 valid email 
> address'
>                 ),
>         ),
> )
>
> function g_isEmail($check){
>         if ( !isset($this->data['Model']['emails']) ){
>                 return FALSE;
>         }
>         if ( is_array($this->data['Model']['emails']) ){
>                 foreach( $this->data['Model']['emails'] as $email ){
>                         if ( !Validate::email($email) )
>                                 return FALSE;
>                         }
>                 }
>         }elseif( !Validate::email($this->data['Model']['emails']) )
>                 return FALSE;
>         }
>         return TRUE;
>
> }
>
> Then using beforeSave to serialize the field and afterFind to
> unserialize the field.
>
> Thanks,
>
> Gary Dalton

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: Differences

2010-02-08 Thread Miles J
What are major differences between Symfony?
They are completely different frameworks, so basically everything. But
in the end, all frameworks do the same thing.

What is equivalent of slots and partials (are they "elements"?) in
Cake?
Yes, elements.

Is it true there is no activerecord in cake?
ActiveRecord is slow and shouldn't be used in most cases. Especially
on high volume traffic sites.

On Feb 8, 2:08 pm, Pax  wrote:
> I know some Symfony and I have to learn CakePHP immediately.
>
> What are major differences between Symfony?
> What is equivalent of slots and partials (are they "elements"?) in
> Cake?
> Is it true there is no activerecord in cake?

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


Differences

2010-02-08 Thread Pax
I know some Symfony and I have to learn CakePHP immediately.

What are major differences between Symfony?
What is equivalent of slots and partials (are they "elements"?) in
Cake?
Is it true there is no activerecord in cake?

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: Designing a form builder - Ideas

2010-02-08 Thread ecommy.com
do you have a demo we can see? in this way we may be able to make
suggestions

On Feb 7, 9:39 pm, "@pauldatta"  wrote:
> Hi Ken,
> Thank you for your response. The form builder is a app where a user
> can build a form online and then save it. I am generating the js
> validations based on the users selection of properties like isValid
> etc while building the form online.
> I have noted down your suggestions - valid though.
>
> I need some more design related ideas based on the options I
> mentioned :)
> Thank you very much
> Paul
>
> On Feb 7, 10:21 pm, kdubya  wrote:
>
>
>
> > Paul,
>
> > I, for one, don't understand what you are trying to do. Why is the
> > "user" selecting a textbox? Is this an end user/ Or is it a client-
> > type user (someone building their website)?
>
> > You say this is your first time using CakePHP so the following might
> > be of help:
>
> > In CakePHP much on the drudgery of building forms can happen
> > automagically if you follow conventions. In general, the type of from
> > element (input, textbox, radio button) is dependent on the datatype of
> > the corresponding field in the database and hence the model.
> > FormHelper reads the DB schema and can automatically generate the
> > correct form elements. You should look over 
> > this:http://book.cakephp.org/view/189/Automagic-Form-Elements
>
> > I think you should be able use to the FormHelper extensively (your
> > option c). In your option (d) you mention doing validation in JS.
> > CakePHP is setup to do validation via the model in PHP. 
> > See:http://book.cakephp.org/view/125/Data-Validation
>
> > I have created my own form builder helper that build upon the features
> > of CakePHP (FormHelper mainly) but adds formatting and hints to each
> > form element. It makes use of arrays that I add to each model:
> > skipField, hiddenField, and fieldHint.
>
> > skipField - if a field name is included in this array, my helper skips
> > it. i.e. there is no form element generated for this field (ex.
> > page_id - a field that is part of a belongsTo relation which the user
> > should never change)
>
> > hiddenField - a field like 'id' that is needed to be passed as a
> > hidden form element. The existing value from the DB is made a "hidden"
> > form element.
>
> > fieldHint - Any explanatory text/instructions for the user as they
> > fill out the form.
>
> > HTH,
> > Ken

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: ACL Component GOOD Tutorial, anyone?

2010-02-08 Thread Guillermo Mansilla
http://mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1
On 8 February 2010 17:08, Guillermo Mansilla  wrote:

> http://mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1
>
>
> On 8 February 2010 16:19, Fernando Z. Bob  wrote:
>
>> I am already having the same problem [?]
>>
>> Lot of tutorials, lot of knowledge but nothing that really explain
>> everything about that.
>>
>> 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.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
<<361.gif>>

Re: ACL Component GOOD Tutorial, anyone?

2010-02-08 Thread Guillermo Mansilla
http://mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1

On 8 February 2010 16:19, Fernando Z. Bob  wrote:

> I am already having the same problem [?]
>
> Lot of tutorials, lot of knowledge but nothing that really explain
> everything about that.
>
> 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.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
<<361.gif>>

Re: ACL Component GOOD Tutorial, anyone?

2010-02-08 Thread Fernando Z. Bob
I am already having the same problem [?]

Lot of tutorials, lot of knowledge but nothing that really explain
everything about that.

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
<<361.gif>>

validation of serialized data

2010-02-08 Thread bujanga
Just some thinking and a question or two, please tell me if I am
totally off base.

I would like to store multiple email addresses and phone numbers per
user. Using a serialized field might work for this. Is that a good
usage?

Next, how does one validate the data and properly save and find the
data. Here is what I am thinking (not tested).

Validate the Model using a custom validation function:

var $validate = array(
'emails'=> array(
'is_email'  => array(
'rule' => array('g_isEmail'),
'required'  => TRUE,
'allowEmpty'=> FALSE,
'message' => 'You must enter at least 1 valid email 
address'
),
),
)

function g_isEmail($check){
if ( !isset($this->data['Model']['emails']) ){
return FALSE;
}
if ( is_array($this->data['Model']['emails']) ){
foreach( $this->data['Model']['emails'] as $email ){
if ( !Validate::email($email) )
return FALSE;
}
}
}elseif( !Validate::email($this->data['Model']['emails']) )
return FALSE;
}
return TRUE;
}

Then using beforeSave to serialize the field and afterFind to
unserialize the field.

Thanks,

Gary Dalton

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 Handle images w/ a Route

2010-02-08 Thread Kyle Decot
The original is an image that someone is uploading. I don't want to
have to create the 75x75 version when they do the upload. I would like
to generate it on the fly when someone tries to access it. I would
also like to keep the path similar to the original so I don't have to
create something like /images/index/?filename=blahblahblah

On Feb 8, 2:48 am, Miles J  wrote:
> Quick question, why are you routing it to a controller, if the path is
> basically the same?
>
> On Feb 7, 7:19 pm, Kyle Decot  wrote:
>
>
>
> > I store all of my full size images at something like /img/photos/
> > filename_goes_here.jpg I would like to be able to add a route so that
> > if I visit /img/photos/75x75_filename_goes_here.jpg it will be handled
> > by my images controller. I've tried adding:
>
> > Router::connect('/img/photos/75x75_*', array('controller' => 'images',
> > 'action' => 'index'));
>
> > However I get the error:
>
> > Error: ImgController could not be found.
>
> > Why is cake trying to connect this to ImgController? How can I fix
> > this so that it will route to images_controller

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: PHP5.3 + Cake1.3-dev on OSX can't find mysql functions

2010-02-08 Thread Melih Onvural
Apologize for a second e-mail, but it turns out that when I upgraded
things my extensions_dir file was set to ./ as opposed to the proper
path to load the mysql extensions, and therefore none of the
functionality was actually working in PHP land.

Not a CakePHP issue at all.

--
Melih O.
http://www.onvural.net/melih

On Feb 8, 12:50 am, Melih Onvural  wrote:
> I've done the obvious Google searches that I can think of, and I've
> tried to work through all of the reasons that I would get this error:
>
> Fatal error: Call to undefined function mysqli_connect() in /opt/local/
> apache2/htdocs/cake/libs/model/datasources/dbo/dbo_mysqli.php  on line
> 78
>
> I have PHP5.3 installed on Mac OS 10.5.8 with Apache2 and Mysql5 all
> installed using MacPorts. I'm just trying to find a place to start
> looking, but I don't see any problems in error logs or console logs.
> Any help or direction would be great.
>
> Thanks a bunch.
> --
> Melih O.http://www.onvural.net/melih

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 plugin in Wordpress or Wordpress as my admin section?

2010-02-08 Thread Parris
Hi All,
I am working on a project right now that involves CakePHP and
Wordpress. I know tons of questions have been asked about this topic,
but I was wondering how I could use wordpress as the main admin user
interface, and sort of develop plugins for wordpress using cakephp. I
would assume that wordpress needs to be inside of cakephp's webroot
and some how almost everything gets routed to wordpress. Maybe I am
wrong.

I guess if that isn't exactly possible maybe I can simply develop a
plugin for wordpress in cakephp. Let me know what you guys think?
Thanks!!!

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: ACL Component GOOD Tutorial, anyone?

2010-02-08 Thread Nabil Alsharif
There aren't any good tutorials, I've looked, they are all vague or
missing a point or two. Unfortunately what your gonna have to do is read
a couple of the tutorials and then try to do it your self.

On Mon, 2010-02-08 at 13:46 -0430, Guillermo Mansilla wrote:
> So far no one have helped me out...
> 
> On 8 February 2010 12:30, Blackbit  wrote:
> Take a look at this tutorial and read part III:
> 
> http://www.ibm.com/developerworks/opensource/tutorials/os-php-cake2/index.html
> 
> On 8 Feb., 17:31, Renato de Freitas Freire
>  wrote:
> > Hi!
> >
> > Im trying to understand this ACL tutorial by Cakebook, but
> its absolutely
> > incomplete.
> > Can anyone tell me where I can find a good acl tutorial?
> Good and
> > understandable.
> >
> > I need to build a login system based on groups and users
> permissions, but I
> > need to know how to handle owners information.
> > Like blog tutorial, only the owner or admin can edit a post,
> or change user
> > information, etc.
> > Others users can only see the post.
> > How to change password, automaticaly add users and
> permissions, password
> > recovery, control access (dont let users access adm area nor
> other users
> > area), etc.
> >
> > Please, can anyone help me? Im a little lost here.
> >
> > Tnx!
> >
> > --
> > Renato de Freitas Freire
> > ren...@morfer.org
> >
> > On Sun, Feb 7, 2010 at 10:45 PM, mansil...@gmail.com
> wrote:
> >
> > > When isAuthorized() returns false I get redirected to "/"
>  which then
> > > redirects to "pages controller"...
> >
> > > Here is my code:
> >
> > > App_controller:
> >
> > > class AppController extends Controller {
> >
> > >   var $components = array('Auth', 'Session');
> >
> > >   var $helpers = array('Javascript', 'Html', 'Form',
> 'Ajax',
> > > 'Session');
> >
> > >   function beforeFilter() {
> >
> > >  $this->Auth->authorize = 'controller';
> >
> > >  $this->Auth->userModel = 'Member';
> >
> > >  Security::setHash("md5");
> >
> > >  $this->Auth->fields = array('username' => 'email',
> 'password' =>
> > > 'password');
> >
> > >  $this->Auth->loginAction = array('controller' =>
> 'members',
> > > 'action' => 'add');
> >
> > >  $this->Auth->loginRedirect = array('controller' =>
> 'members',
> > > 'action' => 'myaccount');
> >
> > >  $this->Auth->logoutRedirect = array('controller' =>
> 'members',
> > > 'action' => 'login');
> >
> > >  $this->Auth->autoRedirect = false;
> >
> > >   }
> >
> > > }
> >
> > > and here is my members controller:
> >
> > > function isAuthorized(){
> > >switch ($this->action) {
> > >case "index":
> > >return
> ($this->Auth->user('rol') ==
> > > 'admin');
> > >break;
> > >default:
> > >return true;
> > >}
> > >}
> > >/* function that handles the login*/
> > >function login(){
> > >if($this->Auth->login()){
> > >if($this->Auth->user('rol') ==
> 'member'){ #check if
> > > it is a member
> > > or an admin
> > >
>  $this->redirect('myaccount');
> > >}elseif ($this->Auth->user('rol' ==
> 'admin')) {
> > >$this->redirect('index');
> > >}
> >
> > >}
> > >}
> >
> > > I have tried changing all properties of Auth in
> app_controller with no
> > > results, it always redirects to "/"
> > >  I just want to redirect to the login page or maybe just
> show a
> > > message.
> >
> > > 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 

RE: Help with foreach

2010-02-08 Thread Dave
No no.

I did figure it out on my own.

But I was pulling records fron the db with unknown number so each row would
be

Record1 | Record2| Record3

Record4 | Record5| Record6

Record7 | Record8| RecordX
And so on

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of mike karthauser
Sent: February-08-10 6:12 AM
To: cake-php@googlegroups.com
Subject: Re: Help with foreach

if you know you've only got 3 or less skills why not just declare the
variables by name or position?





  



   

 

   




seems far simpler to me.



On 8 Feb 2010, at 07:05, Dave wrote:


I am looping thru an array putting 3 of the values in a row using my

but my problem is if the last row has only 1 or 2 values its not
closing
properly.






  



   


   







   

  
  
 

 


Here if the last row only has 1 or 2 the  and

are not closed off sinces it waiting for the 3rd to close out the
group.

Any ideas here?

Thanks

Dave

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




--
Mike Karthäuser
Managing Director - Brightstorm Ltd
Email: mi...@brightstorm.co.uk
Web: http://www.brightstorm.co.uk 
Tel: 07939 252144
Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +

On 7th March 2010, I am running the Bath Half Marathon to raise sponsorship
for the Royal National Lifeboat Institution. 

Visit http://www.justgiving.com/mike-karthauser and help me raise £500 to
support UK Lifeguards. 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +


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 
cake-php+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


Re: ACL Component GOOD Tutorial, anyone?

2010-02-08 Thread Guillermo Mansilla
So far no one have helped me out...

On 8 February 2010 12:30, Blackbit  wrote:

> Take a look at this tutorial and read part III:
>
> http://www.ibm.com/developerworks/opensource/tutorials/os-php-cake2/index.html
>
> On 8 Feb., 17:31, Renato de Freitas Freire  wrote:
> > Hi!
> >
> > Im trying to understand this ACL tutorial by Cakebook, but its absolutely
> > incomplete.
> > Can anyone tell me where I can find a good acl tutorial? Good and
> > understandable.
> >
> > I need to build a login system based on groups and users permissions, but
> I
> > need to know how to handle owners information.
> > Like blog tutorial, only the owner or admin can edit a post, or change
> user
> > information, etc.
> > Others users can only see the post.
> > How to change password, automaticaly add users and permissions, password
> > recovery, control access (dont let users access adm area nor other users
> > area), etc.
> >
> > Please, can anyone help me? Im a little lost here.
> >
> > Tnx!
> >
> > --
> > Renato de Freitas Freire
> > ren...@morfer.org
> >
> > On Sun, Feb 7, 2010 at 10:45 PM, mansil...@gmail.com <
> mansil...@gmail.com>wrote:
> >
> > > When isAuthorized() returns false I get redirected to "/"  which then
> > > redirects to "pages controller"...
> >
> > > Here is my code:
> >
> > > App_controller:
> >
> > > class AppController extends Controller {
> >
> > >   var $components = array('Auth', 'Session');
> >
> > >   var $helpers = array('Javascript', 'Html', 'Form', 'Ajax',
> > > 'Session');
> >
> > >   function beforeFilter() {
> >
> > >  $this->Auth->authorize = 'controller';
> >
> > >  $this->Auth->userModel = 'Member';
> >
> > >  Security::setHash("md5");
> >
> > >  $this->Auth->fields = array('username' => 'email', 'password' =>
> > > 'password');
> >
> > >  $this->Auth->loginAction = array('controller' => 'members',
> > > 'action' => 'add');
> >
> > >  $this->Auth->loginRedirect = array('controller' => 'members',
> > > 'action' => 'myaccount');
> >
> > >  $this->Auth->logoutRedirect = array('controller' => 'members',
> > > 'action' => 'login');
> >
> > >  $this->Auth->autoRedirect = false;
> >
> > >   }
> >
> > > }
> >
> > > and here is my members controller:
> >
> > > function isAuthorized(){
> > >switch ($this->action) {
> > >case "index":
> > >return ($this->Auth->user('rol') ==
> > > 'admin');
> > >break;
> > >default:
> > >return true;
> > >}
> > >}
> > >/* function that handles the login*/
> > >function login(){
> > >if($this->Auth->login()){
> > >if($this->Auth->user('rol') == 'member'){ #check
> if
> > > it is a member
> > > or an admin
> > >$this->redirect('myaccount');
> > >}elseif ($this->Auth->user('rol' == 'admin')) {
> > >$this->redirect('index');
> > >}
> >
> > >}
> > >}
> >
> > > I have tried changing all properties of Auth in app_controller with no
> > > results, it always redirects to "/"
> > >  I just want to redirect to the login page or maybe just show a
> > > message.
> >
> > > 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 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.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


Re: urgent help

2010-02-08 Thread Pablo Viojo
Reading the error message, and googling for it, helps a lot :)

Regards,

Pablo Viojo
pvi...@gmail.com
http://pviojo.net

¿Que necesitas?
http://www.needish.com


On Mon, Feb 8, 2010 at 3:03 PM, priyanka123  wrote:

>
> hi,
> thanx alot..my code worked out...
>
>
> Thanks.
>
> --
> View this message in context:
> http://old.nabble.com/urgent-help-tp27477638p27503835.html
> Sent from the CakePHP mailing list archive at Nabble.com.
>
> 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.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


Re: Notify admin via email when an error happens

2010-02-08 Thread euromark
i did open a ticket regarding a similar task
http://cakephp.lighthouseapp.com/projects/42648/tickets/267-tracing-should-be-available-in-productive-error-logging

i bet you could modify it to just send a mail instead of (or
additionally to) the trace log



On 8 Feb., 17:55, Tom  wrote:
> Hi,
>
> I'm looking for a way to send a notification to my address when a
> fatal error occurs during execution. Is there an established way
> to do it with CakePHP?
>
> It is very useful to get notified automatically if the database
> goes down or there is a serious error somewhere in the code (a
> certain condition is not handled, etc.).
>
> I tried Google and I haven't found anything related, but I'm
> probably overlooking it, because it's a pretty basic feature.
>
> Thanks.

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: urgent help

2010-02-08 Thread priyanka123

hi,
thanx alot..my code worked out...


Thanks.

-- 
View this message in context: 
http://old.nabble.com/urgent-help-tp27477638p27503835.html
Sent from the CakePHP mailing list archive at Nabble.com.

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: ACL Component GOOD Tutorial, anyone?

2010-02-08 Thread Blackbit
Take a look at this tutorial and read part III:
http://www.ibm.com/developerworks/opensource/tutorials/os-php-cake2/index.html

On 8 Feb., 17:31, Renato de Freitas Freire  wrote:
> Hi!
>
> Im trying to understand this ACL tutorial by Cakebook, but its absolutely
> incomplete.
> Can anyone tell me where I can find a good acl tutorial? Good and
> understandable.
>
> I need to build a login system based on groups and users permissions, but I
> need to know how to handle owners information.
> Like blog tutorial, only the owner or admin can edit a post, or change user
> information, etc.
> Others users can only see the post.
> How to change password, automaticaly add users and permissions, password
> recovery, control access (dont let users access adm area nor other users
> area), etc.
>
> Please, can anyone help me? Im a little lost here.
>
> Tnx!
>
> --
> Renato de Freitas Freire
> ren...@morfer.org
>
> On Sun, Feb 7, 2010 at 10:45 PM, mansil...@gmail.com 
> wrote:
>
> > When isAuthorized() returns false I get redirected to "/"  which then
> > redirects to "pages controller"...
>
> > Here is my code:
>
> > App_controller:
>
> > class AppController extends Controller {
>
> >   var $components = array('Auth', 'Session');
>
> >   var $helpers = array('Javascript', 'Html', 'Form', 'Ajax',
> > 'Session');
>
> >   function beforeFilter() {
>
> >      $this->Auth->authorize = 'controller';
>
> >      $this->Auth->userModel = 'Member';
>
> >      Security::setHash("md5");
>
> >      $this->Auth->fields = array('username' => 'email', 'password' =>
> > 'password');
>
> >      $this->Auth->loginAction = array('controller' => 'members',
> > 'action' => 'add');
>
> >      $this->Auth->loginRedirect = array('controller' => 'members',
> > 'action' => 'myaccount');
>
> >      $this->Auth->logoutRedirect = array('controller' => 'members',
> > 'action' => 'login');
>
> >      $this->Auth->autoRedirect = false;
>
> >   }
>
> > }
>
> > and here is my members controller:
>
> > function isAuthorized(){
> >                switch ($this->action) {
> >                        case "index":
> >                                return ($this->Auth->user('rol') ==
> > 'admin');
> >                        break;
> >                        default:
> >                                return true;
> >                }
> >        }
> >        /* function that handles the login*/
> >        function login(){
> >                if($this->Auth->login()){
> >                        if($this->Auth->user('rol') == 'member'){ #check if
> > it is a member
> > or an admin
> >                                $this->redirect('myaccount');
> >                        }elseif ($this->Auth->user('rol' == 'admin')) {
> >                                $this->redirect('index');
> >                        }
>
> >                }
> >        }
>
> > I have tried changing all properties of Auth in app_controller with no
> > results, it always redirects to "/"
> >  I just want to redirect to the login page or maybe just show a
> > message.
>
> > 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


Re: Example de formulaire Cakephp avec Tabs & jquery

2010-02-08 Thread Lance Willett
On Feb 5, 9:23 am, Mistoo  wrote:
> Bonjour, je viens de débuter avec CakePHP en version 1.2.4, et je
> cherche des examples de codes, lien, ... pour utiliser  Cakephp avec
> Tabs & jquery. Merci

Mistoo -- I don't know if there are tutorials on that exact topic, but
you can start here:

http://cakeqs.org/eng/questions/search/language:eng/search:jquery
http://groups.google.com/group/cakephp-fr/topics

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


Notify admin via email when an error happens

2010-02-08 Thread Tom
Hi,

I'm looking for a way to send a notification to my address when a
fatal error occurs during execution. Is there an established way
to do it with CakePHP?

It is very useful to get notified automatically if the database
goes down or there is a serious error somewhere in the code (a
certain condition is not handled, etc.).

I tried Google and I haven't found anything related, but I'm
probably overlooking it, because it's a pretty basic feature.

Thanks.


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


Form always validates on 1.3 beta

2010-02-08 Thread Tomek Mazur
Hi,

I have this weird problem. I set up validation rules but cake seems to
ignore them. Here is my model and controller: 
http://bin.cakephp.org/view/309506151

I supply this data:
Array
(
[PostComment] => Array
(
[username] =>
[email] =>
[message] =>
[post_id] => 31
)
)

which obviously sould not validate, yet the first debug returns
'true'. This is driving me crazy, my controller is kind of 'nasty',
because I was trying to debug the problem.

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: Link creation with javacript

2010-02-08 Thread Chafik H'nini
Hi, have a look at this : http://book.cakephp.org/view/625/link
You can put your link's attributes (onmouseover, onmouseout...) in the the
third parameter which is an array. For example, for the mouseover attribute,
the key is 'onmouseover' and the value is "ShowContent('w3p'); return true;"

Try this and let me know if it works ;)

2010/2/8 Prasanth 

> hello all i am new to cake php please help me,
> plz check bellow link  same thing i want to do in cake how can i do
>
>   onmouseout="HideContent('w3p'); return true;"
>  href="javascript:ShowContent('w3p')" >
>
> Please help me to solve this issue
> using " echo $html->link($day_num,"  using this syntax
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Chafik H'nini - Trésorier du Bureau des Sports
Elève Ingénieur de 3ème année à l'IG2I
Département de l'Ecole Centrale de Lille
http://www.chafikhnini.com

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


Routes and Pagination

2010-02-08 Thread Taff
I am having some trouble with routing. Using

Router::connect('/it-studies/:slug',
array('language'=>'eng','controller' => 'studies', 
'action' =>
'view'),
array('slug' => '[-_A-Za-z0-9]+')
);

works fine at least some of the time. The problem arises with
pagination. At
http://domain.de/eng/studies/index/page:1

the link built using the html helper - $html->link($study['Study']
['headline'.$lan_suffix],
array('language'=>'deu','controller'=>'studies','action' => 'view',
'slug' => $study['Study']['slug']));

creates a link to http://domain.de/it-studies/it-study which is great,
but once I move onto

http://domain.de/eng/studies/index/page:2 the slug part is not being
displayed.

I have read numerous suggesting $paginator->options(array('url' =>
$this->passedArgs)); or similar alternatives.

Can anyone offer a solution?

Cheers,
Taff

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


ACL Component GOOD Tutorial, anyone?

2010-02-08 Thread Renato de Freitas Freire
Hi!

Im trying to understand this ACL tutorial by Cakebook, but its absolutely
incomplete.
Can anyone tell me where I can find a good acl tutorial? Good and
understandable.

I need to build a login system based on groups and users permissions, but I
need to know how to handle owners information.
Like blog tutorial, only the owner or admin can edit a post, or change user
information, etc.
Others users can only see the post.
How to change password, automaticaly add users and permissions, password
recovery, control access (dont let users access adm area nor other users
area), etc.

Please, can anyone help me? Im a little lost here.

Tnx!

--
Renato de Freitas Freire
ren...@morfer.org


On Sun, Feb 7, 2010 at 10:45 PM, mansil...@gmail.com wrote:

> When isAuthorized() returns false I get redirected to "/"  which then
> redirects to "pages controller"...
>
> Here is my code:
>
>
> App_controller:
>
> class AppController extends Controller {
>
>
>
>   var $components = array('Auth', 'Session');
>
>   var $helpers = array('Javascript', 'Html', 'Form', 'Ajax',
> 'Session');
>
>
>
>
>
>   function beforeFilter() {
>
>
>
>
>
>  $this->Auth->authorize = 'controller';
>
>  $this->Auth->userModel = 'Member';
>
>  Security::setHash("md5");
>
>
>
>  $this->Auth->fields = array('username' => 'email', 'password' =>
> 'password');
>
>  $this->Auth->loginAction = array('controller' => 'members',
> 'action' => 'add');
>
>
>
>  $this->Auth->loginRedirect = array('controller' => 'members',
> 'action' => 'myaccount');
>
>  $this->Auth->logoutRedirect = array('controller' => 'members',
> 'action' => 'login');
>
>  $this->Auth->autoRedirect = false;
>
>   }
>
> }
>
> and here is my members controller:
>
> function isAuthorized(){
>switch ($this->action) {
>case "index":
>return ($this->Auth->user('rol') ==
> 'admin');
>break;
>default:
>return true;
>}
>}
>/* function that handles the login*/
>function login(){
>if($this->Auth->login()){
>if($this->Auth->user('rol') == 'member'){ #check if
> it is a member
> or an admin
>$this->redirect('myaccount');
>}elseif ($this->Auth->user('rol' == 'admin')) {
>$this->redirect('index');
>}
>
>}
>}
>
> I have tried changing all properties of Auth in app_controller with no
> results, it always redirects to "/"
>  I just want to redirect to the login page or maybe just show a
> message.
>
> 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.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


get model id by a set of conditions

2010-02-08 Thread Ernesto
Hello.

i'm looking for a function that gets the id from a given set of
conditions.

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: Create association with a join table.

2010-02-08 Thread Martin Radosta

Try this:

Recipe

Recipe
create('MenuRecipe', array('url'=>'/menus/add_recipe'));
echo $form->input('MenuRecipe.recipe_id', array('value'=>
$recipe['Recipe']['id'], 'label'=>false, 'type'=>'hidden'));
echo $form->input('MenuRecipe.menu_id');
$form->end('Add to Menu');
?>


Regards,

MARTIN


On 02/05/2010 05:33 PM, RhythmicDevil wrote:

Hi,
having some problems understanding how to create an association
between two existing records. The scenario is the following. I have
recipes and menus. When viewing a recipe I want the user to be able to
select a menu from a list to add the recipe to. (Menus contain
Recipes). So once again, the recipe and the list of menus already
exist.

When I submit the data to the Menu->save() method it complains that I
am missing fields. This would make sense if I was creating a new menu
and associating recipes at the same time, but I am not. All that needs
to happen is to insert a new record into menus_recipes (join table)
that has the recipe_id and menu_id. In concept this is simple but
something about model associations is eluding me.

This is the top of the recipe view file where I create a form to send
the menu_id and the recipe_id:

Recipe

Recipe
create('Menu', array('url'=>'/menus/add_recipe'));
echo $form->input('Recipe.recipe_id', array('value'=>
$recipe['Recipe']['id'], 'label'=>false, 'type'=>'hidden'));
echo $form->input('Menu.menu_id');
$form->end('Add to Menu');
?>



Here is menus_controller add_recipe:
public function add_recipe()
{
var_dump($this->data);
$this->Menu->saveAll($this->data);
$this->Session->setFlash('The recipe has been added to the 
menu');
$this->redirect(array('controller'=>'recipes',
'action'=>'index'));
}


I am probably going to just write a raw SQL statement to take care of
this but I would really like to know the correct Cake methodology for
this. I honestly have read the docs and cant find what I am looking
for, which probably means I am looking for the wrong thing. If you are
really interested here is a link to the source code in Google's
project hosting: http://code.google.com/p/menurecipemanager/

Thanks for any help or advice.

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
   


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


Various errors with virtualFields (1.3Beta)

2010-02-08 Thread Ernesto
Hello.

i have 2 models.

Items belongsTo Order

Item has a virtualField defined as "CONCAT(Order.code, '-',
REPEAT('0', 3 - LENGTH(Item.id)), Item.id)"

this setup is giving me a lot of errors during finds from Item model.
Some examples:

$this->Item->hasAny("color" => "red")   gives me "unknown column
'Order.code' "
$this->Item->find("all", array("contain" => false));  gives me the
same error as above

it looks like cake is using virtual fields everywhere.

shouldn't cake ignore, in some cases, those virtual fields?

PS: sry for bad eng

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 update last login using authcomp

2010-02-08 Thread Renato de Freitas Freire
I know that.
I was wondering if cakephp has any automagically with this issue..
but thanks anyway.

--
Renato de Freitas Freire
ren...@morfer.org


On Mon, Feb 8, 2010 at 12:45 PM, John Andersen wrote:

> Look in the PHP manual for the predefined variable $_SERVER!
> It has an index named 'REMOTE_ADDR', which gives you the IP address
> that the user is located at.
> Enjoy,
>   John
>
> On Feb 8, 3:20 pm, Renato de Freitas Freire 
> wrote:
> > can you help me with almost same question?
> > i need to update lastIP when user log in my system..
> > how can i do that in cakephp?
> >
> > tnx
> >
> > --
> > Renato de Freitas Freire
> > ren...@morfer.org
> >
> > On Sun, Feb 7, 2010 at 5:57 AM, John Andersen  >wrote:
> >
> > > You are welcome :)
> > >   Joh
> >
> > > On 7 February 2010 06:24, Hussain  wrote:
> > > > Thanks for you solution! It helps me a lot.
> > > > here is my solution:
> > > >function login() {
> > > >//-- code inside this function will execute only when
> > > autoRedirect
> > > > was set to false (i.e. in a beforeFilter).
> > > >if ($this->Auth->user()) {
> > > >if( !(empty($this->data)) ){
> > > >$this->User->id =
> $this->Auth->user('id');
> > > >$this->User->saveField('last_login',
> > > date('Y-m-d H:i:s') ); //
> > > > updating last_login field.
> >
> > >  //$this->redirect($this->Auth->redirect());
> > > >}
> >
> > > >$this->redirect($this->Auth->redirect());
> > > >}
> >
> > > >}
> > > > Thanks again.
> > > [snip]
> >
> > > 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 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.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


Re: Cake is BASTARD

2010-02-08 Thread jodator
Hi,

try to clear all the ARO-ACO nodes from table and create new ones with
automated tool form cake book.
So clear the acos_aros table and acos table

then run the code from the book.cakephp.org to create ACO's (http://
book.cakephp.org/view/647/An-Automated-tool-for-creating-ACOs)
nodes and then ARO-ACO associations. That works for me.

(ps.: do it when with $this->Auth->allowedActions => array('*'); in
appController beforFilter() function, so you don't get acl node lookup
error ;-) )

On Feb 8, 3:17 pm, "lacenaepro...@gmail.com" 
wrote:
> HI,
>
> I'm developing a quite complex application using cake. I developed an
> acl system following the directives of cake official site.
>
> All right until yesterday, when suddenly the acl system brake down.
>
> It gives the infamous error: "acl node lookup".
>
> EVERY PAGE CONTROLLED BY THE ACL does not show, but the others do.
>
> You can say that I was working on some controller, but I was working
> only on views. I also tried to restore an old working version, but the
> problem was not solved.
>
> I AM DEPRESSED. Cake is making laugh of me.
>
> IS THERE A POSSIBLE SOLUTION? I'm thing of giving up with the cake
> framework.
>
> Thanks!!
>
> )

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: Create association with a join table.

2010-02-08 Thread RhythmicDevil
Guess this must be impossible.

On Feb 5, 3:33 pm, RhythmicDevil  wrote:
> Hi,
> having some problems understanding how to create an association
> between two existing records. The scenario is the following. I have
> recipes and menus. When viewing a recipe I want the user to be able to
> select a menu from a list to add the recipe to. (Menus contain
> Recipes). So once again, the recipe and the list of menus already
> exist.
>
> When I submit the data to the Menu->save() method it complains that I
> am missing fields. This would make sense if I was creating a new menu
> and associating recipes at the same time, but I am not. All that needs
> to happen is to insert a new record into menus_recipes (join table)
> that has the recipe_id and menu_id. In concept this is simple but
> something about model associations is eluding me.
>
> This is the top of the recipe view file where I create a form to send
> the menu_id and the recipe_id:
>
> Recipe
> 
>         Recipe
>                          echo $recipe['Recipe']['recipe'];
>                 $form->create('Menu', array('url'=>'/menus/add_recipe'));
>                 echo $form->input('Recipe.recipe_id', array('value'=>
> $recipe['Recipe']['id'], 'label'=>false, 'type'=>'hidden'));
>                 echo $form->input('Menu.menu_id');
>                 $form->end('Add to Menu');
>         ?>
> 
>
> Here is menus_controller add_recipe:
>         public function add_recipe()
>         {
>                 var_dump($this->data);
>                 $this->Menu->saveAll($this->data);
>                 $this->Session->setFlash('The recipe has been added to the 
> menu');
>             $this->redirect(array('controller'=>'recipes',
> 'action'=>'index'));
>         }
>
> I am probably going to just write a raw SQL statement to take care of
> this but I would really like to know the correct Cake methodology for
> this. I honestly have read the docs and cant find what I am looking
> for, which probably means I am looking for the wrong thing. If you are
> really interested here is a link to the source code in Google's
> project hosting:http://code.google.com/p/menurecipemanager/
>
> Thanks for any help or advice.

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 update last login using authcomp

2010-02-08 Thread John Andersen
Look in the PHP manual for the predefined variable $_SERVER!
It has an index named 'REMOTE_ADDR', which gives you the IP address
that the user is located at.
Enjoy,
   John

On Feb 8, 3:20 pm, Renato de Freitas Freire 
wrote:
> can you help me with almost same question?
> i need to update lastIP when user log in my system..
> how can i do that in cakephp?
>
> tnx
>
> --
> Renato de Freitas Freire
> ren...@morfer.org
>
> On Sun, Feb 7, 2010 at 5:57 AM, John Andersen wrote:
>
> > You are welcome :)
> >   Joh
>
> > On 7 February 2010 06:24, Hussain  wrote:
> > > Thanks for you solution! It helps me a lot.
> > > here is my solution:
> > >        function login() {
> > >                //-- code inside this function will execute only when
> > autoRedirect
> > > was set to false (i.e. in a beforeFilter).
> > >                if ($this->Auth->user()) {
> > >                        if( !(empty($this->data)) ){
> > >                                $this->User->id = $this->Auth->user('id');
> > >                                $this->User->saveField('last_login',
> > date('Y-m-d H:i:s') ); //
> > > updating last_login field.
>
> >  //$this->redirect($this->Auth->redirect());
> > >                        }
>
> > >                        $this->redirect($this->Auth->redirect());
> > >                }
>
> > >        }
> > > Thanks again.
> > [snip]
>
> > 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


Link creation with javacript

2010-02-08 Thread Prasanth
hello all i am new to cake php please help me,
plz check bellow link  same thing i want to do in cake how can i do



Please help me to solve this issue
using " echo $html->link($day_num,"  using this syntax

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


PHP5.3 + Cake1.3-dev on OSX can't find mysql functions

2010-02-08 Thread Melih Onvural
I've done the obvious Google searches that I can think of, and I've
tried to work through all of the reasons that I would get this error:

Fatal error: Call to undefined function mysqli_connect() in /opt/local/
apache2/htdocs/cake/libs/model/datasources/dbo/dbo_mysqli.php  on line
78

I have PHP5.3 installed on Mac OS 10.5.8 with Apache2 and Mysql5 all
installed using MacPorts. I'm just trying to find a place to start
looking, but I don't see any problems in error logs or console logs.
Any help or direction would be great.

Thanks a bunch.
--
Melih O.
http://www.onvural.net/melih

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


Problems with Cakephp 1.2.6

2010-02-08 Thread Sitthykun
Hi all,

for now I using cakePHP 1.2.6 on window vista with apache 2.2.x
I would like to test with blog sample, but it does not work.

I have thought it maybe I'm wrong configured. I have tried search
solution, but I still cannot.

please anyone help me.

Sitthykun

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: behaviors conflicting

2010-02-08 Thread Foroct
I'm still having this same issue. Can I call two behaviors in the
$actAs declaration? If so am I doing it correctly?  And finally if I
am is there a way to determine why the behaviors are clashing?

Thanks!

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: Help with foreach

2010-02-08 Thread scs
>From what I can see it not closing because your last one is not
calling the second close div and close field set. To help make it
flexible after the the foreach loop I would do a check on the value of
$rowcount and if it is either a 1 or  a 2 add a closing  and a
closing 

On Feb 8, 4:41 am, mike karthauser  wrote:
> if you know you've only got 3 or less skills why not just declare the 
> variables by name or position?
>
> 
>                 
>
>           
>
>                         
>
>                                             // 1, 2, 3
>
>                         if(isset($skill[0]))
>                         echo $skill[0];
>
>                         if(isset($skill[1]))
>                         echo $skill[1];
>
>                         if(isset($skill[2]))
>                         echo $skill[2];
>
>                         ?>
>                         
>      
>
>                 
>
>         
>
> seems far simpler to me.
>
> On 8 Feb 2010, at 07:05, Dave wrote:
>
>
>
> > I am looping thru an array putting 3 of the values in a row using my 
> > but my problem is if the last row has only 1 or 2 values its not closing
> > properly.
>
> >  >    $i = 0;
> >    $rowmax = 3;
> >    $rowcount = 0; ?>
>
> >    
> >            
>
> >           
>
> >                    
>
> >                     >                         // 1, 2, 3
>
> >                    $i++;
> >                    $rowcount++;
>
> >                    if ($rowcount == $rowmax):?>
>
> >                            
> >            
>
> >    
>
> >    
> >            
>
> >    
>
> >   
> >   
> >  
>
> >      
>
> > Here if the last row only has 1 or 2 the  and 
> > are not closed off sinces it waiting for the 3rd to close out the group.
>
> > Any ideas here?
>
> > Thanks
>
> > Dave
>
> > 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
>
> --
> Mike Karthäuser
> Managing Director - Brightstorm Ltd
> Email: mi...@brightstorm.co.uk
> Web:http://www.brightstorm.co.uk
> Tel: 07939 252144
> Address: 1 Brewery Court, North Street, Bristol, BS3 1JS
>
> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
> + + + + + + + + + + + + + + + + +
>
> On 7th March 2010, I am running the Bath Half Marathon to raise sponsorship 
> for the Royal National Lifeboat Institution.
>
> Visithttp://www.justgiving.com/mike-karthauserand help me raise £500 to 
> support UK Lifeguards.
>
> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
> + + + + + + + + + + + + + + + + +

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: Can not connect Cake to a Mssql db

2010-02-08 Thread scs
just a few things i can think of that you need to watch for that might
cause the issue but are over looked easily.
1) is the host address correctif on same machine do you have it as
LOCALHOST
2) does the user "test" have permission set up in you database to
access the database "mb_bd"
3) does the user "test" have permission to access the database from
the server that you cakephp resides on.

> >> Hi,
>
> >> i try to connect cakephp and after 2 days of trying i get only the
> >> yellow box with "Cakephp can not connect to the database"
>
> >> the database si reachable because it works connecting from an external
> >> php !!!
>
> >> The database and wamp where cake is installed are on a vmware machine
> >> thats having microsoft server !!!
>
> >> The DB is Microsoft Sql Server 2008
>
> >> My config looks like this:
>
> >> var $default = array( 'driver' => 'mssql',
>
> >>      'host' => '\',
>
> >>     'login' => 'test',
>
> >>     'password' => 'test',
>
> >>    'database' => 'my_db',
>
> >>      'prefix' => '');
>
> >> Please i don`t want questions like "you have a mssql driver."  yes
> >> i have because it works connecting outside cake
>
> >> All i want is answers from people who did make the connection , or
> >> experienced ones. Lets try to make a post that will help others
> >> because on the internet is not something well explained.
>
> >> Thanks and i`m waiting your posts

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


Cake is BASTARD

2010-02-08 Thread lacenaepro...@gmail.com
HI,

I'm developing a quite complex application using cake. I developed an
acl system following the directives of cake official site.

All right until yesterday, when suddenly the acl system brake down.

It gives the infamous error: "acl node lookup".

EVERY PAGE CONTROLLED BY THE ACL does not show, but the others do.

You can say that I was working on some controller, but I was working
only on views. I also tried to restore an old working version, but the
problem was not solved.

I AM DEPRESSED. Cake is making laugh of me.

IS THERE A POSSIBLE SOLUTION? I'm thing of giving up with the cake
framework.

Thanks!!


)

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 update last login using authcomp

2010-02-08 Thread Renato de Freitas Freire
can you help me with almost same question?
i need to update lastIP when user log in my system..
how can i do that in cakephp?

tnx

--
Renato de Freitas Freire
ren...@morfer.org


On Sun, Feb 7, 2010 at 5:57 AM, John Andersen wrote:

> You are welcome :)
>   Joh
>
> On 7 February 2010 06:24, Hussain  wrote:
> > Thanks for you solution! It helps me a lot.
> > here is my solution:
> >function login() {
> >//-- code inside this function will execute only when
> autoRedirect
> > was set to false (i.e. in a beforeFilter).
> >if ($this->Auth->user()) {
> >if( !(empty($this->data)) ){
> >$this->User->id = $this->Auth->user('id');
> >$this->User->saveField('last_login',
> date('Y-m-d H:i:s') ); //
> > updating last_login field.
> >
>  //$this->redirect($this->Auth->redirect());
> >}
> >
> >$this->redirect($this->Auth->redirect());
> >}
> >
> >}
> > Thanks again.
> [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.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


Re: Can not connect Cake to a Mssql db

2010-02-08 Thread Trandaburu Tiberiu Andrei
The solution:   You need to make a default instance of the SQL DB .

On Mon, Feb 8, 2010 at 10:04 AM, Trandaburu Tiberiu Andrei <
birli...@gmail.com> wrote:

> did somebody connected ?
>
>
> On Sun, Feb 7, 2010 at 5:16 PM, seamaster  wrote:
>
>> Hi,
>>
>> i try to connect cakephp and after 2 days of trying i get only the
>> yellow box with "Cakephp can not connect to the database"
>>
>> the database si reachable because it works connecting from an external
>> php !!!
>>
>> The database and wamp where cake is installed are on a vmware machine
>> thats having microsoft server !!!
>>
>> The DB is Microsoft Sql Server 2008
>>
>> My config looks like this:
>>
>> var $default = array( 'driver' => 'mssql',
>>
>>  'host' => '\',
>>
>> 'login' => 'test',
>>
>> 'password' => 'test',
>>
>>'database' => 'my_db',
>>
>>  'prefix' => '');
>>
>> Please i don`t want questions like "you have a mssql driver."  yes
>> i have because it works connecting outside cake
>>
>> All i want is answers from people who did make the connection , or
>> experienced ones. Lets try to make a post that will help others
>> because on the internet is not something well explained.
>>
>> Thanks and i`m waiting your posts
>
>
>

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


Short blank screen after clicking link

2010-02-08 Thread Céryl
Hej all!

Hopefully the title makes sense, bacause I'm not talking about a white
screen of death or similar.

Whenever I click on a (internal) link in my website, it shows a white
screen during loading before I arrive at the link. Now, most (perhaps
all) of my other websites I build with Cake don't do this. When you
click on a link (for instance a menu) the page loads while still
showing the current page, and refreshes when the new page has loaded.

But this one website I made very often loads a new page while showing
a white screen. So it's:
Website->click->white screen for 0,5 seconds->Website.


It's a very epileptical experience navigating this way. It is probably
just some setting or something because this is the only site that does
this. It seems to happen when a link is clicked for the first time in
the session, So I think it happens when a page is being cached,
perhaps?

Oh, and I of course debugged it. There are no errors, it happens when
the site is in debug 0, and it also happens between static pages where
no database is involved...

Any ideas on why this happens and how to avoid 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


Re: Help with foreach

2010-02-08 Thread mike karthauser
if you know you've only got 3 or less skills why not just declare the variables 
by name or position?





  



   

 






seems far simpler to me.



On 8 Feb 2010, at 07:05, Dave wrote:

> I am looping thru an array putting 3 of the values in a row using my 
> but my problem is if the last row has only 1 or 2 values its not closing
> properly.
> 
>$i = 0;
>   $rowmax = 3;
>   $rowcount = 0; ?>
> 
>   
>   
> 
>   
> 
>   
> 
> // 1, 2, 3
> 
>$i++;
>$rowcount++;
> 
>if ($rowcount == $rowmax):?>
> 
>   
>   
> 
>   
> 
>   
>   
> 
> 
>
> 
>   
>   
>  
> 
>  
> 
> 
> Here if the last row only has 1 or 2 the  and 
> are not closed off sinces it waiting for the 3rd to close out the group.
> 
> Any ideas here?
> 
> Thanks
> 
> Dave
> 
> 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
> 

-- 
Mike Karthäuser
Managing Director - Brightstorm Ltd 
Email: mi...@brightstorm.co.uk 
Web: http://www.brightstorm.co.uk 
Tel: 07939 252144
Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
+ + + + + + + + + + + + + + + +

On 7th March 2010, I am running the Bath Half Marathon to raise sponsorship for 
the Royal National Lifeboat Institution. 

Visit http://www.justgiving.com/mike-karthauser and help me raise £500 to 
support UK Lifeguards. 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
+ + + + + + + + + + + + + + + +

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: Can not connect Cake to a Mssql db

2010-02-08 Thread Trandaburu Tiberiu Andrei
did somebody connected ?

On Sun, Feb 7, 2010 at 5:16 PM, seamaster  wrote:

> Hi,
>
> i try to connect cakephp and after 2 days of trying i get only the
> yellow box with "Cakephp can not connect to the database"
>
> the database si reachable because it works connecting from an external
> php !!!
>
> The database and wamp where cake is installed are on a vmware machine
> thats having microsoft server !!!
>
> The DB is Microsoft Sql Server 2008
>
> My config looks like this:
>
> var $default = array( 'driver' => 'mssql',
>
>  'host' => '\',
>
> 'login' => 'test',
>
> 'password' => 'test',
>
>'database' => 'my_db',
>
>  'prefix' => '');
>
> Please i don`t want questions like "you have a mssql driver."  yes
> i have because it works connecting outside cake
>
> All i want is answers from people who did make the connection , or
> experienced ones. Lets try to make a post that will help others
> because on the internet is not something well explained.
>
> Thanks and i`m waiting your posts

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