End tag for meta omitted, but OMITTAG NO was specified..Help please..

2014-07-04 Thread Jessica
Hi, I have been trying to fix several errors like this one below after 
validating my site through w3c. I am trying to take care of these
errors myself, as a newbie to PHPCake. I tried adding  / after 1252, but 
it did not solve my problem. Any ideas on how to fix?

Thanks!

Jessica


   - *Line 4 
   
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.rentalology.net%2Fcharset=%28detect+automatically%29doctype=Inliness=1outline=1group=1No200=1verbose=1user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices#line-4,
 
   column 81*: end tag for meta omitted, but OMITTAG NO was specified
   - 
   
   headmeta http-equiv=Content-Type content=text/html; 
charset=windows-1252
   
   

-- 
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: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-24 Thread Zero Sony
Hi all,

Finaly, i found the solutions. I made a big mistake in my Form. I write 
username  and passwordinstead of username and password. Cake 
took the space after username and password.
Thx all for your 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 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: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-19 Thread José Lorenzo
Can you share your code via gist.github.com instead?

On Wednesday, June 18, 2014 5:39:02 PM UTC+2, Zero Sony wrote:

 Hi all, 

 I use cakephp 2.5.1 and my  $this-Auth-login()   does not work. It 
 return me false each time.
 Maybe if someone can say me why , i ll be very gratefull ^^
 I m on this problem for severals days T_T

 My DB is called  users and there are fields username and password .

 *AppControler*

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 class AppController extends Controller {
  
 public $components = array('Session', 'Cookie',
 'Auth' = array(
 'authenticate' = array('Form'code class=php plain 
 style=font-variant: inherit; outline: 0px !important; font-family: 
 Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace 
 !important; line-height: 1.4em !important; border-top-left-radius: 0px 
 !important; border-top-right-radius: 0px !important; 
 border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px 
 !important; bottom: auto !important; float: none !important; height: auto 
 !important; left: auto !important; overflow: visible !important; position: 
 static !important; right: auto !important; top: auto !important; width: 
 auto !important; box-sizing: content-box !impo
 ...

-- 
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: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-19 Thread Zero Sony
https://gist.github.com/0-Sony/3c052a832687e8dbb4d7

Thx for your 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 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: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-19 Thread euromark
Mind your casing

'Authenticate' = 'form'

Compare this with what is documented:
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#configuring-authentication-handlers

mark



Am Donnerstag, 19. Juni 2014 15:32:53 UTC+2 schrieb Zero Sony:

 https://gist.github.com/0-Sony/3c052a832687e8dbb4d7

 Thx for your 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 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: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-19 Thread 0-SonY
I have just edited it. But it's still not work. T_T


2014-06-19 18:48 GMT+02:00 euromark dereurom...@gmail.com:

 Mind your casing

 'Authenticate' = 'form'

 Compare this with what is documented:

 http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#configuring-authentication-handlers

 mark



 Am Donnerstag, 19. Juni 2014 15:32:53 UTC+2 schrieb Zero Sony:

 https://gist.github.com/0-Sony/3c052a832687e8dbb4d7

 Thx for your 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 a topic in the
 Google Groups CakePHP group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/cake-php/etvRbrLTpxs/unsubscribe.
 To unsubscribe from this group and all its topics, 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.


-- 
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: My $this-Auth-login() does not work, any help please? :) Cakephp 2.5.1

2014-06-19 Thread Zero Sony
Thx for your help.

I have just edited it. But it's still not work T_T


https://gist.github.com/0-Sony/3c052a832687e8dbb4d7


Le jeudi 19 juin 2014 18:48:05 UTC+2, euromark a écrit :

 Mind your casing

 'Authenticate' = 'form'

 Compare this with what is documented:

 http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#configuring-authentication-handlers

 mark



 Am Donnerstag, 19. Juni 2014 15:32:53 UTC+2 schrieb Zero Sony:

 https://gist.github.com/0-Sony/3c052a832687e8dbb4d7

 Thx for your 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 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: Help please with Guestflo widget

2012-12-28 Thread mrfugimoto
Hi @jsundquist.

This is my rootappviews folder contents

C:\xampp\htdocs\divinghorse\app\views
C:\xampp\htdocs\divinghorse\app\views\administrators
C:\xampp\htdocs\divinghorse\app\views\categories
C:\xampp\htdocs\divinghorse\app\views\elements
C:\xampp\htdocs\divinghorse\app\views\errors
C:\xampp\htdocs\divinghorse\app\views\events
C:\xampp\htdocs\divinghorse\app\views\galleries
C:\xampp\htdocs\divinghorse\app\views\helpers
C:\xampp\htdocs\divinghorse\app\views\images
C:\xampp\htdocs\divinghorse\app\views\layouts
C:\xampp\htdocs\divinghorse\app\views\layouts\js
C:\xampp\htdocs\divinghorse\app\views\layouts\rss
C:\xampp\htdocs\divinghorse\app\views\layouts\xml
C:\xampp\htdocs\divinghorse\app\views\news
C:\xampp\htdocs\divinghorse\app\views\newsdetail
C:\xampp\htdocs\divinghorse\app\views\ourevents
C:\xampp\htdocs\divinghorse\app\views\ourgalleries
C:\xampp\htdocs\divinghorse\app\views\pagecontent
C:\xampp\htdocs\divinghorse\app\views\pages
C:\xampp\htdocs\divinghorse\app\views\scaffolds

This is the admin panel online from panel login view thru setting up a new 
event and what it looks like on the web.

Admin Panel
http://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

Add New Event
http://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

Event Added in HTML editor mode.Then saved
http://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

Event view on web page, the guestflo widget script and stripped
http://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in 
 itself. It might help to understand this admin panel you speak of. 
 Honestly it sounds to me like you need to modify the layout file which is 
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.comjavascript: 
 wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo 
 customers. This particular one is the only one who uses this script. 

 The business owner, (our customer) just started using guestflo, this site 
 http://guestflo.com/ to create promotional ads for their website. 

 I would post the site but it's an adult site for a strip club in Atlantic 
 City New Jersey USA. 

 Basically when I go into the cakePHP management console Add event it 
 doesn't allow me to embed that widget code. It only allows for basic HTML 
 and upload of an image to be posted under Managed Events on the CMS. 

 I've told the customer this may not be possible to post the widget mainly 
 because the version they are using is cakePHP vers 1.3. Which I believe is 
 old and doesn't support the jquery scripts. If there is a work around 
 without ruining their CMS framework, I'll try it but I really don't think 
 they want to have the code changed entirely in order to make the widget 
 work.

 Hopefully this all makes sense and I'm not rambling. Any help you can 
 provide is greatly appreciated. Thank you

 On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp 
 Google Groups but nothing showed up. I clicked new cakephp Google group, 
 and still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;**
  script 
 src=http://guestflo.com/**venue-widget.phphttp://guestflo.com/venue-widget.php
 ?
 VenueID=31limit=30a_link=**614 type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code

  -- 
 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...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 cake-php+u...@googlegroups.com javascript:.
 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 

Re: Help please with Guestflo widget

2012-12-28 Thread Jonathan Sundquist
So your pasting html into a tinymxe editor which Will convert a  into lt;
and a  gt;.

If you are trying to add this static widget to the events page you Will
need to modify the ctp file within the /app/views/events directory.
Possibly an index.ctp file.

I would suggest checking out the docs for cakephp at docs.cakephp.org.
also in order to figure out which version of cakephp you are using check
out the /cake directory. If you view any file in there it should give you
an idea as to the version.
On Dec 28, 2012 6:35 AM, mrfugimoto r...@nhlfightclub.com wrote:

 Hi @jsundquist.

 This is my rootappviews folder contents

 C:\xampp\htdocs\divinghorse\app\views
 C:\xampp\htdocs\divinghorse\app\views\administrators
 C:\xampp\htdocs\divinghorse\app\views\categories
 C:\xampp\htdocs\divinghorse\app\views\elements
 C:\xampp\htdocs\divinghorse\app\views\errors
 C:\xampp\htdocs\divinghorse\app\views\events
 C:\xampp\htdocs\divinghorse\app\views\galleries
 C:\xampp\htdocs\divinghorse\app\views\helpers
 C:\xampp\htdocs\divinghorse\app\views\images
 C:\xampp\htdocs\divinghorse\app\views\layouts
 C:\xampp\htdocs\divinghorse\app\views\layouts\js
 C:\xampp\htdocs\divinghorse\app\views\layouts\rss
 C:\xampp\htdocs\divinghorse\app\views\layouts\xml
 C:\xampp\htdocs\divinghorse\app\views\news
 C:\xampp\htdocs\divinghorse\app\views\newsdetail
 C:\xampp\htdocs\divinghorse\app\views\ourevents
 C:\xampp\htdocs\divinghorse\app\views\ourgalleries
 C:\xampp\htdocs\divinghorse\app\views\pagecontent
 C:\xampp\htdocs\divinghorse\app\views\pages
 C:\xampp\htdocs\divinghorse\app\views\scaffolds

 This is the admin panel online from panel login view thru setting up a new
 event and what it looks like on the web.

 Admin Panel

 http://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

 Add New Event

 http://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

 Event Added in HTML editor mode.Then saved

 http://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

 Event view on web page, the guestflo widget script and stripped

 http://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

 On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in
 itself. It might help to understand this admin panel you speak of.
 Honestly it sounds to me like you need to modify the layout file which is
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo
 customers. This particular one is the only one who uses this script.

 The business owner, (our customer) just started using guestflo, this
 site http://guestflo.com/ to create promotional ads for their website.

 I would post the site but it's an adult site for a strip club in
 Atlantic City New Jersey USA.

 Basically when I go into the cakePHP management console Add event it
 doesn't allow me to embed that widget code. It only allows for basic HTML
 and upload of an image to be posted under Managed Events on the CMS.

 I've told the customer this may not be possible to post the widget
 mainly because the version they are using is cakePHP vers 1.3. Which I
 believe is old and doesn't support the jquery scripts. If there is a work
 around without ruining their CMS framework, I'll try it but I really don't
 think they want to have the code changed entirely in order to make the
 widget work.

 Hopefully this all makes sense and I'm not rambling. Any help you can
 provide is greatly appreciated. Thank you

 On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp
 Google Groups but nothing showed up. I clicked new cakephp Google group,
 and still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;
  script 
 src=http://guestflo.com/**venue**-widget.phphttp://guestflo.com/venue-widget.php
 ?
 VenueID=31limit=30a_link=**614** type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code

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

 ---
 You received this message because you are 

Re: Help please with Guestflo widget

2012-12-28 Thread mrfugimoto
Hi @jsundquist, it's cake version 1.3Old. I have read through 
everything I think there is in the cookbooks. It seems not even the 
developers of cakePHP know how to get the widget to work. It's not a knock 
against the developers. I just don't see any references to adding scripts 
in their documentation. Not even on the google groups. 

Any idea if the newest version supports embedding scripts?

Thank you for your help.

On Friday, December 28, 2012 9:15:25 AM UTC-5, jsundquist wrote:

 So your pasting html into a tinymxe editor which Will convert a  into 
 lt; and a  gt;. 

 If you are trying to add this static widget to the events page you Will 
 need to modify the ctp file within the /app/views/events directory. 
 Possibly an index.ctp file.

 I would suggest checking out the docs for cakephp at docs.cakephp.org.  
 also in order to figure out which version of cakephp you are using check 
 out the /cake directory. If you view any file in there it should give you 
 an idea as to the version.
 On Dec 28, 2012 6:35 AM, mrfugimoto ro...@nhlfightclub.comjavascript: 
 wrote:

 Hi @jsundquist.

 This is my rootappviews folder contents

 C:\xampp\htdocs\divinghorse\app\views
 C:\xampp\htdocs\divinghorse\app\views\administrators
 C:\xampp\htdocs\divinghorse\app\views\categories
 C:\xampp\htdocs\divinghorse\app\views\elements
 C:\xampp\htdocs\divinghorse\app\views\errors
 C:\xampp\htdocs\divinghorse\app\views\events
 C:\xampp\htdocs\divinghorse\app\views\galleries
 C:\xampp\htdocs\divinghorse\app\views\helpers
 C:\xampp\htdocs\divinghorse\app\views\images
 C:\xampp\htdocs\divinghorse\app\views\layouts
 C:\xampp\htdocs\divinghorse\app\views\layouts\js
 C:\xampp\htdocs\divinghorse\app\views\layouts\rss
 C:\xampp\htdocs\divinghorse\app\views\layouts\xml
 C:\xampp\htdocs\divinghorse\app\views\news
 C:\xampp\htdocs\divinghorse\app\views\newsdetail
 C:\xampp\htdocs\divinghorse\app\views\ourevents
 C:\xampp\htdocs\divinghorse\app\views\ourgalleries
 C:\xampp\htdocs\divinghorse\app\views\pagecontent
 C:\xampp\htdocs\divinghorse\app\views\pages
 C:\xampp\htdocs\divinghorse\app\views\scaffolds

 This is the admin panel online from panel login view thru setting up a 
 new event and what it looks like on the web.

 Admin Panel

 http://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

 Add New Event

 http://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

 Event Added in HTML editor mode.Then saved

 http://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

 Event view on web page, the guestflo widget script and stripped

 http://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

 On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in 
 itself. It might help to understand this admin panel you speak of. 
 Honestly it sounds to me like you need to modify the layout file which is 
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo 
 customers. This particular one is the only one who uses this script. 

 The business owner, (our customer) just started using guestflo, this 
 site http://guestflo.com/ to create promotional ads for their website. 

 I would post the site but it's an adult site for a strip club in 
 Atlantic City New Jersey USA. 

 Basically when I go into the cakePHP management console Add event it 
 doesn't allow me to embed that widget code. It only allows for basic HTML 
 and upload of an image to be posted under Managed Events on the CMS. 

 I've told the customer this may not be possible to post the widget 
 mainly because the version they are using is cakePHP vers 1.3. Which I 
 believe is old and doesn't support the jquery scripts. If there is a work 
 around without ruining their CMS framework, I'll try it but I really don't 
 think they want to have the code changed entirely in order to make the 
 widget work.

 Hopefully this all makes sense and I'm not rambling. Any help you can 
 provide is greatly appreciated. Thank you

 On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp 
 Google Groups but nothing showed up. I clicked new cakephp Google group, 
 and still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on 

Re: Help please with Guestflo widget

2012-12-28 Thread Jonathan Sundquist
This really isn't a cakephp problem.  Someone built a cms on top of cakephp
and you are relaying heavily on that.  In order to add this new, from what
I can understand from the initial post, static widget you will need to
modify one of the view files.  This doesn't sound like some thing you will
be able to accomplish via the admin panel. If you would like help walking
you through what is required feel free to email me directly and I will try
to help you out.


On Fri, Dec 28, 2012 at 8:57 AM, mrfugimoto r...@nhlfightclub.com wrote:

 Hi @jsundquist, it's cake version 1.3Old. I have read through
 everything I think there is in the cookbooks. It seems not even the
 developers of cakePHP know how to get the widget to work. It's not a knock
 against the developers. I just don't see any references to adding scripts
 in their documentation. Not even on the google groups.

 Any idea if the newest version supports embedding scripts?

 Thank you for your help.


 On Friday, December 28, 2012 9:15:25 AM UTC-5, jsundquist wrote:

 So your pasting html into a tinymxe editor which Will convert a  into
 lt; and a  gt;.

 If you are trying to add this static widget to the events page you Will
 need to modify the ctp file within the /app/views/events directory.
 Possibly an index.ctp file.

 I would suggest checking out the docs for cakephp at docs.cakephp.org.
 also in order to figure out which version of cakephp you are using check
 out the /cake directory. If you view any file in there it should give you
 an idea as to the version.
 On Dec 28, 2012 6:35 AM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @jsundquist.

 This is my rootappviews folder contents

 C:\xampp\htdocs\divinghorse\**app\views
 C:\xampp\htdocs\divinghorse\**app\views\administrators
 C:\xampp\htdocs\divinghorse\**app\views\categories
 C:\xampp\htdocs\divinghorse\**app\views\elements
 C:\xampp\htdocs\divinghorse\**app\views\errors
 C:\xampp\htdocs\divinghorse\**app\views\events
 C:\xampp\htdocs\divinghorse\**app\views\galleries
 C:\xampp\htdocs\divinghorse\**app\views\helpers
 C:\xampp\htdocs\divinghorse\**app\views\images
 C:\xampp\htdocs\divinghorse\**app\views\layouts
 C:\xampp\htdocs\divinghorse\**app\views\layouts\js
 C:\xampp\htdocs\divinghorse\**app\views\layouts\rss
 C:\xampp\htdocs\divinghorse\**app\views\layouts\xml
 C:\xampp\htdocs\divinghorse\**app\views\news
 C:\xampp\htdocs\divinghorse\**app\views\newsdetail
 C:\xampp\htdocs\divinghorse\**app\views\ourevents
 C:\xampp\htdocs\divinghorse\**app\views\ourgalleries
 C:\xampp\htdocs\divinghorse\**app\views\pagecontent
 C:\xampp\htdocs\divinghorse\**app\views\pages
 C:\xampp\htdocs\divinghorse\**app\views\scaffolds

 This is the admin panel online from panel login view thru setting up a
 new event and what it looks like on the web.

 Admin Panel
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/1-**
 adminhome_zps366ca5cb.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

 Add New Event
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/2-**
 addevent_zpsa7092e1d.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

 Event Added in HTML editor mode.Then saved
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/3-**
 eventadded_saved_zps985dadb3.**jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

 Event view on web page, the guestflo widget script and stripped
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/4-**
 pageresult_zpscd55c45a.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

 On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in
 itself. It might help to understand this admin panel you speak of.
 Honestly it sounds to me like you need to modify the layout file which is
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo
 customers. This particular one is the only one who uses this script.

 The business owner, (our customer) just started using guestflo, this
 site http://guestflo.com/ to create promotional ads for their
 website.

 I would post the site but it's an adult site for a strip club in
 Atlantic City New Jersey USA.

 Basically when I go into the cakePHP management console Add event
 it doesn't allow me to embed that widget code. It only allows for basic
 HTML and upload of an image to be posted under Managed Events on the 
 CMS.

 I've told the customer this may not be possible to post the widget
 mainly because the version they are using is cakePHP vers 1.3. Which I
 believe is old and doesn't support the jquery scripts. If there is a work
 around without ruining their CMS framework, I'll try it but I really don't
 think they want to have the code changed 

Re: Help please with Guestflo widget

2012-12-28 Thread mrfugimoto
If you don't mind and would like to have a look, I would like to email you 
directly. What address would you like for me to email to?

Thank you

On Friday, December 28, 2012 11:18:11 AM UTC-5, jsundquist wrote:

 This really isn't a cakephp problem.  Someone built a cms on top of 
 cakephp and you are relaying heavily on that.  In order to add this new, 
 from what I can understand from the initial post, static widget you will 
 need to modify one of the view files.  This doesn't sound like some thing 
 you will be able to accomplish via the admin panel. If you would like help 
 walking you through what is required feel free to email me directly and I 
 will try to help you out.


 On Fri, Dec 28, 2012 at 8:57 AM, mrfugimoto 
 ro...@nhlfightclub.comjavascript:
  wrote:

 Hi @jsundquist, it's cake version 1.3Old. I have read through 
 everything I think there is in the cookbooks. It seems not even the 
 developers of cakePHP know how to get the widget to work. It's not a knock 
 against the developers. I just don't see any references to adding scripts 
 in their documentation. Not even on the google groups. 

 Any idea if the newest version supports embedding scripts?

 Thank you for your help.


 On Friday, December 28, 2012 9:15:25 AM UTC-5, jsundquist wrote:

 So your pasting html into a tinymxe editor which Will convert a  into 
 lt; and a  gt;. 

 If you are trying to add this static widget to the events page you Will 
 need to modify the ctp file within the /app/views/events directory. 
 Possibly an index.ctp file.

 I would suggest checking out the docs for cakephp at docs.cakephp.org.  
 also in order to figure out which version of cakephp you are using check 
 out the /cake directory. If you view any file in there it should give you 
 an idea as to the version.
 On Dec 28, 2012 6:35 AM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @jsundquist.

 This is my rootappviews folder contents

 C:\xampp\htdocs\divinghorse\**app\views
 C:\xampp\htdocs\divinghorse\**app\views\administrators
 C:\xampp\htdocs\divinghorse\**app\views\categories
 C:\xampp\htdocs\divinghorse\**app\views\elements
 C:\xampp\htdocs\divinghorse\**app\views\errors
 C:\xampp\htdocs\divinghorse\**app\views\events
 C:\xampp\htdocs\divinghorse\**app\views\galleries
 C:\xampp\htdocs\divinghorse\**app\views\helpers
 C:\xampp\htdocs\divinghorse\**app\views\images
 C:\xampp\htdocs\divinghorse\**app\views\layouts
 C:\xampp\htdocs\divinghorse\**app\views\layouts\js
 C:\xampp\htdocs\divinghorse\**app\views\layouts\rss
 C:\xampp\htdocs\divinghorse\**app\views\layouts\xml
 C:\xampp\htdocs\divinghorse\**app\views\news
 C:\xampp\htdocs\divinghorse\**app\views\newsdetail
 C:\xampp\htdocs\divinghorse\**app\views\ourevents
 C:\xampp\htdocs\divinghorse\**app\views\ourgalleries
 C:\xampp\htdocs\divinghorse\**app\views\pagecontent
 C:\xampp\htdocs\divinghorse\**app\views\pages
 C:\xampp\htdocs\divinghorse\**app\views\scaffolds

 This is the admin panel online from panel login view thru setting up a 
 new event and what it looks like on the web.

 Admin Panel
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/1-**
 adminhome_zps366ca5cb.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

 Add New Event
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/2-**
 addevent_zpsa7092e1d.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

 Event Added in HTML editor mode.Then saved
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/3-**
 eventadded_saved_zps985dadb3.**jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

 Event view on web page, the guestflo widget script and stripped
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/4-**
 pageresult_zpscd55c45a.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

 On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in 
 itself. It might help to understand this admin panel you speak of. 
 Honestly it sounds to me like you need to modify the layout file which is 
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo 
 customers. This particular one is the only one who uses this script. 

 The business owner, (our customer) just started using guestflo, this 
 site http://guestflo.com/ to create promotional ads for their 
 website. 

 I would post the site but it's an adult site for a strip club in 
 Atlantic City New Jersey USA. 

 Basically when I go into the cakePHP management console Add event 
 it doesn't allow me to embed that widget code. It only allows for basic 
 HTML and upload of an image to be posted under Managed Events on the 
 CMS. 

 I've told the customer this may not be possible to post the 

Re: Help please with Guestflo widget

2012-12-28 Thread lowpass
In app\views\events there is probably a file named index.ctp. Open
that in an editor. There should be some PHP code that iterates over an
array of data to create listings for the events which are stored in
the DB. Find a place somewhere within this template to paste the
widget code. Next, go to app/tmp/cache/views and delete all files
inside if your cache isn't already disabled. Load the vents page and
see if the widget is displaying correctly.

On Thu, Dec 27, 2012 at 8:37 PM, mrfugimoto r...@nhlfightclub.com wrote:
 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo customers.
 This particular one is the only one who uses this script.

 The business owner, (our customer) just started using guestflo, this site
 http://guestflo.com/ to create promotional ads for their website.

 I would post the site but it's an adult site for a strip club in Atlantic
 City New Jersey USA.

 Basically when I go into the cakePHP management console Add event it
 doesn't allow me to embed that widget code. It only allows for basic HTML
 and upload of an image to be posted under Managed Events on the CMS.

 I've told the customer this may not be possible to post the widget mainly
 because the version they are using is cakePHP vers 1.3. Which I believe is
 old and doesn't support the jquery scripts. If there is a work around
 without ruining their CMS framework, I'll try it but I really don't think
 they want to have the code changed entirely in order to make the widget
 work.

 Hopefully this all makes sense and I'm not rambling. Any help you can
 provide is greatly appreciated. Thank you


 On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp
 Google Groups but nothing showed up. I clicked new cakephp Google group, and
 still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;
  script src=http://guestflo.com/venue-widget.php?
 VenueID=31limit=30a_link=614 type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code

 --
 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: Help please with Guestflo widget

2012-12-28 Thread mrfugimoto
nevermind I see your email address is in the autonotification.

On Friday, December 28, 2012 12:54:43 PM UTC-5, mrfugimoto wrote:

 If you don't mind and would like to have a look, I would like to email you 
 directly. What address would you like for me to email to?

 Thank you

 On Friday, December 28, 2012 11:18:11 AM UTC-5, jsundquist wrote:

 This really isn't a cakephp problem.  Someone built a cms on top of 
 cakephp and you are relaying heavily on that.  In order to add this new, 
 from what I can understand from the initial post, static widget you will 
 need to modify one of the view files.  This doesn't sound like some thing 
 you will be able to accomplish via the admin panel. If you would like help 
 walking you through what is required feel free to email me directly and I 
 will try to help you out.


 On Fri, Dec 28, 2012 at 8:57 AM, mrfugimoto ro...@nhlfightclub.comwrote:

 Hi @jsundquist, it's cake version 1.3Old. I have read through 
 everything I think there is in the cookbooks. It seems not even the 
 developers of cakePHP know how to get the widget to work. It's not a knock 
 against the developers. I just don't see any references to adding scripts 
 in their documentation. Not even on the google groups. 

 Any idea if the newest version supports embedding scripts?

 Thank you for your help.


 On Friday, December 28, 2012 9:15:25 AM UTC-5, jsundquist wrote:

 So your pasting html into a tinymxe editor which Will convert a  into 
 lt; and a  gt;. 

 If you are trying to add this static widget to the events page you Will 
 need to modify the ctp file within the /app/views/events directory. 
 Possibly an index.ctp file.

 I would suggest checking out the docs for cakephp at docs.cakephp.org.  
 also in order to figure out which version of cakephp you are using check 
 out the /cake directory. If you view any file in there it should give you 
 an idea as to the version.
 On Dec 28, 2012 6:35 AM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @jsundquist.

 This is my rootappviews folder contents

 C:\xampp\htdocs\divinghorse\**app\views
 C:\xampp\htdocs\divinghorse\**app\views\administrators
 C:\xampp\htdocs\divinghorse\**app\views\categories
 C:\xampp\htdocs\divinghorse\**app\views\elements
 C:\xampp\htdocs\divinghorse\**app\views\errors
 C:\xampp\htdocs\divinghorse\**app\views\events
 C:\xampp\htdocs\divinghorse\**app\views\galleries
 C:\xampp\htdocs\divinghorse\**app\views\helpers
 C:\xampp\htdocs\divinghorse\**app\views\images
 C:\xampp\htdocs\divinghorse\**app\views\layouts
 C:\xampp\htdocs\divinghorse\**app\views\layouts\js
 C:\xampp\htdocs\divinghorse\**app\views\layouts\rss
 C:\xampp\htdocs\divinghorse\**app\views\layouts\xml
 C:\xampp\htdocs\divinghorse\**app\views\news
 C:\xampp\htdocs\divinghorse\**app\views\newsdetail
 C:\xampp\htdocs\divinghorse\**app\views\ourevents
 C:\xampp\htdocs\divinghorse\**app\views\ourgalleries
 C:\xampp\htdocs\divinghorse\**app\views\pagecontent
 C:\xampp\htdocs\divinghorse\**app\views\pages
 C:\xampp\htdocs\divinghorse\**app\views\scaffolds

 This is the admin panel online from panel login view thru setting up a 
 new event and what it looks like on the web.

 Admin Panel
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/1-**
 adminhome_zps366ca5cb.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

 Add New Event
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/2-**
 addevent_zpsa7092e1d.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

 Event Added in HTML editor mode.Then saved
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/3-**
 eventadded_saved_zps985dadb3.**jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

 Event view on web page, the guestflo widget script and stripped
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/4-**
 pageresult_zpscd55c45a.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

 On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in 
 itself. It might help to understand this admin panel you speak of. 
 Honestly it sounds to me like you need to modify the layout file which 
 is 
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo 
 customers. This particular one is the only one who uses this script. 

 The business owner, (our customer) just started using guestflo, this 
 site http://guestflo.com/ to create promotional ads for their 
 website. 

 I would post the site but it's an adult site for a strip club in 
 Atlantic City New Jersey USA. 

 Basically when I go into the cakePHP management console Add event 
 it doesn't allow me to embed that widget code. It only allows for basic 
 HTML and upload of 

Re: Help please with Guestflo widget

2012-12-28 Thread mrfugimoto
Thank you @Cricket. With the assistance of @jlundquist, he was able to help 
get me situated. Everything is working, everybody is happy. 

Essentially the site I had to add the widget to is a complete train wreck. 
jlundquist created an entirely new page with the widget and I put a link on 
the menu. Working and customer is happy.

Great assistance here. Thank you both!

On Friday, December 28, 2012 1:26:20 PM UTC-5, cricket wrote:

 In app\views\events there is probably a file named index.ctp. Open 
 that in an editor. There should be some PHP code that iterates over an 
 array of data to create listings for the events which are stored in 
 the DB. Find a place somewhere within this template to paste the 
 widget code. Next, go to app/tmp/cache/views and delete all files 
 inside if your cache isn't already disabled. Load the vents page and 
 see if the widget is displaying correctly. 

 On Thu, Dec 27, 2012 at 8:37 PM, mrfugimoto 
 ro...@nhlfightclub.comjavascript: 
 wrote: 
  Hi @cricket. Thank you very much for reply. 
  
  Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo 
 customers. 
  This particular one is the only one who uses this script. 
  
  The business owner, (our customer) just started using guestflo, this 
 site 
  http://guestflo.com/ to create promotional ads for their website. 
  
  I would post the site but it's an adult site for a strip club in 
 Atlantic 
  City New Jersey USA. 
  
  Basically when I go into the cakePHP management console Add event it 
  doesn't allow me to embed that widget code. It only allows for basic 
 HTML 
  and upload of an image to be posted under Managed Events on the CMS. 
  
  I've told the customer this may not be possible to post the widget 
 mainly 
  because the version they are using is cakePHP vers 1.3. Which I believe 
 is 
  old and doesn't support the jquery scripts. If there is a work around 
  without ruining their CMS framework, I'll try it but I really don't 
 think 
  they want to have the code changed entirely in order to make the widget 
  work. 
  
  Hopefully this all makes sense and I'm not rambling. Any help you can 
  provide is greatly appreciated. Thank you 
  
  
  On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote: 
  
  Hi Please delete if this shows up twice. I posted in the old cakephp 
  Google Groups but nothing showed up. I clicked new cakephp Google 
 group, and 
  still didn't see anything. 
  
  Trying again... 
  
  Hi I am extremely unfamiliar with cakephp framework. I work for a web 
  development company who provide SEO support to customers. We inherited 
  a site which is cakephp 1.3, (I believe an old version). We have an 
  Our Events page and the customer asked me to add a widget 
  
  This is the widget below. I've tried adding this through the admin 
  panel New Event. Nothing works. It's just an empty image frame with 
  nothing to the right. Please help. I've tried everywhere on Google and 
  find nothing. 
  
  Thank you to anybody ahead of time. 
  
  code 
  div style=float:left;width:600px; 
   script src=http://guestflo.com/venue-widget.php? 
  VenueID=31limit=30a_link=614 type=text/javascript 
   /div 
   style type=text/css 
  .widget-wrapper{ 
  width:650px; 
  color:#fff; 
  } 
   /style 
  /code 
  
  -- 
  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...@googlegroups.comjavascript:. 

  To unsubscribe from this group, send email to 
  cake-php+u...@googlegroups.com javascript:. 
  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.




Help please with Guestflo widget

2012-12-27 Thread mrfugimoto
Hi Please delete if this shows up twice. I posted in the old cakephp Google 
Groups but nothing showed up. I clicked new cakephp Google group, and still 
didn't see anything.

Trying again...

Hi I am extremely unfamiliar with cakephp framework. I work for a web
development company who provide SEO support to customers. We inherited
a site which is cakephp 1.3, (I believe an old version). We have an
Our Events page and the customer asked me to add a widget

This is the widget below. I've tried adding this through the admin
panel New Event. Nothing works. It's just an empty image frame with
nothing to the right. Please help. I've tried everywhere on Google and
find nothing.

Thank you to anybody ahead of time.

code
div style=float:left;width:600px;
 script src=http://guestflo.com/venue-widget.php?
VenueID=31limit=30a_link=614 type=text/javascript
 /div
 style type=text/css
.widget-wrapper{
width:650px;
color:#fff;
}
 /style
/code

-- 
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: Help please with Guestflo widget

2012-12-27 Thread lowpass
Is this Guestflo widget meant to replace the existing Events code?
Does it load HTML from some other site? If that's the case, it
probably shouldn't be added through the database. Rather, the existing
events code could be removed, and the index.ctp template changed to
just include the widget code, rather than iterate over the events
fetched from the DB.

On Thu, Dec 27, 2012 at 2:41 PM, mrfugimoto r...@nhlfightclub.com wrote:
 Hi Please delete if this shows up twice. I posted in the old cakephp Google
 Groups but nothing showed up. I clicked new cakephp Google group, and still
 didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;
  script src=http://guestflo.com/venue-widget.php?
 VenueID=31limit=30a_link=614 type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code

 --
 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: Help please with Guestflo widget

2012-12-27 Thread mrfugimoto
Hi @cricket. Thank you very much for reply.

Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo customers. 
This particular one is the only one who uses this script. 

The business owner, (our customer) just started using guestflo, this site 
http://guestflo.com/ to create promotional ads for their website. 

I would post the site but it's an adult site for a strip club in Atlantic 
City New Jersey USA. 

Basically when I go into the cakePHP management console Add event it 
doesn't allow me to embed that widget code. It only allows for basic HTML 
and upload of an image to be posted under Managed Events on the CMS. 

I've told the customer this may not be possible to post the widget mainly 
because the version they are using is cakePHP vers 1.3. Which I believe is 
old and doesn't support the jquery scripts. If there is a work around 
without ruining their CMS framework, I'll try it but I really don't think 
they want to have the code changed entirely in order to make the widget 
work.

Hopefully this all makes sense and I'm not rambling. Any help you can 
provide is greatly appreciated. Thank you

On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp 
 Google Groups but nothing showed up. I clicked new cakephp Google group, 
 and still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;
  script src=http://guestflo.com/venue-widget.php?
 VenueID=31limit=30a_link=614 type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code


-- 
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: Help please with Guestflo widget

2012-12-27 Thread Jonathan Sundquist
What is Grr Cms that they are using? Cakephp is just a framework in itself.
It might help to understand this admin panel you speak of. Honestly it
sounds to me like you need to modify the layout file which is usually with
app/Views
On Dec 27, 2012 7:37 PM, mrfugimoto r...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo customers.
 This particular one is the only one who uses this script.

 The business owner, (our customer) just started using guestflo, this site
 http://guestflo.com/ to create promotional ads for their website.

 I would post the site but it's an adult site for a strip club in Atlantic
 City New Jersey USA.

 Basically when I go into the cakePHP management console Add event it
 doesn't allow me to embed that widget code. It only allows for basic HTML
 and upload of an image to be posted under Managed Events on the CMS.

 I've told the customer this may not be possible to post the widget mainly
 because the version they are using is cakePHP vers 1.3. Which I believe is
 old and doesn't support the jquery scripts. If there is a work around
 without ruining their CMS framework, I'll try it but I really don't think
 they want to have the code changed entirely in order to make the widget
 work.

 Hopefully this all makes sense and I'm not rambling. Any help you can
 provide is greatly appreciated. Thank you

 On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp
 Google Groups but nothing showed up. I clicked new cakephp Google group,
 and still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;**
  script 
 src=http://guestflo.com/**venue-widget.phphttp://guestflo.com/venue-widget.php
 ?
 VenueID=31limit=30a_link=**614 type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code

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




Help please with Guestflo widget

2012-12-27 Thread mrfugimoto
Hi I am extremely unfamiliar with cakephp framework. I work for a web
development company who provide SEO support to customers. We inherited
a site which is cakephp 1.3, (I believe an old version). We have an
Our Events page and the customer asked me to add a widget

This is the widget below. I've tried adding this through the admin
panel New Event. Nothing works. It's just an empty image frame with
nothing to the right. Please help. I've tried everywhere on Google and
find nothing.

Thank you to anybody ahead of time.

code
div style=float:left;width:600px;
 script src=http://guestflo.com/venue-widget.php?
VenueID=31limit=30a_link=614 type=text/javascript/script
 /div
 style type=text/css
.widget-wrapper{
width:650px;
color:#fff;
}
 /style
/code

-- 
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: beginner In CakePHP . HELP PLEASE

2012-02-20 Thread phpMagpie
If you are new to CakePHP then you need to read through the book a couple 
of times before jumping into a project.  Bake some seperate projects and 
look at the code produced, if you're having problems with basic CRUD 
functions then they are all done for you when you bake.

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


beginner In CakePHP . HELP PLEASE

2012-02-17 Thread kalai
HI to all,
I am a beginner in CakePHP.
I would like like to get help in my coding.
i am currently creating a directory using CakePHP.
the problem i am facing

1)when i click edit it is not redirecting to Edit,it just displaying
the Session message say the post is saved

2) when ever i click add after submit button is clicked it is not
adding anything in to Table.


please help me where do i want to start looking.


Thanks in Advance

Regards
Kalai

-- 
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: beginner In CakePHP . HELP PLEASE

2012-02-17 Thread Sam Sherlock
You need to show your code

Sounds like your missing parts of an if-statement in the edit action

- S
On 17 Feb 2012 17:59, kalai mekin...@gmail.com wrote:

 HI to all,
 I am a beginner in CakePHP.
 I would like like to get help in my coding.
 i am currently creating a directory using CakePHP.
 the problem i am facing

 1)when i click edit it is not redirecting to Edit,it just displaying
 the Session message say the post is saved

 2) when ever i click add after submit button is clicked it is not
 adding anything in to Table.


 please help me where do i want to start looking.


 Thanks in Advance

 Regards
 Kalai

 --
 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: beginner In CakePHP . HELP PLEASE

