Re: Using the cookie component in 1.1.x

2007-02-12 Thread Fasthold

Is there any document or example about the brand new cookie components?


--~--~-~--~~~---~--~~
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: Route problem. How to ignore the action name?

2006-09-05 Thread Fasthold


Bert Van den Brande 写道:

> Make sure you define the /tags/add route before the general /tags/*
> route in routings.php
>

Yes, this works with
$Route->connect('/tags/add', array('controller' => 'tags', 'action' =>
'add'));
and
$Route->connect('/tags/*', array('controller' => 'tags', 'action' =>
'view'));
all added.

But in this case, as long as I add a new controller action, I have to
add a new rule to the routing config file. Is there any possible to
specify the rule like this $Route->connect('/tags/:firstparam',
array('controller' => 'tags', 'action' => 'view','firstparam')); ?
 I hope this in future cake. :)

Thanks.


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



Re: Route problem. How to ignore the action name?

2006-09-05 Thread Fasthold

Thanks nate.
Yes, this works for view action. But it doesn't work for add action any
more,
When I visit http://localhost/tags/add, it also redirect to view page.


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



Route problem. How to ignore the action name?

2006-09-05 Thread Fasthold

Hi all,

The issue is that I want to change the route rule like this:

Change:
http://localhost/tags/view/tagName

To:
http;//localost/tags/tagName

I have tried
$Route->connect('/tags/*, array('controller' => tags, 'action' =>
'view',''firstparam'));
and
$Route->connect('/tags/:firstparam', array('controller' => 'tags',
'action' => 'view','firstparam'));
but they all seems useless.

How to solve it, thanks!

Regards,

--FH


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



How to retrieve tree data from the result fo findAllThreaded() query?

2006-08-29 Thread Fasthold

Hi all,

I execute the findAllThreaded() method, and its result like these
below:

Array
(
[0] => Array
(
[Area] => Array
(
[id] => 1
[name] => Cake1
[parent_id] => 0
)

[children] => Array
(
[0] => Array
(
[Area] => Array
(
[id] => 2
[name] => Cake2
[parent_id] => 1
)

[children] => Array
(
[0] => Array
(
[Area] => Array
(
[id] => 3
[name] => Cake3
[parent_id] => 2
)

[children] => Array
(
[0] => Array
(
[Area] =>
Array
(

[id] => 6

[name] => Cake6

[parent_id] => 3
)

[children]
=> Array
(
)

)

)

)

)

)

[1] => Array
(
[Area] => Array
(
[id] => 4
[name] => Cake4
[parent_id] => 1
)

[children] => Array
(
)

)

[2] => Array
(
[Area] => Array
(
[id] => 5
[name] => Cake5
[parent_id] => 1
)

[children] => Array
(
)

)

)

)

)

I checked the api docs, and found a deprecated method
HtmlHelper::guiListTree(), but I can't understand what's the 'bodyKey'.

Is there any tree helper which could retrieve tree's data? Tree's node,
path, children, brother etc.

Regards

--Fasthold


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



Re: Is there any possible to prevent these additional quering "DESC users; DESC articles.... etc."

2006-08-28 Thread Fasthold

WOW! Thanks a lot to the all of the above! I'll enjoy my happy baking
regardless of the DESC stuff :)

Regards,

--FH


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



Re: Is there any possible to prevent these additional quering "DESC users; DESC articles.... etc."

2006-08-28 Thread Fasthold

Thanks for you reply.

My idea is that to specify the fields by hand and don't let cake to do
the describe query.


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



Is there any possible to prevent these additional quering "DESC users; DESC articles.... etc."

2006-08-28 Thread Fasthold

Hi, there

This question has puzzled me for a long time.

I found that as long as the cache expired(I hope I'm right:P), there
are many addtional queries excuted like below:

1 DESC `users`  21 21 15
2 DESC `groups`  5 5 26
3 DESC `permissions`  4 4 32
4 DESC `articles`  10 10 28
5 DESC `categories`  6 6 29
6 DESC `votes`  12 12 34
7 SELECT `User`.`id`, `User`.`group_id`, `User`.`username`,
`User`.`password`, `User`.`mobile`, `User`.`area`, `User`.`email`,
`User`.`gender`, `User`.`photo`, `User`.`name`, `User`.`pid`,
`User`.`description`, `User`.`created`, `User`.`modified`,
`Group`.`id`, `Group`.`name`, `Group`.`isAdmin`, `Group`.`created`,
`Group`.`modified` FROM `users` AS `User` LEFT JOIN `groups` AS `Group`
ON `User`.`group_id` = `Group`.`id` WHERE (`User`.`id` = 135) LIMIT 1
1 1 16

I only need the 7th 'SELECT' statement, but the other queries take much
more loads of the server. I have tried the 'unbindModel()' method, but
it seems useless.

Is there any possible to cut these 'DESC' queries or prolong the cache
period for performance purpose.

Thanks!

-- FH.


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



Re: How to pass some variables from a view to its or other controller(s)?

2006-07-24 Thread Fasthold

Thanks AD7six.

In my case, I can't pass some variables through url.
Because I won't allow users to modify the value of $num for the layout
purpose.

Regards,

Fasthold


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



Re: How to pass some variables from a view to its or other controller(s)?

2006-07-24 Thread Fasthold

Thanks for you quick reply!

My idea is that during the views, I call a funciton such as
articleList('9'[,'parameter2','parameter3']), and the parameter(s) of
articleList() is/are to tell ArticleController how many articles to
show(Here is 9). With the benifit, I won't need to write more the one
method to realize the same LIST function but just a few difference in
somewhere else. The code below:

class ArticleController {
function articleList($limit,$order='created DESC') {
$this->article->findAll(null,null,$order,$limit);
}
}

I'm sorry for my bad English which is not my native language. I wish
you could reach my thought. :P

Thanks,

Fasthold


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



How to pass some variables from a view to its or other controller(s)?

2006-07-23 Thread Fasthold

The situation is that I need pass some variables from a view to its
controller.

Is there any methods to get variables from a view ? So I can write
dynamic template. :)


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



Re: Find conditions for HABTM

2006-07-23 Thread Fasthold

If you mean that a user *hasAndBelongsToMany* submissions, and also a
submission *hasAndBelongsToMany* users, I think you need a link table
"users_submissions" to record the associations.


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



Re: Chinese $html->link character display problem in Cake 1.1.6.3273

2006-07-20 Thread Fasthold

Oh, I checked the ticket, thanks very much!
I'll wait for the next release.:)


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



Chinese $html->link character display problem in Cake 1.1.6.3273

2006-07-20 Thread Fasthold

This problem only occured in "$html->link('Chinese title','/url');"

When Cake in version 1.1.5.x, the "Chinese title" displayed smoothly.
But in 1.1.6.3273, the page showed some ugly character which can't be
recognized.

I type some Chinese characters here for anyone who can copy & paste to
help me solve it. Thanks.

Use utf-8 encode.

link('中文链接','/url'); ?>

If the page don't show like this "中文链接", the problem actually
exsists.


Sorry for my bad English :P


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



Re: 有在中国的朋友吗?一起研究 CAKE

2006-07-05 Thread Fasthold

Yes, I'm Chinese!


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



Is there anyone who integrate CakePHP with Prado?

2006-07-05 Thread Fasthold

Prado is here: http://www.pradosoft.com/
I'll check if any have done the integration.

--sammy


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