Re: home page

2008-07-10 Thread jinhr
1) create files: /app/views/pages/home.ctp /app/views/pages/mystaticpage.ctp 2) open file /app/config/routes.php, which route any specific url to corresponding page. Edit following codes: Router::connect('/', array('controller' = 'pages', 'action' = 'display',

Re: home page

2008-07-10 Thread jinhr
1) create files: /app/views/pages/home.ctp /app/views/pages/mystaticpage.ctp 2) open file /app/config/routes.php, which route any specific url to corresponding page. Edit following codes: /*** this is for http://localhost/app/ ***/ Router::connect('/', array('controller' =

How can I call Element from another Element?

2007-04-05 Thread jinhr
Anybody have idea how can I make my element /views/elements/navigation.ctp to include other elements: /views/elements/searchbox.ctp /views/elements/calendar.ctp ? Thanks ahead. Henry @ Toronto. --~--~-~--~~~---~--~~ You received this message because you are

Re: Model best practices question

2007-02-15 Thread jinhr
(); //with user_image again. jinhr On 2月14日, 下午5时21分, mallyone [EMAIL PROTECTED] wrote: I'm trying to figure out how to return a list of users with only one user_image, the one with 'main'=1 in the user_images table. I also need to be able to return user.*, and it's associated images for another

I used templates to quickly create Model and Controller files in Eclipse+PDT.

2007-02-14 Thread jinhr
I am tired of creating a new Model or Controller file by typing long long codes as following to fit CakePHP convention: var $name = xxx; var $belongsTo = array(blah blah blah); var $hasMany = array(blah blah blah); var $use = ... var $scaffold... So, I define a Model templates in

Re: Model best practices question

2007-02-14 Thread jinhr
You can use $this-Profile-unbindModel(array('hasOne' =array('main_image'))) before $this-Profile-findAll() On 2月14日, 下午5时21分, mallyone [EMAIL PROTECTED] wrote: I'm trying to figure out how to return a list of users with only one user_image, the one with 'main'=1 in the user_images table.

Re: What editor do you use for CakePHP?

2007-02-13 Thread jinhr
I use: Eclipse as environment + PDT (http://www.eclipse.org/php/) as PHP editor + Subclipse for version control + Mylar Trac for task management. The best things for such solution is 1) It is totally free 2) It runs on linux or windows. 3)source code version is under control from ONE

Re: Sending emails

2007-02-13 Thread jinhr
Hi, Andrzej: My codes work OK for html, for text, but NOT for both. I think EmailCompotent still has problem (email.php version 4410 under cake_1.2.0.4451alpha). Here are codes for the three files: /// //File controllers/requests.php

Re: Sending emails

2007-02-13 Thread jinhr
Hi, Andrzej: My codes work OK for html, for text, but NOT for both. I think EmailCompotent still has problem (email.php version 4410 under cake_1.2.0.4451alpha). Here are codes for the three files: /// //File controllers/requests.php

Re: Sending emails

2007-02-13 Thread jinhr
My codes works for HTML, on cake_1.2.0.4451alpha //File controllers/requests.php class RequestsController extends AppController { var $name = Requests; var $uses = array(...); var $components = array('Email');

Re: Need advise on pdf generation with FPDF

2007-02-12 Thread jinhr
at the google cache for the old wikihttp://72.14.253.104/search?q=cache:B-P_vGNWzN8J:wiki.cakephp.org/tut... I send an email to the foundation offering to bring this up to date and to the bakery, since I'm going to start to use it again soon Sam D On 1/17/07, jinhr [EMAIL PROTECTED] wrote

Re: Need advise on pdf generation with FPDF

2007-02-12 Thread jinhr
and to the bakery, since I'm going to start to use it again soon Sam D On 1/17/07, jinhr [EMAIL PROTECTED] wrote: Thank for quick prompt, Chris. Your solution for swf really helps me to think of the solution. I may scratch a similiar way forFPDF. BTW, I wonder whether it be better to define

Re: PHP generation with CakePHP

2007-02-12 Thread jinhr
Devraj, I am using FPDF now. Samuel DeVore has a sample at http://bakery.cakephp.org/articles/view/225. But I think we should make a little changes on his codes, maybe it is because CakePHP is change framework codes. My feedback to Samuel's code is here:

How to show label for radio list?

2007-01-24 Thread jinhr
Any body have idea on showing label for each radio option with existing CakePHP methods? What I want is: == input name=data[Request][priority_id] id=priority_id_1 value=1 type=radio / label for=priority_id_1Normal/labelbr/

Need advise on pdf generation with FPDF

2007-01-17 Thread jinhr
Hi there, I need advise on PDF creation with my current project. I may choose FPDF (http://www.fpdf.org/) When visitors fill and submit a HTML form, besides data going into MySQL, a PDF file should be created with these data and emailed as attachment. My question: How can I use FPDF smoothly

Re: Need advise on pdf generation with FPDF

2007-01-17 Thread jinhr
Thank for quick prompt, Chris. Your solution for swf really helps me to think of the solution. I may scratch a similiar way for FPDF. BTW, I wonder whether it be better to define a fpdf Helper rather than do in Controller? Anyway, I ga to whip now

Re: render to string

2007-01-02 Thread jinhr
the_woodsman is right. In your controller, you can use: function myAction() { $this-set('result', $this-requestAction('/otherModel/otherAction', array('return'))); } the_woodsman wrote: When calling requestAction in the controller, I believe there's a parameter you can pass to get

Re: Cakephp developer needed (Greater Toronto Area, ON)

2007-01-02 Thread jinhr
I am a baker in downtown Toronto. Is that job an on-site in office? or remote at home by SVN? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: Can't login to the bakery

2006-12-01 Thread jinhr
I also can not log in today. Then used forget password to get it reset and log in. Then still can NOT log int with updated new password. sigh... [EMAIL PROTECTED] wrote: I is the bakery temporarily closed? Regards, --~--~-~--~~~---~--~~ You received this

Re: pages controller

2006-12-01 Thread jinhr
Suppose you want to show the latest blog at home page. First you should finish the independent action getLatestBlog of the Controller blogs. Then adding following codes in your app/controllers/pages_controller.php: $latestBlog= $this-requestAction('/blogs/getLatestBlog',

Re: Another best practice question.

2006-12-01 Thread jinhr
TWIOF, I would say search once if the result is not that huge. Then you can use javascript to filter/sort the result. I happened to have a nice filter example for you. Take a look at its last exmaple. http://www.javascriptkit.com/script/script2/tablefilter.shtml Enjoy it ^O^ Henry TWIOF

Re: pages controller

2006-12-01 Thread jinhr
Don't worry the standard. The app/controllers/pages_controller.php is for the project named app only. It will effect this project only. If you want to build another project, say myProjectXXX. You can copy whole app folder and rename it as myProjectXXX. Then your cake/ can works for two different