Re: NewBie

2015-08-07 Thread Gaurav Kumar
$this refers the class in which you are currently working.

On Thursday, June 4, 2015 at 2:11:31 AM UTC+5:30, Kingston Abraham wrote:

 what is the difference between $this-request and $request-

 do both convey same information


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: NewBie

2015-08-03 Thread Ruben Alzate Quintero
If i am correct, the controller they are being called from.

$this- refers to the controller you are calling the request

El miércoles, 3 de junio de 2015, 15:41:31 (UTC-5), Kingston Abraham 
escribió:

 what is the difference between $this-request and $request-

 do both convey same information


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


NewBie

2015-06-03 Thread Kingston Abraham
what is the difference between $this-request and $request-

do both convey same information

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Advice for a newbie?

2015-03-23 Thread DJ Far
Definitely go with CakePHP 3.0.  The ORM and query builder is awesome. 
 Don't ramp up two learning curves, just start with 3.0.

On Sunday, March 22, 2015 at 5:37:30 AM UTC-7, Jim_1993z wrote:

 Hello,

 I am an occasional database programmer, going way back to dBase days and I 
 want to wean myself off microsoft access. CakePHP looks interesting. I have 
 never really done anything in PHP, but I have at times studied it and 
 believe I could master it. Tried Ruby on Rails but learning curve was steep 
 considering I have a day job. 

 So I have another project that could start off as a very simple CRUD app, 
 but I want to make it much more powerful over time. It would store lab 
 data. Lots of different tests on lots of samples. I built apps like this in 
 Access b4 that were quite useful. Back to PHP and Cake. I made a virtual 
 Ubuntu Server yesterday and installed Cake 2.6.3. Haven't gone any further. 
 Then I read about Cake3. I like what read about the new ORM. What to do... 
 Should I go ahead and make my simple app in 2.6.3 or start right off with 
 the quite new version 3? Should I learn more PHP first? Can I install Cake3 
 side by side with Cake 2.6.3? Thanks in advance.


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Advice for a newbie?

2015-03-22 Thread 'Jim_1993z' via CakePHP
Hello,

I am an occasional database programmer, going way back to dBase days and I 
want to wean myself off microsoft access. CakePHP looks interesting. I have 
never really done anything in PHP, but I have at times studied it and 
believe I could master it. Tried Ruby on Rails but learning curve was steep 
considering I have a day job. 

So I have another project that could start off as a very simple CRUD app, 
but I want to make it much more powerful over time. It would store lab 
data. Lots of different tests on lots of samples. I built apps like this in 
Access b4 that were quite useful. Back to PHP and Cake. I made a virtual 
Ubuntu Server yesterday and installed Cake 2.6.3. Haven't gone any further. 
Then I read about Cake3. I like what read about the new ORM. What to do... 
Should I go ahead and make my simple app in 2.6.3 or start right off with 
the quite new version 3? Should I learn more PHP first? Can I install Cake3 
side by side with Cake 2.6.3? Thanks in advance.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Advice for a newbie?

2015-03-22 Thread euromark
Since weeks there is only one real option: Cake3 :)
Use this version right away, as a bonus it just became stable as of today

enjoy
Happy Baking
Mark


Am Sonntag, 22. März 2015 13:37:30 UTC+1 schrieb Jim_1993z:

 Hello,

 I am an occasional database programmer, going way back to dBase days and I 
 want to wean myself off microsoft access. CakePHP looks interesting. I have 
 never really done anything in PHP, but I have at times studied it and 
 believe I could master it. Tried Ruby on Rails but learning curve was steep 
 considering I have a day job. 

 So I have another project that could start off as a very simple CRUD app, 
 but I want to make it much more powerful over time. It would store lab 
 data. Lots of different tests on lots of samples. I built apps like this in 
 Access b4 that were quite useful. Back to PHP and Cake. I made a virtual 
 Ubuntu Server yesterday and installed Cake 2.6.3. Haven't gone any further. 
 Then I read about Cake3. I like what read about the new ORM. What to do... 
 Should I go ahead and make my simple app in 2.6.3 or start right off with 
 the quite new version 3? Should I learn more PHP first? Can I install Cake3 
 side by side with Cake 2.6.3? Thanks in advance.


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


CakePHP NEWBIE needs help w/ international phone number add on contact form...

2014-07-01 Thread Jessica
Hi, 

   Please bear with me! Total newbie in the CakePHP world.
I need to be able to provide the option to add an international phone 
number on my customers registration form page. 
  Currently, only a US 10 digit phone number is being allowed to be 
entered. I really need to be able to provide the capability of entering in 
either styles, US or
international numbers.


Here's a snippet from the ctp file that I thought has to do with phone 
number section, but I do not see where I change anything to make a 
difference.

