Re: Problem generating view for REST webservice in cakephp 2.0

2011-10-19 Thread Juan Basso
Unfortunately the Xml class is not able to determine the root key and the 
child keys from a Model::find(). Model::find() return something like:

Array(
  [0] => Array(
['ModelA'] => Array( ... )
['ModelB'] => Array( ... )
  ),
  [1] => Array (...)
)

So, in this case, what is the root key? ModelA? ModelB? The Xml class cannot 
take this decision. So, you need to define, at least, the root key (in your 
case you putted array('Logs' => $findResult)). BUT, you cannot have a list 
(array with numeric keys) in the root level. Otherwise you will have tags 
like <0>, <1>, ... or it will try to have many root key (what is not allowed 
by XML), ie: .. in root level.

So, in this case, you need to have 2 levels in the array (that you used 
array('Logs' => array('item' => $findResult))). It make sense and will 
generate something like:


  
 ... 
 ... 
  
  
...
  


That make sense to Xml class and to xml language.

You can see these informations on 
http://book.cakephp.org/2.0/en/core-utility-libraries/xml.html


Juan Basso

-- 
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: 'Site under maintenance' option

2011-09-13 Thread Juan Basso
You can use a non-cake solution that is use htaccess (or any rewrite
rule from different http server) that check if file app/webroot/
maintenance.html is present. If is there, show the file to any
request. So you can delete/create/rename the maintenance file to
enable/disable. Faster :)


Juan Basso

On Sep 13, 7:28 pm, ecsyle  wrote:
> I have a boolean set in my AppController to enable/disable the site.
> If the site is disabled, I run $this->cakeError('maintenance') to send
> the user to a custom error page explaining that the site is down for
> maintenance.
>
> I also use a .lock file in the webroot to automatically disable the
> site when I am doing updates. My build script creates the .lock file
> before doing anything else, and once the updates are complete and
> verified, the .lock file is removed.
>
> On Sep 5, 12:45 pm, Xoubaman  wrote:
>
>
>
>
>
>
>
> > I'm trying to implement a system to disable the site temporaly for
> > maintenance purposes or whatever. If the site is disabled, only logged users
> > can navigate through it, non-logged users are redirected to a "Site under
> > maintenance" layout.
>
> > Currently (o "As of now"), my approach is to allow a "secret url" that will
> > lead to the login form, check in AppController::beforefilter if the current
> > url is the allowed one and, if it isn't, set the maintenance layout. Trying
> > to figure out how to allow only one url to log in, I came to define it as a
> > constant in bootstrap and add the route in config/routes pointing to
> > UsersController::login.
>
> > It would be nice to save the secret url into the database and change it
> > without editing bootstrap.php, though.
>
> > Any suggestion?

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


EmailComponent improvements

2011-02-27 Thread Juan Basso
Hey guys,

The core team is working in changes to improve the form to send e-
mails for cake 2.0. With these changes will be possible send e-mail
from others layers of the application, like in shells.

I would like your help to say what is the good and bad points from the
actual solution. What is missing? What we need to improve?

Any help will be welcome.


Thanks,

Core Team

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


Where to put the classes of validation Cake 1.3?

2009-12-01 Thread Juan Basso
I saw that in the documentation[1] of new features for Cake 1.3 has
changed the validation scheme to other languages. However, the
documentation does not address where the files should be.

Analyzed the source code of implementation and it only tests whether
the class exists, or should I put somewhere and make an App:: import.
But where I put the file?! Will have a unique directory? Vendors?


[1] http://code.cakephp.org/wiki/1.3/new-features


Thanks,

Juan Basso

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: Magento cart

2008-02-09 Thread Juan Basso

See the Bakesale:
- Project site: http://cakeforge.org/projects/bakesale
- Information site: http://www.bakesalehq.com/


Juan Basso

On 9 fev, 15:16, cc96ai <[EMAIL PROTECTED]> wrote:
> I try on magento, which is pretty good,
> I wonder does cake have similar completed cart ?
>
> coz, i perfer cake rather than zf framework.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: HABTM with 3 models

2008-01-10 Thread Juan Basso