2012-02-17 Thread kalai
Hi sam,
i have building , which has to be edit, delete, add.
here is the

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


var $validate = array(
'identifier' = array(
'notempty' = array(
'rule' = array('notempty'),
'message' = 'Building alias can not be empty!',
//'allowEmpty' = false,
//'required' = false,
//'last' = false, // Stop validation after 
this rule
//'on' = 'create', // Limit validation to 
'create' or 'update'
operations
),
'alphanumeric' = array(
'rule' = array('alphanumeric'),
'message' = 'Special charcters not allowed!',
//'allowEmpty' = false,
//'required' = false,
//'last' = false, // Stop validation after 
this rule
//'on' = 'create', // Limit validation to 
'create' or 'update'
operations
),
),
'name' = array(
'notempty' = array(
'rule' = array('notempty'),
'message' = 'Building name can not be empty!',
//'allowEmpty' = false,
//'required' = false,
//'last' = false, // Stop validation after 
this rule
//'on' = 'create', // Limit validation to 
'create' or 'update'
operations
),
'lettersandspace' = array(
'rule' = '|^([A-Za-z ])*$|',
'message' = 'Special charcters not allowed!',
//'allowEmpty' = false,
//'required' = false,
//'last' = false, // Stop validation after 
this rule
//'on' = 'create', // Limit validation to 
'create' or 'update'
operations
),
),
'zip' = array(
'notempty' = array(
'rule' = array('notempty'),
'message' = 'Building zip can not be empty!',
//'allowEmpty' = false,
//'required' = false,
//'last' = false, // Stop validation after 
this rule
//'on' = 'create', // Limit validation to 
'create' or 'update'
operations
),
'zipformat' = array(
'rule' = '|^([7][3][0]\d{2})*$|',
'message' = 'Enter a correct zip code - 
730XX!',
//'allowEmpty' = false,
//'required' = false,
//'last' = false, // Stop validation after 
this rule
//'on' = 'create', // Limit validation to 
'create' or 'update'
operations
),
),
'address' = array(
'notempty' = array(
'rule' = array('notempty'),
'message' = 'Building address can not be 
empty!',
//'allowEmpty' = false,
//'required' = false,
//'last' = false, // Stop validation after 
this rule
//'on' = 'create', // Limit validation to 
'create' or 'update'
operations
),
'addressformat' = array(
'rule' = '|^([0-9]{1,7} [a-zA-z\ 
\.]{2,35})*$|',
'message' = 'Invalid address format - use 
1000 Main St.
format!',
//'allowEmpty' = false,
//'required' = false,
//'last' = false, // Stop validation after 
this rule
//'on' = 'create', // Limit validation to 
'create' or 'update'
operations
),
),
);

}
?