tr style=height:30px;
td align=left Phone Number span class=starr*/span  /td
td align=left class=tdwidth ?php echo 
$form-input('Member.phone',array('label'='','div' = '','class'='phone 
required','id'='phone')); ? /td
/tr 
tr style=height:30px;


Then here is a snippet from the ctp file that information is displayed on. 
Though I am not sure if this is relevant?

div class=propertyviewinpt
div class=propertyviewContainerLeft  Phone  span 
class=starr * /span /div
div class=propertyviewContainerRight 
?php echo 
 $form-input('phone',array('label'='','div'='', 'class'='required 
phone', 'size' = '20')); ?

/div


Should I be looking for another ctp file that has solely form information 
on it or can I change the code provided above to include international 
numbers?

Thanks!

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP NEWBIE needs help w/ international phone number add on contact form...

2014-07-01 Thread vbpupil
Hi Jessica

Are you failing the validation? this is set in the model. See here for 
setting up model validation

http://book.cakephp.org/2.0/en/models/data-validation.html

I hoe this helps.


On Monday, June 30, 2014 10:30:23 PM UTC+1, Jessica wrote:

 Hi, 

Please bear with me! Total newbie in the CakePHP world.
 I need to be able to provide the option to add an international phone 
 number on my customers registration form page. 
   Currently, only a US 10 digit phone number is being allowed to be 
 entered. I really need to be able to provide the capability of entering in 
 either styles, US or
 international numbers.


 Here's a snippet from the ctp file that I thought has to do with phone 
 number section, but I do not see where I change anything to make a 
 difference.

 tr style=height:30px;
 td align=left Phone Number span class=starr*/span  /td
 td align=left class=tdwidth ?php echo 
 $form-input('Member.phone',array('label'='','div' = '','class'='phone 
 required','id'='phone')); ? /td
 /tr 
 tr style=height:30px;


 Then here is a snippet from the ctp file that information is displayed on. 
 Though I am not sure if this is relevant?

 div class=propertyviewinpt
 div class=propertyviewContainerLeft  Phone  span 
 class=starr * /span /div
 div class=propertyviewContainerRight 
 ?php echo 
  $form-input('phone',array('label'='','div'='', 'class'='required 
 phone', 'size' = '20')); ?
 
 /div


 Should I be looking for another ctp file that has solely form information 
 on it or can I change the code provided above to include international 
 numbers?

 Thanks!


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: CakePHP Newbie Questions

2013-12-21 Thread Reuben
No doubt you've seen 
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html

With this, you set up the Auth component to tell it how you're doing your 
Auth, and what the loginAction should be.  Once a user request comes in for 
a page that requires authentication, and if they're not Authentication, the 
component will redirect the user to the login action, get them logged in, 
and then redirect them to the original page they were trying to get to.  Of 
course, you're free to directly display your login action as well.

As mentioned before, Controllers don't need a Model, but will use 
convention to determine a model to use, if one is not supplied.  If you 
want a controller with no Models, use public $uses = false or public $uses 
= array(), as described here 
: http://book.cakephp.org/2.0/en/controllers.html#Controller::$uses

When you set up the Auth component, you'll also set up a model that is used 
for that authentication.  Usually it's a User model, with a username and 
password.  To access any fields in the auth model for the current 
authentication session, from the controller, use $this-Auth-user();  i.e. 
$this-Auth-user('username') will give you the user name of the currently 
logged in user. As seen 
here: 
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#accessing-the-logged-in-user

I hope that answers your questions.

Regards
Reuben Helms

On Wednesday, 18 December 2013 03:21:50 UTC+10, Nick Harper wrote:

 Hi,

 I have recently started to learn CakePHP after just being used to coding 
 from scratch.

 I have installed a couple of plugins but the issue I have is linking them 
 together, for example if I have a login script then how on earth do I just 
 show the login page for example?

 Does every Controller need to have a mysql assigned to it?

 I have been through the blog tutorial but so far it just feels really 
 restrictive compared to just coding from scratch but what really appeals is 
 the plugins / helpers but I am just struggling with basic things like 
 echoing the username they are logged in with when logged in etc.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: CakePHP Newbie Questions

2013-12-20 Thread Marush Denchev
Hi Nick,

Well every thing has a learning curve so be patient and you'll get the gist 
of it. I've used almost all PHP frameworks and by far Cake is the one that 
is easiest to learn and use.

To answer your question: No, you don't need a mysql assigned to the 
controller. By mysql I guess you mean Model. Cake will try to load a view 
with the same name of the method in the controller. So if your Controller 
named ProductsController is called and within it the method index, then 
Cake will load a view with name index.ctp from app/Views/Products. In the 
view you can put whatever you want.

Because cake is trying to give you a solid ground for a quick start if you 
have a model named Product then Cake will try to load it also. And if you 
don't have a DB table assigned to that model then Cake will be unhappy. If 
you don't want that just use property $uses and set it to array().

On Tuesday, December 17, 2013 7:21:50 PM UTC+2, Nick Harper wrote:

 Hi,

 I have recently started to learn CakePHP after just being used to coding 
 from scratch.

 I have installed a couple of plugins but the issue I have is linking them 
 together, for example if I have a login script then how on earth do I just 
 show the login page for example?

 Does every Controller need to have a mysql assigned to it?

 I have been through the blog tutorial but so far it just feels really 
 restrictive compared to just coding from scratch but what really appeals is 
 the plugins / helpers but I am just struggling with basic things like 
 echoing the username they are logged in with when logged in etc.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: CakePHP Newbie Questions

2013-12-20 Thread Silver Troy
Hey Nick,
 I know your pain .. I suggest watching these videos  
http://www.youtube.com/playlist?list=PL20D663BEC6319E36
they will really help explain and walk you through setting up a login / 
logout 

Hopefully that helps you and get you moving on your application.

Cheers




On Tuesday, December 17, 2013 12:21:50 PM UTC-5, Nick Harper wrote:

 Hi,

 I have recently started to learn CakePHP after just being used to coding 
 from scratch.

 I have installed a couple of plugins but the issue I have is linking them 
 together, for example if I have a login script then how on earth do I just 
 show the login page for example?

 Does every Controller need to have a mysql assigned to it?

 I have been through the blog tutorial but so far it just feels really 
 restrictive compared to just coding from scratch but what really appeals is 
 the plugins / helpers but I am just struggling with basic things like 
 echoing the username they are logged in with when logged in etc.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


CakePHP Newbie Questions

2013-12-18 Thread Nick Harper
Hi,

I have recently started to learn CakePHP after just being used to coding 
from scratch.

I have installed a couple of plugins but the issue I have is linking them 
together, for example if I have a login script then how on earth do I just 
show the login page for example?

Does every Controller need to have a mysql assigned to it?

I have been through the blog tutorial but so far it just feels really 
restrictive compared to just coding from scratch but what really appeals is 
the plugins / helpers but I am just struggling with basic things like 
echoing the username they are logged in with when logged in etc.


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Cakephp Ajax sample code for complete newbie

2013-06-12 Thread Hiệp Nguyễn
Thanks a lot!

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Cakephp Ajax sample code for complete newbie

2013-06-07 Thread Norris
http://www.reversefolds.com/articles/show/ajax and lots of other tutorial 
if you search on google

Pada Jumat, 24 Mei 2013 16:19:49 UTC+7, Sam menulis:

 Dear CakePHP experts,

 Can someone provide some links to sample code or tutorial that teaches a 
 complete Ajax newbie on using Cakephp with Ajax? I tried searching but 
 could not find much useful links. Thank you very much.


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Cakephp Ajax sample code for complete newbie

2013-05-24 Thread Sam
Dear CakePHP experts,

Can someone provide some links to sample code or tutorial that teaches a 
complete Ajax newbie on using Cakephp with Ajax? I tried searching but 
could not find much useful links. Thank you very much.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




CakePhp 2.x Newbie

2012-12-10 Thread Maximum
Hello everyone!!!

I am a Php Junior developer. been recently employed tomaintained CakePhp 
Applications developed using 1.3.X version. I do the job very well. My 
problem is that now I am trying to learn to build cake applications from 
scratch using Cakephp 2.X.

the actual problem is when having done setting up mu enviroment, Cake gives 
me a Missing controller error. Say if I have named my app 
InventotySystem, cake will say InventorySystemController missing please 
verify if created blah blah blah blah. I am not sure whether this is an 
expected behavior. if not, what should I do to proceed from this?

Please help.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Cake PHP v 2.2.4 - Newbie, blog tutorial does not work?

2012-12-10 Thread Paul Marriott
I have installed and run through the Blog tutorial and am getting the error

http://localhost/cakephp-cakephp-b2812f2/posts/index

Error: PostsController could not be found 

The file definitely exists, I have tried the tutorial twice now so must 
have something wrong. However I cannot find a download of the files from a 
working installation. Can anyone help me out here?

So have a followed the instructions incorrectly or does the example not 
work?

I want to use CakePHP but if I cannot get a simple example working I have 
little confidence that more complex projects will work reliably.

Cheers

Paul

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Cake PHP v 2.2.4 - Newbie, blog tutorial does not work?

2012-12-10 Thread Nathaniel Sumaya
If you are using IIS refer here http://jquerydate.blogspot.com. Otherwise
cookbook http://book.cakephp.org/2.0/en/index.html is sufficient for your
needs.

On Tue, Dec 11, 2012 at 1:29 AM, Paul Marriott paulmarrio...@googlemail.com
 wrote:

 I have installed and run through the Blog tutorial and am getting the error

 http://localhost/cakephp-cakephp-b2812f2/posts/index

 Error: PostsController could not be found

 The file definitely exists, I have tried the tutorial twice now so must
 have something wrong. However I cannot find a download of the files from a
 working installation. Can anyone help me out here?

 So have a followed the instructions incorrectly or does the example not
 work?

 I want to use CakePHP but if I cannot get a simple example working I have
 little confidence that more complex projects will work reliably.

 Cheers

 Paul

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.






-- 
Thanks and Best Regards,
Nathaniel N. Sumaya

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Cake PHP v 2.2.4 - Newbie, blog tutorial does not work?

2012-12-10 Thread Tim Denholm
Hi Paul, could you please include the contents of your PostsController.php
file.

Cheers


On Tue, Dec 11, 2012 at 1:44 PM, Nathaniel Sumaya nsum...@gmail.com wrote:

 If you are using IIS refer here http://jquerydate.blogspot.com.
 Otherwise cookbook http://book.cakephp.org/2.0/en/index.html is
 sufficient for your needs.

 On Tue, Dec 11, 2012 at 1:29 AM, Paul Marriott 
 paulmarrio...@googlemail.com wrote:

 I have installed and run through the Blog tutorial and am getting the
 error

 http://localhost/cakephp-cakephp-b2812f2/posts/index

 Error: PostsController could not be found

 The file definitely exists, I have tried the tutorial twice now so must
 have something wrong. However I cannot find a download of the files from a
 working installation. Can anyone help me out here?

 So have a followed the instructions incorrectly or does the example not
 work?

 I want to use CakePHP but if I cannot get a simple example working I have
 little confidence that more complex projects will work reliably.

 Cheers

 Paul

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.






 --
 Thanks and Best Regards,
 Nathaniel N. Sumaya

  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Cake PHP v 2.2.4 - Newbie, blog tutorial does not work?

2012-12-10 Thread Marcelo F Andrade
Em 11/12/2012 00:42, Paul Marriott paulmarrio...@googlemail.com
escreveu:

 I have installed and run through the Blog tutorial and am getting the
error

 http://localhost/cakephp-cakephp-b2812f2/posts/index

 Error: PostsController could not be found

 The file definitely exists, I have tried the tutorial twice now so must
have something wrong.

Are you sure about the CakePHP version?  Double check the name of your
posts_controller or PostsController file.

If you're in doubt, try to generate this file with cake bake.

Cheers.

MARCELO DE FREITAS ANDRADE
Minha alma é maior do que eu.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Cake Newbie

2012-10-23 Thread Lorenzo Strada
Hi Guys
right yesterday i installed my first webserver on *windows* environment and 
i choose *cakephp* as my first framework but i got some issue.
I followed the instruction on the cake documentation but something gone 
wrong.
I created manually the example database for the blog tutorial but i can't 
link to cake. Moreover the system give me *1024* error.

Can someone help me!?


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Cake Newbie

2012-10-23 Thread Felipe Zavan
Have you opened the Config/core.php and changed the security salt and hash?

I think that 'notice' is related to that.

2012/10/23 Lorenzo Strada lorenzostradaph...@gmail.com:
 Hi Guys
 right yesterday i installed my first webserver on windows environment and i
 choose cakephp as my first framework but i got some issue.
 I followed the instruction on the cake documentation but something gone
 wrong.
 I created manually the example database for the blog tutorial but i can't
 link to cake. Moreover the system give me 1024 error.

 Can someone help me!?


 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Cake Newbie

2012-10-23 Thread Felipe Zavan
more info:

http://stackoverflow.com/questions/4163711/please-change-the-value-of-security-salt-in-app-config-core-php-to-a-salt-valu

(sorry for posting twice)

2012/10/23 Felipe Zavan emailblogg...@gmail.com:
 Have you opened the Config/core.php and changed the security salt and hash?

 I think that 'notice' is related to that.

 2012/10/23 Lorenzo Strada lorenzostradaph...@gmail.com:
 Hi Guys
 right yesterday i installed my first webserver on windows environment and i
 choose cakephp as my first framework but i got some issue.
 I followed the instruction on the cake documentation but something gone
 wrong.
 I created manually the example database for the blog tutorial but i can't
 link to cake. Moreover the system give me 1024 error.

 Can someone help me!?


 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Newbie - Resources

2012-08-12 Thread Salines
http://www.youtube.com/results?search_query=cakephp+tutorial

Dana četvrtak, 9. kolovoza 2012. 15:22:48 UTC+2, korisnik Robert Haylor 
napisao je:

 Hi All, 

 Quick question, I am new to the concept of CakePHP and was just wondering 
 if anyone could recommend some great books or resources which will be ideal 
 for a beginner  - I'm currently following the tutorial on the CakePHP 
 website but any advice would be great.

 Thanks


-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Newbie - Resources

2012-08-12 Thread Nikhil Agrawal
Stick with the cakePHP-cookbooks, its an ultimate resource for all ..:)
Try going through
http://book.cakephp.org/2.0/en/tutorials-and-examples.html you
will understand all basic stuffs.

On Sun, Aug 12, 2012 at 2:24 PM, Salines nikola.parad...@gmail.com wrote:

 http://www.youtube.com/results?search_query=cakephp+tutorial

 Dana četvrtak, 9. kolovoza 2012. 15:22:48 UTC+2, korisnik Robert Haylor
 napisao je:

 Hi All,

 Quick question, I am new to the concept of CakePHP and was just wondering
 if anyone could recommend some great books or resources which will be ideal
 for a beginner  - I'm currently following the tutorial on the CakePHP
 website but any advice would be great.

 Thanks

  --
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Newbie - Resources

2012-08-11 Thread Yasir Arafat Hasib
Hello Newbie,

You can get some beginners tutorial on http://arafats.info/category/cakephp/

On Thu, Aug 9, 2012 at 7:22 PM, Robert Haylor congle...@gmail.com wrote:

 Hi All,

 Quick question, I am new to the concept of CakePHP and was just wondering
 if anyone could recommend some great books or resources which will be ideal
 for a beginner  - I'm currently following the tutorial on the CakePHP
 website but any advice would be great.

 Thanks

 --
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en-US.






-- 
*Thanks  Regards.
-
Yasir Arafat (Hasib)*
*Deputy Project Manager, *Software Solutions
Grameen Solutions
Contact Information:
**
**
Cell : +8801816 536 901, +880197 *333* 2 888
Web: http://arafats.info
http://arafats.info

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Newbie - Resources

2012-08-10 Thread Robert Haylor
Hi All, 

Quick question, I am new to the concept of CakePHP and was just wondering 
if anyone could recommend some great books or resources which will be ideal 
for a beginner  - I'm currently following the tutorial on the CakePHP 
website but any advice would be great.

Thanks

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Newbie: Problem with Blog tutorial

2012-07-15 Thread AD7six
Borislav,

Explaining why it is unexpected would clarify the misunderstanding - there is 
no mocking in asking someone to explain themselves.

AD

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


Newbie: Problem with Blog tutorial

2012-07-14 Thread Kunal Bajpai
As described in the blog tutorial - 

Also remove these .htaccess files:

/.htaccess/app/.htaccess/app/webroot/.htaccess

This will make your URLs look like 
www.example.com/index.php/controllername/actionname/param rather than 
www.example.com/controllername/actionname/param.

I did the same but still the above mentioned problem exists. My url - 
*blog.com/index.php/posts/ 
*works, but the  *blog.com/posts/ *shows the error, Url not found on the 
server

TIA

Kbajpai

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


Newbie: Problem with Blog tutorial

2012-07-14 Thread AD7six
In what way is that unexpected?

AD

-- 
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: Newbie: Problem with Blog tutorial

2012-07-14 Thread Piotr Beschel
Like! +1

W dniu sobota, 14 lipca 2012 16:19:38 UTC+2 użytkownik AD7six napisał:

 In what way is that unexpected?

 AD


-- 
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: Newbie: Problem with Blog tutorial

2012-07-14 Thread Борислав Събев
Shame on you *AD7six* and *Piotr Beschel*! This group is for helping people 
not mocking them!
Yes the question is kinda silly, but this doesn't mean that you should mock 
people. What if 
you end up asking a question that someone better (in Cake) than you 
considers silly?
Would it be nice to get such replies? This is a community not a forum. Man 
up!

On the qestion:
Kunal, *.htaccess* files are Apache configuration files. When the tutorial 
said *Also remove these .htaccess files*
it did so under the *A note on mod_rewite* section. This is to be done if 
you DO NOT have mod_rewrite working at all 
or if you use a different webserver than Apache. So you do not need to do 
this if your application is running
on an Apache instance with mod_rewrite enabled.

What is mod_rewrite? Well take a look 
herehttp://www.workingwith.me.uk/articles/scripting/mod_rewrite
.

How to use pretty urls with Apache and other webservers? Well read 
thishttp://book.cakephp.org/2.0/en/installation/advanced-installation.html#apache-and-mod-rewrite-and-htaccess
.

On your problem: it seems that you've managed to get Cake's built in pretty 
Urls to work.
You are seeing index.php as it is the script being run de facto when you do 
this:

*Configure::write('App.baseUrl', env('SCRIPT_NAME'));*


So this is why what you see happens. Try to get mod_rewrite working, it has 
some advantages.

Borislav.

On Saturday, 14 July 2012 16:16:12 UTC+3, Kunal Bajpai wrote:

 As described in the blog tutorial - 

 Also remove these .htaccess files:

 /.htaccess/app/.htaccess/app/webroot/.htaccess

 This will make your URLs look like 
 www.example.com/index.php/controllername/actionname/param rather than 
 www.example.com/controllername/actionname/param.

 I did the same but still the above mentioned problem exists. My url - *
 blog.com/index.php/posts/ *works, but the  *blog.com/posts/ *shows the 
 error, Url not found on the server

 TIA

 Kbajpai


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


Very newbie question. Trying to define cake core include path

2012-05-24 Thread Panupat
I just donwloaded cakephp 2, just starting to learn it.

So here's what it says in the cook book.

The CakePHP core libraries will be placed in /usr/lib/cake.

if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', DS . 'usr' . DS . 'lib');
}

So I only need to define up till /lib ? without the /cake? Does that
mean my cake source will always be in a directory called cake?

In my case, my cake source is here
/var/www/lib/cake
And I copied webroot over to here
/var/www/html/caketest

So my index.php should have these?

if (!defined('ROOT')) {
define('ROOT', DS . 'var' . DS . 'www' . DS . 'html');
}

if (!defined('APP_DIR')) {
define('APP_DIR', 'caketest');
}

if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', DS . 'var' . DS . 'www' . 'lib');
}

So far I'm only getting blank pages. The index.php seems to stops
right at
App::uses('Dispatcher', 'Routing');

-- 
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: Very newbie question. Trying to define cake core include path

2012-05-24 Thread jeremyharris
So CAKE_CORE_INCLUDE_PATH should point to the Cake directory in the repo's 
lib folder.

From your setup, you should use

if (!defined('CAKE_CORE_INCLUDE_PATH')) { 
// points to /var/www/cake/lib (which has the Cake folder in it)
define('CAKE_CORE_INCLUDE_PATH', DS . 'var' . DS . 'www' . DS . 'cake' 
. DS . 'lib'); 
}  

You should not need to modify ROOT or APP_DIR at all.

On Thursday, May 24, 2012 2:57:40 AM UTC-7, Panupat wrote:

 I just donwloaded cakephp 2, just starting to learn it. 

 So here's what it says in the cook book. 

 The CakePHP core libraries will be placed in /usr/lib/cake. 

 if (!defined('CAKE_CORE_INCLUDE_PATH')) { 
 define('CAKE_CORE_INCLUDE_PATH', DS . 'usr' . DS . 'lib'); 
 } 

 So I only need to define up till /lib ? without the /cake? Does that 
 mean my cake source will always be in a directory called cake? 

 In my case, my cake source is here 
 /var/www/lib/cake 
 And I copied webroot over to here 
 /var/www/html/caketest 

 So my index.php should have these? 

 if (!defined('ROOT')) { 
 define('ROOT', DS . 'var' . DS . 'www' . DS . 'html'); 
 } 

 if (!defined('APP_DIR')) { 
 define('APP_DIR', 'caketest'); 
 } 

 if (!defined('CAKE_CORE_INCLUDE_PATH')) { 
 define('CAKE_CORE_INCLUDE_PATH', DS . 'var' . DS . 'www' . 'lib'); 
 } 

 So far I'm only getting blank pages. The index.php seems to stops 
 right at 
 App::uses('Dispatcher', 'Routing');

-- 
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: The classic Fatal error: Call to a member function find() on a non-object for newbie

2012-02-23 Thread jeremyharris
It's because the item Country does not exist on Information. Models are 
always singular, so where you have Countries defined in your Information 
belongsTo you should have Country instead.

-- 
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: The classic Fatal error: Call to a member function find() on a non-object for newbie

2012-02-23 Thread reynie...@gmail.com
Ohhh thanks I miss this part now it works.

Ing. Reynier Pérez Mira
http://reynierpm.site90.com/



On Thu, Feb 23, 2012 at 5:48 PM, jeremyharris funeralm...@gmail.com wrote:

 It's because the item Country does not exist on Information. Models are
 always singular, so where you have Countries defined in your Information
 belongsTo you should have Country instead.

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


-- 
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: The classic Fatal error: Call to a member function find() on a non-object for newbie

2012-02-23 Thread jeremyharris
No problem. Sometimes it helps to have another person look at it :)

-- 
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: Newbie question: Disable Cache

2012-01-26 Thread rocha9000
This issue has been resolved. It turned out to be my webhost caching the 
generated cache files. 

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


Newbie question: Disable Cache

2012-01-25 Thread rocha9000
Hi guys, 

I'm completely new to CakePHP, and for an hour or so I've been battleling 
with a problem that's about to end my CakePHP-experience.. I simply can't 
figure out how to disable cache so controllers, and views shows the latest 
changes and not some cached version.

I've tried to add Configure::write('Cache.disable', true); in 
/app/webroot/index.php .. but that doesn't work. The pages seems to have 
something like 15 minutes cache, before a change is visible.. how can I 
change this?

Hope you guys can help me out, it will be much appreciated!

-- 
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: Newbie needs to be kicked

2012-01-09 Thread jeremyharris
It sounds like your requests to google are going to be a regular thing, 
like a CRON job. If I'm correct in assuming this, your best bet is to 
create a Shell class that you will run via CRON to regularly collect data 
and place it in your database.

Frontend-wise, I'm not sure what you're doing so there's not much I can 
say, although after the data is collected you can display or do whatever 
you want with it.

-- 
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: Newbie needs to be kicked

2012-01-09 Thread Yves S. Garret
If you are using 2.0:
http://book.cakephp.org/2.0/en/
If you are using 1.3:
http://book.cakephp.org/view/876/The-Manual

On Mon, Jan 9, 2012 at 11:26 AM, jeremyharris funeralm...@gmail.com wrote:

 It sounds like your requests to google are going to be a regular thing,
 like a CRON job. If I'm correct in assuming this, your best bet is to
 create a Shell class that you will run via CRON to regularly collect data
 and place it in your database.

 Frontend-wise, I'm not sure what you're doing so there's not much I can
 say, although after the data is collected you can display or do whatever
 you want with it.

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


-- 
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: Newbie needs to be kicked

2012-01-09 Thread Yves S. Garret
In 1.3, go to chapter 11 and there you will build a small blog.

You can also purchase a book from Amazon that will push you in the right
direction.

On Mon, Jan 9, 2012 at 1:39 PM, Yves S. Garret
yoursurrogate...@gmail.comwrote:

 If you are using 2.0:
 http://book.cakephp.org/2.0/en/
 If you are using 1.3:
 http://book.cakephp.org/view/876/The-Manual


 On Mon, Jan 9, 2012 at 11:26 AM, jeremyharris funeralm...@gmail.comwrote:

 It sounds like your requests to google are going to be a regular thing,
 like a CRON job. If I'm correct in assuming this, your best bet is to
 create a Shell class that you will run via CRON to regularly collect data
 and place it in your database.

 Frontend-wise, I'm not sure what you're doing so there's not much I can
 say, although after the data is collected you can display or do whatever
 you want with it.

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




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


Newbie needs to be kicked

2012-01-07 Thread cipherwar
Hello,
i am new to cakephp. I got the installation guide and I am using a
windows xampp system for development. I got the system running ,
modelled my database, used cake bake for generating mvc classes and
now the CRUD classes are working fine.

But:

I don't know how to go on.

My idea is to have a class which is reading keywords from a database ,
build search requests for google and store the responses into the
database again.

What do I have to to now?
Create a controller? Or a model?  What to to with the CRUD classes,
generated by cake bake, which I do not really use for my business
logic?


Could anybody please kick me in the right direction or post a link to
a tutorial that does not concern with the usual installation guide??

Thank you.

-- 
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: error after loading cakephp at dreamhost (newbie)

2011-10-22 Thread manuj
problem solved

On Oct 21, 9:09 pm, manuj getma...@gmail.com wrote:
 error after loading cakephp at dreamhost

 Fatal Error (256): [MissingHelperException] Helper class FormHelper
 could not be found.
 #0 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/View/
 View.php(577): HelperCollection-load('Form', Array)
 #1 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/View/
 View.php(359): View-loadHelpers()
 #2 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Controller/
 Controller.php(898): View-render('error500', NULL)
 #3 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
 ExceptionRenderer.php(281): Controller-render('error500')
 #4 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
 ExceptionRenderer.php(194): ExceptionRenderer-_outputMessageSafe('error500')

 #5 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
 ExceptionRenderer.php(170): 
 ExceptionRenderer-_cakeError(Object(MissingHelperException))

 #6 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
 ErrorHandler.php(127): ExceptionRenderer-render(Array, Array)
 #7 [internal function]: ErrorHandler::handleException()
 #8 {main} [CORE/Cake/Error/ErrorHandler.php, line 136]

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


error after loading cakephp at dreamhost (newbie)

2011-10-21 Thread manuj
error after loading cakephp at dreamhost

Fatal Error (256): [MissingHelperException] Helper class FormHelper
could not be found.
#0 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/View/
View.php(577): HelperCollection-load('Form', Array)
#1 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/View/
View.php(359): View-loadHelpers()
#2 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Controller/
Controller.php(898): View-render('error500', NULL)
#3 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
ExceptionRenderer.php(281): Controller-render('error500')
#4 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
ExceptionRenderer.php(194): ExceptionRenderer-
_outputMessageSafe('error500')
#5 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
ExceptionRenderer.php(170): ExceptionRenderer-
_cakeError(Object(MissingHelperException))
#6 /home/legalpanda/legalpanda.abmantech.com/lib/Cake/Error/
ErrorHandler.php(127): ExceptionRenderer-render(Array, Array)
#7 [internal function]: ErrorHandler::handleException()
#8 {main} [CORE/Cake/Error/ErrorHandler.php, line 136]

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


Newbie

2011-09-12 Thread Wayneio
Hi, I am new to Cake PHP, I have been given a website to do SEO on,
but it is all CakePHP files. How would I go about finding the HTML to
edit?

Thanks

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

2011-09-12 Thread Dr. Tarique Sani
The presentation layer of a CakePHP application is the Views - but
these are not pure HTML files - they will have varying amount of PHP
in it

See http://book.cakephp.org/view/899/CakePHP-Folder-Structure

As a good measure - keep a backup of everything you change so that you
can revert if need be

HTH
T

On Mon, Sep 12, 2011 at 5:06 PM, Wayneio wayne.s.cov...@gmail.com wrote:
 Hi, I am new to Cake PHP, I have been given a website to do SEO on,
 but it is all CakePHP files. How would I go about finding the HTML to
 edit?

 Thanks

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




-- 
=
PHP for E-Biz: http://sanisoft.com
=

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


newbie confusion with HATB saving

2011-08-01 Thread mr_robot
hi
i'm having a bit of difficulty getting my head around saving records
with HABM.

i'm am trying to dump a whole lot of data simultaneously.
if i do it manually i can get it to work.

for example:
i have an artists table. and a last_update table.

then this works fine:
$artist = $this-Artist-findById($id);
$field_to_update = band_members_last_updated;
$this-data['LastUpdate']['id'] = $artist['LastUpdate']['id'];
$this-data['LastUpdate']['artist_id'] = $artist['id'];
$this-data['LastUpdate'][$field_to_update] = time();
// both these work
$this-LastUpdate-save($this-data);
//$this-Artist-LastUpdate-saveAll($this-data);

but this does not:
$artist['LastUpdate']['artist_last_updated'] = date('Y-m-d');
$this-LastUpdate-saveAll($artist);
//neither work:
//$this-LastUpdate-saveAll($artist);
$this-LastUpdate-saveAll($artist['LastUpdate']);

what i'm actually wanting to do is much more complicated. i want to
pass the $artist array around quite a bit to manipulate quite a few
tables' data then at the end just dump $artist back into the database
and it's associated tables.

and pointers would be appreciated.
tx

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


newbie question about databases

2011-07-31 Thread dewolfe001
Is there a way that I can generate app/config/schema PHP files from
the SQL or MySQL database tables? I tried cake schema generate node
from the console (node being the name of the table I wanted to pick
up). But that just gives me the blogs table that ships as an example
in CakePHP.

Thanks in advance,

Mike

-- 
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: newbie question about databases

2011-07-31 Thread Simon Males
On Mon, Aug 1, 2011 at 5:25 AM, dewolfe001 mikedewo...@gmail.com wrote:
 Is there a way that I can generate app/config/schema PHP files from
 the SQL or MySQL database tables? I tried cake schema generate node
 from the console (node being the name of the table I wanted to pick
 up). But that just gives me the blogs table that ships as an example
 in CakePHP.

The following command will dump the whole schema by looking at the DB,
rather then the models.

cake schema generate -f

-- 
Simon Males

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


newbie question about weird legacy database schema

2011-07-31 Thread ubiquitous_tom
here's the current schema of my database

/* First, create our thread table: */
CREATE TABLE thread (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
dat_id INT,
title VARCHAR(50),
body TEXT,
created DATETIME DEFAULT NULL,
modified DATETIME DEFAULT NULL
);

CREATE TABLE dat_001 (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
thread_id INT,
title VARCHAR(50),
body TEXT,
created DATETIME DEFAULT NULL,
modified DATETIME DEFAULT NULL
);

CREATE TABLE dat_002 (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
thread_id INT,
title VARCHAR(50),
body TEXT,
created DATETIME DEFAULT NULL,
modified DATETIME DEFAULT NULL
);

and so on


I know that this is not exactly how the cakephp database would be but
i am a newbie at this and i would like to know
how do i code this kinda relationship on cakephp. how do I do 1 to
many relationship in cakephp.
I know i can do this in codeigniter and that's what i used to use but
I have to start workin on cakephp and i have found it to be quite good
but run into this kinda problem
so if anyone can help guide me toward to right way of doing this
please let me know.

-- 
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: newbie question about databases

2011-07-31 Thread dewolfe001
Thanks, Simon! That did the trick!

- Mike

On Jul 31, 3:46 pm, Simon Males s...@sime.net.au wrote:
 On Mon, Aug 1, 2011 at 5:25 AM, dewolfe001 mikedewo...@gmail.com wrote:
  Is there a way that I can generate app/config/schema PHP files from
  the SQL or MySQL database tables? I tried cake schema generate node
  from the console (node being the name of the table I wanted to pick
  up). But that just gives me the blogs table that ships as an example
  in CakePHP.

 The following command will dump the whole schema by looking at the DB,
 rather then the models.

 cake schema generate -f

 --
 Simon Males

-- 
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: Newbie Question - Controller Model Binding

2011-07-07 Thread Gary Herman
It was in a book I grabbed recently called Beginning CakePHP: From Novice
to Professional.

Gary Herman
831.454.0850 x.13 (Office)


-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of euromark
Sent: Wednesday, July 06, 2011 8:05 AM
To: CakePHP
Subject: Re: Newbie Question - Controller Model Binding

where did you find that?
sounds totally wrong to be. but i would need to see the source in order to
tell you if its worthy to read.

you usually create
- model
- controller
- views
in this order (using the baking tools this is quite comfortable)


it is as alive as is gets :)
of course you turn up old results as the framework is already in existance
for quite some time and some issues from the past are cake1 oder cake1.2
related

nowadays with cake1.3 there might be other new issues - or the same ones in
a slightly different way


On 5 Jul., 20:37, gavrielh gher...@jabico.com wrote:
 Just jumping into CakePHP and while I've gotten quite deep in the code 
 already, awesome by the way, I found one article that threw me for a 
 loop.  Basically it suggested that one should only create controllers 
 for database tables and for nothing else.  This seems a bit strange, 
 why would I not be able to create a controller for a backend class or 
 something not directly tied to the model?

 Also, on a side note - I notice that a lot of my searches on Google 
 for CakePHP related topics return very old posts - is CakePHP still 
 alive and well?

--
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 
cake-php+at http://groups.google.com/group/cake-php

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


Newbie Question - Controller Model Binding

2011-07-06 Thread gavrielh
Just jumping into CakePHP and while I've gotten quite deep in the code
already, awesome by the way, I found one article that threw me for a
loop.  Basically it suggested that one should only create controllers
for database tables and for nothing else.  This seems a bit strange,
why would I not be able to create a controller for a backend class or
something not directly tied to the model?

Also, on a side note - I notice that a lot of my searches on Google
for CakePHP related topics return very old posts - is CakePHP still
alive and well?

-- 
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: Newbie Question - Controller Model Binding

2011-07-06 Thread euromark
where did you find that?
sounds totally wrong to be. but i would need to see the source in
order to tell you if its worthy to read.

you usually create
- model
- controller
- views
in this order (using the baking tools this is quite comfortable)


it is as alive as is gets :)
of course you turn up old results as the framework is already in
existance for quite some time
and some issues from the past are cake1 oder cake1.2 related

nowadays with cake1.3 there might be other new issues - or the same
ones in a slightly different way


On 5 Jul., 20:37, gavrielh gher...@jabico.com wrote:
 Just jumping into CakePHP and while I've gotten quite deep in the code
 already, awesome by the way, I found one article that threw me for a
 loop.  Basically it suggested that one should only create controllers
 for database tables and for nothing else.  This seems a bit strange,
 why would I not be able to create a controller for a backend class or
 something not directly tied to the model?

 Also, on a side note - I notice that a lot of my searches on Google
 for CakePHP related topics return very old posts - is CakePHP still
 alive and well?

-- 
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: newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-09 Thread barricades
Hey, that worked perfectly, thanks for the help :)

On May 8, 9:27 pm, dreamingmind dreamingmin...@gmail.com wrote:
 Barricades,

 I think your concern about the beforeSave/afterSave issues are red
 herrings. Since the first line of your code is:
  if ($this-Campaign-save($this-data)) {  ...
 both the before and after are finished. And you are only getting
 inside the 'if' statement when the save was successful. Of course, in
 that case the slug exists but it isn't available in the way you are
 trying to get to it. That's why I suggested searching on the returned
 id of the created record. That will get you the slug value to pass on
 through to your redirect. To prove it to yourself, modify the if
 statement to read:

 if ($this-Campaign-save($this-data)) {
  debug($this-Campaign-findById($this-Campaign-id,array('fields'='slug')));

  die;
 ...

 }

 So using the find statement I've shown you in the debug function
 (above) you could do this:

 if ($this-Campaign-save($this-data)) {
    $new_record = $this-Campaign-findById(
         $this-Campaign-id,
         array('fields'='slug')
   );
    $this-redirect(array(
         'action' = 'view',
         $new_record['Campaign']['slug']
   ));

 } else {
    
 }

 Regards,
 Don

 On May 8, 4:59 am, barricades davow...@googlemail.com wrote:







  Thanks for the reply :)

  The find after the save isn't returning what I want it to. In fact I'm
  not sure it's returning anything at all. Baring in mind I'm a total
  newbie (not even that much of a php'er either yet) what I want it
  simply somehow (what I've done is just my best guess - I've no idea
  how to do this at all) to make it so that when I save a new Campaign,
  if it's successful, it redirects to a view action and passes along the
  slug, as a string I guess would be best(?), so that I can show the
  details of the newly created Campaign on in the view.ctp.

  The caveat being that I'm using sluggable behaviour which creates the
  slug in a beforeSave and therefore the $slug to be passed on to the
  view function has to be created after the save.

  I hope that makes sense.

  On May 8, 3:08 am, dreamingmind dreamingmin...@gmail.com wrote:

   Barricades,

   You don't really say WHERE the process seems to break down. The find
   after the save seems suspicious to me. Is that returning the proper
   slug to pass along to your view function? It looks like $slug will end
   up holding the returned data array rather than the returned string
   from the slug field (see below for more info)

   You might take advantage of the fact that the id property of the model
   is set to the id of the record that was created by save. So you should
   be able to set your slug value properly after:

   $this-Campaign-findById($this-Campaign-

   id,,array('fields'='slug'));

   But you should also be aware that this will not return the slug field
   directly. It's going to be in the usual data array:

   Array
   (
       [Campaign] = Array
           (
               [slug] = My_crazy_slug
           )
   )

   Regards,
   Don

   On May 7, 9:22 am, barricades davow...@googlemail.com wrote:

Hi, I'm new so please don't shout at me for the stupid question but...

When I save a record I want to redirect straight to the record I just
created. The record which I have just created uses sluggable behaviour
to create a slug in a beforeSave, so I can't just use 
$this-data['Campaign]['slug'] as it doesn't exist before I save my

campaign.

in my add function I've got:

pre
if ($this-Campaign-save($this-data)) {
        $slug = $this-Campaign-find('first', array('fields' =
'Campaign.slug'));
        $this-redirect(array('action' = 'view', $slug));
        } else {
        $this-Session-setFlash(__('The campaign could not be saved. 
Please,
try again.', true));}

/pre

and then

pre
function view($slug) {
        $campaign = $this-Campaign-find('first',
array('conditions'=array('Campaign.slug'=$slug), 'recursive'=-1));
        $this-set(compact('campaign'));
        }
/pre

but that ain't working. I've tried a couple of other ways but I'm a
bit stumped.

How do I get the value that's in the slug column for the Campaign
which has just been saved and pass it on to the view function so that
I can display the right Campaign?

thanks in advance :)

-- 
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: newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-08 Thread barricades
Thanks for the reply :)

The find after the save isn't returning what I want it to. In fact I'm
not sure it's returning anything at all. Baring in mind I'm a total
newbie (not even that much of a php'er either yet) what I want it
simply somehow (what I've done is just my best guess - I've no idea
how to do this at all) to make it so that when I save a new Campaign,
if it's successful, it redirects to a view action and passes along the
slug, as a string I guess would be best(?), so that I can show the
details of the newly created Campaign on in the view.ctp.

The caveat being that I'm using sluggable behaviour which creates the
slug in a beforeSave and therefore the $slug to be passed on to the
view function has to be created after the save.

I hope that makes sense.



On May 8, 3:08 am, dreamingmind dreamingmin...@gmail.com wrote:
 Barricades,

 You don't really say WHERE the process seems to break down. The find
 after the save seems suspicious to me. Is that returning the proper
 slug to pass along to your view function? It looks like $slug will end
 up holding the returned data array rather than the returned string
 from the slug field (see below for more info)

 You might take advantage of the fact that the id property of the model
 is set to the id of the record that was created by save. So you should
 be able to set your slug value properly after:

 $this-Campaign-findById($this-Campaign-

 id,,array('fields'='slug'));

 But you should also be aware that this will not return the slug field
 directly. It's going to be in the usual data array:

 Array
 (
     [Campaign] = Array
         (
             [slug] = My_crazy_slug
         )
 )

 Regards,
 Don

 On May 7, 9:22 am, barricades davow...@googlemail.com wrote:







  Hi, I'm new so please don't shout at me for the stupid question but...

  When I save a record I want to redirect straight to the record I just
  created. The record which I have just created uses sluggable behaviour
  to create a slug in a beforeSave, so I can't just use 
  $this-data['Campaign]['slug'] as it doesn't exist before I save my

  campaign.

  in my add function I've got:

  pre
  if ($this-Campaign-save($this-data)) {
          $slug = $this-Campaign-find('first', array('fields' =
  'Campaign.slug'));
          $this-redirect(array('action' = 'view', $slug));
          } else {
          $this-Session-setFlash(__('The campaign could not be saved. 
  Please,
  try again.', true));}

  /pre

  and then

  pre
  function view($slug) {
          $campaign = $this-Campaign-find('first',
  array('conditions'=array('Campaign.slug'=$slug), 'recursive'=-1));
          $this-set(compact('campaign'));
          }
  /pre

  but that ain't working. I've tried a couple of other ways but I'm a
  bit stumped.

  How do I get the value that's in the slug column for the Campaign
  which has just been saved and pass it on to the view function so that
  I can display the right Campaign?

  thanks in advance :)

-- 
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: newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-08 Thread dreamingmind
Barricades,

I think your concern about the beforeSave/afterSave issues are red
herrings. Since the first line of your code is:
 if ($this-Campaign-save($this-data)) {  ...
both the before and after are finished. And you are only getting
inside the 'if' statement when the save was successful. Of course, in
that case the slug exists but it isn't available in the way you are
trying to get to it. That's why I suggested searching on the returned
id of the created record. That will get you the slug value to pass on
through to your redirect. To prove it to yourself, modify the if
statement to read:

if ($this-Campaign-save($this-data)) {
 debug($this-Campaign-findById($this-Campaign-
id,array('fields'='slug')));
 die;
...
}

So using the find statement I've shown you in the debug function
(above) you could do this:

if ($this-Campaign-save($this-data)) {
   $new_record = $this-Campaign-findById(
$this-Campaign-id,
array('fields'='slug')
  );
   $this-redirect(array(
'action' = 'view',
$new_record['Campaign']['slug']
  ));
} else {
   
}

Regards,
Don

On May 8, 4:59 am, barricades davow...@googlemail.com wrote:
 Thanks for the reply :)

 The find after the save isn't returning what I want it to. In fact I'm
 not sure it's returning anything at all. Baring in mind I'm a total
 newbie (not even that much of a php'er either yet) what I want it
 simply somehow (what I've done is just my best guess - I've no idea
 how to do this at all) to make it so that when I save a new Campaign,
 if it's successful, it redirects to a view action and passes along the
 slug, as a string I guess would be best(?), so that I can show the
 details of the newly created Campaign on in the view.ctp.

 The caveat being that I'm using sluggable behaviour which creates the
 slug in a beforeSave and therefore the $slug to be passed on to the
 view function has to be created after the save.

 I hope that makes sense.

 On May 8, 3:08 am, dreamingmind dreamingmin...@gmail.com wrote:







  Barricades,

  You don't really say WHERE the process seems to break down. The find
  after the save seems suspicious to me. Is that returning the proper
  slug to pass along to your view function? It looks like $slug will end
  up holding the returned data array rather than the returned string
  from the slug field (see below for more info)

  You might take advantage of the fact that the id property of the model
  is set to the id of the record that was created by save. So you should
  be able to set your slug value properly after:

  $this-Campaign-findById($this-Campaign-

  id,,array('fields'='slug'));

  But you should also be aware that this will not return the slug field
  directly. It's going to be in the usual data array:

  Array
  (
  [Campaign] = Array
  (
  [slug] = My_crazy_slug
  )
  )

  Regards,
  Don

  On May 7, 9:22 am, barricades davow...@googlemail.com wrote:

   Hi, I'm new so please don't shout at me for the stupid question but...

   When I save a record I want to redirect straight to the record I just
   created. The record which I have just created uses sluggable behaviour
   to create a slug in a beforeSave, so I can't just use 
   $this-data['Campaign]['slug'] as it doesn't exist before I save my

   campaign.

   in my add function I've got:

   pre
   if ($this-Campaign-save($this-data)) {
   $slug = $this-Campaign-find('first', array('fields' =
   'Campaign.slug'));
   $this-redirect(array('action' = 'view', $slug));
   } else {
   $this-Session-setFlash(__('The campaign could not be saved. 
   Please,
   try again.', true));}

   /pre

   and then

   pre
   function view($slug) {
   $campaign = $this-Campaign-find('first',
   array('conditions'=array('Campaign.slug'=$slug), 'recursive'=-1));
   $this-set(compact('campaign'));
   }
   /pre

   but that ain't working. I've tried a couple of other ways but I'm a
   bit stumped.

   How do I get the value that's in the slug column for the Campaign
   which has just been saved and pass it on to the view function so that
   I can display the right Campaign?

   thanks in advance :)

-- 
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: newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-08 Thread BAIMA

$this-redirect(array('action' = 'view', 'id' = $slug));

hth... Claudio


On 7 maio, 13:22, barricades davow...@googlemail.com wrote:
 Hi, I'm new so please don't shout at me for the stupid question but...

 When I save a record I want to redirect straight to the record I just
 created. The record which I have just created uses sluggable behaviour
 to create a slug in a beforeSave, so I can't just use 
 $this-data['Campaign]['slug'] as it doesn't exist before I save my

 campaign.

 in my add function I've got:

 pre
 if ($this-Campaign-save($this-data)) {
         $slug = $this-Campaign-find('first', array('fields' =
 'Campaign.slug'));
         $this-redirect(array('action' = 'view', $slug));
         } else {
         $this-Session-setFlash(__('The campaign could not be saved. Please,
 try again.', true));}

 /pre

 and then

 pre
 function view($slug) {
         $campaign = $this-Campaign-find('first',
 array('conditions'=array('Campaign.slug'=$slug), 'recursive'=-1));
         $this-set(compact('campaign'));
         }
 /pre

 but that ain't working. I've tried a couple of other ways but I'm a
 bit stumped.

 How do I get the value that's in the slug column for the Campaign
 which has just been saved and pass it on to the view function so that
 I can display the right Campaign?

 thanks in advance :)

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


newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-07 Thread barricades
Hi, I'm new so please don't shout at me for the stupid question but...

When I save a record I want to redirect straight to the record I just
created. The record which I have just created uses sluggable behaviour
to create a slug in a beforeSave, so I can't just use $this-
data['Campaign]['slug'] as it doesn't exist before I save my
campaign.

in my add function I've got:

pre
if ($this-Campaign-save($this-data)) {
$slug = $this-Campaign-find('first', array('fields' =
'Campaign.slug'));
$this-redirect(array('action' = 'view', $slug));
} else {
$this-Session-setFlash(__('The campaign could not be saved. Please,
try again.', true));
}
/pre

and then

pre
function view($slug) {
$campaign = $this-Campaign-find('first',
array('conditions'=array('Campaign.slug'=$slug), 'recursive'=-1));
$this-set(compact('campaign'));
}
/pre

but that ain't working. I've tried a couple of other ways but I'm a
bit stumped.

How do I get the value that's in the slug column for the Campaign
which has just been saved and pass it on to the view function so that
I can display the right Campaign?

thanks in advance :)

-- 
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: newbie question - how to I find this particular value so I can pass it on via a redirect

2011-05-07 Thread dreamingmind
Barricades,

You don't really say WHERE the process seems to break down. The find
after the save seems suspicious to me. Is that returning the proper
slug to pass along to your view function? It looks like $slug will end
up holding the returned data array rather than the returned string
from the slug field (see below for more info)

You might take advantage of the fact that the id property of the model
is set to the id of the record that was created by save. So you should
be able to set your slug value properly after:

$this-Campaign-findById($this-Campaign-
id,,array('fields'='slug'));

But you should also be aware that this will not return the slug field
directly. It's going to be in the usual data array:

Array
(
[Campaign] = Array
(
[slug] = My_crazy_slug
)
)

Regards,
Don

On May 7, 9:22 am, barricades davow...@googlemail.com wrote:
 Hi, I'm new so please don't shout at me for the stupid question but...

 When I save a record I want to redirect straight to the record I just
 created. The record which I have just created uses sluggable behaviour
 to create a slug in a beforeSave, so I can't just use 
 $this-data['Campaign]['slug'] as it doesn't exist before I save my

 campaign.

 in my add function I've got:

 pre
 if ($this-Campaign-save($this-data)) {
         $slug = $this-Campaign-find('first', array('fields' =
 'Campaign.slug'));
         $this-redirect(array('action' = 'view', $slug));
         } else {
         $this-Session-setFlash(__('The campaign could not be saved. Please,
 try again.', true));}

 /pre

 and then

 pre
 function view($slug) {
         $campaign = $this-Campaign-find('first',
 array('conditions'=array('Campaign.slug'=$slug), 'recursive'=-1));
         $this-set(compact('campaign'));
         }
 /pre

 but that ain't working. I've tried a couple of other ways but I'm a
 bit stumped.

 How do I get the value that's in the slug column for the Campaign
 which has just been saved and pass it on to the view function so that
 I can display the right Campaign?

 thanks in advance :)

-- 
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: PHP Newbie

2011-05-05 Thread Ryan Schmidt

On May 4, 2011, at 11:37, Chathu wrote:

 I'm new to php and final year IT student.we are developing Hospital
 management system.Can i do full system using Cakephp?

You can do anything you want.

 and also if any
 problem happen theres a support team ?

There's this Google group, which is populated by other CakePHP users, and some 
of the developers, and who may be able to help you with issues you encounter 
(or they may not).

I'm not sure if anybody offers more guaranteed paid support options for CakePHP.



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


PHP Newbie

2011-05-04 Thread Chathu
hi!,
I'm new to php and final year IT student.we are developing Hospital
management system.Can i do full system using Cakephp? and also if any
problem happen theres a support 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


Newbie model question...

2011-04-27 Thread Staple
Hi there,

I have an application with 'Regions' that have many 'Councils' that in
turn have many 'People'.

It is all working well and the view page of a 'Region' has the
associated 'Councils' available in it. I need to get deeper to get the
'People' available on the 'Region' view page as well. My model looks
like this (I imagine I need to add 'People' to the model?):

?php
class Region extends AppModel {
var $name = 'Region';
var $displayField = 'name';
//The Associations below have been created with all possible keys,
those that are not needed can be removed

var $hasMany = array(
'Council' = array(
'className' = 'Council',
'foreignKey' = 'region_id',
'dependent' = false,
'conditions' = '',
'fields' = '',
'order' = '',
'limit' = '',
'offset' = '',
'exclusive' = '',
'finderQuery' = '',
'counterQuery' = ''
)
);

}
?

Any help much appreciated...

-- 
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: Newbie model question...

2011-04-27 Thread #2Will
You need a similar association in the council model defenition for
hasmany people. You don't need to do anything in the regions model to
get the people, cake works its way through.

Then use recursive to automatically provide deeper associations, or
use contain to be more specific about what you want, to avoid
performance hits.  I normally get it working with recursive and then
tighten things up with contain once i can see its working.

hth

will

On Apr 28, 9:04 am, Staple gwily...@gmail.com wrote:
 Hi there,

 I have an application with 'Regions' that have many 'Councils' that in
 turn have many 'People'.

 It is all working well and the view page of a 'Region' has the
 associated 'Councils' available in it. I need to get deeper to get the
 'People' available on the 'Region' view page as well. My model looks
 like this (I imagine I need to add 'People' to the model?):

 ?php
 class Region extends AppModel {
         var $name = 'Region';
         var $displayField = 'name';
         //The Associations below have been created with all possible keys,
 those that are not needed can be removed

         var $hasMany = array(
                 'Council' = array(
                         'className' = 'Council',
                         'foreignKey' = 'region_id',
                         'dependent' = false,
                         'conditions' = '',
                         'fields' = '',
                         'order' = '',
                         'limit' = '',
                         'offset' = '',
                         'exclusive' = '',
                         'finderQuery' = '',
                         'counterQuery' = ''
                 )
         );

 }

 ?

 Any help much appreciated...

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


Newbie having trouble with 'html helper', need to add 'rel' to url...

2011-03-24 Thread adam_g2000
Hi Guys,

I'm using the following code:

echo $this-Html-image('photos/' . $resource['Resource']['filename'],
array(
'alt' = $resource['Resource']['title'],
'url' = array('controller' = 'resources', 'action' = 'lightbox',
$resource['Resource']['filename_large'])
));

What I need to do is make the resulting link have a 'rel' attribute so
it ends up looking like...

a href=linketc... rel=prettyPhotoimg src=blah/a

...but I can't figure out from the documentation how to do it.

Thanks in advance for any assistance.

Adam.

-- 
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: Newbie having trouble with 'html helper', need to add 'rel' to url...

2011-03-24 Thread cricket
On Thu, Mar 24, 2011 at 7:24 PM, adam_g2000 a...@designcollective.co.nz wrote:
 Hi Guys,

 I'm using the following code:

 echo $this-Html-image('photos/' . $resource['Resource']['filename'],
 array(
        'alt' = $resource['Resource']['title'],
        'url' = array('controller' = 'resources', 'action' = 'lightbox',
 $resource['Resource']['filename_large'])
 ));

 What I need to do is make the resulting link have a 'rel' attribute so
 it ends up looking like...

 a href=linketc... rel=prettyPhotoimg src=blah/a

 ...but I can't figure out from the documentation how to do it.

It looks like the image() method doesn't take that, or any other link
attributes, into consideration.
http://api.cakephp.org/view_source/html-helper/#line-604

I use link() plus image():

echo $this-Html-link(
$this-Html-image(
'photos/' . $resource['Resource']['filename'],
array('alt' = $resource['Resource']['title'])
),
array(
'controller' = 'resources',
'action' = 'lightbox',
$resource['Resource']['filename_large']
),
array(
'rel' = 'prettyPhoto',
'escape' = false
)
);

Note the 'escape' option. If left out, the img tag will be escaped.

-- 
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: i'm newbie

2011-03-23 Thread aji ipank
emmhh...1 more question, is this .ctp file is compatible if i write
php code inside the .ctp file? sory for my bad english.. thank you..

On 22/03/2011, Ryan Schmidt google-2...@ryandesign.com wrote:

 On Mar 22, 2011, at 08:43, Robert Bodley wrote:

 Hi I'm also a Newbie can someone please expain how the function pages
 work iv scene other peoples code and they have a file with all
 function for the index page and all the pages can someone please
 explain how this works thanks

 Sounds like you need to spend a few hours reading the book straight through.
 It explains these basics pretty well.

 http://book.cakephp.org/



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


-- 
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: i'm newbie

2011-03-23 Thread Tilen Majerle
yes it is...
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/3/23 aji ipank aji.ipank.m...@gmail.com

 emmhh...1 more question, is this .ctp file is compatible if i write
 php code inside the .ctp file? sory for my bad english.. thank you..

 On 22/03/2011, Ryan Schmidt google-2...@ryandesign.com wrote:
 
  On Mar 22, 2011, at 08:43, Robert Bodley wrote:
 
  Hi I'm also a Newbie can someone please expain how the function pages
  work iv scene other peoples code and they have a file with all
  function for the index page and all the pages can someone please
  explain how this works thanks
 
  Sounds like you need to spend a few hours reading the book straight
 through.
  It explains these basics pretty well.
 
  http://book.cakephp.org/
 
 
 
  --
  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
 

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


-- 
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: i'm newbie

2011-03-23 Thread Stephen
It's the same as using a .php extension, .ctp stands for Cake Template

On 23 March 2011 07:55, Tilen Majerle tilen.maje...@gmail.com wrote:

 yes it is...
 --
 Lep pozdrav, Tilen Majerle
 http://majerle.eu



 2011/3/23 aji ipank aji.ipank.m...@gmail.com

 emmhh...1 more question, is this .ctp file is compatible if i write
 php code inside the .ctp file? sory for my bad english.. thank you..

 On 22/03/2011, Ryan Schmidt google-2...@ryandesign.com wrote:
 
  On Mar 22, 2011, at 08:43, Robert Bodley wrote:
 
  Hi I'm also a Newbie can someone please expain how the function pages
  work iv scene other peoples code and they have a file with all
  function for the index page and all the pages can someone please
  explain how this works thanks
 
  Sounds like you need to spend a few hours reading the book straight
 through.
  It explains these basics pretty well.
 
  http://book.cakephp.org/
 
 
 
  --
  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
 

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


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




-- 
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk

-- 
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: i'm newbie

2011-03-23 Thread aji ipank
is this possible for us to write .php files? and when it possible, where i
can put that .php files? in app/views/pages or in another directory?

-- 
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: i'm newbie

2011-03-23 Thread Sam Sherlock
Cake bakes php app - app contain various classes or templates (.ctp) all php

so it is possible to auto make files - sets of MVCs that related to each
other

behaviours, componants, helpers use php classes to extend app functionality

ctp files call helpers and allow you to mix php /html using var set to the
view
based on logic in the controller obtained from a datasource

reading though the book.cakephp.org site will answer your questions and
detail the specifics of cakes conventions

you could create a helper class in .php file in app/views/helpers/ and use
that within view files (.ctp)
a ctp in app/views/pages would be displayed by page controllers display
action (by default
not using db stored data)

 - S




On 24 March 2011 03:17, aji ipank aji.ipank.m...@gmail.com wrote:

 is this possible for us to write .php files? and when it possible, where i
 can put that .php files? in app/views/pages or in another directory?

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


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


i'm newbie

2011-03-22 Thread aji ipank
Hello all.. I want to learn about cakephp.. i've installed cakephp and
no problem at all.. but now, i have one problem. i make hello world
html file and i put it into app/views/pages. then i load it via
localhost, but no hello world in my browser. can you help me? what was
wrong? reply please..

-- 
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: i'm newbie

2011-03-22 Thread Stephen
*Create:*
/app/views/pages/helloworld*.ctp* (not .html)

*Visit:*
http://localhost/pages/helloworld

On 22 March 2011 02:11, aji ipank aji.ipank.m...@gmail.com wrote:

 Hello all.. I want to learn about cakephp.. i've installed cakephp and
 no problem at all.. but now, i have one problem. i make hello world
 html file and i put it into app/views/pages. then i load it via
 localhost, but no hello world in my browser. can you help me? what was
 wrong? reply please..

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




-- 
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk

-- 
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: i'm newbie

2011-03-22 Thread Robert Bodley
Hi I'm also a Newbie can someone please expain how the function pages
work iv scene other peoples code and they have a file with all
function for the index page and all the pages can someone please
explain how this works thanks

On Mar 22, 3:34 pm, Stephen step...@ninjacodermonkey.co.uk wrote:
 *Create:*
 /app/views/pages/helloworld*.ctp* (not .html)

 *Visit:*http://localhost/pages/helloworld

 On 22 March 2011 02:11, aji ipank aji.ipank.m...@gmail.com wrote:





  Hello all.. I want to learn about cakephp.. i've installed cakephp and
  no problem at all.. but now, i have one problem. i make hello world
  html file and i put it into app/views/pages. then i load it via
  localhost, but no hello world in my browser. can you help me? what was
  wrong? reply please..

  --
  Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd 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
  athttp://groups.google.com/group/cake-php

 --
 Kind Regards
  Stephen

  http://www.ninjacodermonkey.co.uk

-- 
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: i'm newbie

2011-03-22 Thread mikek
 Hi I'm also a Newbie can someone please expain how the function pages
 work iv scene other peoples code and they have a file with all
 function for the index page and all the pages can someone please
 explain how this works thanks

you might want to look at the cake book.

http://book.cakephp.org/view/66/Models#!/view/4/Beginning-With-CakePHP


 On Mar 22, 3:34 pm, Stephen step...@ninjacodermonkey.co.uk wrote:
 *Create:*
 /app/views/pages/helloworld*.ctp* (not .html)

 *Visit:*http://localhost/pages/helloworld

 On 22 March 2011 02:11, aji ipank aji.ipank.m...@gmail.com wrote:





  Hello all.. I want to learn about cakephp.. i've installed cakephp and
  no problem at all.. but now, i have one problem. i make hello world
  html file and i put it into app/views/pages. then i load it via
  localhost, but no hello world in my browser. can you help me? what was
  wrong? reply please..

  --
  Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd 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
  athttp://groups.google.com/group/cake-php

 --
 Kind Regards
  Stephen

  http://www.ninjacodermonkey.co.uk

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




-- 
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: i'm newbie

2011-03-22 Thread Ryan Schmidt

On Mar 22, 2011, at 08:43, Robert Bodley wrote:

 Hi I'm also a Newbie can someone please expain how the function pages
 work iv scene other peoples code and they have a file with all
 function for the index page and all the pages can someone please
 explain how this works thanks

Sounds like you need to spend a few hours reading the book straight through. It 
explains these basics pretty well.

http://book.cakephp.org/



-- 
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: I am Newbie in PHP - Cake

2011-03-17 Thread AD7six


On Mar 16, 11:48 am, pancary panc...@gmail.com wrote:
 Hello,

 I am Eduardo (Pancary -www.eduardo.perdomo.nom.br),
 I am newbie,  but i need learn PHP because is the language in Host.
 But I know a litlle of Delphi, Visual Basic, Java (JSP) and others, and I
 can understand MVC - Controller, Actions, Views, Etc...
 Foloing the blog exemple of cokbook, I make a list of table Users.
 So I have an question: I need learn all PHP first or can go to Cake-PHP to
 make it more easy?

I hadn't touched php before using cakephp - if you know other
languages it might work for you to jump straight in.

However, if you're asking, and hijacking other people's threads to do
so, in a support group - I'd suggest you definitely need to do some
basic PHP research first.

AD

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


RES: I am Newbie in PHP - Cake

2011-03-17 Thread pancary
OK,

I want to download some ebook on php and test some examples first, and
switch to another group in my language.

I asked because it seems very easy to develop with cakephp ...

Tanks All.

-Mensagem original-
De: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] Em nome de
AD7six
Enviada em: quinta-feira, 17 de março de 2011 06:55
Para: CakePHP
Assunto: Re: I am Newbie in PHP - Cake



On Mar 16, 11:48 am, pancary panc...@gmail.com wrote:
 Hello,

 I am Eduardo (Pancary -www.eduardo.perdomo.nom.br), I am newbie,  but 
 i need learn PHP because is the language in Host.
 But I know a litlle of Delphi, Visual Basic, Java (JSP) and others, 
 and I can understand MVC - Controller, Actions, Views, Etc...
 Foloing the blog exemple of cokbook, I make a list of table Users.
 So I have an question: I need learn all PHP first or can go to 
 Cake-PHP to make it more easy?

I hadn't touched php before using cakephp - if you know other languages it
might work for you to jump straight in.

However, if you're asking, and hijacking other people's threads to do so, in
a support group - I'd suggest you definitely need to do some basic PHP
research first.

AD

--
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 
cake-php+at http://groups.google.com/group/cake-php

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


I am Newbie in PHP - Cake

2011-03-16 Thread pancary
Hello,
 
I am Eduardo (Pancary - www.eduardo.perdomo.nom.br ),
I am newbie,  but i need learn PHP because is the language in Host. 
But I know a litlle of Delphi, Visual Basic, Java (JSP) and others, and I
can understand MVC - Controller, Actions, Views, Etc...
Foloing the blog exemple of cokbook, I make a list of table Users.
So I have an question: I need learn all PHP first or can go to Cake-PHP to
make it more easy?
 
Tanks a lot.
 

-- 
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: I am Newbie in PHP - Cake

2011-03-16 Thread Stephen
I would learn a fair amount of PHP first

On 16 March 2011 10:48, pancary panc...@gmail.com wrote:

  Hello,

 I am Eduardo (Pancary - www.eduardo.perdomo.nom.br ),
 I am newbie,  but i need learn PHP because is the language in Host.
 But I know a litlle of Delphi, Visual Basic, Java (JSP) and others, and I
 can understand MVC - Controller, Actions, Views, Etc...
 Foloing the blog exemple of cokbook, I make a list of table Users.
 So I have an question: I need learn all PHP first or can go to Cake-PHP to
 make it more easy?

 Tanks a lot.


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




-- 
Kind Regards
 Stephen

 http://www.ninjacodermonkey.co.uk

-- 
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: I am Newbie in PHP - Cake

2011-03-16 Thread Tilen Majerle
of course first learn PHP...CakePHP just help you to make sites fast and
powerful...
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/3/16 Stephen step...@ninjacodermonkey.co.uk

 I would learn a fair amount of PHP first

 On 16 March 2011 10:48, pancary panc...@gmail.com wrote:

  Hello,

 I am Eduardo (Pancary - www.eduardo.perdomo.nom.br ),
 I am newbie,  but i need learn PHP because is the language in Host.
 But I know a litlle of Delphi, Visual Basic, Java (JSP) and others, and I
 can understand MVC - Controller, Actions, Views, Etc...
 Foloing the blog exemple of cokbook, I make a list of table Users.
 So I have an question: I need learn all PHP first or can go to Cake-PHP to
 make it more easy?

 Tanks a lot.


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




 --
 Kind Regards
  Stephen

  http://www.ninjacodermonkey.co.uk



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


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


Media Plugin - Newbie Questions

2011-02-21 Thread mjhnlca
I'm trying to set up the Media plugin, but am having problems.

I have a PressRelease model, and while adding an entry I would like to
choose and upload a PDF file to associate with it. But when adding an
entry, the press_releases table receives an entry, and the attachment
table does not. *If I use the baked Attachment view to add an entry
the attachments table DOES receive the row.

I have followed the documentation, updated the bootstrap file, etc.
Below is the relevant code from the Press Release model, controller
and view.

If you have any idea what I correct, please advise. Thanks!

A few simple questions also:
1. Do I need to add this ...
var $helpers = array('Media.Media');
... to my PressRelease model?

2. Do I need to add belongsTo data to the Attachment model?

-- Code Provided Below --

The Press Release model has this:

   var $hasOne = array(
  'Attachment' = array(
  'className' = 'Media.Attachment',
  'foreignKey' = 'foreign_key',
  'conditions' = array('Attachment.model' = 'PressRelease'),
  'dependent' = true,
   ));

The Press Release controller has this:

function admin_add() {
$this-layout = 'admin';
if (!empty($this-data)) {
$this-PressRelease-create();
if ($this-PressRelease-saveAll($this-data, 
array('validate' =
'first'))) {
$this-Session-setFlash('The press release has 
been saved.',
'flash_success');
$this-redirect(array('action' = 'index'));
} else {
$this-Session-setFlash('The press release 
could not be saved.
Please, try again.', 'flash_error');
}
}
$projects = $this-PressRelease-Project-find('list');
$this-set(compact('projects'));
}

The form in the view looks like this:

div class=pressReleases form
?php echo $this-Form-create('PressRelease', array('enctype' =
'multipart/form-data'));?
fieldset
legend?php __('Add Press Release'); ?/legend
?php
$current_year = date('Y');
$max_year = $current_year + 2;
$unix_timestamp = strtotime('now');

echo $this-Form-input('date', array('type'='date',
'minYear'=2005, 'maxYear'=$max_year, 'selected'=$unix_timestamp));
echo $this-Form-input('title');
echo $this-Form-input('file', array('label' = 'File', 'type' 
=
'file'));
echo $this-Form-input('Project',array('label'='Related
Project(s)', 'multiple' = 'checkbox'));
?
/fieldset
?php echo $this-Form-end(__('Add Press Release', true));?
/div

-- 
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: Media Plugin - Newbie Questions

2011-02-21 Thread kdubya
I don't know anything about the Media plugin, however your problem may
be with how you have created your inputs in the view. Have you looked
at the structure of $this-data once the form has been submitted to
your action (admin_add)? In order for saveAll() to work. It should
look something like:

array(
  [PressRelease]=array(
[date]=// some date
. // other fields
.
  [Attachment]=array(
[file]=// some file name

In your view you have:
echo $this-Form-input('file', array('label' = 'File', 'type'
='file'));

It may be as simple as changing this to:
echo $this-Form-input('Attachment.file', array('label' = 'File',
'type' ='file'));

BTW, saveAll() will save related model data ONLY if the array passed
is properly structured AND it is only one level deep.

HTH,
Ken

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


Newbie file upload question

2011-01-31 Thread Paul Wheatley

Hi,
Very new to CakePHP and my first post here, I am loving Cake so far but have 
run up against a small hurdle.
Can anyone point me in the direction of instructions on creating a form with a 
file upload field? It's for a registration form where the user uploads normal 
stuff (name, address, etc...) and an image or logo of their company.
From what I've seen of Cake so far I think it should be simple enough but I 
can't work it out, can anyone help?
Paul
  

-- 
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: Newbie file upload question

2011-01-31 Thread newguy
Hi there
This should be helpful:
http://cakebaker.42dh.com/2006/04/15/file-upload-with-cakephp/

thanks

On Jan 31, 12:00 pm, Paul Wheatley mr.paul.wheat...@hotmail.com
wrote:
 Hi,
 Very new to CakePHP and my first post here, I am loving Cake so far but have 
 run up against a small hurdle.
 Can anyone point me in the direction of instructions on creating a form with 
 a file upload field? It's for a registration form where the user uploads 
 normal stuff (name, address, etc...) and an image or logo of their company.
 From what I've seen of Cake so far I think it should be simple enough but I 
 can't work it out, can anyone help?
 Paul

-- 
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: Newbie file upload question

2011-01-31 Thread Sam Sherlock
If your getting started with file uploads looking at existing code could
help you get started - otherwise you should ask a more specific question :)

its simple so long as you don't use swfupload; here are some links

http://tv.cakephp.org/video/jasonwydro/2011/01/29/cakephp_1_3_-_meio_image_upload_resize_gallery_tutorial
https://github.com/webtechnick/CakePHP-FileUpload-Plugin
https://github.com/josegonzalez/uploadpack
http://www.jamesfairhurst.co.uk/posts/view/uploading_files_and_images_with_cakephp
http://bakery.cakephp.org/articles/webtechnick/2009/02/10/file-upload-component-w-automagic-model-optional

 - S



On 31 January 2011 20:00, Paul Wheatley mr.paul.wheat...@hotmail.comwrote:


 Hi,
 Very new to CakePHP and my first post here, I am loving Cake so far but
 have run up against a small hurdle.
 Can anyone point me in the direction of instructions on creating a form
 with a file upload field? It's for a registration form where the user
 uploads normal stuff (name, address, etc...) and an image or logo of their
 company.
 From what I've seen of Cake so far I think it should be simple enough but I
 can't work it out, can anyone help?
 Paul

 --
 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.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php


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


Cake Newbie with ACL implementation question

2011-01-20 Thread mackdaddy
HI All

As above i have just started to get my head around Cake and have done
a couple of the Tutorials. My question is this;
I am setting out to write a global stock management app for my
employer to manage different warehouses around the world.
1) I want to have a Super User to administer the whole app,
2) I want to have Users who can see all the warehouses.
3) I want to have each warehouse to have an administrator so that they
can add their own users etc, and
4) each warehouse to have a user.

In Summary
[Global Admin] - Super User
 [Global User] - Can See All warehouses
   [Warehouse Admin] - Administer their own warehouse e.g.
Create products, locations, users etc
  [Warehouse User]

Ultimately there will probably 6 warehouses but the local users can
change.

Could anyone explain if the ACL route will work for me and if so how.

Muchus Gracias

MackDaddy

-- 
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: newbie question on custom function

2011-01-14 Thread jsalonen
 So how do I call the function within the same class

You'd use $this-multiexplode(...), but if it is just a simple function that 
doesn't need to maintain state you could just define it as a regular PHP 
function in bootstrap.php.nor 

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


newbie question on custom function

2011-01-13 Thread roy
I am new to cakephp and i have go through those tutorials.
May be I am too stubborn to the old php coding way so I face a problem
when I am making my own Function.

Say, I have my a multiexplode function that recursively explode a
string given an array of delimiators,
sth like:

class UtilComponent extends Object {
   function multiexplode ($delimiters,$string){
  ..
   $ary[$key] = multiexplode($delimiters, $val);  // recursive
part
  ..
   }
..
}

and I and call

$this-Util-multiexplode(...)

to trigger the function.

ps: Indeed I am not sure where to put this function at. So I ended up
wrapping this function with a component. (don't know if it is
appropriate)

And then it gives me

Call to undefined function multiexplode() ...

error.

So how do I call the function within the same class?
Can I make my own function and call it from another function within
the same component/ 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: newbie question on custom function

2011-01-13 Thread Stephen
Hi Roy

If you want to define custom functions the best place to pop it is inside
the app_controller.php

This way you can call $this-multiexplode( ... ) in any controller and it
will access it from the AppController.

Otherwise pop the function inside the controller you wish to use it.

It's also a good idea to prefix your functions with _ i.e. function
_multiexplode() {

This means that you won't be able to access the function via the URL
/controller/multiexplode

Hope this helps

-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

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: newbie question on custom function

2011-01-13 Thread Dr. Loboto
You can just define your utils functions as functions in bootstrap.php
and they will be always accessible without create component overhead
and use in controller only restriction.

On Jan 13, 2:54 pm, roy roy...@gmail.com wrote:
 I am new to cakephp and i have go through those tutorials.
 May be I am too stubborn to the old php coding way so I face a problem
 when I am making my own Function.

 Say, I have my a multiexplode function that recursively explode a
 string given an array of delimiators,
 sth like:

 class UtilComponent extends Object {
    function multiexplode ($delimiters,$string){
   ..
        $ary[$key] = multiexplode($delimiters, $val);  // recursive
 part
   ..
    }
 ..

 }

 and I and call

 $this-Util-multiexplode(...)

 to trigger the function.

 ps: Indeed I am not sure where to put this function at. So I ended up
 wrapping this function with a component. (don't know if it is
 appropriate)

 And then it gives me

 Call to undefined function multiexplode() ...

 error.

 So how do I call the function within the same class?
 Can I make my own function and call it from another function within
 the same component/ 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


Newbie - clueless about mod_rewrite and httpd.conf

2011-01-11 Thread estherM
I'm a total newbie to Cake and not much better with apache; I've done
a lot of PHP but always with a server that's already been set up by
someone else. So I'm going through the basic blog tutorial, and it
says:

A Note On mod_rewrite
Occasionally a new user will run in to mod_rewrite issues, so I'll
mention them marginally here. If the Cake welcome page looks a little
funny (no images or css styles), it probably means mod_rewrite isn't
functioning on your system. Here are some tips to help get you up and
running:

Make sure that an .htaccess override is allowed: in your httpd.conf,
you should have a section that defines a section for each Directory on
your server. Make sure the AllowOverride is set to All for the correct
Directory.

Make sure you are editing the system httpd.conf rather than a user- or
site-specific httpd.conf.

For some reason or another, you might have obtained a copy of CakePHP
without the needed .htaccess files. This sometimes happens because
some operating systems treat files that start with '.' as hidden, and
don't copy them. Make sure your copy of CakePHP is from the downloads
section of the site or our SVN repository.

Make sure you are loading up mod_rewrite correctly! You should see
something like LoadModule rewrite_module libexec/httpd/mod_rewrite.so
and AddModule mod_rewrite.c in your httpd.conf.

I'm using XAMPP on linux. I've found my httpd.conf file in opt/lampp/
etc, but am not sure what I need to do with it. I've searched for
rewrite, and there's only one line:

LoadModule rewrite_module modules/mod_rewrite.so

There's nothing about AddModule mod_rewrite.c.

Do I just create a Directory section for the directory I've installed
Cake in and set AlllowOverride to All? (I created a separate
subdirectory of my wwwroot and installed in there, since I also have
installs of Joomla and CodeIgniter.) Is there anything else I need to
do? My download of Cake did come with two htaccess-type files
(._.htaccess and .htaccess) - do I need to do anything with them?

Thanks for any help you can provide to this non-server-admin.

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: Newbie - clueless about mod_rewrite and httpd.conf

2011-01-11 Thread cricket
On Tue, Jan 11, 2011 at 1:01 PM, estherM esthermst...@gmail.com wrote:

 I'm using XAMPP on linux. I've found my httpd.conf file in opt/lampp/
 etc, but am not sure what I need to do with it. I've searched for
 rewrite, and there's only one line:

 LoadModule rewrite_module modules/mod_rewrite.so

 There's nothing about AddModule mod_rewrite.c.

The documentation is outdated. AddModule is no longer used in Apache 2.x.

 Do I just create a Directory section for the directory I've installed
 Cake in and set AlllowOverride to All? (I created a separate
 subdirectory of my wwwroot and installed in there, since I also have
 installs of Joomla and CodeIgniter.) Is there anything else I need to
 do? My download of Cake did come with two htaccess-type files
 (._.htaccess and .htaccess) - do I need to do anything with them?

If you have access to apache's conf, you can disable htaccess
(AllowOverride None) for a little boost in speed by putting the
rewrite config in there. If you have separate virtual host configs for
your site(s) put this in the appropriate file instead.

Directory /path/to/your/app/webroot
Options None
AllowOverride None
Order allow,deny
Allow from all

DirectoryIndex index.php index.html

IfModule mod_rewrite.c
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
/IfModule
/Directory

With this config, all requests will be forwarded to webroot/index.php,
unless it's for an existing file or directory inside webroot (eg. your
css, js, or something else you include in there).

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: Newbie - clueless about mod_rewrite and httpd.conf

2011-01-11 Thread estherM
Thanks!

On Jan 11, 2:14 pm, cricket zijn.digi...@gmail.com wrote:
 On Tue, Jan 11, 2011 at 1:01 PM, estherM esthermst...@gmail.com wrote:

  I'm using XAMPP on linux. I've found my httpd.conf file in opt/lampp/
  etc, but am not sure what I need to do with it. I've searched for
  rewrite, and there's only one line:

  LoadModule rewrite_module modules/mod_rewrite.so

  There's nothing about AddModule mod_rewrite.c.

 The documentation is outdated. AddModule is no longer used in Apache 2.x.

  Do I just create a Directory section for the directory I've installed
  Cake in and set AlllowOverride to All? (I created a separate
  subdirectory of my wwwroot and installed in there, since I also have
  installs of Joomla and CodeIgniter.) Is there anything else I need to
  do? My download of Cake did come with two htaccess-type files
  (._.htaccess and .htaccess) - do I need to do anything with them?

 If you have access to apache's conf, you can disable htaccess
 (AllowOverride None) for a little boost in speed by putting the
 rewrite config in there. If you have separate virtual host configs for
 your site(s) put this in the appropriate file instead.

 Directory /path/to/your/app/webroot
         Options None
         AllowOverride None
         Order allow,deny
         Allow from all

         DirectoryIndex index.php index.html

         IfModule mod_rewrite.c
                 RewriteEngine On
                 RewriteCond %{REQUEST_FILENAME} !-d
                 RewriteCond %{REQUEST_FILENAME} !-f
                 RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
         /IfModule
 /Directory

 With this config, all requests will be forwarded to webroot/index.php,
 unless it's for an existing file or directory inside webroot (eg. your
 css, js, or something else you include in there).

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: Newbie trying to pass xml object

2010-11-03 Thread sipiatti
did you debugged $modules?
the message says it is not an object so does not have methods.
something wrong there...

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: Newbie trying to pass xml object

2010-11-03 Thread cricket
On Wed, Nov 3, 2010 at 2:11 AM, sipiatti sipia...@gmail.com wrote:
 did you debugged $modules?
 the message says it is not an object so does not have methods.
 something wrong there...

Yes, the HTTP protocol doesn't allow for passing class objects over the wire.

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


Newbie trying to pass xml object

2010-11-02 Thread mochaman
Let me start by saying that I am very new to php and cakephp.  I went
through the blog tutorial (:-)) and now am facing a problem which I
believe is something simple, but can't seem to get it to work.  I have
an xml file which I am reading into my view then upon selection of one
of the nodes, call my controller to display the children of that
node.  Here are my code snippets:

In my view:

?php
$registryFile = simplexml_load_file(../models/registry.xml);
$modules = $registryFile-modules;
foreach($modules-children() as $module)
{
$links = $module-links;
echo $this-Html-link($module-
name,array('action'='Modules','$links'));
echo br/;
}
?

In my controller:

class MyController extends AppController {
function Modules($InParent)
{
echo dt.$InParent./dt;
foreach($InParent-children() as $link)
{
echo dd.$link-name./dd;
}
}
}

I keep getting an error that Fatal error: Call to a member function
children() on a non-object.
Any assistance is appreciated.

Thanks.  Mocha Man

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: Newbie trying to pass xml object

2010-11-02 Thread cricket
On Tue, Nov 2, 2010 at 12:20 AM, mochaman mochama...@gmail.com wrote:
 Let me start by saying that I am very new to php and cakephp.  I went
 through the blog tutorial (:-)) and now am facing a problem which I
 believe is something simple, but can't seem to get it to work.  I have
 an xml file which I am reading into my view then upon selection of one
 of the nodes, call my controller to display the children of that
 node.  Here are my code snippets:

 In my view:

 ?php
                $registryFile = simplexml_load_file(../models/registry.xml);
                $modules = $registryFile-modules;
                foreach($modules-children() as $module)
                {
                        $links = $module-links;
                        echo $this-Html-link($module-
name,array('action'='Modules','$links'));
                        echo br/;
                }
 ?

 In my controller:

 class MyController extends AppController {
        function Modules($InParent)
        {
                echo dt.$InParent./dt;
                foreach($InParent-children() as $link)
                {
                        echo dd.$link-name./dd;
                }
        }
 }

 I keep getting an error that Fatal error: Call to a member function
 children() on a non-object.
 Any assistance is appreciated.

You can't pass an XML node through an HTTP request. Not like that,
anyway. And, if you're going to fetch these from a file, you'd be
better off doing it in the controller. In which case, you could then
pass a node ID to your controller function, having it fetch just those
child nodes.

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: newbie first tutorial

2010-10-17 Thread dhiraj ray
check your rout of index page

must consider on moderewrite

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


  1   2   3   4   5   6   7   8   9   >