Sorry. By the way I write is correct. I tested with other code.

But, I use this thread to ask something:

I make the relation spec before, but I like recursive only in a
UsersProjectsPermission when findAll Projects for exemple.

Using:
$this->Project->UsersProjectsPermission->recursive = 3;
$this->Project->findAll(array('Project.id' => 1));

This exemple doesn't work. Only if I make recursive = 3 for the
project. But Projects hasMany others tables and generated various
selects uneeded. I don't like unbind the hasMany associations.


Thanks.


Juan Basso

On 10 jan, 23:17, Juan Basso <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm tring create a HABTM with 3 models. The case is: I have three
> tables: Users, Projects, Permissions. A user have some permissions in
> a determined project. For exemple, I (user) can read and write
> (permission) on project A (project), but can't write (permission) in
> project B (project).
>
> For this, I create four tables on database:
> - users (id, username, password);
> - projects (id, name);
> - permissions (id, description);
> - users_projects_permissions (id, user_id, project_id, permission_id);
>
> Creating the Model's files, I make:
> - For User, Project and Permission:
> hasMany('UsersProjectsPermission');
> - For UsersProjectsPermission: belongsTo('User', 'Project',
> 'Permission');
>
> But, when I execute my controller that use one of this tables, show
> error: "Error: Database table users_users_projects_permissions for
> model UsersUsersProjectsPermission was not found."
>
> It's need make onde HABTM? Who?
>
> What's wrong?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



HABTM with 3 models

2008-01-10 Thread Juan Basso

Hi,

I'm tring create a HABTM with 3 models. The case is: I have three
tables: Users, Projects, Permissions. A user have some permissions in
a determined project. For exemple, I (user) can read and write
(permission) on project A (project), but can't write (permission) in
project B (project).

For this, I create four tables on database:
- users (id, username, password);
- projects (id, name);
- permissions (id, description);
- users_projects_permissions (id, user_id, project_id, permission_id);

Creating the Model's files, I make:
- For User, Project and Permission:
hasMany('UsersProjectsPermission');
- For UsersProjectsPermission: belongsTo('User', 'Project',
'Permission');


But, when I execute my controller that use one of this tables, show
error: "Error: Database table users_users_projects_permissions for
model UsersUsersProjectsPermission was not found."

It's need make onde HABTM? Who?


What's wrong?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Sharing CSS/JS

2008-01-04 Thread Juan Basso

Hi,

Who to share css and js with others applications?

I have some applications and all use one css file in common. I want
share this css for all applications.


Thanks.

Juan Basso

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Working with XML-RPC

2007-12-20 Thread Juan Basso

You can send to me? Or post here? My e-mail is jrbasso under
gmail.com.

Thanks.


Juan Basso

Serge Rodovnichenko escreveu:

> I wrote a component, that uses an XML-RPC library from PEAR.
>
> On Dec 19, 7:57 pm, Juan Basso <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Anyone have worked with xml-rpc? Not for server, but to a client. My
> > application need get data under xml-rpc of others machines...
> >
> > Thanks.
> >
> > Juan Basso

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Working with XML-RPC

2007-12-19 Thread Juan Basso

Hi,

Anyone have worked with xml-rpc? Not for server, but to a client. My
application need get data under xml-rpc of others machines...


Thanks.

Juan Basso

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: shopping cart

2007-11-07 Thread Juan Basso

Why not shopping cart IN cake? http://cakeforge.org/projects/bakesale/


Juan Basso

On 6 nov, 15:04, carSign <[EMAIL PROTECTED]> wrote:
> Has anyone been able to integrate a third party shopping cart into
> cake?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bakesale vs IIS

2007-01-13 Thread Juan Basso

Aldemir,

To it, you only need uncomment the line below in file
app/config/core.php:
//define ('BASE_URL', env('SCRIPT_NAME'));


Good look,

Juan Basso


Aldemir Vieira escreveu:

> I having problems to install Bakesale (cakeforge) in the IIS.
>
> Somebody knows what to make to disable the mod_rewrite in bakesale and still
> thus to continue functioning?
> 
> -- 
> []´s,
> Aldemir Vieira


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---