Layer images

2012-05-10 Thread Sean
Hello all,

I am working in 2.1.

I have a couple of images that I want to stack on top of each other. One is 
the image that everyone will see, and a transparent image that will sit on 
top of the main image.

I have seen that it can be done using CSS and HTML, but I was wondering if 
there is a way to do it theCakePHP way.

This is a concept that I would like to use as these images are from an 
artist and I don't want people to just download the images. This way, when 
they click on the image, what they will get is my transparent image instead 
of the real one.

Does anyone have any ideas?

Thanks,
Sean

-- 
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: cakePHP 2.1, ckeditor + ckfinder

2012-05-01 Thread Sean
Thanks for all of your replies!!!

I did get things working with the solution I posted earlier.

What I haven't quite figured out is how to turn the label off on the 
replaced editor. I have CSS that puts an asterisk (*) after required fields 
and it appears at the very bottom right after the editor window. Anyone 
have any ideas on how to remove the label from that? I assume it's being 
treated as a form field of it's own. I'm not as familiar with JS as I am 
PHP and CakePHP. 

I'm now having an issue with CSS and the JS replacement.  I have CSS that 
puts an asterisk (*) after required fields. This was actually generated by 
cake and I liked it so kept it. However, I set the label to FALSE in 
$this-Form-input(..., array('label' = false). This works, but it appears 
that the JS replacement script is treated as a Form element and cake 
includes the 'required' CSS class there. What I would like to know is if 
there is a way to stop that.

Here is some code:

In the Form call: 
 echo $this-Form-label('body', null, array('class' = 'required'));
 echo $this-Form-input('body', array('id' = 'body', 'class' = 
'ckeditor', 'label' = false));

The JS:
 script type=text/javascript
  var CustomHTML = CKEDITOR.replace( 'body',
{filebrowserBrowseUrl : 
'/MyApp/app/webroot/js/ckfinder/ckfinder.html',filebrowserWindowWidth : 
'1000',filebrowserWindowHeight : '700'}
);
/script

The HTML of the display:
 div class=input textarea requiredtextarea name=
data[Newsletter][body] id=body class=ckeditor cols=30 rows=6
lt;pgt;

To reiterate, the editor and filebrowser works just fine, but the JS 
replacement doesn't respect the Form call 'label' = false.
Attached is a screenshot. Look below and to the left of the editor to find 
the offending asterisk(*).

On Tuesday, May 1, 2012 8:17:03 AM UTC-4, vijay kumbhar wrote:

 Yes, 

 Keep ckeditor inside js directory. 

 You need to put the ckfinder inside the wwwroot directory. 

 Create an element, ckeditor.ctp 
 ?php 
 echo $this-Html-script('/ckfinder/ckfinder', false); 

 if(!isset($description)){ 
 $description = ''; 
 } 

 echo $this-Form-textarea($name , array('label' = false , 'id' = 
 $id , 'value' = $description));//,'class'='ckeditor'? 

 script type=text/javascript 

 //var siteurl = '?php //echo FULL_BASE_URL;?'; 
 //![CDATA[ 

 // This call can be placed at any point after the 
 // textarea, or inside a headscript in a 
 // window.onload event handler. 

 // Replace the textarea id=editor with an CKEditor 
 // instance, using default configurations. 
 CKEDITOR.replace( '?php echo $id;?', 
 { 
 filebrowserBrowseUrl : '?php echo FULL_BASE_URL;?/ckfinder/ 
 ckfinder.html', 
 filebrowserImageBrowseUrl : '?php echo FULL_BASE_URL;?/ 
 ckfinder/ckfinder.html?type=Images', 
 filebrowserFlashBrowseUrl : '?php echo FULL_BASE_URL;?/ 
 ckfinder/ckfinder.html?type=Flash', 
 filebrowserUploadUrl : '?php echo FULL_BASE_URL;?/ckfinder/ 
 core/connector/php/connector.php?command=QuickUploadtype=Files', 
 filebrowserImageUploadUrl : '?php echo FULL_BASE_URL;?/ 
 ckfinder/core/connector/php/connector.php? 
 command=QuickUploadtype=Images', 
 filebrowserFlashUploadUrl : '?php echo FULL_BASE_URL;?/ 
 ckfinder/core/connector/php/connector.php? 
 command=QuickUploadtype=Flash', 
 width: '?php echo $width; ?', 
 height: '?php echo $height; ?', 
 contentsCss:['/css/global.css', '/css/ie7.css', '/css/jquery- 
 ui-1.8.16.custom.css', '/css/slider.css', '/css/bootstrap.css', '/css/ 
 ie.css'], 
 enterMode: CKEDITOR.ENTER_BR, 
 ignoreEmptyParagraph: true 

 } 
 ); 
 //]] 
 /script 

 Use in view : 
 ?php echo $this-Html-script(array('ckeditor/ckeditor', 'ckfinder/ 
 ckfinder')); ? 

 ?php echo $this-element('ckeditor', array('name' = 'body', 'id' = 
 'body_eng', 'width' = 800, 'height' = 550)); ? 

 Hope this will help. 



 On May 1, 11:32 am, hoss7 hoss...@gmail.com wrote: 
  this is my sample code for wotk with ckeditor 
  
  1.copy ckeditor in webroot/js 
  
  2. in view : 
  
  ?php echo $this-Html-script('ckeditor/ckeditor'); ? 
  
  ?php 
  echo 
  
 $this-Form-textarea('info',array('class'='ckeditor','id'='editor_office2003'));
  

  ? 
  /fieldset

-- 
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
attachment: ckeditor-ckfinder.png

Re: cakePHP 2.1, ckeditor + ckfinder

2012-05-01 Thread Sean
I did get things working with the solution I posted earlier.

I'm now having an issue with CSS and the JS replacement.  I have CSS that 
puts an asterisk (*) after required fields. This was actually generated by 
cake and I liked it so kept it. However, I set the label to FALSE in 
$this-Form-input(..., array('label' = false). This works, but it appears 
that the JS replacement script is treated as a Form element and cake 
includes the 'required' CSS class there. What I would like to know is if 
there is a way to stop that.

Here is some code:

In the Form call: 
 echo $this-Form-label('body', null, array('class' = 'required'));
 echo $this-Form-input('body', array('id' = 'body', 'class' = 
'ckeditor', 'label' = false));

The JS:
 script type=text/javascript
  var CustomHTML = CKEDITOR.replace( 'body',
{filebrowserBrowseUrl : 
'/MyApp/app/webroot/js/ckfinder/ckfinder.html',filebrowserWindowWidth : 
'1000',filebrowserWindowHeight : '700'}
);
/script

The HTML of the display:
 div class=input textarea requiredtextarea 
name=data[Newsletter][body] id=body class=ckeditor cols=30 rows=6
lt;pgt;

To reiterate, the editor and filebrowser works just fine, but the JS 
replacement doesn't respect the Form call 'label' = false.
Attached is a screenshot. Look below and to the left of the editor to find 
the offending asterisk(*).

On Tuesday, May 1, 2012 8:17:03 AM UTC-4, vijay kumbhar wrote:

 Yes, 

 Keep ckeditor inside js directory. 

 You need to put the ckfinder inside the wwwroot directory. 

 Create an element, ckeditor.ctp 
 ?php 
 echo $this-Html-script('/ckfinder/ckfinder', false); 

 if(!isset($description)){ 
 $description = ''; 
 } 

 echo $this-Form-textarea($name , array('label' = false , 'id' = 
 $id , 'value' = $description));//,'class'='ckeditor'? 

 script type=text/javascript 

 //var siteurl = '?php //echo FULL_BASE_URL;?'; 
 //![CDATA[ 

 // This call can be placed at any point after the 
 // textarea, or inside a headscript in a 
 // window.onload event handler. 

 // Replace the textarea id=editor with an CKEditor 
 // instance, using default configurations. 
 CKEDITOR.replace( '?php echo $id;?', 
 { 
 filebrowserBrowseUrl : '?php echo FULL_BASE_URL;?/ckfinder/ 
 ckfinder.html', 
 filebrowserImageBrowseUrl : '?php echo FULL_BASE_URL;?/ 
 ckfinder/ckfinder.html?type=Images', 
 filebrowserFlashBrowseUrl : '?php echo FULL_BASE_URL;?/ 
 ckfinder/ckfinder.html?type=Flash', 
 filebrowserUploadUrl : '?php echo FULL_BASE_URL;?/ckfinder/ 
 core/connector/php/connector.php?command=QuickUploadtype=Files', 
 filebrowserImageUploadUrl : '?php echo FULL_BASE_URL;?/ 
 ckfinder/core/connector/php/connector.php? 
 command=QuickUploadtype=Images', 
 filebrowserFlashUploadUrl : '?php echo FULL_BASE_URL;?/ 
 ckfinder/core/connector/php/connector.php? 
 command=QuickUploadtype=Flash', 
 width: '?php echo $width; ?', 
 height: '?php echo $height; ?', 
 contentsCss:['/css/global.css', '/css/ie7.css', '/css/jquery- 
 ui-1.8.16.custom.css', '/css/slider.css', '/css/bootstrap.css', '/css/ 
 ie.css'], 
 enterMode: CKEDITOR.ENTER_BR, 
 ignoreEmptyParagraph: true 

 } 
 ); 
 //]] 
 /script 

 Use in view : 
 ?php echo $this-Html-script(array('ckeditor/ckeditor', 'ckfinder/ 
 ckfinder')); ? 

 ?php echo $this-element('ckeditor', array('name' = 'body', 'id' = 
 'body_eng', 'width' = 800, 'height' = 550)); ? 

 Hope this will help. 



 On May 1, 11:32 am, hoss7 hoss...@gmail.com wrote: 
  this is my sample code for wotk with ckeditor 
  
  1.copy ckeditor in webroot/js 
  
  2. in view : 
  
  ?php echo $this-Html-script('ckeditor/ckeditor'); ? 
  
  ?php 
  echo 
  
 $this-Form-textarea('info',array('class'='ckeditor','id'='editor_office2003'));
  

  ? 
  /fieldset

-- 
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: cakePHP 2.1, ckeditor + ckfinder

2012-04-30 Thread Sean

For those that are having this problem as well, here is what I was able to 
do. This took a lot of trial and error on my part!

I have mine in:

app/webroot/js/ckeditor
app/webroot/js/ckfinder

I don't have anything special in my ckeditor config, just the default.

For ckfinder, here is my config:

* Put these lines at the top of the file after the ?php :
 * session_name('YOUR SESSION NAME'); - I found that my session name 
was NOT 'CAKEPHP' but what I have the cookie named.
 * session_start();

* In CheckAuthentication I have:
 *  if (!empty($_SESSION[Auth])) { 
if(!empty($_SESSION['Auth']['User']['admin'])) {
return true; 
}
} 
return false;
 * The only place that I use ckeditor and ckfinder is in my admin area, 
so I not only check
   for user logged in, but also for admin privileges as well. 
(Although, if it's configured properly
   non admin users shouldn't be able to reach that point anyway, just 
for added security.)

For the $baseURL:
 * $baseURL = '/path_to_cake_app/app/webroot/img/files/' - trailing 
slash required!!!
   (eg. '/test_dir/app/webroot/img/files/'
 * For the default ckfinder directory: 
'/path_to_cake_app/app/webroot/js/ckfinder/userfiles/'
 * I haven't tried this on my live host yet, but I would think that 
simply removing the leading path to the app
   would work in a production environment ('/app/webroot/...'), I 
should know shortly as I expect to turn this
   into production very soon.

For the $baseDir:
 * $baseDir = resolveUrl($baseUrl); - this is the default configuration 
and works well.

For the view:
 *  ?php echo $this-Form-input('body', array('id' = 'body', 'class' 
= 'ckeditor', 'label' = false)); ?
script type=text/javascript
var CustomHTML = CKEDITOR.replace( 'body',
{filebrowserBrowseUrl : 
'/path_to_cake/app/webroot/js/ckfinder/ckfinder.html',filebrowserWindowWidth 
: '1000',filebrowserWindowHeight : '700'}
);
/script

What I haven't quite figured out is how to turn the label off on the 
replaced editor. I have CSS that puts an asterisk (*) after required fields 
and it appears at the very bottom right after the editor window. Anyone 
have any ideas on how to remove the label from that? I assume it's being 
treated as a form field of it's own. I'm not as familiar with JS as I am 
PHP and CakePHP.

Any help with that little issue would be appreciated.

Elsewise, I hope this helps.

Sean

On Friday, April 27, 2012 2:21:45 PM UTC-4, Sean wrote:

 Hello again,

 I am working with cakePHP 2.1.0 and have incorporated ckeditor and 
 ckfinder. I have gotten the editor window to come up and even gotten the 
 ckfinder Browse Server button to work. What I am having problems with now 
 is that when I hit the Browse Server button, the window opens, but gives 
 me the dreaded Folder not found. Please refresh and try again. error.

 I have Googled, and RTFM, but to no avail. I'm not sure what else to do. I 
 have tried using my own file structure, and using the default.

 Here is some code:

 /*
 To make it easy to configure CKFinder, the $baseUrl and $baseDir can be 
 used.
 Those are helper variables used later in this config file.
 */

 /*
 $baseUrl : the base path used to build the final URL for the resources 
 handled
 in CKFinder. If empty, the default value (/userfiles/) is used.

 Examples:
 $baseUrl = 'http://example.com/ckfinder/files/';
 $baseUrl = '/userfiles/';

 ATTENTION: The trailing slash is required.
 */
 $baseUrl = '/js/ckfinder/userfiles/';

 /*
 $baseDir : the path to the local directory (in the server) which points to 
 the
 above $baseUrl URL. This is the path used by CKFinder to handle the files 
 in
 the server. Full write permissions must be granted to this directory.

 Examples:
 // You may point it to a directory directly:
 $baseDir = '/home/login/public_html/ckfinder/files/';
 $baseDir = 'C:/SiteDir/CKFinder/userfiles/';

 // Or you may let CKFinder discover the path, based on $baseUrl.
 // WARNING: resolveUrl() *will not work* if $baseUrl does not start with a 
 slash (/),
 // for example if $baseDir is set to  http://example.com/ckfinder/files/
 $baseDir = resolveUrl($baseUrl);

 ATTENTION: The trailing slash is required.
 */
 $baseDir = resolveUrl($baseUrl);

 At the moment, I have authentication turned off. I don't think it will 
 matter as this is in the admin area which has NO public access. Only myself 
 and another admin. 
 I have tried to use authentication and couldn't get that working either.

 I just don't know what these settings should be. I really like cakePHP, 
 but getting ckfinder has been REALLY mind-blowing. 
 I made this conversion b/c my old FCKeditor didn't work when I ported over 
 from 1.2

 Any help would be appreciated.

 Thanks



-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group

cakePHP 2.1, ckeditor + ckfinder

2012-04-27 Thread Sean
Hello again,

I am working with cakePHP 2.1.0 and have incorporated ckeditor and 
ckfinder. I have gotten the editor window to come up and even gotten the 
ckfinder Browse Server button to work. What I am having problems with now 
is that when I hit the Browse Server button, the window opens, but gives 
me the dreaded Folder not found. Please refresh and try again. error.

I have Googled, and RTFM, but to no avail. I'm not sure what else to do. I 
have tried using my own file structure, and using the default.

Here is some code:

/*
To make it easy to configure CKFinder, the $baseUrl and $baseDir can be 
used.
Those are helper variables used later in this config file.
*/

/*
$baseUrl : the base path used to build the final URL for the resources 
handled
in CKFinder. If empty, the default value (/userfiles/) is used.

Examples:
$baseUrl = 'http://example.com/ckfinder/files/';
$baseUrl = '/userfiles/';

ATTENTION: The trailing slash is required.
*/
$baseUrl = '/js/ckfinder/userfiles/';

/*
$baseDir : the path to the local directory (in the server) which points to 
the
above $baseUrl URL. This is the path used by CKFinder to handle the files in
the server. Full write permissions must be granted to this directory.

Examples:
// You may point it to a directory directly:
$baseDir = '/home/login/public_html/ckfinder/files/';
$baseDir = 'C:/SiteDir/CKFinder/userfiles/';

// Or you may let CKFinder discover the path, based on $baseUrl.
// WARNING: resolveUrl() *will not work* if $baseUrl does not start with a 
slash (/),
// for example if $baseDir is set to  http://example.com/ckfinder/files/
$baseDir = resolveUrl($baseUrl);

ATTENTION: The trailing slash is required.
*/
$baseDir = resolveUrl($baseUrl);

At the moment, I have authentication turned off. I don't think it will 
matter as this is in the admin area which has NO public access. Only myself 
and another admin. 
I have tried to use authentication and couldn't get that working either.

I just don't know what these settings should be. I really like cakePHP, but 
getting ckfinder has been REALLY mind-blowing. 
I made this conversion b/c my old FCKeditor didn't work when I ported over 
from 1.2

Any help would be appreciated.

Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Model

2012-04-27 Thread Sean
Your Consult model would use $belongsTo.

ex.

/**
 * belongsTo associations
 *
 * @var array
 */
public $belongsTo = array(
'Patient' = array(
'className' = 'Patient',
'foreignKey' = 'patient_id',
),
);// End $belongsTo

Good luck,
Sean


On Friday, April 27, 2012 5:33:06 AM UTC-4, alexkd wrote:

 I have two tables 1)Patient2)Consulting. Consulting has foreign key 
 patient_id. But Patient would not have Consulting_id. 
 What relation should I use? 
 I have to ensure saving to Consulting table after each saving of 
 patient. i.e its essential to saving to Consulting table after the 
 saving Patient. 
 How to ensure this?

-- 
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: How to call element to element

2012-04-27 Thread Sean
In main view, call:

$this-element('first_element');

In 'first_element' call:

$this-element('second_element');

Hope this helps


On Thursday, April 26, 2012 8:26:48 AM UTC-4, nikunj kansara wrote:

 Hello,

 I want to call one elements to another elements

 example : I have view/elements/view.ctp

 i want to call another element from view.ctp

 How can i do that?



-- 
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: Create a collection page from multiple models

2012-04-11 Thread Sean
Jeremy,

Thanks for the reply. I can see where you're coming from. This site is for 
a single artist, but I suppose that it would still be better to have a 
single table for the art work and have it related to the images and 
categories.

Thanks for the advice, I'll try to redesign it.

Sean

On Wednesday, April 11, 2012 12:53:19 AM UTC-4, Jeremy Burns wrote:

 That sounds like poor database design from a number of angles. If you 
 wanted to add another category you'd have to add another table. Presumably 
 these are all tied together with something common like Artist? Then you 
 could do a find from the Artist model and contain (see the Containable 
 behaviour) each of the models you mention below. Then place conditions on 
 the Artist and/or category models to show the entire catalogue or a subset.

 Jeremy Burns
 Class Outfit

 http://www.classoutfit.com 

 On 10 Apr 2012, at 21:44:55, Sean wrote:

 Good afternoon everyone,

 I have a site I'm working on in 2.1. It is an artists website. I have the 
 models and controllers for several categories of artwork: CharacterStudy, 
 Figure, Monochrome and Portrait.

 What I'm trying to do is also create a page that shows all of them at 
 once, a Collected Works page. So far I have hit a brick wall. I don't 
 need another table in the database, because that would duplicate the 
 information. I would rather be able to address each table and it's 
 associated images all at once.

 Does anyone have any ideas?

 Thanks,
 Sean




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


Create a collection page from multiple models

2012-04-10 Thread Sean
Good afternoon everyone,

I have a site I'm working on in 2.1. It is an artists website. I have the 
models and controllers for several categories of artwork: CharacterStudy, 
Figure, Monochrome and Portrait.

What I'm trying to do is also create a page that shows all of them at once, 
a Collected Works page. So far I have hit a brick wall. I don't need 
another table in the database, because that would duplicate the 
information. I would rather be able to address each table and it's 
associated images all at once.

Does anyone have any ideas?

Thanks,
Sean

-- 
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: sql logs not showing

2012-04-03 Thread Sean Templeton
no, i have it set to 3

On Tue, Apr 3, 2012 at 1:19 PM, lowpass zijn.digi...@gmail.com wrote:

 Do you have debug set to 0?

 On Sun, Apr 1, 2012 at 11:05 PM, LordZardeck s...@blackfireweb.com
 wrote:
  Using ?php echo $this-element('sql_dmp'); ? is displaying  no queries
  made, but i'm getting data. If i go into the sql_dump.ctp element and
  print_r() the $logs variable, i get this:
 
  (
  [default] = Array
  (
  [log] = Array
  (
  )
 
  [count] = 0
  [time] =
  )
 
  )
 
  What's going on? How do I proceed from here to find the problem? I'm
 using
  CakePHP 1.3 for reference.
 
  --
  Our newest site for the community: CakePHP Video Tutorials
  http://tv.cakephp.org
  Check out the new CakePHP Questions site http://ask.cakephp.org and help
  others with their CakePHP related questions.
 
 
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this
 group at
  http://groups.google.com/group/cake-php

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Debug in Production Mode

2012-03-14 Thread Sean
Thanks AD. I found the culprit.

MR

On Tuesday, March 13, 2012 12:33:27 PM UTC-4, Sean wrote:

 Hello all,

 I've recently noticed a problem. I am getting debug messages on my 
 production site. I have set debug to 0 in core.php, but I am still getting 
 these messages. I did a search of all my files and found debug settings, 
 but know which ones might be affecting this. This site is built using 
 1.2.0.7692 
 RC3. I don't know if that makes any difference.

 Here is the contents of my core.php:

 ?php
 define('LOG_ERROR', 2);

 Configure::write('debug', 0);
 Configure::write('Routing.admin', 'admin');

 $session = array(
 'save' = 'php',
 'cookie' = 'MYSITE',
 'timeout' = '120',
 'start' = true,
 'checkAgent' = true,
 //'table' = 'cake_sessions',
 //'database' = 'default'
 );
 Configure::write('Session', $session);

 $security = array(
 'level' = 'medium',
 'salt' = 'mysalt'
 );
 Configure::write('Security', $security);

 //Configure::write('Asset.filter.css', 'css.php');
 //Configure::write('Asset.filter.js', 
 'custom_javascript_output_filter.php');

 //Configure::write('Acl.classname', 'DbAcl');
 //Configure::write('Acl.database', 'default');

 Cache::config('default', array('engine' = 'File'));
 ?

 Here are the files that reference debug:

 app/controllers/bids_controller.php: Configure::write('debug', 0);
 app/controllers/auctions_controller.php: Configure::write('debug', 0);
 app/controllers/auctions_controller.php: Configure::write('debug', 0);
 app/controllers/auction_images_controller.php: Configure::write('debug', 
 0);
 app/controllers/sitemaps_controller.php:Configure::write('debug', 
 0);
 app/controllers/sitemaps_controller.php:   
 Configure::write('debug', 0); 
 app/controllers/sitemaps_controller.php:   
 Configure::write('debug', 0); 
 app/controllers/sitemaps_controller.php:   
 Configure::write('debug', 0); 
 app/controllers/sitemaps_controller.php:   
 Configure::write('debug', 0); 
 app/controllers/sitemaps_controller.php:   
 Configure::write('debug', 0); 
 app/controllers/settings_controller.php: Configure::write('debug', 0);
 app/controllers/settings_controller.php: Configure::write('debug', 0);
 cake/tests/cases/dispatcher.test.php: Configure::write('debug', 0);
 cake/tests/cases/dispatcher.test.php: Configure::write('debug', 0);
 cake/tests/cases/dispatcher.test.php: Configure::write('debug', 0);
 cake/tests/cases/dispatcher.test.php: Configure::write('debug', 0);
 cake/tests/cases/dispatcher.test.php: Configure::write('debug', 2);
 cake/tests/cases/libs/view/helpers/html.test.php: Configure::write('debug', 
 0);
 cake/tests/cases/libs/view/helpers/html.test.php: Configure::write('debug', 
 $debug);
 cake/tests/cases/libs/view/helpers/javascript.test.php: 
 Configure::write('debug', 
 0);
 cake/tests/cases/libs/view/helpers/javascript.test.php: 
 Configure::write('debug', 
 $debug);
 cake/tests/cases/libs/controller/components/auth.test.php: 
 Configure::write('debug', 
 1);
 cake/tests/cases/libs/controller/controller.test.php: 
 Configure::write('debug', 
 2);
 cake/tests/cases/libs/model/behaviors/translate.test.php: 
 Configure::write('debug', 
 0);
 cake/tests/cases/libs/model/behaviors/translate.test.php: 
 Configure::write('debug', 
 $debug);
 cake/tests/cases/libs/model/model.test.php: Configure::write('debug', 2);
 cake/tests/cases/libs/model/model.test.php: Configure::write('debug', 
 $this-debug);
 cake/tests/cases/libs/model/datasources/dbo_source.test.php: 
 Configure::write('debug', 
 1);
 cake/tests/cases/libs/model/datasources/dbo_source.test.php: 
 Configure::write('debug', 
 $this-debug);
 cake/tests/cases/libs/model/datasources/dbo_source.test.php: 
 Configure::write('debug', 
 2);
 cake/tests/cases/libs/model/datasources/dbo_source.test.php: 
 Configure::write('debug', 
 $oldDebug);
 cake/console/cake.php: Configure::write('debug', 1);
 cake/console/libs/templates/skel/config/core.php: Configure::write('debug', 
 2);
 cake/console/libs/schema.php: Configure::write('debug', 2);



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


Debug in Production Mode

2012-03-13 Thread Sean
Hello all,

I've recently noticed a problem. I am getting debug messages on my 
production site. I have set debug to 0 in core.php, but I am still getting 
these messages. I did a search of all my files and found debug settings, 
but know which ones might be affecting this. This site is built using 
1.2.0.7692 
RC3. I don't know if that makes any difference.

Here is the contents of my core.php:

?php
define('LOG_ERROR', 2);

Configure::write('debug', 0);
Configure::write('Routing.admin', 'admin');

$session = array(
'save' = 'php',
'cookie' = 'MYSITE',
'timeout' = '120',
'start' = true,
'checkAgent' = true,
//'table' = 'cake_sessions',
//'database' = 'default'
);
Configure::write('Session', $session);

$security = array(
'level' = 'medium',
'salt' = 'mysalt'
);
Configure::write('Security', $security);

//Configure::write('Asset.filter.css', 'css.php');
//Configure::write('Asset.filter.js', 
'custom_javascript_output_filter.php');

//Configure::write('Acl.classname', 'DbAcl');
//Configure::write('Acl.database', 'default');

Cache::config('default', array('engine' = 'File'));
?

Here are the files that reference debug:

app/controllers/bids_controller.php: Configure::write('debug', 0);
app/controllers/auctions_controller.php: Configure::write('debug', 0);
app/controllers/auctions_controller.php: Configure::write('debug', 0);
app/controllers/auction_images_controller.php: Configure::write('debug', 0);
app/controllers/sitemaps_controller.php:Configure::write('debug', 
0);
app/controllers/sitemaps_controller.php:   
Configure::write('debug', 0); 
app/controllers/sitemaps_controller.php:   
Configure::write('debug', 0); 
app/controllers/sitemaps_controller.php:   
Configure::write('debug', 0); 
app/controllers/sitemaps_controller.php:   
Configure::write('debug', 0); 
app/controllers/sitemaps_controller.php:   
Configure::write('debug', 0); 
app/controllers/settings_controller.php: Configure::write('debug', 0);
app/controllers/settings_controller.php: Configure::write('debug', 0);
cake/tests/cases/dispatcher.test.php: Configure::write('debug', 0);
cake/tests/cases/dispatcher.test.php: Configure::write('debug', 0);
cake/tests/cases/dispatcher.test.php: Configure::write('debug', 0);
cake/tests/cases/dispatcher.test.php: Configure::write('debug', 0);
cake/tests/cases/dispatcher.test.php: Configure::write('debug', 2);
cake/tests/cases/libs/view/helpers/html.test.php: Configure::write('debug', 
0);
cake/tests/cases/libs/view/helpers/html.test.php: Configure::write('debug', 
$debug);
cake/tests/cases/libs/view/helpers/javascript.test.php: 
Configure::write('debug', 
0);
cake/tests/cases/libs/view/helpers/javascript.test.php: 
Configure::write('debug', 
$debug);
cake/tests/cases/libs/controller/components/auth.test.php: 
Configure::write('debug', 
1);
cake/tests/cases/libs/controller/controller.test.php: Configure::write('debug', 
2);
cake/tests/cases/libs/model/behaviors/translate.test.php: 
Configure::write('debug', 
0);
cake/tests/cases/libs/model/behaviors/translate.test.php: 
Configure::write('debug', 
$debug);
cake/tests/cases/libs/model/model.test.php: Configure::write('debug', 2);
cake/tests/cases/libs/model/model.test.php: Configure::write('debug', 
$this-debug);
cake/tests/cases/libs/model/datasources/dbo_source.test.php: 
Configure::write('debug', 
1);
cake/tests/cases/libs/model/datasources/dbo_source.test.php: 
Configure::write('debug', 
$this-debug);
cake/tests/cases/libs/model/datasources/dbo_source.test.php: 
Configure::write('debug', 
2);
cake/tests/cases/libs/model/datasources/dbo_source.test.php: 
Configure::write('debug', 
$oldDebug);
cake/console/cake.php: Configure::write('debug', 1);
cake/console/libs/templates/skel/config/core.php: Configure::write('debug', 
2);
cake/console/libs/schema.php: Configure::write('debug', 2);

-- 
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: CakePHP Paypal returning link not working with SSL

2012-02-28 Thread Sean
Thanks for the response lowpass.

The controller allows ipn, but not returning. However, after further
testing, I found that not only was I being returned to the login page,
I was actually logged out. I found this when trying to go to other
places on the site and found that it shows the login instead of my
welcome. I have a status bar at the top of all my pages that show
either a login box or a welcome showing the user's name.

On Feb 28, 2:17 pm, lowpass zijn.digi...@gmail.com wrote:
 Are you sure that the controller that handles the return action
 specifically allows that action?

 function beforeFilter()
 {
         parent::beforeFilter();
         $this-Auth-allow(array('ipn', 'returning'));

 }

 (or whatever the actual names are)

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


CakePHP Paypal returning link not working with SSL

2012-02-27 Thread Sean
Hello all,

I am having a problem with using Paypal API on my cakePHP site while
using an SSL. My site is entirely secured with an SSL. Everything
seems to work except for the returning link. Everything works when not
using SSL. I have both Paypal and IPN. The IPN notification works. But
when returning from Paypal, it directs to my login page instead of the
controller's returning function.

My app is accessed using https://mydomain.com

Here is some code:

From the config:


'App' = array(
'encoding'  = 'UTF-8',
'baseUrl'= '',
'base'= '',
'dir'   = 'app',
'webroot'   = 'webroot',
'name'   = 'mydomain.com',
'url'= 'https://mydomain.com',
'timezone'  = 'America/New_York',
'language'  = 'en',

From the controller:

  if(!empty($this-data)) {
if($this-appConfigurations['gateway']) {
// Formating the data
$paypal['url']  = 
Configure::read('Paypal.url');
$paypal['business'] = 
Configure::read('Paypal.email');
$paypal['lc']   = 
Configure::read('Paypal.lc');
$paypal['currency_code'] = 
$this-appConfigurations['currency'];
if (!empty($auction['Charity']['name'])) {
  $paypal['item_name'] = $auction['Auction']
['title'] . ' - Benefits: ' . $auction['Charity']['name'];
} else {
  $paypal['item_name'] = $auction['Auction']
['title'];
}
$paypal['item_number']   = $auction['Auction']['id'];
$paypal['amount']   = number_format($total, 2);
$paypal['return']   = 
$this-appConfigurations['url'] . '/
auctions/returning';
$paypal['notify_url'] = $this-
appConfigurations['url'] . '/auctions/ipn';
$paypal['custom']   = $user['User']['id'];
$paypal['first_name']   = $user['User']['first_name'];
$paypal['last_name']   = $user['User']['last_name'];
$paypal['email']  = $user['User']['email'];
$paypal['address1'] = 
$userAddress['Billing']['Address']
['address_1'];
$paypal['address2'] = 
$userAddress['Billing']['Address']
['address_2'];
$paypal['city'] = 
$userAddress['Billing']['Address']
['city'];
$paypal['zip']  = 
$userAddress['Billing']['Address']
['postcode'];

$this-Paypal-configure($paypal);
$paypalData = $this-Paypal-getFormData();
$this-set('paypalData', $paypalData);

As an alternative, I could set the app up to only use SSL for login
and registration. The problem I'm running into there is that the app
stays in HTTPS after the login, so then I run into the same problem.

Any assistance would be appreciated.

Thanks,
Sean

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


SSL paypal returning

2012-02-17 Thread Sean
Hello all,

I use a redirect in order to direct users to my HTTPS site. I have
just discovered that when I direct users to Paypal in order to make
their payments, the returning link doesn't work. It goes to my user
login page instead of the page that it's supposed to. I have done some
testing and discovered that I have been completely logged out of my
site when I return. The application doesn't take long enough for the
session to have timed out. I am just being logged out.

When I go back to the HTTP configuration, it works just fine. I am at
a loss as to what could be happening here.

I am implementing both Paypal and IPN. The IPN works just fine. Here
is some code:

app/config/config.php:

'App' = array(
'encoding'  = 'UTF-8',
'baseUrl'= '',
'base'= '',
'dir'   = 'app',
'webroot'   = 'webroot',
'name'   = 'domain.com',
'url'= 'https://www.domain.com',
'timezone'  = 'America/New_York',

app/app_controller.php:


if ($this-appConfigurations['forceSSL'] == true) {
  if (!env(HTTPS)) {
$this-redirect('https://' . env('SERVER_NAME') . $this-
here);
  }
}

One of my payment controllers:

if(!empty($this-data)) {
  if($this-appConfigurations['gateway']) {
// Formating the data
$paypal['url']   = 
Configure::read('Paypal.url');
$paypal['business']  = Configure::read('Paypal.email');
$paypal['lc']= 
Configure::read('Paypal.lc');
$paypal['currency_code'] = 
$this-appConfigurations['currency'];
$paypal['item_name'] = $auction['Auction']['title'];
$paypal['item_number']   = $auction['Auction']['id'];
$paypal['amount']= number_format($total, 2);
$paypal['return']= $this-appConfigurations['url'] 
. '/
auctions/returning';
$paypal['notify_url']= $this-appConfigurations['url'] 
. '/
auctions/ipn';
$paypal['custom']= $user['User']['id'];
$paypal['first_name']= $user['User']['first_name'];
$paypal['last_name'] = $user['User']['last_name'];
$paypal['email'] = $user['User']['email'];
$paypal['address1']  = 
$userAddress['Billing']['Address']
['address_1'];
$paypal['address2']  = 
$userAddress['Billing']['Address']
['address_2'];
$paypal['city']  = 
$userAddress['Billing']['Address']
['city'];
$paypal['zip']   = 
$userAddress['Billing']['Address']
['postcode'];

$this-Paypal-configure($paypal);
$paypalData = $this-Paypal-getFormData();
$this-set('paypalData', $paypalData);
 } else {
// the gateway is not set
if ($auction['Auction']['bids']  0) {
  // Find user first
  $this-__process($auction, $user);
}else {
  $auction['Auction']['status_id'] = 2;
  $this-Auction-save($auction);
}
  }

-- 
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: Using HABTM

2012-02-16 Thread Sean
I discovered the problem that gave me the error. Now what I'm working
on selecting the images and getting them saved in the join table.

I have been able to manually populate the fields in the join table and
verify that the association works. But when I create the selection
form, the form appears to be my original add form instead of my new
select form. At least that is what I have seen when I view the source
of the page. form id=AuctionImageAddForm method=post action=/
admin/auction_images/add

On Feb 16, 3:59 am, Florin Trifu florin.catalin.tr...@gmail.com
wrote:
 Ok. Now I think I understand what you're trying to obtain.
 Please tell me again your problem.

 Best regards!









 On Thu, Feb 16, 2012 at 4:10 AM, Sean sean.rac...@gmail.com wrote:
  Thanks for the reply, Florin.

  Auction hasMany AuctionImages is the way that it is currently set. The
  problem is that it currently uses up any AuctionImage that is
  associated with the Auction. Each image is associated with a
  particular auction_id.

  What I'm looking for is a way to have a set of images that I then
  associate with numerous auctions. That is multiple images with
  multiple auctions (e.g. 6 images for a single item type and then
  associate them with multiple auctions).

  In addition to the structure that I'm attempting in the Models, here
  is the current structure of the database tables:

      auctions:
           Column                       Type
          1      id                      int(11)            (AUTO INCREMENT)
          2      title                   varchar(255)
          5      description     text
          6      category_id     int(11)
          
          26     created         datetime
          27     modified                datetime

         Keyname          Type         Unique      Column
         PRIMARY         BTREE   Yes             id
         category_id     BTREE   No              category_id

      auction_images:
          1      id                      int(8)          UNSIGNED
   AUTO_INCREMENT
          2      auction_id              int(11)
          3      image           varchar(255)
          4      order                   int(11)
          5      created         datetime
          6      modified                datetime

          Keyname       Type           Unique      Column
          PRIMARY              BTREE     Yes             id
          auction_id           BTREE     No              auction_id

      Join table - auctions_auction_images
          1     id                       int(11)      AUTO_INCREMENT
          2     auction_id           int(11)
          3     auction_image_id int(11)
          4     order                   int(1)

         Keyname                 Type            Unique    Column
         PRIMARY                 BTREE   Yes           id
         auction_id                      BTREE   No            auction_id
         auction_image_id        BTREE   No            auction_image_id

  I hope this help clear up what I am looking for.

  Thanks,
  Sean

  On Feb 15, 5:33 pm, Florin Trifu florin.catalin.tr...@gmail.com
  wrote:
   Hi

   I don't know if my understanding is correct, but Auction hasMany
   AuctionImages and not HABTM.
   You should try to change that hasAndBelongsTo from the Auction model, of
   which I've never heard by the way, into hasMany.

   As by the error following the pattern model_name_X is not associated
  with
   model_name_X usually appears in this case:

   Let's take for example you Image model:

   - you use $actsAs = array('Containable')
   - then you pass an array following this pattern into a query
  interrogating
   the Image model:

   array('contain' = array('Image' [,'model_name']))

   Hope it's useful!

   Best regards!

   On Wed, Feb 15, 2012 at 10:40 PM, Sean sean.rac...@gmail.com wrote:
Hi all,

I am trying to do something that I think is pretty common.

I am working on an auction site and if I had say a auctions table and
a auction_images table. I want to be able to use multiple images with
multiple auctions.

In other words - auction1 be associated with auction_image 1, 2, 3 
auction2 be associated with 1, 2, 3

When I use a $belongsTo relationship from Users to Images it works
fine, but that limits things to haveing specific images directly
linked to image id's (effectively using up the associated images).

I thought that the HABTM direction was the way to go, but am having a
problem with it.  But when I use HABTM, I get an error that the model
images is not associated with the model images. I believe that I have
followed the book.cakephp directions and Josh Benner's directions but
it's not working.

Here are the model's:

    Auction Model:
       class Auction extends AppModel {

               var $name = 'Auction';

               var $actsAs = array('Containable');

               var $belongsTo = array

Using HABTM

2012-02-15 Thread Sean
Hi all,

I am trying to do something that I think is pretty common.

I am working on an auction site and if I had say a auctions table and
a auction_images table. I want to be able to use multiple images with
multiple auctions.

In other words - auction1 be associated with auction_image 1, 2, 3 
auction2 be associated with 1, 2, 3

When I use a $belongsTo relationship from Users to Images it works
fine, but that limits things to haveing specific images directly
linked to image id's (effectively using up the associated images).

I thought that the HABTM direction was the way to go, but am having a
problem with it.  But when I use HABTM, I get an error that the model
images is not associated with the model images. I believe that I have
followed the book.cakephp directions and Josh Benner's directions but
it's not working.

Here are the model's:

 Auction Model:
class Auction extends AppModel {

var $name = 'Auction';

var $actsAs = array('Containable');

var $belongsTo = array(
'Category' = array(
'className'  = 'Category',
'foreignKey' = 'category_id'
),
'Status' = array(
'className'  = 'Status',
'foreignKey' = 'status_id'
),
'Winner' = array(
'className'  = 'User',
'foreignKey' = 'winner_id'
)
);

var $hasMany = array(
'Bidbutler'  = array(
'className'  = 'Bidbutler',
'foreignKey' = 'auction_id',
'limit'  = 10,
'dependent'  = true
),

'Bid' = array(
'className'  = 'Bid',
'foreignKey' = 'auction_id',
'order'  = 'Bid.id DESC',
'limit'  = 10,
'dependent'  = true
),

'Autobid' = array(
'className'  = 'Autobid',
'foreignKey' = 'auction_id',
'limit'  = 10,
'dependent'  = true
)
);

var $hasAndBelongsTo = array(
'AuctionImage'   =
array(
'className'  = 
'AuctionImage',
'joinTable' = 
'auctions_auction_images',
'foreignKey'   = 
'auction_id',
'associationForeignKey' = 
'auction_image_id',
'unique'= 
false,
'limit'= 
'6',
'order'= 
array('order' = 'asc'),
),
);

 AuctionImages Model:

class AuctionImage extends AppModel {

var $name = 'AuctionImage';

var $hasAndBelongsToMany = array(
'Auction' = array(
'className'   = 'Auction',
'joinTable'   = 
'auctions_auction_images',
'foreignKey'= 
'auction_image_id',
'associationForeignKey'  = 'auction_id',
'unique' = false,
'limit'= '6'

)
);

I'm not sure how the controller language is supposed to look but an
example of the auction_image language would be:

$auction = $this-AuctionImage-Auction-read(null, $auction_id);

-- 
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: Using HABTM

2012-02-15 Thread Sean
Thanks for the reply, Florin.

Auction hasMany AuctionImages is the way that it is currently set. The
problem is that it currently uses up any AuctionImage that is
associated with the Auction. Each image is associated with a
particular auction_id.

What I'm looking for is a way to have a set of images that I then
associate with numerous auctions. That is multiple images with
multiple auctions (e.g. 6 images for a single item type and then
associate them with multiple auctions).

In addition to the structure that I'm attempting in the Models, here
is the current structure of the database tables:

 auctions:
  Column   Type
 1  id  int(11)(AUTO INCREMENT)
 2  title   varchar(255)
 5  description text
 6  category_id int(11)
 
 26 created datetime
 27 modifieddatetime

Keyname  Type Unique  Column
PRIMARY BTREE   Yes id
category_id BTREE   No  category_id

 auction_images:
 1  id  int(8)  UNSIGNED
AUTO_INCREMENT
 2  auction_id  int(11)
 3  image   varchar(255)
 4  order   int(11)
 5  created datetime
 6  modifieddatetime

 Keyname   Type   Unique  Column
 PRIMARY  BTREE Yes id
 auction_id   BTREE No  auction_id


 Join table - auctions_auction_images
 1 id   int(11)  AUTO_INCREMENT
 2 auction_id   int(11)
 3 auction_image_id int(11)
 4 order   int(1)

Keyname TypeUniqueColumn
PRIMARY BTREE   Yes   id
auction_id  BTREE   Noauction_id
auction_image_idBTREE   Noauction_image_id

I hope this help clear up what I am looking for.

Thanks,
Sean

On Feb 15, 5:33 pm, Florin Trifu florin.catalin.tr...@gmail.com
wrote:
 Hi

 I don't know if my understanding is correct, but Auction hasMany
 AuctionImages and not HABTM.
 You should try to change that hasAndBelongsTo from the Auction model, of
 which I've never heard by the way, into hasMany.

 As by the error following the pattern model_name_X is not associated with
 model_name_X usually appears in this case:

 Let's take for example you Image model:

 - you use $actsAs = array('Containable')
 - then you pass an array following this pattern into a query interrogating
 the Image model:

 array('contain' = array('Image' [,'model_name']))

 Hope it's useful!

 Best regards!







 On Wed, Feb 15, 2012 at 10:40 PM, Sean sean.rac...@gmail.com wrote:
  Hi all,

  I am trying to do something that I think is pretty common.

  I am working on an auction site and if I had say a auctions table and
  a auction_images table. I want to be able to use multiple images with
  multiple auctions.

  In other words - auction1 be associated with auction_image 1, 2, 3 
  auction2 be associated with 1, 2, 3

  When I use a $belongsTo relationship from Users to Images it works
  fine, but that limits things to haveing specific images directly
  linked to image id's (effectively using up the associated images).

  I thought that the HABTM direction was the way to go, but am having a
  problem with it.  But when I use HABTM, I get an error that the model
  images is not associated with the model images. I believe that I have
  followed the book.cakephp directions and Josh Benner's directions but
  it's not working.

  Here are the model's:

      Auction Model:
         class Auction extends AppModel {

                 var $name = 'Auction';

                 var $actsAs = array('Containable');

                 var $belongsTo = array(
                         'Category' = array(
                                 'className'  = 'Category',
                                 'foreignKey' = 'category_id'
                         ),
                         'Status' = array(
                                 'className'  = 'Status',
                                 'foreignKey' = 'status_id'
                         ),
                         'Winner' = array(
                                 'className'  = 'User',
                                 'foreignKey' = 'winner_id'
                         )
                 );

                 var $hasMany = array(
                         'Bidbutler'  = array(
                                 'className'  = 'Bidbutler',
                                 'foreignKey' = 'auction_id',
                                 'limit'      = 10,
                                 'dependent'  = true

app-controllers-pages_controller

2012-02-12 Thread Sean
Hello all,

This is the first time I have posted. I am relatively new to cakePHP.
I have been working with an application and have run into something
strange. My app/controllers/pages_controller is acting very strange.

It works just fine in my development environment. I can view, add,
edit and delete pages. I uploaded it into my host and now it doesn't
work. At one point, it did, but now it's acting up.

I first discovered the issue a couple of days ago when I tried to edit
a page. When I tried to save it, it redirected me to the edit page and
deleted my changes.

It shows old pages in the views. I even made my changes in my
development environment and imported the SQL into the database
manually.

I tried deleting the pages and according to the list in my admin area,
they are gone, but the database shows that they are still there.

This is all very strange. Has anyone seen this before? My site is on
the live server, but our site hasn't officially gone live. These are
important informational pages that need to be viewable and accurate.
How could this work in one environment and stop working in another?

Any help would be appreciated.

Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: i18n script ans default.po file

2011-09-14 Thread Sean Dong
avairet:

*Have you solved the problem? I am having the same thing here. The 
translation is not show up. Only the original string...*

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


PHP / CAKE Developer needed

2010-09-16 Thread Sean Hynes
Hello,

We need someone who can grind out some finishing work on a big
project. We need someone who knows PHP, Cake and API consumption (from
Shopper.com) that can pan out some finihsing touches in the next 2 to
3 weeks.

Please contact me immediately at seanh a weblogixinc.com  or
678-568-9606

Thanks
SEan

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


Class 'AppController' not found.

2010-03-22 Thread Sean
Hey, guys.  I'm a newbie here.  I encountered this problem when trying
to run a simple controller starting with the following lines:

class UsersController extends AppController {
var $name = 'Users';
var $scarffold;
var $helpers = array('Html', 'Form', 'Session');
var $components = array('Auth');
...

And the debugger said Fatal error: Class 'AppController' not found in
C:\xampp\htdocs\cakephp\app\controllers\users_controller.php on line
2

Would you please advise me what kind of mistake could I have made?
And how can I solve it?
Thanks a lot.

- Sean

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


How to use naming convention in an unfamiliar scheme.

2008-11-11 Thread Sean

I'm a newbie to CakePHP.

I'm building a site that lists a massive amount of places; possibly in
the hundreds of thousands. These places will be user-registered, so
the mysql database is split up into tables, whose names contain an
variable zipcode and a suffix indicating if it is information often
accessed or only ocassionally accessed (when the place's profile is
viewed).

As I understand, I need a controller for each of these tables, named
after the table. There is the potential of having two tables for every
zipcode, so I don't want to have that many controllers. All tables
have the same structure however, and I will constantly be needing to
look through many of them. How can I just make two controllers in
CakePHP that apply to the two different types (often and rarely
accessed) of all these tables, rather than have an individual one for
every single table?

If my explanation is poor, I'd be happy to try and re-write it. Thanks
for the help, in advance.

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



Using curl_multi_* across several modules

2007-11-26 Thread Sean Walberg
I've got a series of web services implemented as models that a controller
might call as such:

$a = $this-WebService1-findByName($searchstring1);
$b = $this-WebService2-findByName($searchstring2)
$c = $this-WebService3-findByName($searchstring3)
// Do something with $a, $b, and $c, then pass it to the view

Each model implements some form of caching, but in the event of a cache-miss
the user has to wait for all 3 web services to execute concurrently.

I'd like to use curl_multi_exec to make the calls go in parallel, but the
curl object isn't exposed to the world, and the blocking model doesn't work
anymore.  Is there anything prettier than

$curl_a = $this-WebService1-setupFindByName($searchstring1);
$curl_b = $this-WebService2-setupFindByName($searchstring2)
$curl_c = $this-WebService3-setupFindByName($searchstring3)

// curl_multi_add_handle ...
// do { curl_multi_exec... } while $(waiting)

$a = $this-WebService1-findByName(curl_multi_getcontent($curl_a));
$b = $this-WebService1-findByName(curl_multi_getcontent($curl_b));
$c = $this-WebService1-findByName(curl_multi_getcontent($curl_b));

Would this be wrapped in another model? Or is there another form more
appropriate for this?

Thanks

Sean

-- 
Sean Walberg [EMAIL PROTECTED]http://ertw.com/

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



Re: Table comumn widths

2007-05-31 Thread sean

No way, I am afraid.

On 5月26日, 下午11时17分, merlin [EMAIL PROTECTED] wrote:
 Hi all

 If I build a table using HtmlHelper::tableHeadersand
 HtmlHelper::tableCells - how do I control the width of each column?


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



Re: Problems with Cakephp

2007-04-27 Thread sean

sovled! thx

On Apr 27, 11:04 am, sean [EMAIL PROTECTED] wrote:
 After I set up cakephp, I got the following error messages when
 visiting.
 -
 Strict Standards: Redefining already defined constructor for class
 Object in /home//dev/cake/libs/object.php on line 69

 Strict Standards: Assigning the return value of new by reference is
 deprecated in /home//dev/cake/libs/object.php on line 102

 Strict Standards: Assigning the return value of new by reference is
 deprecated in /home//dev/cake/libs/security.php on line 48

 Strict Standards: Assigning the return value of new by reference is
 deprecated in /home//dev/cake/libs/configure.php on line 82

 Strict Standards: Non-static method Configure::getInstance() should
 not be called statically in /home//dev/cake/bootstrap.php on line
 43

 Strict Standards: Non-static method Configure::write() should not be
 called statically in /home//dev/cake/bootstrap.php on line 82

 Strict Standards: Non-static method Configure::getInstance() should
 not be called statically in /home//dev/cake/libs/configure.php on
 line 102
 --
 I really don't know why.

 After that, I found some tips in this forum, which say that E_STRICT
 should be turned off when using php 5.1. Then I did what it says. But
 I still got the messages above.

 Can anyone help me with it? Thank you in advance!:)


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



Problems with Cakephp

2007-04-26 Thread sean

After I set up cakephp, I got the following error messages when
visiting.
-
Strict Standards: Redefining already defined constructor for class
Object in /home//dev/cake/libs/object.php on line 69

Strict Standards: Assigning the return value of new by reference is
deprecated in /home//dev/cake/libs/object.php on line 102

Strict Standards: Assigning the return value of new by reference is
deprecated in /home//dev/cake/libs/security.php on line 48

Strict Standards: Assigning the return value of new by reference is
deprecated in /home//dev/cake/libs/configure.php on line 82

Strict Standards: Non-static method Configure::getInstance() should
not be called statically in /home//dev/cake/bootstrap.php on line
43

Strict Standards: Non-static method Configure::write() should not be
called statically in /home//dev/cake/bootstrap.php on line 82

Strict Standards: Non-static method Configure::getInstance() should
not be called statically in /home//dev/cake/libs/configure.php on
line 102
--
I really don't know why.

After that, I found some tips in this forum, which say that E_STRICT
should be turned off when using php 5.1. Then I did what it says. But
I still got the messages above.

Can anyone help me with it? Thank you in advance!:)


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



Questions Re: App Distribution

2006-04-11 Thread Sean

I have a few questions, and I apologize in advance if the question
seems like a stupid one. First, I would like to know if Cake is
suitable for building applications that are intended for distribution.
I'm working on a suite of PHP applications that will enable us to
engage in online advoacy campaigns. As a non-profit, this is an
extremely important tool, and sadly, the resources available are either
extremely expensive or lack the features we need. Since there is such a
huge need for this type of system, I want to allow other non-profits to
use the application on their sites.

It seems as though anything that is programmed with Cake needs to be
distributed with the Cake Framework, is this correct? If this is the
case, there are a number of elements which would be out of my control
(like not knowing if their webhost gives them access to mod-rewrite,
etc).

So, my question is this...

1) Is Cake suitable for creating applications intended for
distribution, or is it's purpose primarily for use on developers
sites/servers?

2) Would it be possible to create an install script for my
application that would check the client's server and adapt Cake's
settings (like disabling mod-rewrite, etc) to match the server?

Thanks in advance, 
Sean @ Save the Orcas, Inc


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



Re: Questions Re: App Distribution

2006-04-11 Thread Sean

I really love Cake so far, though I can't really get it running right
on my computer (WinXP running WAMP), but I think I just need to tweek a
few settings in the httpd file.

My one concern is the overall size of the package, first there is my
application, then there are the Cake files, would make for a large
package (possibly, though I may very well find my package size becoming
smaller with Cake.

The once main concern that I have is generally, the people I work with
(other non-profits) have very limited skills - some don't even know
what FTP is. Up until now, I've kept things very simple. They have
downloaded a single file from my site which they place in their root
directory, and the script uses CURL to download and install my
application automatically.

I'm worried that people will not know where to place the Cake
directories and such. Can anyone point me towards other applications
built with Cake?

Also, I'm not sure the license for Cake will allow me to distribute the
application the way I want. Since I represent a non-profit, all our
scripts are generally free, however, we do encode all files with
IonCube. This is done for security purposes only, and we have no
problem giving the source code to others to work with.

Somehow, I don't feel right about encoding something that isn't mine.

I really do love Cake so far, it seems to be easier to use and more
powerful than the other frameworks I've looked at. If I can get things
working with Cake, I'd be glad to offer you a case study on how Cake
has helped us. 

Thanks
Sean


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