Controller of Building:
?php
class BuildingsController extends AppController {

var $name = 'Buildings';

function index() {
$this-Building-recursive = 0;
$this-set('buildings', $this-paginate());
}

function 

Re: beginner In CakePHP . HELP PLEASE

2012-02-17 Thread Sam Sherlock

@kalai
you need to check that $this-data is not empty when adding a building

been a while since I used 1.3 but I just baked a project after updating 
my base of 1.3


I put you code in first without validation in the model (my view were 
baked too)


I have not trouble editing buildings or adding new entries (after the 
change on the if state of the add method - guess that was typo which is 
why  baking is soo nice)


next I added the validation code.

I am not sure what your exact setup is for the buildings table or the 
intended purpose of each field.
I see the identifier to my thinking this looks like your making an seo 
friendly retrival field (if so look at the various slug behaviours out 
there CakeDC Utils or Deuromark Tools plugins)


I see that in your views you are hard setting some stuff (certainly not 
something I would do)


I am happy to give your actual sql setup a whirl if you like.

Also someone may well spot something I have missed

(I did not encounter that issue with the edit action)

On 17/02/2012 20:23, kalai wrote:

function add() {
if (!empty($this-data)) {
$this-Building-create();
if ($this-Building-save($this-data)) {
$this-Session-setFlash(__('The building has 
been saved', true));
$this-redirect(array('action' =  'index'));
} else {
$this-Session-setFlash(__('The building could 
not be saved.
Please, try again.', true));
}
}
}


--
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: beginner In CakePHP . HELP PLEASE

2012-02-17 Thread Kalaiarasan Eswaramoorthy
Thank you Sam, for your kind reply building is one of the functionality,
like Building there are Department,People,User,Group..etc..

I edited add function but still it has some other issues pooping up..
if you don't mind i would send my entire code and my table structure.?
can you help me please?

Thanks in Advance..
Regards
Kalai
On Fri, Feb 17, 2012 at 3:30 PM, Sam Sherlock sam.sherl...@gmail.comwrote:

 @kalai
 you need to check that $this-data is not empty when adding a building

 been a while since I used 1.3 but I just baked a project after updating my
 base of 1.3

 I put you code in first without validation in the model (my view were
 baked too)

 I have not trouble editing buildings or adding new entries (after the
 change on the if state of the add method - guess that was typo which is why
  baking is soo nice)

 next I added the validation code.

 I am not sure what your exact setup is for the buildings table or the
 intended purpose of each field.
 I see the identifier to my thinking this looks like your making an seo
 friendly retrival field (if so look at the various slug behaviours out
 there CakeDC Utils or Deuromark Tools plugins)

 I see that in your views you are hard setting some stuff (certainly not
 something I would do)

 I am happy to give your actual sql setup a whirl if you like.

 Also someone may well spot something I have missed

 (I did not encounter that issue with the edit action)

 On 17/02/2012 20:23, kalai wrote:

 function add() {
if (!empty($this-data)) {

$this-Building-create();
if ($this-Building-save($this-**data)) {
$this-Session-setFlash(__('**The
 building has been saved', true));
$this-redirect(array('action' =
  'index'));
} else {
$this-Session-setFlash(__('**The
 building could not be saved.
 Please, try again.', true));
}
}
}


 --
 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+unsubscribe@**googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/**group/cake-phphttp://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: beginner In CakePHP . HELP PLEASE

2012-02-17 Thread kalai
Hi Sam Thanks for your kind Reply.
i changed the edit function still i have that issue..
i thought better understanding of my functionality will help you
better to help me..
If don't mind i would send my entire code and my table structure, so
that i can get exactly what i whant
can you help me in this, please?

Thanks in  advance

with Regards
kalai.


On Feb 17, 3:30 pm, Sam Sherlock sam.sherl...@gmail.com wrote:
 @kalai
 you need to check that $this-data is not empty when adding a building

 been a while since I used 1.3 but I just baked a project after updating
 my base of 1.3

 I put you code in first without validation in the model (my view were
 baked too)

 I have not trouble editing buildings or adding new entries (after the
 change on the if state of the add method - guess that was typo which is
 why  baking is soo nice)

 next I added the validation code.

 I am not sure what your exact setup is for the buildings table or the
 intended purpose of each field.
 I see the identifier to my thinking this looks like your making an seo
 friendly retrival field (if so look at the various slug behaviours out
 there CakeDC Utils or Deuromark Tools plugins)

 I see that in your views you are hard setting some stuff (certainly not
 something I would do)

 I am happy to give your actual sql setup a whirl if you like.

 Also someone may well spot something I have missed

 (I did not encounter that issue with the edit action)

 On 17/02/2012 20:23, kalai wrote:







  function add() {
             if (!empty($this-data)) {
                     $this-Building-create();
                     if ($this-Building-save($this-data)) {
                             $this-Session-setFlash(__('The building has 
  been saved', true));
                             $this-redirect(array('action' =  'index'));
                     } else {
                             $this-Session-setFlash(__('The building could 
  not be saved.
  Please, try again.', true));
                     }
             }
     }

-- 
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: beginner In CakePHP . HELP PLEASE

2012-02-17 Thread Sam Sherlock

 Building there are Department,People,User,Group..etc..

I was hoping to see the sql and the problem model  controller
with the code being in bin.cakephp.org or github gist

have you got debug on in your app?
have you got debug_kit? its a must really

when you get an isssue with some controller action you can use
$this-log($aVartoDebug, 'file-to-save-it-in');
this will make a log file in tmp/logs and put the value of the first arg

also is you have a controller working comparing it with the one that 
does not is very helpful.


Overall though taking some time to complete the blog tutorial and redo 
it adding more

will teach  you much.

setting up bake will save you from many annoying human error typos and 
save lots of time.

Its or so very easy to setup

finally if you are starting out why start with 1.3 when you could just 
start with 2.0?



On 17/02/2012 21:57, kalai wrote:

Hi Sam Thanks for your kind Reply.
i changed the edit function still i have that issue..
i thought better understanding of my functionality will help you
better to help me..
If don't mind i would send my entire code and my table structure, so
that i can get exactly what i whant
can you help me in this, please?

Thanks in  advance

with Regards
kalai.


On Feb 17, 3:30 pm, Sam Sherlocksam.sherl...@gmail.com  wrote:

@kalai
you need to check that $this-data is not empty when adding a building

been a while since I used 1.3 but I just baked a project after updating
my base of 1.3

I put you code in first without validation in the model (my view were
baked too)

I have not trouble editing buildings or adding new entries (after the
change on the if state of the add method - guess that was typo which is
why  baking is soo nice)

next I added the validation code.

I am not sure what your exact setup is for the buildings table or the
intended purpose of each field.
I see the identifier to my thinking this looks like your making an seo
friendly retrival field (if so look at the various slug behaviours out
there CakeDC Utils or Deuromark Tools plugins)

I see that in your views you are hard setting some stuff (certainly not
something I would do)

I am happy to give your actual sql setup a whirl if you like.

Also someone may well spot something I have missed

(I did not encounter that issue with the edit action)

On 17/02/2012 20:23, kalai wrote:








function add() {
if (!empty($this-data)) {
$this-Building-create();
if ($this-Building-save($this-data)) {
$this-Session-setFlash(__('The building has been 
saved', true));
$this-redirect(array('action' ='index'));
} else {
$this-Session-setFlash(__('The building could not 
be saved.
Please, try again.', true));
}
}
}


--
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: beginner In CakePHP . HELP PLEASE

2012-02-17 Thread Kalaiarasan Eswaramoorthy
Hi Thanks, first of all i am starting to edit already existing code
developed in 1.3 version..
i added some actions in it , as i am new to cakePHP i just followed the
tutorial...
in this i am attaching the entire code.
so please help to figure it out...

please find the attachment

regards
Kalai

On Fri, Feb 17, 2012 at 5:48 PM, Sam Sherlock sam.sherl...@gmail.comwrote:

  Building there are Department,People,User,Group..**etc..

 I was hoping to see the sql and the problem model  controller
 with the code being in bin.cakephp.org or github gist

 have you got debug on in your app?
 have you got debug_kit? its a must really

 when you get an isssue with some controller action you can use
 $this-log($aVartoDebug, 'file-to-save-it-in');
 this will make a log file in tmp/logs and put the value of the first arg

 also is you have a controller working comparing it with the one that does
 not is very helpful.

 Overall though taking some time to complete the blog tutorial and redo it
 adding more
 will teach  you much.

 setting up bake will save you from many annoying human error typos and
 save lots of time.
 Its or so very easy to setup

 finally if you are starting out why start with 1.3 when you could just
 start with 2.0?



 On 17/02/2012 21:57, kalai wrote:

 Hi Sam Thanks for your kind Reply.
 i changed the edit function still i have that issue..
 i thought better understanding of my functionality will help you
 better to help me..
 If don't mind i would send my entire code and my table structure, so
 that i can get exactly what i whant
 can you help me in this, please?

 Thanks in  advance

 with Regards
 kalai.


 On Feb 17, 3:30 pm, Sam 
 Sherlocksam.sherl...@gmail.**comsam.sherl...@gmail.com
  wrote:

 @kalai
 you need to check that $this-data is not empty when adding a building

 been a while since I used 1.3 but I just baked a project after updating
 my base of 1.3

 I put you code in first without validation in the model (my view were
 baked too)

 I have not trouble editing buildings or adding new entries (after the
 change on the if state of the add method - guess that was typo which is
 why  baking is soo nice)

 next I added the validation code.

 I am not sure what your exact setup is for the buildings table or the
 intended purpose of each field.
 I see the identifier to my thinking this looks like your making an seo
 friendly retrival field (if so look at the various slug behaviours out
 there CakeDC Utils or Deuromark Tools plugins)

 I see that in your views you are hard setting some stuff (certainly not
 something I would do)

 I am happy to give your actual sql setup a whirl if you like.

 Also someone may well spot something I have missed

 (I did not encounter that issue with the edit action)

 On 17/02/2012 20:23, kalai wrote:







  function add() {
if (!empty($this-data)) {
$this-Building-create();
if ($this-Building-save($this-**data)) {
$this-Session-setFlash(__('**The building
 has been saved', true));
$this-redirect(array('action' =
  'index'));
} else {
$this-Session-setFlash(__('**The building
 could not be saved.
 Please, try again.', true));
}
}
}


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


setting up cakephp HELP please

2011-03-22 Thread Robert Bodley
Hi everyone

im new to cake and i set up cake with all the thing required and that
all right (i watched a few youtube videos) but when i put a bit of php
like
?php

echo hello world;

?

and save it as a test.ctp in the folder views it always comes up with
this error when i try and view it on the localhost

(Missing Controller
Error: Test.ctpController could not be found.

Error: Create the class Test.ctpController below in file: app
\controllers\test.ctp_controller.php

?php
class Test.ctpController extends AppController {

var $name = 'Test.ctp';
}
?
Notice: If you want to customize this error message, create app\views
\errors\missing_controller.ctp)

when i try view the file i go to this file http://localhost/cakephp/test.ctp
on my browser is this correct?

and im using xampp localhost

any suggestions to fix this?


thanks a lot help will be 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


setting up cakephp HELP please

2011-03-22 Thread Robert Bodley
Hi everyone

im new to cake and i set up cake with all the thing required and that
all right (i watched a few youtube videos) but when i put a bit of php
like
?php

echo hello world;

?

and save it as a test.ctp in the folder views it always comes up with
this error when i try and view it on the localhost

(Missing Controller
Error: Test.ctpController could not be found.

Error: Create the class Test.ctpController below in file: app
\controllers\test.ctp_controller.php

?php
class Test.ctpController extends AppController {

var $name = 'Test.ctp';
}
?
Notice: If you want to customize this error message, create app\views
\errors\missing_controller.ctp)

when i try view the file i go to this file http://localhost/cakephp/test.ctp
on my browser is this correct?

and im using xampp localhost

any suggestions to fix this?


thanks a lot help will be 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: setting up cakephp HELP please

2011-03-22 Thread Tilen Majerle
http://book.cakephp.org/view/898/A-Typical-CakePHP-Request
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/3/22 Robert Bodley borisbod...@gmail.com

 Hi everyone

 im new to cake and i set up cake with all the thing required and that
 all right (i watched a few youtube videos) but when i put a bit of php
 like
 ?php

 echo hello world;

 ?

 and save it as a test.ctp in the folder views it always comes up with
 this error when i try and view it on the localhost

 (Missing Controller
 Error: Test.ctpController could not be found.

 Error: Create the class Test.ctpController below in file: app
 \controllers\test.ctp_controller.php

 ?php
 class Test.ctpController extends AppController {

var $name = 'Test.ctp';
 }
 ?
 Notice: If you want to customize this error message, create app\views
 \errors\missing_controller.ctp)

 when i try view the file i go to this file
 http://localhost/cakephp/test.ctp
 on my browser is this correct?

 and im using xampp localhost

 any suggestions to fix this?


 thanks a lot help will be 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


-- 
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: Urgent Help--Please

2011-02-21 Thread Tapan Kumar Thapa
My find fields array is already having my new date In first parameter however 
it still comes in last. Pls suggest if you have something else in your mind.

Regards 
Tapan Thapa 
India

Sent from my iPhone

On Feb 20, 2011, at 9:21 PM, John Andersen j.andersen...@gmail.com wrote:

 This is speculation only, but maybe define your field parameter in the
 find statement, so that the newdate comes first!
 Enjoy,
   John
 
 On Feb 20, 4:42 pm, Tapan Kumar Thapa tapan.th...@hindustantimes.com
 wrote:
 Thanks for your suggestion.
 
 I have implemented this in my model.
 
 var $virtualFields = array(
 'newdate' = 'DATE_FORMAT(Incoming.date, %d-%b-%y)'
 );
 
 It works as charm however now i have got another problem.
 
 now my new date is coming in last like this.
 
 SELECT `Incoming`.`time`, `Incoming`.`msisdn`, `Incoming`.`shortcode`,
 `Incoming`.`operator`, `Incoming`.`circle`, `Incoming`.`keyword`,
 `Incoming`.`answer`, `Incoming`.`age`, `Incoming`.`gender`,
 `Incoming`.`status`, *(DATE_FORMAT(`Incoming`.`date`, %d-%b-%y)) AS
 `Incoming__newdate`* FROM `incomings` AS `Incoming` WHERE
 `Incoming`.`created` = '2011-02-08 00:00:00' AND `Incoming`.`created` =
 '2011-02-20 20:55:00' ORDER BY `Incoming`.`id` desc LIMIT 20, 20
 
 However i want like this:
 
 SELECT *(DATE_FORMAT(`Incoming`.`date`, %d-%b-%y)) AS
 `Incoming__newdate`*,`Incoming`.`time`,
 `Incoming`.`msisdn`, `Incoming`.`shortcode`, `Incoming`.`operator`,
 `Incoming`.`circle`, `Incoming`.`keyword`, `Incoming`.`answer`,
 `Incoming`.`age`, `Incoming`.`gender`, `Incoming`.`status`  FROM `incomings`
 AS `Incoming` WHERE `Incoming`.`created` = '2011-02-08 00:00:00' AND
 `Incoming`.`created` = '2011-02-20 20:55:00' ORDER BY `Incoming`.`id` desc
 LIMIT 20, 20
 
 Please suggest.
 
 Regards
 Tapan Thapa
 India
 
 On Sun, Feb 20, 2011 at 8:28 PM, John Andersen 
 j.andersen...@gmail.comwrote:
 
 Please show us how the view code looks like, maybe we can suggest
 something based on that.
 
 If you can't then you may be able to use a virtual field for this,
 look at the CakePHP book at:
 http://book.cakephp.org/view/1608/Virtual-fields
 
 Enjoy,
   John
 
 On Feb 20, 3:45 pm, Tapan Kumar Thapa tapan.th...@hindustantimes.com
 wrote:
 Unfortunately no(:-
 
 I have an export csv option via a html link and i am not presenting this
 data to my view.
 
 Please suggest if this can be achieved in controller itself.
 
 Regards
 Tapan Thapa
 India
 
 [snip]
 
 --
 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
 
 -- 
 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


Urgent Help--Please

2011-02-20 Thread Tapan Kumar Thapa
Hello Community,

I have an export function in my controller.

function export() {
$this-layout = '';
$startdate = $this-Session-read('startdate');
$enddate = $this-Session-read('enddate');
$this-set('Export', $this-Incoming-find('all', array(
'fields' = array('date', 'time', 'msisdn', 'shortcode',
'operator', 'circle', 'keyword', 'answer', 'age', 'gender'),
'order' = Incoming.id desc,
'conditions' = array(Incoming.created = '$startdate'
AND Incoming.created = '$enddate' ),
'contain' = false)));
}

I want this control look like this.

function export() {
$this-layout = '';
$startdate = $this-Session-read('startdate');
$enddate = $this-Session-read('enddate');
$this-set('Export', $this-Incoming-find('all', array(
'fields' = array('date_format(date, '%d-%b-%y') as
date', 'time', 'msisdn', 'shortcode', 'operator', 'circle', 'keyword',
'answer', 'age', 'gender'),
'order' = Incoming.id desc,
'conditions' = array(Incoming.created = '$startdate'
AND Incoming.created = '$enddate' ),
'contain' = false)));
}

Please suggest.

Regards
Tapan Thapa
India

-- 
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: Urgent Help--Please

2011-02-20 Thread John Andersen
Presentation of the data, your date and time fields, should be done in
the view, not in the controller, so just move the formatting to the
view. Would that be an acceptable solution for you?
Enjoy,
   John

On Feb 20, 2:58 pm, Tapan Kumar Thapa tapan.th...@hindustantimes.com
wrote:
 Hello Community,

 I have an export function in my controller.

 function export() {
         $this-layout = '';
         $startdate = $this-Session-read('startdate');
         $enddate = $this-Session-read('enddate');
         $this-set('Export', $this-Incoming-find('all', array(
                     'fields' = array('date', 'time', 'msisdn', 'shortcode',
 'operator', 'circle', 'keyword', 'answer', 'age', 'gender'),
                     'order' = Incoming.id desc,
                     'conditions' = array(Incoming.created = '$startdate'
 AND Incoming.created = '$enddate' ),
                     'contain' = false)));
     }

 I want this control look like this.

 function export() {
         $this-layout = '';
         $startdate = $this-Session-read('startdate');
         $enddate = $this-Session-read('enddate');
         $this-set('Export', $this-Incoming-find('all', array(
                     'fields' = array('date_format(date, '%d-%b-%y') as
 date', 'time', 'msisdn', 'shortcode', 'operator', 'circle', 'keyword',
 'answer', 'age', 'gender'),
                     'order' = Incoming.id desc,
                     'conditions' = array(Incoming.created = '$startdate'
 AND Incoming.created = '$enddate' ),
                     'contain' = false)));
     }

 Please suggest.

 Regards
 Tapan Thapa
 India

-- 
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: Urgent Help--Please

2011-02-20 Thread Tapan Kumar Thapa
Unfortunately no(:-

I have an export csv option via a html link and i am not presenting this
data to my view.

Please suggest if this can be achieved in controller itself.

Regards
Tapan Thapa
India

On Sun, Feb 20, 2011 at 8:08 PM, John Andersen j.andersen...@gmail.comwrote:

 Presentation of the data, your date and time fields, should be done in
 the view, not in the controller, so just move the formatting to the
 view. Would that be an acceptable solution for you?
 Enjoy,
   John

 On Feb 20, 2:58 pm, Tapan Kumar Thapa tapan.th...@hindustantimes.com
 wrote:
  Hello Community,
 
  I have an export function in my controller.
 
  function export() {
  $this-layout = '';
  $startdate = $this-Session-read('startdate');
  $enddate = $this-Session-read('enddate');
  $this-set('Export', $this-Incoming-find('all', array(
  'fields' = array('date', 'time', 'msisdn',
 'shortcode',
  'operator', 'circle', 'keyword', 'answer', 'age', 'gender'),
  'order' = Incoming.id desc,
  'conditions' = array(Incoming.created =
 '$startdate'
  AND Incoming.created = '$enddate' ),
  'contain' = false)));
  }
 
  I want this control look like this.
 
  function export() {
  $this-layout = '';
  $startdate = $this-Session-read('startdate');
  $enddate = $this-Session-read('enddate');
  $this-set('Export', $this-Incoming-find('all', array(
  'fields' = array('date_format(date, '%d-%b-%y') as
  date', 'time', 'msisdn', 'shortcode', 'operator', 'circle', 'keyword',
  'answer', 'age', 'gender'),
  'order' = Incoming.id desc,
  'conditions' = array(Incoming.created =
 '$startdate'
  AND Incoming.created = '$enddate' ),
  'contain' = false)));
  }
 
  Please suggest.
 
  Regards
  Tapan Thapa
  India

 --
 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: Urgent Help--Please

2011-02-20 Thread John Andersen
Please show us how the view code looks like, maybe we can suggest
something based on that.

If you can't then you may be able to use a virtual field for this,
look at the CakePHP book at:
http://book.cakephp.org/view/1608/Virtual-fields

Enjoy,
   John

On Feb 20, 3:45 pm, Tapan Kumar Thapa tapan.th...@hindustantimes.com
wrote:
 Unfortunately no(:-

 I have an export csv option via a html link and i am not presenting this
 data to my view.

 Please suggest if this can be achieved in controller itself.

 Regards
 Tapan Thapa
 India

[snip]

-- 
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: Urgent Help--Please

2011-02-20 Thread Tapan Kumar Thapa
Thanks for your suggestion.

I have implemented this in my model.

var $virtualFields = array(
'newdate' = 'DATE_FORMAT(Incoming.date, %d-%b-%y)'
);

It works as charm however now i have got another problem.

now my new date is coming in last like this.

SELECT `Incoming`.`time`, `Incoming`.`msisdn`, `Incoming`.`shortcode`,
`Incoming`.`operator`, `Incoming`.`circle`, `Incoming`.`keyword`,
`Incoming`.`answer`, `Incoming`.`age`, `Incoming`.`gender`,
`Incoming`.`status`, *(DATE_FORMAT(`Incoming`.`date`, %d-%b-%y)) AS
`Incoming__newdate`* FROM `incomings` AS `Incoming` WHERE
`Incoming`.`created` = '2011-02-08 00:00:00' AND `Incoming`.`created` =
'2011-02-20 20:55:00' ORDER BY `Incoming`.`id` desc LIMIT 20, 20

However i want like this:

SELECT *(DATE_FORMAT(`Incoming`.`date`, %d-%b-%y)) AS
`Incoming__newdate`*,`Incoming`.`time`,
`Incoming`.`msisdn`, `Incoming`.`shortcode`, `Incoming`.`operator`,
`Incoming`.`circle`, `Incoming`.`keyword`, `Incoming`.`answer`,
`Incoming`.`age`, `Incoming`.`gender`, `Incoming`.`status`  FROM `incomings`
AS `Incoming` WHERE `Incoming`.`created` = '2011-02-08 00:00:00' AND
`Incoming`.`created` = '2011-02-20 20:55:00' ORDER BY `Incoming`.`id` desc
LIMIT 20, 20

Please suggest.

Regards
Tapan Thapa
India


On Sun, Feb 20, 2011 at 8:28 PM, John Andersen j.andersen...@gmail.comwrote:

 Please show us how the view code looks like, maybe we can suggest
 something based on that.

 If you can't then you may be able to use a virtual field for this,
 look at the CakePHP book at:
 http://book.cakephp.org/view/1608/Virtual-fields

 Enjoy,
   John

 On Feb 20, 3:45 pm, Tapan Kumar Thapa tapan.th...@hindustantimes.com
 wrote:
  Unfortunately no(:-
 
  I have an export csv option via a html link and i am not presenting this
  data to my view.
 
  Please suggest if this can be achieved in controller itself.
 
  Regards
  Tapan Thapa
  India
 
 [snip]

 --
 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: Urgent Help--Please

2011-02-20 Thread John Andersen
This is speculation only, but maybe define your field parameter in the
find statement, so that the newdate comes first!
Enjoy,
   John

On Feb 20, 4:42 pm, Tapan Kumar Thapa tapan.th...@hindustantimes.com
wrote:
 Thanks for your suggestion.

 I have implemented this in my model.

 var $virtualFields = array(
         'newdate' = 'DATE_FORMAT(Incoming.date, %d-%b-%y)'
     );

 It works as charm however now i have got another problem.

 now my new date is coming in last like this.

 SELECT `Incoming`.`time`, `Incoming`.`msisdn`, `Incoming`.`shortcode`,
 `Incoming`.`operator`, `Incoming`.`circle`, `Incoming`.`keyword`,
 `Incoming`.`answer`, `Incoming`.`age`, `Incoming`.`gender`,
 `Incoming`.`status`, *(DATE_FORMAT(`Incoming`.`date`, %d-%b-%y)) AS
 `Incoming__newdate`* FROM `incomings` AS `Incoming` WHERE
 `Incoming`.`created` = '2011-02-08 00:00:00' AND `Incoming`.`created` =
 '2011-02-20 20:55:00' ORDER BY `Incoming`.`id` desc LIMIT 20, 20

 However i want like this:

 SELECT *(DATE_FORMAT(`Incoming`.`date`, %d-%b-%y)) AS
 `Incoming__newdate`*,`Incoming`.`time`,
 `Incoming`.`msisdn`, `Incoming`.`shortcode`, `Incoming`.`operator`,
 `Incoming`.`circle`, `Incoming`.`keyword`, `Incoming`.`answer`,
 `Incoming`.`age`, `Incoming`.`gender`, `Incoming`.`status`  FROM `incomings`
 AS `Incoming` WHERE `Incoming`.`created` = '2011-02-08 00:00:00' AND
 `Incoming`.`created` = '2011-02-20 20:55:00' ORDER BY `Incoming`.`id` desc
 LIMIT 20, 20

 Please suggest.

 Regards
 Tapan Thapa
 India

 On Sun, Feb 20, 2011 at 8:28 PM, John Andersen j.andersen...@gmail.comwrote:

  Please show us how the view code looks like, maybe we can suggest
  something based on that.

  If you can't then you may be able to use a virtual field for this,
  look at the CakePHP book at:
 http://book.cakephp.org/view/1608/Virtual-fields

  Enjoy,
    John

  On Feb 20, 3:45 pm, Tapan Kumar Thapa tapan.th...@hindustantimes.com
  wrote:
   Unfortunately no(:-

   I have an export csv option via a html link and i am not presenting this
   data to my view.

   Please suggest if this can be achieved in controller itself.

   Regards
   Tapan Thapa
   India

  [snip]

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

-- 
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: Urgent Help--Please

2011-02-20 Thread euromark
john is still right, though
the data should be finalized in the view
this way you can customize it better

simply use a csv layout (settings headers) which uses the custom csv
view you generate (using a csv helper).


On 20 Feb., 16:51, John Andersen j.andersen...@gmail.com wrote:
 This is speculation only, but maybe define your field parameter in the
 find statement, so that the newdate comes first!
 Enjoy,
    John

 On Feb 20, 4:42 pm, Tapan Kumar Thapa tapan.th...@hindustantimes.com
 wrote:







  Thanks for your suggestion.

  I have implemented this in my model.

  var $virtualFields = array(
          'newdate' = 'DATE_FORMAT(Incoming.date, %d-%b-%y)'
      );

  It works as charm however now i have got another problem.

  now my new date is coming in last like this.

  SELECT `Incoming`.`time`, `Incoming`.`msisdn`, `Incoming`.`shortcode`,
  `Incoming`.`operator`, `Incoming`.`circle`, `Incoming`.`keyword`,
  `Incoming`.`answer`, `Incoming`.`age`, `Incoming`.`gender`,
  `Incoming`.`status`, *(DATE_FORMAT(`Incoming`.`date`, %d-%b-%y)) AS
  `Incoming__newdate`* FROM `incomings` AS `Incoming` WHERE
  `Incoming`.`created` = '2011-02-08 00:00:00' AND `Incoming`.`created` =
  '2011-02-20 20:55:00' ORDER BY `Incoming`.`id` desc LIMIT 20, 20

  However i want like this:

  SELECT *(DATE_FORMAT(`Incoming`.`date`, %d-%b-%y)) AS
  `Incoming__newdate`*,`Incoming`.`time`,
  `Incoming`.`msisdn`, `Incoming`.`shortcode`, `Incoming`.`operator`,
  `Incoming`.`circle`, `Incoming`.`keyword`, `Incoming`.`answer`,
  `Incoming`.`age`, `Incoming`.`gender`, `Incoming`.`status`  FROM `incomings`
  AS `Incoming` WHERE `Incoming`.`created` = '2011-02-08 00:00:00' AND
  `Incoming`.`created` = '2011-02-20 20:55:00' ORDER BY `Incoming`.`id` desc
  LIMIT 20, 20

  Please suggest.

  Regards
  Tapan Thapa
  India

  On Sun, Feb 20, 2011 at 8:28 PM, John Andersen 
  j.andersen...@gmail.comwrote:

   Please show us how the view code looks like, maybe we can suggest
   something based on that.

   If you can't then you may be able to use a virtual field for this,
   look at the CakePHP book at:
  http://book.cakephp.org/view/1608/Virtual-fields

   Enjoy,
     John

   On Feb 20, 3:45 pm, Tapan Kumar Thapa tapan.th...@hindustantimes.com
   wrote:
Unfortunately no(:-

I have an export csv option via a html link and i am not presenting this
data to my view.

Please suggest if this can be achieved in controller itself.

Regards
Tapan Thapa
India

   [snip]

   --
   Our newest site for the community: CakePHP Video Tutorials
  http://tv.cakephp.org
   Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
   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

-- 
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: Clueless...Help please

2011-01-14 Thread javier0051
Hi AD7

I actually downloaded the whole site, without leaving behind the old
folders, I mean the folder and file layout is exactly the same. I'm
not getting paid to move the site but I usually try to be helpful to
customers and in this case it's a friend's site and I don't want to
leave him stuck with this.

I saw the tute but still I don't know what's controlling that sql
sentence, I'm not new to php but since I did not develop the app I
cannot figure out where exactly is that $conditions var or array
defined, also some app's urls/buttons call some /c/ folder, defined on
the routes.php file. That folder was unexistant in the old site so I
don't understand what that /c/whatever/article-name  stands for

I'll keep on reading this is driving me insane man!

Thanks for replying!

On 13 ene, 11:41, AD7six andydawso...@gmail.com wrote:
 On Jan 12, 6:03 pm, javier0051 javier.ange...@gmail.com wrote:

  Thank you all for answering. I really appreciate it.

  My main business is hosting but I also do PHP coding but never did
  anything with cake.

  As I saw the error, as Ryan stated, it's obvious that there's
  something wrong with that sql query. The weird thing is that the site
  worked well on other box with same PHP version, same OS, same MySql
  version and same folder layout, and I'm still lost on which files make
  changes or look for the issue to correct it...

 The ones mentioned in the error message (and in replies to this
 thread).



  any suggestions on this? I'll read the tute

 By now I assume you've done this - it will have been the most valuable
 15 minutes of your cake experience :)

  but it'd be great if you
  guys can hand me a clue on what file(s) to change...

 The error is in the application - look at the stack trace. You are not
 looking at a setup problem or afaics anything related to changing
 servers - it's an error in the way whomever wrote the menus
 controller.

 From what you've said I would say it's not your responsibility to fix
 it - unless they're paying you to do so. Changing from one functional
 server to another functional server doesn't magically introduce bugs
 of this kind. The fact that it worked before and doesn't act the same
 now means nothing  in and of itself IMO - how do you know the bit of
 code generating the error was even executed on the old server - e.g.
 the old install might be relying on the existence of a cache file
 which you've (rightly) deleted when moving servers.

 hth,

 AD

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: Clueless...Help please

2011-01-13 Thread AD7six


On Jan 12, 6:03 pm, javier0051 javier.ange...@gmail.com wrote:
 Thank you all for answering. I really appreciate it.

 My main business is hosting but I also do PHP coding but never did
 anything with cake.

 As I saw the error, as Ryan stated, it's obvious that there's
 something wrong with that sql query. The weird thing is that the site
 worked well on other box with same PHP version, same OS, same MySql
 version and same folder layout, and I'm still lost on which files make
 changes or look for the issue to correct it...

The ones mentioned in the error message (and in replies to this
thread).


 any suggestions on this? I'll read the tute

By now I assume you've done this - it will have been the most valuable
15 minutes of your cake experience :)

 but it'd be great if you
 guys can hand me a clue on what file(s) to change...

The error is in the application - look at the stack trace. You are not
looking at a setup problem or afaics anything related to changing
servers - it's an error in the way whomever wrote the menus
controller.

From what you've said I would say it's not your responsibility to fix
it - unless they're paying you to do so. Changing from one functional
server to another functional server doesn't magically introduce bugs
of this kind. The fact that it worked before and doesn't act the same
now means nothing  in and of itself IMO - how do you know the bit of
code generating the error was even executed on the old server - e.g.
the old install might be relying on the existence of a cache file
which you've (rightly) deleted when moving servers.

hth,

AD



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: Clueless...Help please

2011-01-12 Thread javier0051
Thank you all for answering. I really appreciate it.

My main business is hosting but I also do PHP coding but never did
anything with cake.

As I saw the error, as Ryan stated, it's obvious that there's
something wrong with that sql query. The weird thing is that the site
worked well on other box with same PHP version, same OS, same MySql
version and same folder layout, and I'm still lost on which files make
changes or look for the issue to correct it...


any suggestions on this? I'll read the tute but it'd be great if you
guys can hand me a clue on what file(s) to change...

Thanks so much!!

On 11 ene, 14:19, Brian Mckphee jnsmit...@gmail.com wrote:
 I agree with the last few posters.  You may need to tell your client
 to look at their code.  Are you merely a hosting provider or are you a
 coder?

 On Jan 10, 8:13 am, javier0051 javier.ange...@gmail.com wrote:

  Hi

  I am a completely newbie to cake php. A new customer has a site
  developed with cake php and we recently moved the site to one of our
  boxes but we haven't been able to show all the page's content. No
  errors, the news  articles and other stuff are actually in the
  database BUT no contents are displayed. (site's main page:www.acepweb.org.ar
  Undisplayed contents example url (http://www.acepweb.org.ar/c/noticias/
  ultimas-noticias)

  The problem comes when trying to access one of the interior sections.
  The contents are in the database, the routing.php file has this line
  (Router::connect('/c/:categoria/:subcategoria', array('controller' =
  'categories', 'action' = 'view', 'categoria' = null, 'subcategoria'
  = null));) directing to some /c/ folder or whatever it is but it is
  not physically present.

  The connection to the db is established propperly but at this point I
  am totally clueless on how to get that example page to display the
  contents it used to display when hosted on the other box, with same
  cPanel, same linux operating system.

  Thank you .Help will be totally appreciated

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: Clueless...Help please

2011-01-11 Thread javier0051
Thanks for replying Tarique.

Actually I don't get any errors, the app just doesn't seem to find the
contents that were actually visible on the site mounted on the old
server. The contents are actually stored in the db... The URL is
http://www.acepweb.org.ar  The main page is totally visible but when I
click a button to get to the secondary sections, eg. news, I get not
an error message but a message indicating that no  articles were found
on the category... I'm still totally clueless about this

On 11 ene, 00:06, Dr. Tarique Sani tariques...@gmail.com wrote:
 Can't seem to reach the URL you have mentioned but have you tried
 setting the Debug on?

 Probably you are not seeing any errors because Debug is set to 0

 HTH
 Tarique

 On Mon, Jan 10, 2011 at 7:43 PM, javier0051 javier.ange...@gmail.com wrote:
  Hi

  I am a completely newbie to cake php. A new customer has a site
  developed with cake php and we recently moved the site to one of our
  boxes but we haven't been able to show all the page's content. No
  errors, the news  articles and other stuff are actually in the
  database BUT no contents are displayed. (site's main page:www.acepweb.org.ar
  Undisplayed contents example url (http://www.acepweb.org.ar/c/noticias/
  ultimas-noticias)

  The problem comes when trying to access one of the interior sections.
  The contents are in the database, the routing.php file has this line
  (Router::connect('/c/:categoria/:subcategoria', array('controller' =
  'categories', 'action' = 'view', 'categoria' = null, 'subcategoria'
  = null));) directing to some /c/ folder or whatever it is but it is
  not physically present.

  The connection to the db is established propperly but at this point I
  am totally clueless on how to get that example page to display the
  contents it used to display when hosted on the other box, with same
  cPanel, same linux operating system.

  Thank you .Help will be totally appreciated

  Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
  with their CakePHP related questions.

  You received this message because you are subscribed to the Google Groups 
  CakePHP group.
  To post to this group, send email to cake-php@googlegroups.com
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group 
  athttp://groups.google.com/group/cake-php?hl=en

 --
 =
 Cheesecake-Photoblog:http://cheesecake-photoblog.org
 PHP for E-Biz:http://sanisoft.com
 =

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Clueless...Help please

2011-01-11 Thread javier0051
Alright... I set the debug mode to 1 under config/core.php... There's
indeed an error (thoug the site is setup just as in the old machine).
This is what I'm getting:

---
Warning (512): SQL Error: 1054: Unknown column 'conditions' in 'where
clause' [CORE/cake/libs/model/datasources/dbo_source.php, line 525]

Code | Context

$sql=   SELECT COUNT(*) AS `count` FROM `articles` AS `Article` LEFT
JOIN `categories` AS `Category` ON (`Article`.`category_id` =
`Category`.`id`) LEFT JOIN `images` AS `Image` ON
(`Image`.`foreign_id` = `Article`.`id` AND `Image`.`thumb` = 1 AND
`Image`.`model` = 'Article') LEFT JOIN `galleries` AS `Gallery` ON
(`Gallery`.`article_id` = `Article`.`id`)  WHERE conditions = ('43')

$error  =   1054: Unknown column 'conditions' in 'where clause'
$out=   null

$out = null;
if ($error) {
trigger_error(span style = \color:Red;text-
align:left\bSQL Error:/b {$this-error}/span,
E_USER_WARNING);

DboSource::showQuery() - CORE/cake/libs/model/datasources/
dbo_source.php, line 525
DboSource::execute() - CORE/cake/libs/model/datasources/
dbo_source.php, line 201
DboSource::fetchAll() - CORE/cake/libs/model/datasources/
dbo_source.php, line 336
DboSource::read() - CORE/cake/libs/model/datasources/dbo_source.php,
line 653
Model::find() - CORE/cake/libs/model/model.php, line 1988
Controller::paginate() - CORE/cake/libs/controller/controller.php,
line 1070
CategoriesController::view() - APP/controllers/
categories_controller.php, line 39
Object::dispatchMethod() - CORE/cake/libs/object.php, line 116
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194
[main] - APP/webroot/index.php, line 84

Query: SELECT COUNT(*) AS `count` FROM `articles` AS `Article` LEFT
JOIN `categories` AS `Category` ON (`Article`.`category_id` =
`Category`.`id`) LEFT JOIN `images` AS `Image` ON
(`Image`.`foreign_id` = `Article`.`id` AND `Image`.`thumb` = 1 AND
`Image`.`model` = 'Article') LEFT JOIN `galleries` AS `Gallery` ON
(`Gallery`.`article_id` = `Article`.`id`) WHERE conditions = ('43')

Query: SELECT `Article`.`id`, `Article`.`title`, `Article`.`preview`,
`Article`.`body`, `Article`.`category_id`, `Article`.`created`,
`Article`.`modified`, `Article`.`hot`, `Category`.`id`,
`Category`.`name`, `Category`.`description`, `Category`.`parent_id`,
`Category`.`url`, `Category`.`show_date`, `Category`.`order`,
`Image`.`id`, `Image`.`model`, `Image`.`foreign_id`,
`Image`.`filename`, `Image`.`dir`, `Image`.`mimetype`,
`Image`.`filesize`, `Image`.`height`, `Image`.`width`,
`Image`.`thumb`, `Image`.`description`, `Image`.`order`,
`Image`.`created`, `Image`.`modified`, `Gallery`.`id`,
`Gallery`.`name`, `Gallery`.`created`, `Gallery`.`article_id` FROM
`articles` AS `Article` LEFT JOIN `categories` AS `Category` ON
(`Article`.`category_id` = `Category`.`id`) LEFT JOIN `images` AS
`Image` ON (`Image`.`foreign_id` = `Article`.`id` AND `Image`.`thumb`
= 1 AND `Image`.`model` = 'Article') LEFT JOIN `galleries` AS
`Gallery` ON (`Gallery`.`article_id` = `Article`.`id`) WHERE
conditions = ('43') ORDER BY `Article`.`created` DESC LIMIT 10

ACEP: Asociación Civil Estudios Populares

* Home
* Sobre Nosotros
* Contacto

  Warning (512): SQL Error: 1064: You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version
for the right syntax to use near '__resetAssociations' at line 1 [CORE/
cake/libs/model/datasources/dbo_source.php, line 525]

  Code | Context

  $sql  =   __resetAssociations
  $error=   1064: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near '__resetAssociations' at line 1
  $out  =   null

  $out = null;
  if ($error) {
  trigger_error(span style = \color:Red;text-
align:left\bSQL Error:/b {$this-error}/span,
E_USER_WARNING);

  DboSource::showQuery() - CORE/cake/libs/model/datasources/
dbo_source.php, line 525
  DboSource::execute() - CORE/cake/libs/model/datasources/
dbo_source.php, line 201
  DboSource::fetchAll() - CORE/cake/libs/model/datasources/
dbo_source.php, line 336
  DboSource::query() - CORE/cake/libs/model/datasources/
dbo_source.php, line 297
  Model::call__() - CORE/cake/libs/model/model.php, line 441
  Overloadable::__call() - CORE/cake/libs/overloadable_php5.php,
line 52
  Button::__resetAssociations() - [internal], line ??
  BindableBehavior::resetBindable() - APP/models/behaviors/
bindable.php, line 258
  BindableBehavior::afterFind() - APP/models/behaviors/
bindable.php, line 317
  

Re: Clueless...Help please

2011-01-11 Thread Ryan Schmidt

On Jan 11, 2011, at 07:10, javier0051 wrote:

 Alright... I set the debug mode to 1 under config/core.php... There's
 indeed an error (thoug the site is setup just as in the old machine).
 This is what I'm getting:
 
 ---
 Warning (512): SQL Error: 1054: Unknown column 'conditions' in 'where
 clause' [CORE/cake/libs/model/datasources/dbo_source.php, line 525]
 
 Code | Context
 
 $sql  =   SELECT COUNT(*) AS `count` FROM `articles` AS `Article` LEFT
 JOIN `categories` AS `Category` ON (`Article`.`category_id` =
 `Category`.`id`) LEFT JOIN `images` AS `Image` ON
 (`Image`.`foreign_id` = `Article`.`id` AND `Image`.`thumb` = 1 AND
 `Image`.`model` = 'Article') LEFT JOIN `galleries` AS `Gallery` ON
 (`Gallery`.`article_id` = `Article`.`id`)  WHERE conditions = ('43')
 
 $error=   1054: Unknown column 'conditions' in 'where clause'

At the risk of stating the obvious, it sounds like there is no column called 
conditions. Is there a column called conditions in any of the tables being 
used in this query? (Off hand, I'm not sure which table it wants that column to 
be in.)

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: Clueless...Help please

2011-01-11 Thread AD7six


On Jan 11, 3:37 pm, Ryan Schmidt google-2...@ryandesign.com wrote:
 On Jan 11, 2011, at 07:10, javier0051 wrote:
  Code | Context

  $sql       =       SELECT COUNT(*) AS `count` FROM `articles` AS `Article` 
  LEFT
  JOIN `categories` AS `Category` ON (`Article`.`category_id` =
  `Category`.`id`) LEFT JOIN `images` AS `Image` ON
  (`Image`.`foreign_id` = `Article`.`id` AND `Image`.`thumb` = 1 AND
  `Image`.`model` = 'Article') LEFT JOIN `galleries` AS `Gallery` ON
  (`Gallery`.`article_id` = `Article`.`id`)  WHERE conditions = ('43')
  
  $error     =       1054: Unknown column 'conditions' in 'where clause'

 At the risk of stating the obvious, it sounds like there is no column called 
 conditions.

a missing field named conditions shouts app-code error to me. Given it
comes from a paginate call, I guess this is in the code:

-paginate(array('conditions' = array(43)));

which is simply wrong.

javier I'd suggest doing the blog tutorial before continuing - it'll
answer these sort of problems for you by example.

AD
ps. there's a spanish google group cakephp-esp

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: Clueless...Help please

2011-01-11 Thread Devario Johnson
that error usually happens when a call to a find query (in this case a
paginate query) is written wrong.  That seems like an app error not
hosting.

On Jan 11, 9:07 am, AD7six andydawso...@gmail.com wrote:
 On Jan 11, 3:37 pm, Ryan Schmidt google-2...@ryandesign.com wrote:

  On Jan 11, 2011, at 07:10, javier0051 wrote:
   Code | Context

   $sql       =       SELECT COUNT(*) AS `count` FROM `articles` AS 
   `Article` LEFT
   JOIN `categories` AS `Category` ON (`Article`.`category_id` =
   `Category`.`id`) LEFT JOIN `images` AS `Image` ON
   (`Image`.`foreign_id` = `Article`.`id` AND `Image`.`thumb` = 1 AND
   `Image`.`model` = 'Article') LEFT JOIN `galleries` AS `Gallery` ON
   (`Gallery`.`article_id` = `Article`.`id`)  WHERE conditions = ('43')
   
   $error     =       1054: Unknown column 'conditions' in 'where clause'

  At the risk of stating the obvious, it sounds like there is no column 
  called conditions.

 a missing field named conditions shouts app-code error to me. Given it
 comes from a paginate call, I guess this is in the code:

 -paginate(array('conditions' = array(43)));

 which is simply wrong.

 javier I'd suggest doing the blog tutorial before continuing - it'll
 answer these sort of problems for you by example.

 AD
 ps. there's a spanish google group cakephp-esp

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: Clueless...Help please

2011-01-11 Thread Brian Mckphee
I agree with the last few posters.  You may need to tell your client
to look at their code.  Are you merely a hosting provider or are you a
coder?

On Jan 10, 8:13 am, javier0051 javier.ange...@gmail.com wrote:
 Hi

 I am a completely newbie to cake php. A new customer has a site
 developed with cake php and we recently moved the site to one of our
 boxes but we haven't been able to show all the page's content. No
 errors, the news  articles and other stuff are actually in the
 database BUT no contents are displayed. (site's main page:www.acepweb.org.ar
 Undisplayed contents example url (http://www.acepweb.org.ar/c/noticias/
 ultimas-noticias)

 The problem comes when trying to access one of the interior sections.
 The contents are in the database, the routing.php file has this line
 (Router::connect('/c/:categoria/:subcategoria', array('controller' =
 'categories', 'action' = 'view', 'categoria' = null, 'subcategoria'
 = null));) directing to some /c/ folder or whatever it is but it is
 not physically present.

 The connection to the db is established propperly but at this point I
 am totally clueless on how to get that example page to display the
 contents it used to display when hosted on the other box, with same
 cPanel, same linux operating system.

 Thank you .Help will be totally appreciated

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


Clueless...Help please

2011-01-10 Thread javier0051
Hi

I am a completely newbie to cake php. A new customer has a site
developed with cake php and we recently moved the site to one of our
boxes but we haven't been able to show all the page's content. No
errors, the news  articles and other stuff are actually in the
database BUT no contents are displayed. (site's main page: www.acepweb.org.ar
Undisplayed contents example url (http://www.acepweb.org.ar/c/noticias/
ultimas-noticias)

The problem comes when trying to access one of the interior sections.
The contents are in the database, the routing.php file has this line
(Router::connect('/c/:categoria/:subcategoria', array('controller' =
'categories', 'action' = 'view', 'categoria' = null, 'subcategoria'
= null));) directing to some /c/ folder or whatever it is but it is
not physically present.

The connection to the db is established propperly but at this point I
am totally clueless on how to get that example page to display the
contents it used to display when hosted on the other box, with same
cPanel, same linux operating system.

Thank you .Help will be totally appreciated

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: Clueless...Help please

2011-01-10 Thread Dr. Tarique Sani
Can't seem to reach the URL you have mentioned but have you tried
setting the Debug on?

Probably you are not seeing any errors because Debug is set to 0

HTH
Tarique


On Mon, Jan 10, 2011 at 7:43 PM, javier0051 javier.ange...@gmail.com wrote:
 Hi

 I am a completely newbie to cake php. A new customer has a site
 developed with cake php and we recently moved the site to one of our
 boxes but we haven't been able to show all the page's content. No
 errors, the news  articles and other stuff are actually in the
 database BUT no contents are displayed. (site's main page: www.acepweb.org.ar
 Undisplayed contents example url (http://www.acepweb.org.ar/c/noticias/
 ultimas-noticias)

 The problem comes when trying to access one of the interior sections.
 The contents are in the database, the routing.php file has this line
 (Router::connect('/c/:categoria/:subcategoria', array('controller' =
 'categories', 'action' = 'view', 'categoria' = null, 'subcategoria'
 = null));) directing to some /c/ folder or whatever it is but it is
 not physically present.

 The connection to the db is established propperly but at this point I
 am totally clueless on how to get that example page to display the
 contents it used to display when hosted on the other box, with same
 cPanel, same linux operating system.

 Thank you .Help will be totally appreciated

 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




-- 
=
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Clueless...Help please

2011-01-10 Thread Dr. Loboto
Check error logs. And/or turn debug on and go to page to see actual
errors.

On Jan 10, 8:13 pm, javier0051 javier.ange...@gmail.com wrote:
 Hi

 I am a completely newbie to cake php. A new customer has a site
 developed with cake php and we recently moved the site to one of our
 boxes but we haven't been able to show all the page's content. No
 errors, the news  articles and other stuff are actually in the
 database BUT no contents are displayed. (site's main page:www.acepweb.org.ar
 Undisplayed contents example url (http://www.acepweb.org.ar/c/noticias/
 ultimas-noticias)

 The problem comes when trying to access one of the interior sections.
 The contents are in the database, the routing.php file has this line
 (Router::connect('/c/:categoria/:subcategoria', array('controller' =
 'categories', 'action' = 'view', 'categoria' = null, 'subcategoria'
 = null));) directing to some /c/ folder or whatever it is but it is
 not physically present.

 The connection to the db is established propperly but at this point I
 am totally clueless on how to get that example page to display the
 contents it used to display when hosted on the other box, with same
 cPanel, same linux operating system.

 Thank you .Help will be totally appreciated

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: Clueless...Help please

2011-01-10 Thread Ryan Schmidt
On Jan 10, 2011, at 08:13, javier0051 wrote:

 No errors, the news  articles and other stuff are actually in the
 database BUT no contents are displayed. (site's main page: www.acepweb.org.ar
 Undisplayed contents example url (http://www.acepweb.org.ar/c/noticias/
 ultimas-noticias)
 
 The problem comes when trying to access one of the interior sections.
 The contents are in the database, the routing.php file has this line
 (Router::connect('/c/:categoria/:subcategoria', array('controller' =
 'categories', 'action' = 'view', 'categoria' = null, 'subcategoria'
 = null));) directing to some /c/ folder or whatever it is but it is
 not physically present.

Router::connect() is not directing to some /c/ folder or whatever; 
Router::connect() informs CakePHP that when a visitor accesses a URL of the 
form /c/:categoria/:subcategoria (where :categoria and :subcategoria are 
placeholders which stand for any value), CakePHP will invoke the view method 
of the categories controller. You may want to spend some more time reading 
the CakePHP documentation to better understand this and other basics of CakePHP 
applications.

http://book.cakephp.org/view/875/x1-3-Collection





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: Problem with models....help please!!!

2010-06-07 Thread dtemes
I think you have a typo:

var $actAs = array('Containable');

should be

var $actsAs = array('Containable');

you forgot the 's'



On 6 jun, 21:09, Christopher Hanson phpcoder2...@gmail.com wrote:
 hey, i tried the following

 ?php

 class Invoice extends AppModel
 {

      var $name = 'Invoice';
      var $actAs = array('Containable');
      var $hasMany = array(
          'InvoiceRows' = array(
              'className' = 'InvoiceRows',
              'foreignKey' = 'invoice_id',
              'order' = 'InvoiceRows.delta ASC',
          ),
      );
      var $belongsTo = array(
          'Client' = array(
              'className' = 'Client',
          ),
      );

 }

 and

 ?php

 class InvoicesController extends AppController
 {

      var $name = 'Invoices';

      function index(){}

      function view($invoice_id)
      {

          $this-Invoice-contain('Country');
          $data = $this-Invoice-find('all');
          //$data = $this-Invoice-findById($invoice_id);
          debug($data);
          $this-set('client_data', $data);

      }

 }

 also even if i try contain(); it still comes back with this error

 *Warning*  (512)  javascript:void(0);:*SQL Error:*  1064: You have an error 
 in your SQL syntax; check the manual that corresponds to your MySQL server 
 version for the right syntax to use near 'contain' at line 1  
 [*CORE\cake\libs\model\datasources\dbo_source.php*, line*673*]

 Chris

 --
 Best Regards Christopher Hanson

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: Problem with models....help please!!!

2010-06-07 Thread Christopher Hanson

On 06/06/2010 20:18, Jens Ulf Dittrich wrote:
I guess you have no Class InvoiceRows in your Models. I think your 
Invoice AppModel should be something like:


...
var $hasMany = array(
'InvoiceRows' = array( // I guess that is ok for the name
'className' = 'Invoice', // -- this one has to be a name of 
an actually existing Model/Table

.


Hi Jens

InvoiceRows works fine alrready, i Have classname as InvoiceRows, a 
table in db invoice_rows and model file invoice_rows.php but thanks for 
the help anyway.


--
Best Regards Christopher Hanson

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


Problem with models....help please!!!

2010-06-06 Thread phpcoder2...@googlemail.com
Hey guys, new here so please be gentle ;) lol here is my issue i need
help getting my head around.

I have the following models

invoice.php
client.php
country.php

client has country_id in db which relates to id in the country table
and pulls the correct country. this pulls out by using belongsTo
country in my client model and works great! my problem now is when i
go into an invoice it pulls the the client because im using belongsTo
client in the invoice model and using hasMany invoices in my client
model, this works great except the invoice only pulls the client
details along with the invoice data and doesnt fetch the country...
can anyone help me?

heres the code too:

invoice model

?php

class Invoice extends AppModel
{

var $name = 'Invoice';
var $hasMany = array(
'InvoiceRows' = array(
'className' = 'InvoicesRows',
'foreignKey' = 'invoice_id',
'order' = 'InvoiceRows.delta ASC',
),
);
var $belongsTo = array(
'Client' = array(
'className' = 'Client',
),
);

}

my client model

?php

class Client extends AppModel
{

var $name = 'Client';
var $hasMany = array(
'Invoices' = array(
'className' = 'Invoice',
'foreignKey' = 'client_id',
'order' = 'Invoices.invoice_no DESC',
),
);
var $belongsTo = array(
'Country' = array(
'className' = 'Country',
'foreignKey' = 'country_id',
),
);

}

can anyone see anything wrong?

thanks Chris

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: Problem with models....help please!!!

2010-06-06 Thread John Andersen
There is nothing wrong with your associations/relationships between
the Invoice, Client and Country models.
You just have to read up on the recursive attribute in the model, see:
http://book.cakephp.org/view/1057/Model-Attributes#recursive-1063

That should give you a hint :)

Next I suggest you study the Containable behavior, as that will make
life easier for you in the future, with regard to finding related
information. See:
http://book.cakephp.org/view/1323/Containable

Last I also suggest you conform to the CakePHP conventions, see:
http://book.cakephp.org/view/901/CakePHP-Conventions
Note specially the Model naming (hint: className = InvoicesRows)!

Enjoy,
   John

On Jun 6, 7:05 pm, phpcoder2...@googlemail.com
phpcoder2...@gmail.com wrote:
 Hey guys, new here so please be gentle ;) lol here is my issue i need
 help getting my head around.

 I have the following models

 invoice.php
 client.php
 country.php

 client has country_id in db which relates to id in the country table
 and pulls the correct country. this pulls out by using belongsTo
 country in my client model and works great! my problem now is when i
 go into an invoice it pulls the the client because im using belongsTo
 client in the invoice model and using hasMany invoices in my client
 model, this works great except the invoice only pulls the client
 details along with the invoice data and doesnt fetch the country...
 can anyone help me?

 heres the code too:

 invoice model

 ?php

 class Invoice extends AppModel
 {

     var $name = 'Invoice';
     var $hasMany = array(
         'InvoiceRows' = array(
             'className' = 'InvoicesRows',
             'foreignKey' = 'invoice_id',
             'order' = 'InvoiceRows.delta ASC',
         ),
     );
     var $belongsTo = array(
         'Client' = array(
             'className' = 'Client',
         ),
     );

 }

 my client model

 ?php

 class Client extends AppModel
 {

     var $name = 'Client';
     var $hasMany = array(
         'Invoices' = array(
             'className' = 'Invoice',
             'foreignKey' = 'client_id',
             'order' = 'Invoices.invoice_no DESC',
         ),
     );
     var $belongsTo = array(
         'Country' = array(
             'className' = 'Country',
             'foreignKey' = 'country_id',
         ),
     );

 }

 can anyone see anything wrong?

 thanks Chris

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: Problem with models....help please!!!

2010-06-06 Thread Christopher Hanson

On 06/06/2010 18:54, John Andersen wrote:

There is nothing wrong with your associations/relationships between
the Invoice, Client and Country models.
You just have to read up on the recursive attribute in the model, see:
http://book.cakephp.org/view/1057/Model-Attributes#recursive-1063

That should give you a hint :)

Next I suggest you study the Containable behavior, as that will make
life easier for you in the future, with regard to finding related
information. See:
http://book.cakephp.org/view/1323/Containable

Last I also suggest you conform to the CakePHP conventions, see:
http://book.cakephp.org/view/901/CakePHP-Conventions
Note specially the Model naming (hint: className =  InvoicesRows)!

Enjoy,
John

On Jun 6, 7:05 pm, phpcoder2...@googlemail.com
phpcoder2...@gmail.com  wrote:
   

Hey guys, new here so please be gentle ;) lol here is my issue i need
help getting my head around.

I have the following models

invoice.php
client.php
country.php

client has country_id in db which relates to id in the country table
and pulls the correct country. this pulls out by using belongsTo
country in my client model and works great! my problem now is when i
go into an invoice it pulls the the client because im using belongsTo
client in the invoice model and using hasMany invoices in my client
model, this works great except the invoice only pulls the client
details along with the invoice data and doesnt fetch the country...
can anyone help me?

heres the code too:

invoice model

?php

class Invoice extends AppModel
{

 var $name = 'Invoice';
 var $hasMany = array(
 'InvoiceRows' =  array(
 'className' =  'InvoicesRows',
 'foreignKey' =  'invoice_id',
 'order' =  'InvoiceRows.delta ASC',
 ),
 );
 var $belongsTo = array(
 'Client' =  array(
 'className' =  'Client',
 ),
 );

}

my client model

?php

class Client extends AppModel
{

 var $name = 'Client';
 var $hasMany = array(
 'Invoices' =  array(
 'className' =  'Invoice',
 'foreignKey' =  'client_id',
 'order' =  'Invoices.invoice_no DESC',
 ),
 );
 var $belongsTo = array(
 'Country' =  array(
 'className' =  'Country',
 'foreignKey' =  'country_id',
 ),
 );

}

can anyone see anything wrong?

thanks Chris
 

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
   
thanks for your reply John, id just stumbled upon recursive before thie 
email, its bringing my Country data but inside of the Client data, every 
where else im accessing it outside Client, so Client - data, Country - 
data but recursive is fetching Client - data, Country. I though id 
changed InvoicesRow to InvoiceRows (thats better right?); guess i hadnt 
lol, thanks


Chris

--
Best Regards Christopher Hanson

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: Problem with models....help please!!!

2010-06-06 Thread Christopher Hanson
also i have been reading on containable and i just get SQL errors when i 
try to use either $this-Model-contain() or in the params for find, any 
ideas whats gong wrong?


--
Best Regards Christopher Hanson

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: Problem with models....help please!!!

2010-06-06 Thread John Andersen
Have you added the Containable behavior to your model(s) or even
better to the AppModel? Like:
[code]
var $actsAs = array('Containable');
[/code]

Only after doing that, can you use it!

If you have done it, then please show the code of your find statement
including the contain conditions..
Enjoy,
   John

On Jun 6, 9:34 pm, Christopher Hanson phpcoder2...@gmail.com wrote:
 also i have been reading on containable and i just get SQL errors when i
 try to use either $this-Model-contain() or in the params for find, any
 ideas whats gong wrong?

 --
 Best Regards Christopher Hanson

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: Problem with models....help please!!!

2010-06-06 Thread Christopher Hanson

On 06/06/2010 19:51, John Andersen wrote:

Have you added the Containable behavior to your model(s) or even
better to the AppModel? Like:
[code]
var $actsAs = array('Containable');
[/code]

Only after doing that, can you use it!

If you have done it, then please show the code of your find statement
including the contain conditions..
Enjoy,
John

On Jun 6, 9:34 pm, Christopher Hansonphpcoder2...@gmail.com  wrote:
   

also i have been reading on containable and i just get SQL errors when i
try to use either $this-Model-contain() or in the params for find, any
ideas whats gong wrong?

--
Best Regards Christopher Hanson
 

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
   
Johndont beat me with a bati forgot that bit :D lol how would 
you suggest i get the country data pulling right in my invoice data? if 
you dont mind me askin


thanks and ill try the above now.

Chris

--
Best Regards Christopher Hanson

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: Problem with models....help please!!!

2010-06-06 Thread Christopher Hanson

hey, i tried the following

?php

class Invoice extends AppModel
{

var $name = 'Invoice';
var $actAs = array('Containable');
var $hasMany = array(
'InvoiceRows' = array(
'className' = 'InvoiceRows',
'foreignKey' = 'invoice_id',
'order' = 'InvoiceRows.delta ASC',
),
);
var $belongsTo = array(
'Client' = array(
'className' = 'Client',
),
);

}

and

?php

class InvoicesController extends AppController
{

var $name = 'Invoices';

function index(){}

function view($invoice_id)
{


$this-Invoice-contain('Country');
$data = $this-Invoice-find('all');
//$data = $this-Invoice-findById($invoice_id);
debug($data);
$this-set('client_data', $data);

}

}

also even if i try contain(); it still comes back with this error

*Warning*  (512)  javascript:void(0);:*SQL Error:*  1064: You have an error 
in your SQL syntax; check the manual that corresponds to your MySQL server version 
for the right syntax to use near 'contain' at line 1  
[*CORE\cake\libs\model\datasources\dbo_source.php*, line*673*]

Chris

--
Best Regards Christopher Hanson

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: Problem with models....help please!!!

2010-06-06 Thread John Andersen
First, to make sure that your association between Invoice and
InvoiceRow does not affect the issue solving, please comment it out in
your Invoice model!

Taking your example, finding invoices from within the Invoices
controller, then you must specify the Containable conditions as:

[code]
$this-Invoice-find(
   'all',
   array(
  'contain' = array(
 'Client' = array(
'Country'
 )
  )
   )
);
[/code]

The reason is the Country is related through the Client. This will
mean that the Country record will be located inside the Client record.

Try it out and tell us what you got and whether it helped you on the
way :)
Enjoy,
   John

On Jun 6, 10:09 pm, Christopher Hanson phpcoder2...@gmail.com wrote:
 hey, i tried the following

 ?php

 class Invoice extends AppModel
 {

      var $name = 'Invoice';
      var $actAs = array('Containable');
      var $hasMany = array(
          'InvoiceRows' = array(
              'className' = 'InvoiceRows',
              'foreignKey' = 'invoice_id',
              'order' = 'InvoiceRows.delta ASC',
          ),
      );
      var $belongsTo = array(
          'Client' = array(
              'className' = 'Client',
          ),
      );

 }

 and

 ?php

 class InvoicesController extends AppController
 {

      var $name = 'Invoices';

      function index(){}

      function view($invoice_id)
      {

          $this-Invoice-contain('Country');
          $data = $this-Invoice-find('all');
          //$data = $this-Invoice-findById($invoice_id);
          debug($data);
          $this-set('client_data', $data);

      }

 }

 also even if i try contain(); it still comes back with this error

 *Warning*  (512)  javascript:void(0);:*SQL Error:*  1064: You have an error 
 in your SQL syntax; check the manual that corresponds to your MySQL server 
 version for the right syntax to use near 'contain' at line 1  
 [*CORE\cake\libs\model\datasources\dbo_source.php*, line*673*]

 Chris

 --
 Best Regards Christopher Hanson

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: Problem with models....help please!!!

2010-06-06 Thread Christopher Hanson
thanks John, tried that but still doesnt fetch any country data, im 
really not sure where the problem is :( any other suggestions? thanks


--
Best Regards Christopher Hanson

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: Problem with models....help please!!!

2010-06-06 Thread Christopher Hanson

On 06/06/2010 20:28, John Andersen wrote:

First, to make sure that your association between Invoice and
InvoiceRow does not affect the issue solving, please comment it out in
your Invoice model!

Taking your example, finding invoices from within the Invoices
controller, then you must specify the Containable conditions as:

[code]
$this-Invoice-find(
'all',
array(
   'contain' =  array(
  'Client' =  array(
 'Country'
  )
   )
)
);
[/code]

The reason is the Country is related through the Client. This will
mean that the Country record will be located inside the Client record.

Try it out and tell us what you got and whether it helped you on the
way :)
Enjoy,
John

On Jun 6, 10:09 pm, Christopher Hansonphpcoder2...@gmail.com  wrote:
   

hey, i tried the following

?php

class Invoice extends AppModel
{

  var $name = 'Invoice';
  var $actAs = array('Containable');
  var $hasMany = array(
  'InvoiceRows' =  array(
  'className' =  'InvoiceRows',
  'foreignKey' =  'invoice_id',
  'order' =  'InvoiceRows.delta ASC',
  ),
  );
  var $belongsTo = array(
  'Client' =  array(
  'className' =  'Client',
  ),
  );

}

and

?php

class InvoicesController extends AppController
{

  var $name = 'Invoices';

  function index(){}

  function view($invoice_id)
  {

  $this-Invoice-contain('Country');
  $data = $this-Invoice-find('all');
  //$data = $this-Invoice-findById($invoice_id);
  debug($data);
  $this-set('client_data', $data);

  }

}

also even if i try contain(); it still comes back with this error

*Warning*  (512)javascript:void(0);:*SQL Error:*  1064: You have an error in 
your SQL syntax; check the manual that corresponds to your MySQL server version for 
the right syntax to use near 'contain' at line 1  
[*CORE\cake\libs\model\datasources\dbo_source.php*, line*673*]

Chris

--
Best Regards Christopher Hanson
 

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
   
i do have it working now, is noticed a mistake in invoice.php, $asctAs 
instead of $actsAs, i now get countries, do you know how to display the 
Country data in the same way on the client data so i can keep same 
variable access?


thanks

--
Best Regards Christopher Hanson

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: Problem with models....help please!!!

2010-06-06 Thread Jens Ulf Dittrich
I guess you have no Class InvoiceRows in your Models. I think your 
Invoice AppModel should be something like:


...
var $hasMany = array(
'InvoiceRows' = array( // I guess that is ok for the name
'className' = 'Invoice', // -- this one has to be a name of 
an actually existing Model/Table

.

Am 06.06.2010 21:09, schrieb Christopher Hanson:

hey, i tried the following

?php

class Invoice extends AppModel
{

var $name = 'Invoice';
var $actAs = array('Containable');
var $hasMany = array(
'InvoiceRows' = array(
'className' = 'InvoiceRows',
'foreignKey' = 'invoice_id',
'order' = 'InvoiceRows.delta ASC',
),
);
var $belongsTo = array(
'Client' = array(
'className' = 'Client',
),
);

}

and

?php

class InvoicesController extends AppController
{

var $name = 'Invoices';

function index(){}

function view($invoice_id)
{


$this-Invoice-contain('Country');
$data = $this-Invoice-find('all');
//$data = $this-Invoice-findById($invoice_id);
debug($data);
$this-set('client_data', $data);

}

}

also even if i try contain(); it still comes back with this error

*Warning*  (512)  javascript:void(0);:*SQL Error:*  1064: You have an error 
in your SQL syntax; check the manual that corresponds to your MySQL server version 
for the right syntax to use near 'contain' at line 1  
[*CORE\cake\libs\model\datasources\dbo_source.php*, line*673*]
Chris

--
Best Regards Christopher Hanson
Check out the new CakePHP Questions site http://cakeqs.org and help 
others with their CakePHP related questions.


You received this message because you are subscribed to the Google 
Groups CakePHP group.

To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this 
group at http://groups.google.com/group/cake-php?hl=en


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Help please.... Postgres find() returns different array format as Mysql find()

2010-04-19 Thread Adam
Do I just have to re-write my application if I'm using Postgres? I
thought I could switch databases
and cake would handle it for me?

The array format for associated tables is different in Postgres than
it is in Mysql

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: [HELP PLEASE] Question: HABTM

2010-01-28 Thread Alexandru Ciobanu

On 1/27/2010 2:06 PM, Douglas Pacheco Cardoso wrote:

I have 3 tables:
  - Users
  - Locals - access locals of the system.
  - Permissions - Table N:M with the fields (id, user_id, local_id, 
_add, _read, _delete, _update)


I created a page for managing permissions, but I have a problem, 
because when I execute saveAll method, is saving only the fields: 
user_id and local_id, not the specific fields.


Anybody have a tip for me?



http://teknoid.wordpress.com/2008/09/24/saving-extra-fields-in-the-join-table-for-habtm-models/

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: [HELP PLEASE] Question: HABTM

2010-01-28 Thread Douglas Pacheco Cardoso
Thank you Alexandru Ciobanu...I'll test...

Douglas Pacheco Cardoso


2010/1/28 Alexandru Ciobanu ics.cake...@gmail.com

 On 1/27/2010 2:06 PM, Douglas Pacheco Cardoso wrote:

 I have 3 tables:
  - Users
  - Locals - access locals of the system.
  - Permissions - Table N:M with the fields (id, user_id, local_id, _add,
 _read, _delete, _update)

 I created a page for managing permissions, but I have a problem, because
 when I execute saveAll method, is saving only the fields: user_id and
 local_id, not the specific fields.

 Anybody have a tip for me?



 http://teknoid.wordpress.com/2008/09/24/saving-extra-fields-in-the-join-table-for-habtm-models/


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


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


[HELP PLEASE] Question: HABTM

2010-01-27 Thread Douglas Pacheco Cardoso
Hi,

I have a question about HABTM.

I'm making a access permission system itself, because I don't need the
complexity of the ACL.
I have 3 tables:
  - Users
  - Locals - access locals of the system.
  - Permissions - Table N:M with the fields (id, user_id, local_id, _add,
_read, _delete, _update)

I created a page for managing permissions, but I have a problem, because
when I execute saveAll method, is saving only the fields: user_id and
local_id, not the specific fields.

Anybody have a tip for me?

thank you,

Douglas Pacheco Cardoso

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: Order results by related model totals (help please)

2009-12-05 Thread nurvzy
Well, I can think of a few ways to achieve the desired result you're
looking for.  First of all, you should be doing that 'last_job' key
creation in your Project model's afterFind($results) callback if
you're going to go down the array manipulation route.

In regards to pagination, you could do it yourself manually using
custom pagination. You'd pass in 
http://www.yoursite.com/projects/index/sort:last_hour/
and in the controller look for $this-params['named']['sort'] ==
'last_hour' and organize your returning pagination accordingly.

However, I think the cleanest way I would approach this is with a
beforeSave() either in the Project or Job model that creates a
'last_job' key for that project and saves it to the database.  in the
Job model it would update its parent Project on any new job created
under that project, or in the Project model it would only update upon
updating the parent project.  Not knowing your application I would
suggest the Job model that way you can be sure your Project's last_job
is always correct on job creations/updates.  This way you'd be able to
use database sorting which is always faster.  All your PHP intensive
array organization would only occur on a save, not on every retrieval
of the data as you're currently doing.

Here's some reading on Model Callbacks: 
http://book.cakephp.org/view/76/Callback-Methods

Hope that helps,
Nick


On Dec 4, 4:47 am, otherphil otherphi...@gmail.com wrote:
 hi, this is my first post. I am new to cakePHP (and databases in
 general).

 I have built a little application with a table called Projects and a
 table called Jobs.

 a project has many Jobs.

 a job has (amongst others) a 'hours' field and a 'date' field.

 I have an index page for the projects which lists all the projects,
 showing the name, the last job and the total hours for that project.
 There is a paginator whichs breaks up the results. At the moment I am
 finding the last job and the total hours by searching through the
 results after they are returned (see code below).

 My problem is that I want to be able to order the results by the last
 job or by the total hours. Can someone explain the best way to do this
 please. My only ideas are

 1. that I can manually re-sort the array returned by the find query
 but I have no idea how this would work with the paginator, or
 2. to use 2 new fields on the projects table - total hours and last
 job - but it seems like this would be redundant information which can
 be found in the jobs table.

 below is my code in the Projects controller. Everything works (there
 are no errors) I just need to know how to do what I mentioned above.

 Thanks very much for any help you can give. I'm sorry if this has been
 answered before (I did look)

 - Phil

   function index() {

     $this-Project-Behaviors-attach('Containable');
     $this-Project-contain(array('Job.date', 'Job.hours',
 'Client.name'));

     $conditions = array();

     //$projects = $this-Project-find('all', array('order' =
 'Project.name DESC', 'conditions' = $conditions));
     $projects = $this-paginate('Project', $conditions);

     // for each project find the last job and record it in the array
     for  ($i = 0; $icount($projects); $i++) {

       $proj_id = $projects[$i]['Project']['id'];

       // create a new member of the Project array for this project and
 give it a default value of 'never'
       $projects[$i]['Project']['last_job'] = Never;

       foreach ($projects[$i]['Job'] as $job) {
         if ($projects[$i]['Project']['last_job'] == Never ||
 $projects[$i]['Project']['last_job']  $job['date']) {
           $projects[$i]['Project']['last_job'] =  $job['date'];
         }
       } // end job loop
     } // end project loop

     $this-set('projects', $projects);

   } // end index

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


Order results by related model totals (help please)

2009-12-04 Thread otherphil
hi, this is my first post. I am new to cakePHP (and databases in
general).

I have built a little application with a table called Projects and a
table called Jobs.

a project has many Jobs.

a job has (amongst others) a 'hours' field and a 'date' field.

I have an index page for the projects which lists all the projects,
showing the name, the last job and the total hours for that project.
There is a paginator whichs breaks up the results. At the moment I am
finding the last job and the total hours by searching through the
results after they are returned (see code below).

My problem is that I want to be able to order the results by the last
job or by the total hours. Can someone explain the best way to do this
please. My only ideas are

1. that I can manually re-sort the array returned by the find query
but I have no idea how this would work with the paginator, or
2. to use 2 new fields on the projects table - total hours and last
job - but it seems like this would be redundant information which can
be found in the jobs table.


below is my code in the Projects controller. Everything works (there
are no errors) I just need to know how to do what I mentioned above.

Thanks very much for any help you can give. I'm sorry if this has been
answered before (I did look)

- Phil

  function index() {

$this-Project-Behaviors-attach('Containable');
$this-Project-contain(array('Job.date', 'Job.hours',
'Client.name'));

$conditions = array();


//$projects = $this-Project-find('all', array('order' =
'Project.name DESC', 'conditions' = $conditions));
$projects = $this-paginate('Project', $conditions);

// for each project find the last job and record it in the array
for  ($i = 0; $icount($projects); $i++) {

  $proj_id = $projects[$i]['Project']['id'];

  // create a new member of the Project array for this project and
give it a default value of 'never'
  $projects[$i]['Project']['last_job'] = Never;

  foreach ($projects[$i]['Job'] as $job) {
if ($projects[$i]['Project']['last_job'] == Never ||
$projects[$i]['Project']['last_job']  $job['date']) {
  $projects[$i]['Project']['last_job'] =  $job['date'];
}
  } // end job loop
} // end project loop

$this-set('projects', $projects);

  } // end index

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


Help Please

2009-09-18 Thread Simon

is sombody here correct me here please
how can i do this if a users group is admin

i did it with session but this dosent work any other way

?php
if ($session-read('Auth.User.group') == 'Admin')
{
echo'div class=author';
}else{
echo'div class=nonauthor;
}?


?php
if($this-$comment['User'[['Group']['admin']){
echo'div class=author';
echo $comment['Comment']['comment'];
echo'/div ';



}else{


echo'div class=non-author
echo $comment['Comment']['comment'];
echo'/div';


}


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



Router Help please !

2009-07-31 Thread DatacenterHellas

I use this for router


Router::connect('/:language/:controller/:action/*',array(),array
('language'='[a-z]{3}'));

and when I click on this link

$html-link('Greek',array('language'='gre'));

The returned URL is

http://www.mydomain.ext/controller/action

instead of

http://www.mydomain.ext/gre/controller/action

Why that ? ?

Also when I move my mouse over the link the status bar has this URL

http://www.mydomain.ext/gre/controller/action
--~--~-~--~~~---~--~~
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: Router Help please !

2009-07-31 Thread DatacenterHellas

There is no one who can help me ? ? ?
--~--~-~--~~~---~--~~
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: Tabs in Layout... Help Please.

2009-01-16 Thread Martin Westin

@Andrew
The reason the li.active method is so widely used is that is works
for CMSes and other dynamic applications where the contents of the
menu changes. The technique you describe uses hard-coded menu items
which I very rarely find to be sufficient for the applications I work
on.




On Jan 15, 10:05 pm, ache...@gmail.com ache...@gmail.com wrote:
 Nurvzy,

 Yes! This is the first time I've written anything and then been able
 to link to it. I don't like the idea of using your server to process
 this, I think it's a task much better suited to CSS I wrote about it
 here if you want to take a lookhttp://www.lifeiscake.com/posts/view/css-menus

 Sincerely,
 ~Andrew Allen

 On Jan 13, 4:05 pm, nurvzy nur...@gmail.com wrote:

  Hi All,

    I'm new to cakephp and working through my first cake app.  I'm
  chugging along and am now stumped as to where to put a function I've
  written to help decide if a navigation tab should have the
  id=selected assigned to the anchor tag.

  Basically the gist is I have a ul Navigation bar with various links:
  (Home, Contact, ect..) and depending on the current controller or
  action or whatever I pass in; I want the id of that a tag to be
  selected.

  So I've written a little function:

  function is_selected($controller_or_action, $link_text){
    if (strpos($controller_or_action,$link_text) !== false) return true;
    else return false;

  }

  And I'm calling it like so in the default.ctp layout:

  ?php
   if(is_selected($this-params['controller'], pages)) echo $html-link
  ('Contact', array('controller' = 'pages', 'action' = 'contactus'),
  array('id' = 'selected'));
  else echo $html-link('Contact', array('controller' = 'pages',
  'action' = 'contactus'));
   ?

  But that's really tedious and quite ugly, plus I have that function
  just written at the top of the layout which is a big no-no.  So I'm
  looking for some help/advice.  How do you specify a tab type layout in
  your cake app?

  Thank you for your advice and/or help.
  Nick
--~--~-~--~~~---~--~~
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: Tabs in Layout... Help Please.

2009-01-15 Thread ache...@gmail.com

Nurvzy,

Yes! This is the first time I've written anything and then been able
to link to it. I don't like the idea of using your server to process
this, I think it's a task much better suited to CSS I wrote about it
here if you want to take a look http://www.lifeiscake.com/posts/view/css-menus

Sincerely,
~Andrew Allen

On Jan 13, 4:05 pm, nurvzy nur...@gmail.com wrote:
 Hi All,

   I'm new to cakephp and working through my first cake app.  I'm
 chugging along and am now stumped as to where to put a function I've
 written to help decide if a navigation tab should have the
 id=selected assigned to the anchor tag.

 Basically the gist is I have a ul Navigation bar with various links:
 (Home, Contact, ect..) and depending on the current controller or
 action or whatever I pass in; I want the id of that a tag to be
 selected.

 So I've written a little function:

 function is_selected($controller_or_action, $link_text){
   if (strpos($controller_or_action,$link_text) !== false) return true;
   else return false;

 }

 And I'm calling it like so in the default.ctp layout:

 ?php
  if(is_selected($this-params['controller'], pages)) echo $html-link
 ('Contact', array('controller' = 'pages', 'action' = 'contactus'),
 array('id' = 'selected'));
 else echo $html-link('Contact', array('controller' = 'pages',
 'action' = 'contactus'));
  ?

 But that's really tedious and quite ugly, plus I have that function
 just written at the top of the layout which is a big no-no.  So I'm
 looking for some help/advice.  How do you specify a tab type layout in
 your cake app?

 Thank you for your advice and/or help.
 Nick
--~--~-~--~~~---~--~~
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: Tabs in Layout... Help Please.

2009-01-15 Thread nurvzy

@Andrew: Thank you very much for the link to your great article; its
well written and much appreciated.

Thank you all for your quick responses, help and advice.  Very much
appreciated!

Nick
On Jan 15, 2:05 pm, ache...@gmail.com ache...@gmail.com wrote:
 Nurvzy,

 Yes! This is the first time I've written anything and then been able
 to link to it. I don't like the idea of using your server to process
 this, I think it's a task much better suited to CSS I wrote about it
 here if you want to take a lookhttp://www.lifeiscake.com/posts/view/css-menus

 Sincerely,
 ~Andrew Allen

 On Jan 13, 4:05 pm, nurvzy nur...@gmail.com wrote:

  Hi All,

    I'm new to cakephp and working through my first cake app.  I'm
  chugging along and am now stumped as to where to put a function I've
  written to help decide if a navigation tab should have the
  id=selected assigned to the anchor tag.

  Basically the gist is I have a ul Navigation bar with various links:
  (Home, Contact, ect..) and depending on the current controller or
  action or whatever I pass in; I want the id of that a tag to be
  selected.

  So I've written a little function:

  function is_selected($controller_or_action, $link_text){
    if (strpos($controller_or_action,$link_text) !== false) return true;
    else return false;

  }

  And I'm calling it like so in the default.ctp layout:

  ?php
   if(is_selected($this-params['controller'], pages)) echo $html-link
  ('Contact', array('controller' = 'pages', 'action' = 'contactus'),
  array('id' = 'selected'));
  else echo $html-link('Contact', array('controller' = 'pages',
  'action' = 'contactus'));
   ?

  But that's really tedious and quite ugly, plus I have that function
  just written at the top of the layout which is a big no-no.  So I'm
  looking for some help/advice.  How do you specify a tab type layout in
  your cake app?

  Thank you for your advice and/or help.
  Nick
--~--~-~--~~~---~--~~
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: Tabs in Layout... Help Please.

2009-01-14 Thread Martin Westin


One technique I have used where I want it to be as automatic as
possible (but possibly not compatible with any routing scenario) is
this:

My main menu consists of either plugins or controllers (some of each
kind.) So I use this to figure out what the current plugin or top-
level controller is:
---
if ( empty($this-plugin) ) {
$module_name = $this-name;
} else {
$module_name = $this-plugin;
}
---
Then I loop the currently available modules (controllers and plugins
that should be visible).
For each one I compare its name to the one extracted above and set the
class to selected if it matches.
---
foreach($modules as $one) {
$class = '';
if ( low($module_name) == low($one) ) {
$class = ' selected';
}
e('li id='.'main_menu_'.$one.' class=main_menu_item'.
$class.'');
e( $html-link(___('main_menu_'.$one),'/'.$one) );
e('/li');
}
---
For the links I only need to go to the index action but there is
nothing stopping you from using more detailed menu-data to make more
complex versions of this technique.

What I like it that I don't need any specific (hard coded) information
in my layout. I can change out the available menuitems at any time. I
do this to adapt the menu to the permissions each user has. They only
need to see items that they actually can access. I construct the list
of available modules in AppController::beforeFilter after Auth has
done its thing.

/Martin


On Jan 14, 3:05 am, nurvzy nur...@gmail.com wrote:
 Thank you Miles!

 That technique is exactly what I was looking for!

 Nick

 On Jan 13, 5:04 pm, Miles J mileswjohn...@gmail.com wrote:

  This is how I do mine:

  // controller action
  function login() {
          $this-set('activeTab', 'login');

  }

  // the view
  li?php if ($activeTab == 'login') echo ' class=selected'; ?a
  href=#Login/a/li
  li?php if ($activeTab == 'signup') echo ' class=selected'; ?a
  href=#Signup/a/li

  Also, your function would go in the bootstrap.php file in your app/
  config/ folder.
--~--~-~--~~~---~--~~
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: Tabs in Layout... Help Please.

2009-01-14 Thread nurvzy

A That's mighty clever too Martin, thanks for sharing.  I have a
static menu but I like the idea of not having to pass anything to the
view and the layout figuring out where it is on its own.  My problem
is I'm using the same pages controller to display 3 of my 6 tabs with
static content, so the controller name is the same 3 out of 6 times so
I needed another way to decide between them all.

But thanks for sharing, I'll keep that in mind for my next projects.

On Jan 14, 3:36 am, Martin Westin martin.westin...@gmail.com wrote:
 One technique I have used where I want it to be as automatic as
 possible (but possibly not compatible with any routing scenario) is
 this:

 My main menu consists of either plugins or controllers (some of each
 kind.) So I use this to figure out what the current plugin or top-
 level controller is:
 ---
 if ( empty($this-plugin) ) {
     $module_name = $this-name;} else {

     $module_name = $this-plugin;}

 ---
 Then I loop the currently available modules (controllers and plugins
 that should be visible).
 For each one I compare its name to the one extracted above and set the
 class to selected if it matches.
 ---
 foreach($modules as $one) {
     $class = '';
     if ( low($module_name) == low($one) ) {
         $class = ' selected';
     }
     e('li id='.'main_menu_'.$one.' class=main_menu_item'.
 $class.'');
     e( $html-link(___('main_menu_'.$one),'/'.$one) );
     e('/li');}

 ---
 For the links I only need to go to the index action but there is
 nothing stopping you from using more detailed menu-data to make more
 complex versions of this technique.

 What I like it that I don't need any specific (hard coded) information
 in my layout. I can change out the available menuitems at any time. I
 do this to adapt the menu to the permissions each user has. They only
 need to see items that they actually can access. I construct the list
 of available modules in AppController::beforeFilter after Auth has
 done its thing.

 /Martin

 On Jan 14, 3:05 am, nurvzy nur...@gmail.com wrote:

  Thank you Miles!

  That technique is exactly what I was looking for!

  Nick

  On Jan 13, 5:04 pm, Miles J mileswjohn...@gmail.com wrote:

   This is how I do mine:

   // controller action
   function login() {
           $this-set('activeTab', 'login');

   }

   // the view
   li?php if ($activeTab == 'login') echo ' class=selected'; ?a
   href=#Login/a/li
   li?php if ($activeTab == 'signup') echo ' class=selected'; ?a
   href=#Signup/a/li

   Also, your function would go in the bootstrap.php file in your app/
   config/ folder.
--~--~-~--~~~---~--~~
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: Tabs in Layout... Help Please.

2009-01-14 Thread teknoid

If I understand this right, you are looking to set an active tab,
based on the view you are currently in...

It can be done easily from the view itself, i.e. in view_one.ctp:
$this-set('tabOne', true); (which is now going to be available in
your layout).
Therefore, in the layout you could do: ?php echo isset($tabOne) ?
'class=selected-tab' : null; ?

On Jan 13, 6:05 pm, nurvzy nur...@gmail.com wrote:
 Hi All,

   I'm new to cakephp and working through my first cake app.  I'm
 chugging along and am now stumped as to where to put a function I've
 written to help decide if a navigation tab should have the
 id=selected assigned to the anchor tag.

 Basically the gist is I have a ul Navigation bar with various links:
 (Home, Contact, ect..) and depending on the current controller or
 action or whatever I pass in; I want the id of that a tag to be
 selected.

 So I've written a little function:

 function is_selected($controller_or_action, $link_text){
   if (strpos($controller_or_action,$link_text) !== false) return true;
   else return false;

 }

 And I'm calling it like so in the default.ctp layout:

 ?php
  if(is_selected($this-params['controller'], pages)) echo $html-link
 ('Contact', array('controller' = 'pages', 'action' = 'contactus'),
 array('id' = 'selected'));
 else echo $html-link('Contact', array('controller' = 'pages',
 'action' = 'contactus'));
  ?

 But that's really tedious and quite ugly, plus I have that function
 just written at the top of the layout which is a big no-no.  So I'm
 looking for some help/advice.  How do you specify a tab type layout in
 your cake app?

 Thank you for your advice and/or help.
 Nick
--~--~-~--~~~---~--~~
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: Tabs in Layout... Help Please.

2009-01-14 Thread Kappa

Why not using for_layout variables?

Just set into your controller action a selectedtab_for_layout
variable and inside the
layout (yes i said layout, not view) you can access it.


On Jan 14, 5:42 pm, teknoid teknoid.cake...@gmail.com wrote:
 If I understand this right, you are looking to set an active tab,
 based on the view you are currently in...

 It can be done easily from the view itself, i.e. in view_one.ctp:
 $this-set('tabOne', true); (which is now going to be available in
 your layout).
 Therefore, in the layout you could do: ?php echo isset($tabOne) ?
 'class=selected-tab' : null; ?

 On Jan 13, 6:05 pm, nurvzy nur...@gmail.com wrote:

  Hi All,

    I'm new to cakephp and working through my first cake app.  I'm
  chugging along and am now stumped as to where to put a function I've
  written to help decide if a navigation tab should have the
  id=selected assigned to the anchor tag.

  Basically the gist is I have a ul Navigation bar with various links:
  (Home, Contact, ect..) and depending on the current controller or
  action or whatever I pass in; I want the id of that a tag to be
  selected.

  So I've written a little function:

  function is_selected($controller_or_action, $link_text){
    if (strpos($controller_or_action,$link_text) !== false) return true;
    else return false;

  }

  And I'm calling it like so in the default.ctp layout:

  ?php
   if(is_selected($this-params['controller'], pages)) echo $html-link
  ('Contact', array('controller' = 'pages', 'action' = 'contactus'),
  array('id' = 'selected'));
  else echo $html-link('Contact', array('controller' = 'pages',
  'action' = 'contactus'));
   ?

  But that's really tedious and quite ugly, plus I have that function
  just written at the top of the layout which is a big no-no.  So I'm
  looking for some help/advice.  How do you specify a tab type layout in
  your cake app?

  Thank you for your advice and/or help.
  Nick
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Tabs in Layout... Help Please.

2009-01-13 Thread nurvzy

Hi All,

  I'm new to cakephp and working through my first cake app.  I'm
chugging along and am now stumped as to where to put a function I've
written to help decide if a navigation tab should have the
id=selected assigned to the anchor tag.

Basically the gist is I have a ul Navigation bar with various links:
(Home, Contact, ect..) and depending on the current controller or
action or whatever I pass in; I want the id of that a tag to be
selected.

So I've written a little function:

function is_selected($controller_or_action, $link_text){
  if (strpos($controller_or_action,$link_text) !== false) return true;
  else return false;
}

And I'm calling it like so in the default.ctp layout:

?php
 if(is_selected($this-params['controller'], pages)) echo $html-link
('Contact', array('controller' = 'pages', 'action' = 'contactus'),
array('id' = 'selected'));
else echo $html-link('Contact', array('controller' = 'pages',
'action' = 'contactus'));
 ?

But that's really tedious and quite ugly, plus I have that function
just written at the top of the layout which is a big no-no.  So I'm
looking for some help/advice.  How do you specify a tab type layout in
your cake app?

Thank you for your advice and/or help.
Nick
--~--~-~--~~~---~--~~
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: Tabs in Layout... Help Please.

2009-01-13 Thread Miles J

This is how I do mine:

// controller action
function login() {
$this-set('activeTab', 'login');
}

// the view
li?php if ($activeTab == 'login') echo ' class=selected'; ?a
href=#Login/a/li
li?php if ($activeTab == 'signup') echo ' class=selected'; ?a
href=#Signup/a/li

Also, your function would go in the bootstrap.php file in your app/
config/ folder.
--~--~-~--~~~---~--~~
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: Tabs in Layout... Help Please.

2009-01-13 Thread nurvzy

Thank you Miles!

That technique is exactly what I was looking for!

Nick

On Jan 13, 5:04 pm, Miles J mileswjohn...@gmail.com wrote:
 This is how I do mine:

 // controller action
 function login() {
         $this-set('activeTab', 'login');

 }

 // the view
 li?php if ($activeTab == 'login') echo ' class=selected'; ?a
 href=#Login/a/li
 li?php if ($activeTab == 'signup') echo ' class=selected'; ?a
 href=#Signup/a/li

 Also, your function would go in the bootstrap.php file in your app/
 config/ folder.
--~--~-~--~~~---~--~~
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: Import Script Help Please

2008-12-26 Thread Webweave

If you put the data into the array before you do your save, Cake does
the magic under the covers to figure out if the record exists already
or not.

When you do the save, Cake does a lookup to figure out if the
request needs to be an insert or delete (assuming you have the
constraints set properly).

I would expect that whether you can take advantage of this is entirely
dependent on the data you are getting sent. If your customer
information includes a unique key, then you should be able to use that
as your ID, and Cake will automagically do an insert or update. If it
doesn't give you a primary key, you'll need to do a lookup and figure
out if you want to do the insert yourself anyway.

On Dec 25, 2:37 pm, Chad Casselman ccassel...@gmail.com wrote:
 Let's see if I can explain this better.

 I have the models setup correctly or so I think - new to all of this.

 But I am getting lots of information posted from an external source so let's
 say field1, field2, field3, etc. etc.

 Fields 1-10 are customer information
 Fields 11-15 are product information
 Fields 16-20 are order information

 I need a script the can accepted the above fields, but the catch is for me
 to check to see if the customer exists, if not add it.  Then check to see if
 the product exists, if not add it, then the same with the order.  I don't
 understand how the current magic save stuff works - because it is all hidden
 from me.  I need to see it working to understand it, but most examples just
 say use it.  I am not using it the typical way so without understanding it,
 I am struggling to create the script to accept the posted information.

 Does that help or hurt?

 Chad

 On Thu, Dec 25, 2008 at 3:02 PM, Webweave webwe...@gmail.com wrote:

  So are you saying you're getting data posted to you somehow that isn't
  related to the tables you outlined?

  I'm not clear on whet you mean by I can't control the name of the
  fields coming in, but it sounds like you have the basic idea.

  Cake should handle the magic for you as long as you build the table
  structure, model and relationships properly.

  All you need to do is build the Model structure into $this-data, and
  do a saveAll (or save for each bit you are interested in). There are
  lots of examples on how to do this floating around.

  On Dec 23, 8:11 am, Chad Casselman ccassel...@gmail.com wrote:
   Very new to cakePHP and of course the first thing I try doesn't follow
  the
   model.

   I am trying to create a script which takes a lot of post variables (from
   1shoppingcart exactly) and then puts them in the corresponding values in
  my
   database design.

   Let's say my database is:
   customers
   customers_products
   products

   I haven't figured out exactly how to do the associations but that is not
  my
   hang up right now.

   I can't control the name of the fields coming in, but I need for the
   save/post to go through the data and put the customer info into the
  customer
   table (always new inserts), then go through the product information
  (unknown
   count) (product1name, product2name, etc) and put them in the product
  table
   (record of source) if they do not exist and then connect the customer to
  the
   products that they ordered.

   I am completely stumped on how to even tackle processing form information
   that was not generated by cake.

   Chad


--~--~-~--~~~---~--~~
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: Import Script Help Please

2008-12-25 Thread Webweave

So are you saying you're getting data posted to you somehow that isn't
related to the tables you outlined?

I'm not clear on whet you mean by I can't control the name of the
fields coming in, but it sounds like you have the basic idea.

Cake should handle the magic for you as long as you build the table
structure, model and relationships properly.

All you need to do is build the Model structure into $this-data, and
do a saveAll (or save for each bit you are interested in). There are
lots of examples on how to do this floating around.

On Dec 23, 8:11 am, Chad Casselman ccassel...@gmail.com wrote:
 Very new to cakePHP and of course the first thing I try doesn't follow the
 model.

 I am trying to create a script which takes a lot of post variables (from
 1shoppingcart exactly) and then puts them in the corresponding values in my
 database design.

 Let's say my database is:
 customers
 customers_products
 products

 I haven't figured out exactly how to do the associations but that is not my
 hang up right now.

 I can't control the name of the fields coming in, but I need for the
 save/post to go through the data and put the customer info into the customer
 table (always new inserts), then go through the product information (unknown
 count) (product1name, product2name, etc) and put them in the product table
 (record of source) if they do not exist and then connect the customer to the
 products that they ordered.

 I am completely stumped on how to even tackle processing form information
 that was not generated by cake.

 Chad
--~--~-~--~~~---~--~~
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: Import Script Help Please

2008-12-25 Thread Chad Casselman
Let's see if I can explain this better.

I have the models setup correctly or so I think - new to all of this.

But I am getting lots of information posted from an external source so let's
say field1, field2, field3, etc. etc.

Fields 1-10 are customer information
Fields 11-15 are product information
Fields 16-20 are order information

I need a script the can accepted the above fields, but the catch is for me
to check to see if the customer exists, if not add it.  Then check to see if
the product exists, if not add it, then the same with the order.  I don't
understand how the current magic save stuff works - because it is all hidden
from me.  I need to see it working to understand it, but most examples just
say use it.  I am not using it the typical way so without understanding it,
I am struggling to create the script to accept the posted information.

Does that help or hurt?

Chad



On Thu, Dec 25, 2008 at 3:02 PM, Webweave webwe...@gmail.com wrote:


 So are you saying you're getting data posted to you somehow that isn't
 related to the tables you outlined?

 I'm not clear on whet you mean by I can't control the name of the
 fields coming in, but it sounds like you have the basic idea.

 Cake should handle the magic for you as long as you build the table
 structure, model and relationships properly.

 All you need to do is build the Model structure into $this-data, and
 do a saveAll (or save for each bit you are interested in). There are
 lots of examples on how to do this floating around.

 On Dec 23, 8:11 am, Chad Casselman ccassel...@gmail.com wrote:
  Very new to cakePHP and of course the first thing I try doesn't follow
 the
  model.
 
  I am trying to create a script which takes a lot of post variables (from
  1shoppingcart exactly) and then puts them in the corresponding values in
 my
  database design.
 
  Let's say my database is:
  customers
  customers_products
  products
 
  I haven't figured out exactly how to do the associations but that is not
 my
  hang up right now.
 
  I can't control the name of the fields coming in, but I need for the
  save/post to go through the data and put the customer info into the
 customer
  table (always new inserts), then go through the product information
 (unknown
  count) (product1name, product2name, etc) and put them in the product
 table
  (record of source) if they do not exist and then connect the customer to
 the
  products that they ordered.
 
  I am completely stumped on how to even tackle processing form information
  that was not generated by cake.
 
  Chad
 


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



Import Script Help Please

2008-12-23 Thread Chad Casselman
Very new to cakePHP and of course the first thing I try doesn't follow the
model.

I am trying to create a script which takes a lot of post variables (from
1shoppingcart exactly) and then puts them in the corresponding values in my
database design.

Let's say my database is:
customers
customers_products
products

I haven't figured out exactly how to do the associations but that is not my
hang up right now.

I can't control the name of the fields coming in, but I need for the
save/post to go through the data and put the customer info into the customer
table (always new inserts), then go through the product information (unknown
count) (product1name, product2name, etc) and put them in the product table
(record of source) if they do not exist and then connect the customer to the
products that they ordered.

I am completely stumped on how to even tackle processing form information
that was not generated by cake.

Chad

--~--~-~--~~~---~--~~
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: console help please

2008-11-21 Thread calzone

Cakebaker, at cakebaker.42dh.com, has resolved this issue for me
(http://cakebaker.42dh.com/2007/05/07/writing-a-custom-cakephp-console-
script/).  In case anyone else runs into this same issue some day, the
resolution is that my code was missing the controller initialization
after the instantiation:

$this-CitiesController = new CitiesController();
$this-CitiesController-constructClasses();

The cake manual has a page mentioning this under Developing With
CakePHP  Controllers  Controller Methods  Other Useful Methods 
constructClasses (http://book.cakephp.org/view/429/constructClasses).

For anyone who hasn't carefully perused the more basic sections in the
cake manual like Controllers, Models, and Views since v1, this
requirement when using the console can be pretty easy to miss.  I'm
adding a comment to the manual in the console section and hopefully
someone sees fit to expand on it as part of the console section
proper.

chris

On Nov 19, 3:26 pm, calzone [EMAIL PROTECTED] wrote:
 Sorry if this is a likely stupid question, but I can't seem to find
 the answer anywhere. Searching for CakePHP console examples outside of
 using it for ACL and baking seems mighty thin on google.  Maybe I'm
 overlooking something that should be obvious?

 The Backstory:
 I have cakephp doing some intensive data processing using many
 different actions in a specified sequence and even with pagination to
 avoid timeouts.

 I decided to try to automate this by setting up a cake shell function
 to go through all of the steps and then I can just invoke the magic
 from the command line and output report results into a file. I
 followed the example from this 
 page:http://twit88.com/blog/2008/02/14/php-writing-a-console-program-in-ca...

 The Issue:
 What is happening when I try to invoke a controller action from within
 a shell function is that I get the following error (this only happens
 when the controller action I invoke has within a call to a model
 method --as most controller actions are wont to do):

 Fatal error: Call to a member function on a non-object in /var/www/.../
 httpdocs/app/controllers/cities_controller.php on line 34

 Observations:
 1) The action I'm invoking works fine when called from a browser
 2) The 'member function' in question is none other than the standard
 built-in findAll(), which I would hope would be supported 'out of the
 box' when trying to invoke controller actions from the console.

 My Question:
 Am I approaching this the wrong way? Is there a shortcut to invoking
 controller actions from the console that I've overlooked?  App:import
 sure seems hacky.

 Reference:

 class ReportShell extends Shell
 {
 var $uses = array('City');
 var $tasks = array
 ('Project','DbConfig','Model','Controller','View','Plugin');
 var $CitiesController = null;

 function initialize()
 {
 $this-_loadModels();

 }

 function main()
 {
 App::import('Controller', 'Cities');
 $this-CitiesController = new CitiesController();
 $this-out($this-CitiesController-export_overall('Massachusetts'));

 }
 }
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



console help please

2008-11-19 Thread calzone

Sorry if this is a likely stupid question, but I can't seem to find
the answer anywhere. Searching for CakePHP console examples outside of
using it for ACL and baking seems mighty thin on google.  Maybe I'm
overlooking something that should be obvious?

The Backstory:
I have cakephp doing some intensive data processing using many
different actions in a specified sequence and even with pagination to
avoid timeouts.

I decided to try to automate this by setting up a cake shell function
to go through all of the steps and then I can just invoke the magic
from the command line and output report results into a file. I
followed the example from this page:
http://twit88.com/blog/2008/02/14/php-writing-a-console-program-in-cakephp/

The Issue:
What is happening when I try to invoke a controller action from within
a shell function is that I get the following error (this only happens
when the controller action I invoke has within a call to a model
method --as most controller actions are wont to do):

Fatal error: Call to a member function on a non-object in /var/www/.../
httpdocs/app/controllers/cities_controller.php on line 34

Observations:
1) The action I'm invoking works fine when called from a browser
2) The 'member function' in question is none other than the standard
built-in findAll(), which I would hope would be supported 'out of the
box' when trying to invoke controller actions from the console.

My Question:
Am I approaching this the wrong way? Is there a shortcut to invoking
controller actions from the console that I've overlooked?  App:import
sure seems hacky.

Reference:

class ReportShell extends Shell
{
var $uses = array('City');
var $tasks = array
('Project','DbConfig','Model','Controller','View','Plugin');
var $CitiesController = null;

function initialize()
{
$this-_loadModels();
}

function main()
{
App::import('Controller', 'Cities');
$this-CitiesController = new CitiesController();
$this-out($this-CitiesController-export_overall('Massachusetts'));
}

}

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Has ... relationships help please

2008-09-12 Thread soldier.coder

I am getting lost in semantics and need a guide.  I'm writing an app
that keeps track of grades for students in multiple courses.
Depending on the type of course, there will be different categories of
grades ('Lab Assignments','Oral Presentation', 'Programming
Assignments', ...) and there will be different weights for the grades
of different categories.  So let me lay out some tables:

Weights table
   course_id
   category_id
   number
   weight

Categories table
   category_id
   description

Courses
  course_id
  course_name


So it is obvious to me that the Weights table belongs to the Courses
and Categories tables.
When I set up the weights that is strait forward to me.  My problem
comes when I start thinking about how to write the model for the
Categories table. According to a book I am reading, each relationship
with association mapping must be specified in both directions and
when describing the other direction in the relationship between
Categories and Weights or between Categories and Courses I have
exactly 3 options: Has One, Has Many and Has and Belongs To
Many...

Which is right for the relationship between Categories and Weights?
and why?
Which is right for the relationship between Categories and Courses?
and why?

Thank you very much for your help!


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Has ... relationships help please

2008-09-12 Thread David C. Zentgraf

Weights belongsTo both Categories and Courses
Categories hasMany Weights
Courses hasMany Weigths

BelongsTo means the model that belongsTo something also has the  
foreign keys in itself (Weights.course_id).
For hasMany THE OTHER model is supposed to have the foreign key  
(Courses hasMany Weights, so Courses will look for a  
Weights.category_id that matches its own id).

Behold my ASCII art: ;-)

   / Weight.category_id
Category.id - Weight.category_id
   \ Weight.category_id

HasMany and belongsTo are the two sides you need for a single-many  
relationship.
hasAndBelongsToMany expresses a many-many relationship, with both  
models havingAndBelongingToMany.
A hasOne-belongsTo pair would be a one-one relationship.

Does that help?

On 12 Sep 2008, at 22:42, soldier.coder wrote:


 I am getting lost in semantics and need a guide.  I'm writing an app
 that keeps track of grades for students in multiple courses.
 Depending on the type of course, there will be different categories of
 grades ('Lab Assignments','Oral Presentation', 'Programming
 Assignments', ...) and there will be different weights for the grades
 of different categories.  So let me lay out some tables:

 Weights table
   course_id
   category_id
   number
   weight

 Categories table
   category_id
   description

 Courses
  course_id
  course_name


 So it is obvious to me that the Weights table belongs to the Courses
 and Categories tables.
 When I set up the weights that is strait forward to me.  My problem
 comes when I start thinking about how to write the model for the
 Categories table. According to a book I am reading, each relationship
 with association mapping must be specified in both directions and
 when describing the other direction in the relationship between
 Categories and Weights or between Categories and Courses I have
 exactly 3 options: Has One, Has Many and Has and Belongs To
 Many...

 Which is right for the relationship between Categories and Weights?
 and why?
 Which is right for the relationship between Categories and Courses?
 and why?

 Thank you very much for your help!


 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Models and Has... help please!

2008-09-12 Thread soldier.coder


But I guess such thinking on my part is futile. So let me lay it all
out for you.
My tables:

courses-- this is here to provide in ID and a course
name for display.
   course_id
   course_name

categories -- another look up table for category names
   category_id
   category_name

So right now I can look up course names and categories in, say
dropdowns, but I really have
no place to store *which* categories are for *which* courses.  So

weights
   course_id
   category_id
   number(number of grades in this category)
   weight (weight for entire category)

At this point I can pick and store the grading categories for a course
along with how many
grades will be stored for what category and the percentage of the
total grade for the course
that grades in this category represent.  But I still have no storage
for the actual grades.
But I can't have grades yet -- because I have no students...

students
   student_id
   first_name
   last_name
   email
   user_name
   password

now I can store grades

grades
   course_id
   student_id
   category_id
   date_assigned
   number_grade

at the some point you need to sum up all the grades in a particular
category, then multiply
the total of the category by the weight for the category:

category_totals
   course_id
   student_id
   category_id
   category_raw_total
   category_total_x_weight

then finally, by summing the category_total_x_weight for a particular
course, and student,
you get the final grade.

final_grades
   course_id
   student_id
   final_grade

*Soo!  That is my whole database setup.

I hate to ask, but could someone tell me how to set up my models?
I have these huge gaps in my understanding.

For instance, I can see that weights belongs to courses and
categories.

So I should have something like this for Weight model:
?
   class Weight extends AppModel {
  var $name = 'Weight';
  var $belongsTo = array (
 'Course'   = array('className' = 'Course',   'foreignKey'
= 'course_id',
'conditions' =null, 'fields'=null),
 'Category' = array('className' = 'Category', 'foreignKey'
= 'category_id',
'conditions' =null, 'fields' =null)
  )
   }
?

But then do I need to establish or describe some kind of relationship
going the other way for
Course and Category?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Models and Has... help please!

2008-09-12 Thread David C. Zentgraf

What about replying to the answers you already received in the other  
threads about the very same topic instead of starting from scratch  
every time? Also, you'll have to find the final answer yourself, it's  
about the basic design of your app. You got a bunch of advise already  
which should help you to figure out the final solution.

On 13 Sep 2008, at 03:15, soldier.coder wrote:

 But I guess such thinking on my part is futile. So let me lay it all
 out for you.
 My tables:

 courses-- this is here to provide in ID and a course
 name for display.
   course_id
   course_name

 categories -- another look up table for category names
   category_id
   category_name

 So right now I can look up course names and categories in, say
 dropdowns, but I really have
 no place to store *which* categories are for *which* courses.  So

 weights
   course_id
   category_id
   number(number of grades in this category)
   weight (weight for entire category)

 At this point I can pick and store the grading categories for a course
 along with how many
 grades will be stored for what category and the percentage of the
 total grade for the course
 that grades in this category represent.  But I still have no storage
 for the actual grades.
 But I can't have grades yet -- because I have no students...

 students
   student_id
   first_name
   last_name
   email
   user_name
   password

 now I can store grades

 grades
   course_id
   student_id
   category_id
   date_assigned
   number_grade

 at the some point you need to sum up all the grades in a particular
 category, then multiply
 the total of the category by the weight for the category:

 category_totals
   course_id
   student_id
   category_id
   category_raw_total
   category_total_x_weight

 then finally, by summing the category_total_x_weight for a particular
 course, and student,
 you get the final grade.

 final_grades
   course_id
   student_id
   final_grade

 *Soo!  That is my whole database setup.

 I hate to ask, but could someone tell me how to set up my models?
 I have these huge gaps in my understanding.

 For instance, I can see that weights belongs to courses and
 categories.

 So I should have something like this for Weight model:
 ?
   class Weight extends AppModel {
  var $name = 'Weight';
  var $belongsTo = array (
 'Course'   = array('className' = 'Course',   'foreignKey'
 = 'course_id',
   'conditions' =null, 'fields'=null),
 'Category' = array('className' = 'Category', 'foreignKey'
 = 'category_id',
'conditions' =null, 'fields' =null)
  )
   }
 ?

 But then do I need to establish or describe some kind of relationship
 going the other way for
 Course and Category?

 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



File Upload -- help please

2008-08-25 Thread Astha Shukla
Hi,
Could any one please teach me,, How can I upload a file in to server folder
using CakePHP (I do not want to store a file into database)
for example I have a file say add.thtml in view folder that is uploading a
file and I have add function in cotroller, what code should I need to write
in add.thml and in add function to enable file upload.
Thanks in advance
Astha

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: File Upload -- help please

2008-08-25 Thread Samuel DeVore

On Mon, Aug 25, 2008 at 6:30 AM, Astha Shukla [EMAIL PROTECTED] wrote:

 Hi,
 Could any one please teach me,, How can I upload a file in to server folder
 using CakePHP (I do not want to store a file into database)
 for example I have a file say add.thtml in view folder that is uploading a
 file and I have add function in cotroller, what code should I need to write
 in add.thml and in add function to enable file upload.
 Thanks in advance
 Astha


This is asked all the time, if you take some time to search either the
Bakery ( http://bakery.cakephp.org/ ) and or Google (
http://google.com/ ), I am sure you will find more answers then you
need.  Also it is with great joy that I announce that this list is
hosted on google groups which actually has a search engine that can be
be used to find the answer as well.
http://groups.google.com/group/cake-php

Here is a bit of friendly advice, if you have a question about cakephp
I find it hard to believe that a beginner is going to ask a question
that has not already been asked many many many times before.  So here
is some more advice, cakephp is written in php so know where to find
php questions http://php.net  use google and google groups and SEARCH
first.  This group of grumps will much happier if you ask questions
that are at least seeking clarity after demonstrating that you at
least put in _some_ work first.

sd

-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/
http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/
http://blog.samdevore.com/cakephp-pages/i-cant-bake/

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: File Upload -- help please

2008-08-25 Thread Donkeybob

yea . . . this was actually asked 5 days ago. the search box is an
amazing tool. . . .

http://groups.google.com/group/cake-php/browse_thread/thread/e77705247cfb0d44/bb04ce1ecdc1b217#bb04ce1ecdc1b217

On Aug 25, 9:30 am, Astha Shukla [EMAIL PROTECTED] wrote:
 Hi,
 Could any one please teach me,, How can I upload a file in to server folder
 using CakePHP (I do not want to store a file into database)
 for example I have a file say add.thtml in view folder that is uploading a
 file and I have add function in cotroller, what code should I need to write
 in add.thml and in add function to enable file upload.
 Thanks in advance
 Astha
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: File Upload -- help please

2008-08-25 Thread clemos

This list is slowly becoming a STFW messages contest :)
http://www.catb.org/~esr/faqs/smart-questions.html#rtfm

+++
Clément

On Mon, Aug 25, 2008 at 4:19 PM, Samuel DeVore [EMAIL PROTECTED] wrote:

 On Mon, Aug 25, 2008 at 6:30 AM, Astha Shukla [EMAIL PROTECTED] wrote:

 Hi,
 Could any one please teach me,, How can I upload a file in to server folder
 using CakePHP (I do not want to store a file into database)
 for example I have a file say add.thtml in view folder that is uploading a
 file and I have add function in cotroller, what code should I need to write
 in add.thml and in add function to enable file upload.
 Thanks in advance
 Astha


 This is asked all the time, if you take some time to search either the
 Bakery ( http://bakery.cakephp.org/ ) and or Google (
 http://google.com/ ), I am sure you will find more answers then you
 need.  Also it is with great joy that I announce that this list is
 hosted on google groups which actually has a search engine that can be
 be used to find the answer as well.
 http://groups.google.com/group/cake-php

 Here is a bit of friendly advice, if you have a question about cakephp
 I find it hard to believe that a beginner is going to ask a question
 that has not already been asked many many many times before.  So here
 is some more advice, cakephp is written in php so know where to find
 php questions http://php.net  use google and google groups and SEARCH
 first.  This group of grumps will much happier if you ask questions
 that are at least seeking clarity after demonstrating that you at
 least put in _some_ work first.

 sd

 --
 (the old fart) the advice is free, the lack of crankiness will cost you

 - its a fine line between a real question and an idiot

 http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/
 http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/
 http://blog.samdevore.com/cakephp-pages/i-cant-bake/

 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CakePHP Setup, Need Help Please

2008-01-20 Thread longint

Hi Folks,

Brand spankin' new to PHP  CakePHP.  Coming over from ASP.NET to
explore.  I'm following the Blog tutorial from the Cake site and
here's what happens:

1.) Move it to the webroot.
2.) Checkout localhost and I can see the initial page (with CSS!)
3.) Change my db configuration to connect correctly.
4.) Refresh localhost and the initial page no longer has CSS applied!!

This sounds like a mod_rewrite issue (I guess?).  I went through the
steps of enabling it (or so I think).  But the tutorials I've read say
that if you see CSS it means it's enabled.  So I have no clue why
connecting to the db would disable this.

Help?

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



  1   2   >