Re: Style switcher / font resizer

2007-01-25 Thread Jonathon Davis

You should be able to do this with just prototype.js unless you want it
to have an effect on it while it is resizing the font.

http://www.prototypejs.org/api/element/methods/

getStyle and setStyle are the ones you should concern yourself with.


$('element').setStyle({
'font-size': getStyle('font-size') + 4
});


Or something to that effect.


--~--~-~--~~~---~--~~
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: Date field SQL error

2007-01-25 Thread nate

Just add a beforeSave callback in your model that unsets the field from
$this->data if it is empty.

On Jan 25, 5:49 pm, "miggs" <[EMAIL PROTECTED]> wrote:
> I'm sure the answer is right in front of me as it normally is, but I'm
> just not seeing.  I used the bake.php script to create the basic
> scaffolding for my project. I then  added a datepicker (from
> frequency-decoder.com) to the date fields.  It is working great, I
> think it's a fantastic script.  If I create a 'new' record, and I leave
> the date fields blank, it works just fine, but if I go in and 'edit'
> that same page, and leave the date fields blank, it gives me an error.
> If I add a date to the fields in either 'new' or 'edit', it works just
> fine.
>
> The SQL error I get when I turn on debug in the edit view is:
>
> 1292: Incorrect date value: '' for column 'dateSend' at row 1
>
> I don't want to make this a required field and it is set to allow nulls
> in mysql.  Is there something I need to do so that if it's empty it
> doesn't use `dateSend`='' in the SQL statement.
> 
> Any help is most appreciated


--~--~-~--~~~---~--~~
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: Transactions support

2007-01-25 Thread nate

Transactions aren't yet supported at the model level.  We're working on
it, be patient.

On Jan 25, 5:33 pm, "zipman" <[EMAIL PROTECTED]> wrote:
> Anyone?


--~--~-~--~~~---~--~~
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: error in default.thtml

2007-01-25 Thread nate

Okay, the most likely issue is that Cake is rendering an error page,
and the error page is using the default layout, which uses
JavascriptHelper.  Cake, on the other hand, is probably using the base
Controller class to render the error.  Ergo, no $javascript.  If you
want to know the *real* error, read the title of the page, it should
say "Missing "

On Jan 25, 5:56 pm, "lukemack" <[EMAIL PROTECTED]> wrote:
> thanks again!
>
> On 25 Jan, 13:52, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
>
> > Actaully you don't need to copy the app_controller  from core, just
> > make a new one that has just this
>
> > class AppController extends Controller  {
> > var $components = array('Acl','Output');   // components you want 
> > for
> > all controllers
> > var $helpers = array('html', 'ajax'); //helpers you want for 
> > all views
>
> > }The thing you should know is that these arrays are not additive
> > (though there are some ways to make them that way)  and put this in
> > your app's main folder.
>
> > this is mentioned briefly inhttp://manual.cakephp.org/chapter/controllers
>
> > some interesting reading on this can be found with
>
> >http://cakephp.org/search?q=appcontroller
>
> > HTH
>
> > Sam D
>
> > On 1/25/07, kabturek <[EMAIL PROTECTED]> wrote:
>
> > > Hi
> > > On Jan 25, 6:58 am, "lukemack" <[EMAIL PROTECTED]> wrote:
> > > > thanks guys - i resolved it by adding the helpers in
> > > > cake\app_controller.php. what would be the point of having this in the
> > > > \app folder? does it override the default one?
>
> > > You shouldn't edit anything in the /cake folder - these are the core
> > > libs and when upgrading to newer version your changes will be
> > > overwritten.
> > > Copy the app_controller to the /app and edit it there - it will have
> > > the same effect.
>
> > > greets,--
> > ==
> > S. DeVore
> > (the old fart) the advice is free, the lack of crankiness will cost you


--~--~-~--~~~---~--~~
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: Can Cake's routing system do this?

2007-01-25 Thread nate

You can do this in Cake 1.2:
Router::connect("/foo/bar/:controller/:action/*", array("plugin" =>
"foo_bar"));

On Jan 25, 6:30 pm, Gonçalo Marrafa <[EMAIL PROTECTED]>
wrote:
> Hi to all.
>
> I've searched through Cake's documentation and this group but i couldn't
> find an answer to my problem. Hope you guys can help me out.
>
> I want to connect urls like /foo/bar/some_controller/some_action to
> foo_bar plugin. Can i do this with Cake's routing system?
> 
> --
> Gonçalo Marrafa <[EMAIL PROTECTED]>


--~--~-~--~~~---~--~~
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: Pagination in 1.2 with method parameters

2007-01-25 Thread nate

$paginator->next('Next>>', array('url' => $this->params['pass']))

On Jan 25, 10:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I'm using the latest nightly build of 1.2 (2007.01.24) and I'm trying
> to use pagination to display some search results.  The search
> parameters are specified as arguments to the action method like this:
>
> /controller/action/param1/param2
>
> The first page of results comes up fine, but the link generated by
> $paginator->next() in the view is incorrect, it looks like this:
>
> /controller/action/page:2
>
> I tried calling $paginator->next('Next>>', array('url' =>
> $this->params['url']['url'])) but then I get the next link like this:
>
> /controller/action/page:2/controller/action/param1/param2
>
> Does anyone know how to keep the parameters intact in the url so
> PaginatorHelper appends the pagination parameters appropriately?


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



Pagination in 1.2 with method parameters

2007-01-25 Thread [EMAIL PROTECTED]

I'm using the latest nightly build of 1.2 (2007.01.24) and I'm trying
to use pagination to display some search results.  The search
parameters are specified as arguments to the action method like this:

/controller/action/param1/param2

The first page of results comes up fine, but the link generated by
$paginator->next() in the view is incorrect, it looks like this:

/controller/action/page:2

I tried calling $paginator->next('Next>>', array('url' =>
$this->params['url']['url'])) but then I get the next link like this:

/controller/action/page:2/controller/action/param1/param2

Does anyone know how to keep the parameters intact in the url so
PaginatorHelper appends the pagination parameters appropriately?


--~--~-~--~~~---~--~~
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: Dynamically generated form controls and DOM

2007-01-25 Thread Mountain Man

Hello,

I solved the DOM problem. While the dynamically generated radio buttons
could not be read by their name attribute, they could be read by their
id attribute. I had mistakenly capitalized the D at the end of
"getElementById." Below is an adaption of a script from page 749 of the
second edition of O'Reilly's "Dynamic HTML: The Definitive Reference"
that can read these buttons.



  function read_multi(elementName, count){
for(var i = 0; i < count; i++) {
  var a_button = document.getElementById(elementName + '_' + i);
  if(a_button.checked){
alert('The value of the chosen button is ' + a_button.value);
  }
}
  }



Thank you for taking the time to read this topic.

--
Mountain Man

On Jan 25, 1:44 pm, "Mountain Man" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I searched Cake PHP for "DOM" and got 4 pages of results, none of which
> appeared to address this question.
>
> I am having a problem with code adapted from the first edition of
> "Programming PHP." This code dynamically generates checkboxes or radio
> buttons that retain their settings when the form is submitted without
> passing validation.
>
> The problem is that these dynamically generated form controls almost
> never appear in the DOM when the page loads. I am only aware of one
> instance with Firefox 2 where I was able to access these form controls
> with DHTML. My code example appears below.
>
> 
> function make_radio ($name, $query, $options) {
>   $i = 0;
>   foreach ($options as $value => $label) {
> printf(' value="%s" ',
> $name, $name, $i, $value);
> if (in_array($value, $query)) {echo "checked ";}
> echo "/> $label\n";
> $i++;
>   }
>
> }if (! is_array($own_files)) { $own_files = array(); }
>
> $preference1 = array(
>   'Yes'  => 'Yes',
>   'No'  => 'No',
>   );
>
> make_radio (own_files, $own_files, $preference1);
>
> ?>
>
> As I said before, there was one instance where these form controls did
> make it into the DOM. Otherwise, the following examples test as
> undefined.
>
> 
>   document.forms[0].own_files[0];
>   document.forms[0].own_files[1];
>   document.getElementByID('own_files_0');
>   document.getElementByID('own_files_1');
> 
>
> Does anyone know how to get dynamically generated form controls into
> the DOM on a reliable basis? I have tested the above JavaScript in
> Firefox 2, IE 7, and Opera 9 for Windows XP. Thank you to all who can
> shed light on this problem.
> 
> --
> Mountain Man


--~--~-~--~~~---~--~~
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: afterFind in associations STILL not working, 1.2.0.4206 Development

2007-01-25 Thread Logan

After some more test, I just find out that is not the afterFInd
in associations that doesn't work but the afterFind in Behaviors.
Sorry about the last one. :P

I supposed that behaviors are yet to fresh to say anything
about them.

Thank you very much


--~--~-~--~~~---~--~~
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: A new music thing with CakePHP

2007-01-25 Thread tom

Hi,

It's fixed.

Sam - It's parsing XML with SimpleXML and tying into MusicBrainz,
Amazon, and Hype Machine to get information.

The musicbrainz database is lacking in certain areas, with lesser-known
artists and it has some duplicates in the mix. I'll try to combine it
with other services to get a more complete picture, but it just took
some time to figure out what was causing javascript problems.

On Jan 25, 4:05 am, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> Hi Tom,
>
> That good work indeed very expansive too.
>
> Seems to not be working right now unless you click that top 25. The other
> day I was really impress with the range of results.
>
> Are having to make a xml file or add each artist / band to a db?
> for example Iggy returned a number of stuff, but searching for 'kenny dope'
> and clicking through to Kenny 'Dope' Gonzalez listed nearly nothing - in
> reality he has done loads.
> Are you parsing xml within cakePHP? - who did you achieve this by using
> vendor()?
> Is it using web services?  I would love to no a bit more about the
> underlying mechanics
>
> Not detracting from your efforts at all great stuff :)
>
> - S
>
> On 25/01/07, tom <[EMAIL PROTECTED]> wrote:
>
>
>
> > Yep. Trying to get help from the jQuery folks, it's mostly a JS
> > problem.
>
> > Should try to get this done before my classes wind up.
>
> > On Jan 22, 4:21 am, "Eric C Blount" <[EMAIL PROTECTED]> wrote:
> > > It blew up.
>
> > > 1) Not typing anything in the search box and submitting yields several
> > > error messages (not a big deal, but I thought you should know)
>
> > > 2) I typed "cream", selected the band Cream, clicked on Eric Clapton
> > > and nothing happened. In fact, I can't get it to go past that first
> > > page. The album title links are not working either.
>
> > > I'm using IE 6 on WinXP (no flames, I know it sucks, it's a work
> > computer).
>
> > > I like the concept, please let me know what happens.
> 
> > > Eric


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



afterFind in associations STILL not working, 1.2.0.4206 Development

2007-01-25 Thread Logan

Greetings CakePHP Team. Nice Work!

afterFind, beforeFind, etc. in associations are not been
executed. I know there are several posts about this
subject, but no concrete answer.

It's a bug? it's a feature? it's wrong to execute afterFind
of one model from an association?

I think this feature its vital for a model to behave as it is.

Thank you very much


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



Can Cake's routing system do this?

2007-01-25 Thread Gonçalo Marrafa

Hi to all.

I've searched through Cake's documentation and this group but i couldn't
find an answer to my problem. Hope you guys can help me out.

I want to connect urls like /foo/bar/some_controller/some_action to
foo_bar plugin. Can i do this with Cake's routing system?

-- 
Gonçalo Marrafa <[EMAIL PROTECTED]>

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



Style switcher / font resizer

2007-01-25 Thread lukemack

Hi,

Can anyone recommend a way to implement a font resizer in a cakePHP
application? Can this be done with the scriptaculous js library? Or
would I be better off doing this server-side? The functionality should
be global to the app and allow the user to click on some buttons in the
header to resize all text elements on the page. Ideally, this would not
involve a full page refresh. I'm thinking that dynamic font resizing
using the DOM would be better than a CSS style switcher?

Many thanks for any suggestions

lukemack.


--~--~-~--~~~---~--~~
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: error in default.thtml

2007-01-25 Thread lukemack

thanks again!

On 25 Jan, 13:52, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> Actaully you don't need to copy the app_controller  from core, just
> make a new one that has just this
>
> class AppController extends Controller  {
> var $components = array('Acl','Output');   // components you want for
> all controllers
> var $helpers = array('html', 'ajax'); //helpers you want for all 
> views
>
> }The thing you should know is that these arrays are not additive
> (though there are some ways to make them that way)  and put this in
> your app's main folder.
>
> this is mentioned briefly inhttp://manual.cakephp.org/chapter/controllers
>
> some interesting reading on this can be found with
>
> http://cakephp.org/search?q=appcontroller
>
> HTH
>
> Sam D
>
> On 1/25/07, kabturek <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi
> > On Jan 25, 6:58 am, "lukemack" <[EMAIL PROTECTED]> wrote:
> > > thanks guys - i resolved it by adding the helpers in
> > > cake\app_controller.php. what would be the point of having this in the
> > > \app folder? does it override the default one?
>
> > You shouldn't edit anything in the /cake folder - these are the core
> > libs and when upgrading to newer version your changes will be
> > overwritten.
> > Copy the app_controller to the /app and edit it there - it will have
> > the same effect.
>
> > greets,--
> ==
> S. DeVore
> (the old fart) the advice is free, the lack of crankiness will cost you


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



Date field SQL error

2007-01-25 Thread miggs

I'm sure the answer is right in front of me as it normally is, but I'm
just not seeing.  I used the bake.php script to create the basic
scaffolding for my project. I then  added a datepicker (from
frequency-decoder.com) to the date fields.  It is working great, I
think it's a fantastic script.  If I create a 'new' record, and I leave
the date fields blank, it works just fine, but if I go in and 'edit'
that same page, and leave the date fields blank, it gives me an error.
If I add a date to the fields in either 'new' or 'edit', it works just
fine.


The SQL error I get when I turn on debug in the edit view is:

1292: Incorrect date value: '' for column 'dateSend' at row 1

I don't want to make this a required field and it is set to allow nulls
in mysql.  Is there something I need to do so that if it's empty it
doesn't use `dateSend`='' in the SQL statement.

Any help is most appreciated


--~--~-~--~~~---~--~~
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: how can I pass two or more params to controller

2007-01-25 Thread the_woodsman

Ahhh, excellent.

Could 1.2  map these directly to the names of the params in your action
methods?

i.e
action/var1:val1/var2:val2   maps correctly to  action($var2, $var1)


Now *that* would be awesome... hint :)



On Jan 25, 6:50 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Here ya go:http://bakery.cakephp.org/articles/view/129
>
> personally i do see benefits for using named parameters in terms of
> usability, even SEO. it's just more informational.
>
> other then that, it relieves the programmer for having to worry about
> the order in which get paramaters appear.  for that benefit alone i
> think this method is great.


--~--~-~--~~~---~--~~
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: Paginate() question for 1.2.x.x

2007-01-25 Thread Jonathon Davis

Sweet. Thanks for explaining that for me. I don't know what I would do
without the Cake Google Group. The API and documentation don't give all
the information you would need.

Thanks nate

On Jan 25, 3:40 pm, "nate" <[EMAIL PROTECTED]> wrote:
> // First way:
>
> var $paginate = array('conditions' => array('active' => 1));
>
> // Second way:
> $data = $this->paginate(array('active' => 1));
>
> On Jan 25, 3:02 pm, "Jonathon Davis" <[EMAIL PROTECTED]> wrote:
>
> > I have a question about paginate()... Is there any way to add
> > conditions to fetching and displaying results? Let's say I had a posts
> > MVC and I wanted to paginate only posts that have a certain category
> > assigned to them.  How would I do this?  Can I achieve this with the
> > built-in function or would I have to create my own pagination for this?
> 
> > Thanks!


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



Dynamically generated form controls and DOM

2007-01-25 Thread Mountain Man

Hello,

I searched Cake PHP for "DOM" and got 4 pages of results, none of which
appeared to address this question.

I am having a problem with code adapted from the first edition of
"Programming PHP." This code dynamically generates checkboxes or radio
buttons that retain their settings when the form is submitted without
passing validation.

The problem is that these dynamically generated form controls almost
never appear in the DOM when the page loads. I am only aware of one
instance with Firefox 2 where I was able to access these form controls
with DHTML. My code example appears below.

 $label) {
printf(' $label\n";
$i++;
  }
}

if (! is_array($own_files)) { $own_files = array(); }

$preference1 = array(
  'Yes'  => 'Yes',
  'No'  => 'No',
  );

make_radio (own_files, $own_files, $preference1);

?>

As I said before, there was one instance where these form controls did
make it into the DOM. Otherwise, the following examples test as
undefined.


  document.forms[0].own_files[0];
  document.forms[0].own_files[1];
  document.getElementByID('own_files_0');
  document.getElementByID('own_files_1');


Does anyone know how to get dynamically generated form controls into
the DOM on a reliable basis? I have tested the above JavaScript in
Firefox 2, IE 7, and Opera 9 for Windows XP. Thank you to all who can
shed light on this problem.

--
Mountain Man


--~--~-~--~~~---~--~~
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: Transactions support

2007-01-25 Thread zipman

Anyone?


--~--~-~--~~~---~--~~
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: Using one set of controllers/models for multiple sites

2007-01-25 Thread John David Anderson (_psychic_)


On Jan 25, 2007, at 3:11 PM, Dave Rogers wrote:

>
> On Jan 25, 4:00 pm, "John David Anderson (_psychic_)"
> <[EMAIL PROTECTED]> wrote:
>
>> You should be able to point multiple virtual domains at a single app/
>> webroot folder. Is that what you're asking?
>>
>> -- John
>
>
> Yes.  But the domains would be from different organizations:
>   someNonProfit.org
>   anotherNonProfit.org
>
> Both would go to the same codebase (app?), however I would like to be
> able to setup some sort of different file structure based which domain
> they are coming from.
>
> I suppose I could put some code in bootstrap that would grab the  
> domain
> and load some additional 'bootstrap' file from a directory based on  
> the
> domain name.  Does this seem like the best way to do this?

Yep, something like that.

-- John

--~--~-~--~~~---~--~~
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: Using one set of controllers/models for multiple sites

2007-01-25 Thread Dave Rogers

On Jan 25, 4:00 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:

> You should be able to point multiple virtual domains at a single app/
> webroot folder. Is that what you're asking?
>
> -- John


Yes.  But the domains would be from different organizations:
  someNonProfit.org
  anotherNonProfit.org

Both would go to the same codebase (app?), however I would like to be
able to setup some sort of different file structure based which domain
they are coming from.

I suppose I could put some code in bootstrap that would grab the domain
and load some additional 'bootstrap' file from a directory based on the
domain name.  Does this seem like the best way to do this?

--Dave


--~--~-~--~~~---~--~~
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: Using one set of controllers/models for multiple sites

2007-01-25 Thread John David Anderson (_psychic_)


On Jan 25, 2007, at 2:54 PM, Dave Rogers wrote:

>
> Is there a way to use one set of controllers and models for multiple
> sites?  This would effectively create an ASP (Application Service
> Provider) model.

You should be able to point multiple virtual domains at a single app/ 
webroot folder. Is that what you're asking?

-- John

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



Using one set of controllers/models for multiple sites

2007-01-25 Thread Dave Rogers

Is there a way to use one set of controllers and models for multiple
sites?  This would effectively create an ASP (Application Service
Provider) model.

Thanks


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



Re: Custom conditions in 1.2 Pagination

2007-01-25 Thread [EMAIL PROTECTED]

I actually wrote it wrong in the first post (d'oh!): price1 and price2
are actually the same field in the table called price.

Here's what finally worked:

$conditions = array();
$conditions[] = array('price' => '>=100');
$conditions[] = array('price' => '<= 400');
$this->paginate($conditions);



On Jan 25, 4:44 pm, "nate" <[EMAIL PROTECTED]> wrote:
> First, try setting DEBUG to 2, so you can see the actual SQL being
> generated.
>
> Second, try specifying the conditions like this:
>
> $data = $this->paginate(array('price1' => "<= 100", 'price2' =>
> ">=400"));
>
> On Jan 25, 4:05 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > I'm using the latest nightly 1.2 (2007.01.24) and am trying to use some
> > custom conditions in my pagination call.  Basically I want some SQL
> > that looks like:
>
> > SELECT * FROM table WHERE price1<='100' AND price2>='400'
>
> > I tried using "price1<='100' AND price2>='400'" as the $scope argument
> > to the paginate() call, but I don't get any results back (there should
> > actually be many many results for that query).
>
> > Is there a better way to get paginate() to use my conditions?  I don't
> > think I can specify conditions as an array, since I'm using <= and >=,
> > not just =.


--~--~-~--~~~---~--~~
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: Custom conditions in 1.2 Pagination

2007-01-25 Thread nate

First, try setting DEBUG to 2, so you can see the actual SQL being
generated.

Second, try specifying the conditions like this:

$data = $this->paginate(array('price1' => "<= 100", 'price2' =>
">=400"));

On Jan 25, 4:05 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I'm using the latest nightly 1.2 (2007.01.24) and am trying to use some
> custom conditions in my pagination call.  Basically I want some SQL
> that looks like:
>
> SELECT * FROM table WHERE price1<='100' AND price2>='400'
>
> I tried using "price1<='100' AND price2>='400'" as the $scope argument
> to the paginate() call, but I don't get any results back (there should
> actually be many many results for that query).
>
> Is there a better way to get paginate() to use my conditions?  I don't
> think I can specify conditions as an array, since I'm using <= and >=,
> not just =.


--~--~-~--~~~---~--~~
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: Paginate() question for 1.2.x.x

2007-01-25 Thread nate

// First way:

var $paginate = array('conditions' => array('active' => 1));

// Second way:
$data = $this->paginate(array('active' => 1));

On Jan 25, 3:02 pm, "Jonathon Davis" <[EMAIL PROTECTED]> wrote:
> I have a question about paginate()... Is there any way to add
> conditions to fetching and displaying results? Let's say I had a posts
> MVC and I wanted to paginate only posts that have a certain category
> assigned to them.  How would I do this?  Can I achieve this with the
> built-in function or would I have to create my own pagination for this?
> 
> Thanks!


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



Re: obAuth Session Errors

2007-01-25 Thread [EMAIL PROTECTED]

Hi,

just check out what is at line 117 (output started at
/Library/WebServer/Documents/cake_1.1.12.4205/ngo_reservation/controllers/components/ob_auth.php:117)
that makes some output into buffer before session_start() function is
called. Also white spaces count.


--~--~-~--~~~---~--~~
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: Pagination in 1.2 using different models

2007-01-25 Thread [EMAIL PROTECTED]

Wow that was easy - thanks Nate!


On Jan 25, 3:07 pm, "nate" <[EMAIL PROTECTED]> wrote:
> var $paginate = array("ModelName" => array("limit" => 20));
>
> function index() {
> $data = $this->paginate("ModelName");
> ...
>
> }On Jan 25, 2:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > I'm using the latest nightly of 1.2 (2007.01.24) and have a controller
> > that uses several models, none of which are the default.  I'd like to
> > paginate search results on any of these models, but I'm not sure how to
> > tell the controller which model classes to use.
>
> > Does anyone know how to specify the model class to paginate in the
> > paginate() method?


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



Custom conditions in 1.2 Pagination

2007-01-25 Thread [EMAIL PROTECTED]

I'm using the latest nightly 1.2 (2007.01.24) and am trying to use some
custom conditions in my pagination call.  Basically I want some SQL
that looks like:

SELECT * FROM table WHERE price1<='100' AND price2>='400'

I tried using "price1<='100' AND price2>='400'" as the $scope argument
to the paginate() call, but I don't get any results back (there should
actually be many many results for that query).

Is there a better way to get paginate() to use my conditions?  I don't
think I can specify conditions as an array, since I'm using <= and >=,
not just =.


--~--~-~--~~~---~--~~
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: Error At Top Of Every Page

2007-01-25 Thread Dustin

Thanks Mika, my de-compression software defaults the bad way in this
case.  That was the problem, it just skipped the empty folders.  I
appreciate the help from everyone.

I feel dumb for missing that note at the bottom of the install
instructions though.

- Dustin

On Jan 25, 1:50 pm, "Mika" <[EMAIL PROTECTED]> wrote:
> I think the original problem was that you uncompressed the cakephp
> files without using the "full directory" option. Those directories are
> in the compressed zip but they are empty so if you don't set that
> option (which is usually on by default in most compression software)
> then it will just ignore them.
>
> Also make sure you have ALL the temp directories - there are quite a
> few.
>
> On Jan 25, 9:11 pm, "Dustin" <[EMAIL PROTECTED]> wrote:
>
> > Hey,
>
> > Cake noob here, but I'm very excited by everything I've seen so far and
> > think it's far superior to any of the other PHP frameworks I've tried
> > so far.
>
> > With that being said, I've had a frustrating pair of error messages at
> > the top of every page I've built in Cake (from various tutorials).  I
> > have followed the tutorials and help docs to the literal "T" and still
> > can't seem to get rid of these errors:
>
> > Warning:
> > file_put_contents(C:\xampp\htdocs\app\tmp\cache\models\default_cake_list)
> > [function.file-put-contents]: failed to open stream: No such file or
> > directory in C:\xampp\htdocs\cake\basics.php on line 868
>
> > Warning:
> > file_put_contents(C:\xampp\htdocs\app\tmp\cache\models\default_users)
> > [function.file-put-contents]: failed to open stream: No such file or
> > directory in C:\xampp\htdocs\cake\basics.php on line 868
>
> > The odd thing is that the messages don't seem to affect any of my code
> > in a functional way.  I'm thinking it must not be related to a Cake
> > problem, but some sort of a config problem.
>
> > Running XAMP on Windows with Mod_ReWrite enabled (properly I think).
> > The start page of each project doesn't give the errors (the one that
> > tells you whether or not your DB connection exists).  But the moment I
> > start coding my own stuff, the errors show up.
> 
> > I appreciate any help in advance!
> 
> > Dustin


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



Paginate() question for 1.2.x.x

2007-01-25 Thread Jonathon Davis

I have a question about paginate()... Is there any way to add
conditions to fetching and displaying results? Let's say I had a posts
MVC and I wanted to paginate only posts that have a certain category
assigned to them.  How would I do this?  Can I achieve this with the
built-in function or would I have to create my own pagination for this?

Thanks!


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



Re: Pagination in 1.2 using different models

2007-01-25 Thread nate

var $paginate = array("ModelName" => array("limit" => 20));

function index() {
$data = $this->paginate("ModelName");
...
}

On Jan 25, 2:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I'm using the latest nightly of 1.2 (2007.01.24) and have a controller
> that uses several models, none of which are the default.  I'd like to
> paginate search results on any of these models, but I'm not sure how to
> tell the controller which model classes to use.
>
> Does anyone know how to specify the model class to paginate in the
> paginate() method?


--~--~-~--~~~---~--~~
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: Error At Top Of Every Page

2007-01-25 Thread Mika

I think the original problem was that you uncompressed the cakephp
files without using the "full directory" option. Those directories are
in the compressed zip but they are empty so if you don't set that
option (which is usually on by default in most compression software)
then it will just ignore them.

Also make sure you have ALL the temp directories - there are quite a
few.

On Jan 25, 9:11 pm, "Dustin" <[EMAIL PROTECTED]> wrote:
> Hey,
>
> Cake noob here, but I'm very excited by everything I've seen so far and
> think it's far superior to any of the other PHP frameworks I've tried
> so far.
>
> With that being said, I've had a frustrating pair of error messages at
> the top of every page I've built in Cake (from various tutorials).  I
> have followed the tutorials and help docs to the literal "T" and still
> can't seem to get rid of these errors:
>
> Warning:
> file_put_contents(C:\xampp\htdocs\app\tmp\cache\models\default_cake_list)
> [function.file-put-contents]: failed to open stream: No such file or
> directory in C:\xampp\htdocs\cake\basics.php on line 868
>
> Warning:
> file_put_contents(C:\xampp\htdocs\app\tmp\cache\models\default_users)
> [function.file-put-contents]: failed to open stream: No such file or
> directory in C:\xampp\htdocs\cake\basics.php on line 868
>
> The odd thing is that the messages don't seem to affect any of my code
> in a functional way.  I'm thinking it must not be related to a Cake
> problem, but some sort of a config problem.
>
> Running XAMP on Windows with Mod_ReWrite enabled (properly I think).
> The start page of each project doesn't give the errors (the one that
> tells you whether or not your DB connection exists).  But the moment I
> start coding my own stuff, the errors show up.
> 
> I appreciate any help in advance!
> 
> Dustin


--~--~-~--~~~---~--~~
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: Error At Top Of Every Page

2007-01-25 Thread Samuel DeVore

http://apache.teachesme.com/~sdevore/FinderScreenSnapz001.png

--~--~-~--~~~---~--~~
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: Error At Top Of Every Page

2007-01-25 Thread John David Anderson (_psychic_)


On Jan 25, 2007, at 12:33 PM, Dustin wrote:

>
> OK, well I finally understand what the error means and felt sorta  
> dumb.
>  I see that it was looking for a directory that didn't exist WITHIN  
> the
> tmp folder.  Specifically 'app\tmp\cache\models\'.
>
> I am in windows, so I didn't think it was permission problems like
> that.  I added the cache and models folders and the errors went away.
>
> I guess there is no logic to create the folders if they don't exist?

Cake can't unless the folder is writable by the web server.

> Why aren't the tmp/cache folders including in the folder structure  
> from
> the git go?

Because they're not always needed, and they have to be written all  
the time anyway.

> ie: why isn't it mentioned in the install or come included with the
> downloadable archive?

It is mentioned in the manual. I included the link to the reference  
in my original email.

-- John

--~--~-~--~~~---~--~~
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: Error At Top Of Every Page

2007-01-25 Thread Samuel DeVore

they are included

On 1/25/07, Dustin <[EMAIL PROTECTED]> wrote:
>
> OK, well I finally understand what the error means and felt sorta dumb.
>  I see that it was looking for a directory that didn't exist WITHIN the
> tmp folder.  Specifically 'app\tmp\cache\models\'.
>
> I am in windows, so I didn't think it was permission problems like
> that.  I added the cache and models folders and the errors went away.
>
> I guess there is no logic to create the folders if they don't exist?
> Why aren't the tmp/cache folders including in the folder structure from
> the git go?
>
> ie: why isn't it mentioned in the install or come included with the
> downloadable archive?
>
> - Dustin
>
> On Jan 25, 1:24 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> > On 1/25/07, Dustin <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > That's odd, I don't even have a directory in app called tmp.  That
> > > folder doesn't come with the basic archive does it?
> >
> > > I added the folder and made double-checked permissions, it all looks
> > > ok.  Still doing the same thing.
> >
> > > I am using the development install where everything is under the htdocs
> > > folder (ie: htdocs/app, htdocs/cake, htdocs/docs, htdocs/index.php).That 
> > > error ONLY occurs when the permissions haven't been set.  I
> > suggest using the firehose permissions setting (in UNIX, doing a chmod
> > -R 777 on the tmp directory) and those errors will definitely go away.
> >
> > --
> > Chris Hartjes
> >
> > My motto for 2007:  "Just build it, damnit!"
> >
> > rallyhat.com - digitial photo scavenger hunt
> > @TheBallpark -http://www.littlehart.net/attheballpark
> > @TheKeyboard -http://www.littlehart.net/atthekeyboard
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~-~--~~~---~--~~
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: Error At Top Of Every Page

2007-01-25 Thread Chris Hartjes

On 1/25/07, Dustin <[EMAIL PROTECTED]> wrote:
>

> I guess there is no logic to create the folders if they don't exist?
> Why aren't the tmp/cache folders including in the folder structure from
> the git go?
>
> ie: why isn't it mentioned in the install or come included with the
> downloadable archive?

Actually, it is... ;)

In the manual:

***
Section 4
Setting Up CakePHP

The first way to setup CakePHP is generally only recommended for
development environments because it is less secure. The second way is
considered more secure and should be used in a production environment.

NOTE: /app/tmp must be writable by the user that your web server runs as.
*


-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digitial photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: Error At Top Of Every Page

2007-01-25 Thread Dustin

OK, well I finally understand what the error means and felt sorta dumb.
 I see that it was looking for a directory that didn't exist WITHIN the
tmp folder.  Specifically 'app\tmp\cache\models\'.

I am in windows, so I didn't think it was permission problems like
that.  I added the cache and models folders and the errors went away.

I guess there is no logic to create the folders if they don't exist?
Why aren't the tmp/cache folders including in the folder structure from
the git go?

ie: why isn't it mentioned in the install or come included with the
downloadable archive?

- Dustin

On Jan 25, 1:24 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 1/25/07, Dustin <[EMAIL PROTECTED]> wrote:
>
>
>
> > That's odd, I don't even have a directory in app called tmp.  That
> > folder doesn't come with the basic archive does it?
>
> > I added the folder and made double-checked permissions, it all looks
> > ok.  Still doing the same thing.
>
> > I am using the development install where everything is under the htdocs
> > folder (ie: htdocs/app, htdocs/cake, htdocs/docs, htdocs/index.php).That 
> > error ONLY occurs when the permissions haven't been set.  I
> suggest using the firehose permissions setting (in UNIX, doing a chmod
> -R 777 on the tmp directory) and those errors will definitely go away.
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> rallyhat.com - digitial photo scavenger hunt
> @TheBallpark -http://www.littlehart.net/attheballpark
> @TheKeyboard -http://www.littlehart.net/atthekeyboard


--~--~-~--~~~---~--~~
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: Error At Top Of Every Page

2007-01-25 Thread Chris Hartjes

On 1/25/07, Dustin <[EMAIL PROTECTED]> wrote:
>
> That's odd, I don't even have a directory in app called tmp.  That
> folder doesn't come with the basic archive does it?
>
> I added the folder and made double-checked permissions, it all looks
> ok.  Still doing the same thing.
>
> I am using the development install where everything is under the htdocs
> folder (ie: htdocs/app, htdocs/cake, htdocs/docs, htdocs/index.php).
>

That error ONLY occurs when the permissions haven't been set.  I
suggest using the firehose permissions setting (in UNIX, doing a chmod
-R 777 on the tmp directory) and those errors will definitely go away.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digitial photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: Error At Top Of Every Page

2007-01-25 Thread Dustin

That's odd, I don't even have a directory in app called tmp.  That
folder doesn't come with the basic archive does it?

I added the folder and made double-checked permissions, it all looks
ok.  Still doing the same thing.

I am using the development install where everything is under the htdocs
folder (ie: htdocs/app, htdocs/cake, htdocs/docs, htdocs/index.php).

Any other ideas?

- Dustin

On Jan 25, 1:15 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Jan 25, 2007, at 12:11 PM, Dustin wrote:
>
>
>
>
>
> > Hey,
>
> > Cake noob here, but I'm very excited by everything I've seen so far
> > and
> > think it's far superior to any of the other PHP frameworks I've tried
> > so far.
>
> > With that being said, I've had a frustrating pair of error messages at
> > the top of every page I've built in Cake (from various tutorials).  I
> > have followed the tutorials and help docs to the literal "T" and still
> > can't seem to get rid of these errors:
>
> > Warning:
> > file_put_contents(C:\xampp\htdocs\app\tmp\cache\models
> > \default_cake_list)
> > [function.file-put-contents]: failed to open stream: No such file or
> > directory in C:\xampp\htdocs\cake\basics.php on line 868
>
> > Warning:
> > file_put_contents(C:\xampp\htdocs\app\tmp\cache\models\default_users)
> > [function.file-put-contents]: failed to open stream: No such file or
> > directory in C:\xampp\htdocs\cake\basics.php on line 868
>
> > The odd thing is that the messages don't seem to affect any of my code
> > in a functional way.  I'm thinking it must not be related to a Cake
> > problem, but some sort of a config problem.
>
> > Running XAMP on Windows with Mod_ReWrite enabled (properly I think).
> > The start page of each project doesn't give the errors (the one that
> > tells you whether or not your DB connection exists).  But the moment I
> > start coding my own stuff, the errors show up.Just make sure your app/tmp 
> > directory is writable by the webserver[1].
>
> Cake keeps caches of models and things in there.
>
> -- John
> 
> [1] -http://manual.cakephp.org/chapter/installing(Section 4)


--~--~-~--~~~---~--~~
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: Error At Top Of Every Page

2007-01-25 Thread John David Anderson (_psychic_)


On Jan 25, 2007, at 12:11 PM, Dustin wrote:

>
> Hey,
>
> Cake noob here, but I'm very excited by everything I've seen so far  
> and
> think it's far superior to any of the other PHP frameworks I've tried
> so far.
>
> With that being said, I've had a frustrating pair of error messages at
> the top of every page I've built in Cake (from various tutorials).  I
> have followed the tutorials and help docs to the literal "T" and still
> can't seem to get rid of these errors:
>
> Warning:
> file_put_contents(C:\xampp\htdocs\app\tmp\cache\models 
> \default_cake_list)
> [function.file-put-contents]: failed to open stream: No such file or
> directory in C:\xampp\htdocs\cake\basics.php on line 868
>
> Warning:
> file_put_contents(C:\xampp\htdocs\app\tmp\cache\models\default_users)
> [function.file-put-contents]: failed to open stream: No such file or
> directory in C:\xampp\htdocs\cake\basics.php on line 868
>
> The odd thing is that the messages don't seem to affect any of my code
> in a functional way.  I'm thinking it must not be related to a Cake
> problem, but some sort of a config problem.
>
> Running XAMP on Windows with Mod_ReWrite enabled (properly I think).
> The start page of each project doesn't give the errors (the one that
> tells you whether or not your DB connection exists).  But the moment I
> start coding my own stuff, the errors show up.

Just make sure your app/tmp directory is writable by the webserver[1].

Cake keeps caches of models and things in there.

-- John

[1] - http://manual.cakephp.org/chapter/installing (Section 4)

--~--~-~--~~~---~--~~
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: Dreamhost and CakePHP

2007-01-25 Thread DJ Spark

 I have a few test websites running on dreamhost, and none had any
problem. They worked with de default installation, and with the
advanced , with app path outside the doc root...

 spark

On 1/24/07, lance <[EMAIL PROTECTED]> wrote:
>
> On Jan 24, 5:51 pm, "Mark" <[EMAIL PROTECTED]> wrote:
> > Anyone else had problems getting CakePHP to work properly on Dreamhost?
> >
> > I've installed it, following the instructions in the manual, but the
> > URLs don't work as they should, I have to keep the 'index.php' in in
> > order for them to work, for example:
> >
> > http://www.example.com/index.php/path/to/page
> >
> > rather thanhttp://www.example.com/path/to/page
> >
> > And this has other negative effects on other parts that expect the
> > index.php part to not be there, so I'd really like to get this sorted
> > out before I attempt to seriously develop anything on it.
> >
> > Anyone got any advice? I'd be extremely grateful for a solution as I've
> > tried looking just about everywhere else.
>
> Mark,
> I've installed three different CakePHP sites on Dreamhost and haven't
> had problems. All three are on shared servers (not dedicated) and
> CakePHP installed just fine without asking Dreamhost to change any
> settings.
>
> Things to check:
> 1) You edited the domain under "Manage Domains", "Web Directory:" to be
> /home/username/cake/app/webroot (or else point to the app/webroot of
> your CakePHP install)
> 2) Make sure your copy of CakePHP has all the .htaccess files intact
> 3) Check if the .htaccess file in webroot has the basic rewrite rule:
> RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
>
> Otherwise, it should work. I have my three domains with CakePHP apps
> running PHP 5.1.2, but that shouldn't make a difference in your case.
>
> Hope that helps...
>
>
> >
>


-- 
[web] http://synapsisdi.com.br
[livesets] http://djspark.com.br/mp3

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



Error At Top Of Every Page

2007-01-25 Thread Dustin

Hey,

Cake noob here, but I'm very excited by everything I've seen so far and
think it's far superior to any of the other PHP frameworks I've tried
so far.

With that being said, I've had a frustrating pair of error messages at
the top of every page I've built in Cake (from various tutorials).  I
have followed the tutorials and help docs to the literal "T" and still
can't seem to get rid of these errors:

Warning:
file_put_contents(C:\xampp\htdocs\app\tmp\cache\models\default_cake_list)
[function.file-put-contents]: failed to open stream: No such file or
directory in C:\xampp\htdocs\cake\basics.php on line 868

Warning:
file_put_contents(C:\xampp\htdocs\app\tmp\cache\models\default_users)
[function.file-put-contents]: failed to open stream: No such file or
directory in C:\xampp\htdocs\cake\basics.php on line 868

The odd thing is that the messages don't seem to affect any of my code
in a functional way.  I'm thinking it must not be related to a Cake
problem, but some sort of a config problem.

Running XAMP on Windows with Mod_ReWrite enabled (properly I think).
The start page of each project doesn't give the errors (the one that
tells you whether or not your DB connection exists).  But the moment I
start coding my own stuff, the errors show up.

I appreciate any help in advance!

Dustin


--~--~-~--~~~---~--~~
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: idea: trace things into a log window

2007-01-25 Thread NOSLOW

I made a couple of changes while trying to get this working on a shared
hosting server:

1. removed public/private statements before my functions.
2. check for log file existence before attempting to read it's contents
(doh!).

http://bin.cakephp.org/saved/2412

This should make it easier for anyone brave enough to try this helper.

On Jan 24, 2:56 pm, "NOSLOW" <[EMAIL PROTECTED]> wrote:
> I'm just starting a big project in CakePHP and I'm struggling a bit
> trying to figure things out as I go. Not being real proficient in PHP
> makes it even harder for me. Having some nice debugging tools and
> methods would certainly be helpful to us all in learning Cake.
> Therefore, I thought I'd share my crude attempt at a debug/watch window
> for all of us to try, and hopefully, improve upon.  I did the best I
> could to make it into an easy to use Helper, called "Ovenlight":
>
> http://bin.cakephp.org/saved/2338
>
> Basically, it just does print_r statements on variables that are in
> scope, as well as the contents of errors.log, and outputs them to the
> end of the HTML stream. With a little bit of CSS icing, the information
> for each variable is displayed in individual boxes (div tags) and is
> arranged nicely.
>
> I'd appreciate any feedback, suggestions, and most importantly,
> improvements to this little pet project. I encourage everyone to share
> their contributions with this community, as I did, no matter how small.
>  If you create something you find useful, chances are that others would
> be interested in it as well.
> 
> Thanks,
> NOSLOW


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



Pagination in 1.2 using different models

2007-01-25 Thread [EMAIL PROTECTED]

I'm using the latest nightly of 1.2 (2007.01.24) and have a controller
that uses several models, none of which are the default.  I'd like to
paginate search results on any of these models, but I'm not sure how to
tell the controller which model classes to use.

Does anyone know how to specify the model class to paginate in the
paginate() method?


--~--~-~--~~~---~--~~
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: how can I pass two or more params to controller

2007-01-25 Thread [EMAIL PROTECTED]

Here ya go:
http://bakery.cakephp.org/articles/view/129

personally i do see benefits for using named parameters in terms of
usability, even SEO. it's just more informational.

other then that, it relieves the programmer for having to worry about
the order in which get paramaters appear.  for that benefit alone i
think this method is great.


--~--~-~--~~~---~--~~
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: Where to store application-wide array definition

2007-01-25 Thread Jon Bennett

> Can some point me to a location where i can store
> an array so it can be evaluated in two or more
> controllers and models ?

you've got at least 2 options:

1. in app/app_controller.php
2. in /app/config/bootstrap.php

j

-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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: Where to store application-wide array definition

2007-01-25 Thread Mikee Freedom

what would be the purpose of such an array?

just curious so we might be able to provide a solution that will suit.

On 26/01/07, jyrgen <[EMAIL PROTECTED]> wrote:
>
> Can some point me to a location where i can store
> an array so it can be evaluated in two or more
> controllers and models ?
> thanks very much
> jyrgen
>
>
> >
>

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

2007-01-25 Thread Mikee Freedom

morning mate,

your best place to start to look for help is searching through these
groups. this topic has come up countless times before and an answer
can be found by doing a little research.

http://groups.google.com/group/cake-php/browse_thread/thread/b6c269d2b0c2a321/e9f98a33ce764209?lnk=st&q=select&rnum=3#e9f98a33ce764209

http://groups.google.com/group/cake-php/search?group=cake-php&q=populate+select&qt_g=1&searchnow=Search+this+group

HTH

mikee

On 25/01/07, jonatha <[EMAIL PROTECTED]> wrote:
>
> I'm a newbie and i have a problem using ComboBox in a view.
> I have a category and a subcategory, and i want to use 2 combobox
> (category and subcategory) for input data.
> I want to use the selection made on category combobox to filter the
> options shown in subcategory combobox:
> is it possible? could someone give me an example ?
> Thanks you in advice,
> jonatha
>
>
> >
>

--~--~-~--~~~---~--~~
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: Ajax to show hidden select Tag.

2007-01-25 Thread John David Anderson (_psychic_)


On Jan 25, 2007, at 10:41 AM, salimk786 wrote:

>
> Thanks John for that.
> However, I'd like the form to be submitted when they choose something
> from the drop down and based on that selection, my hidden field  
> appears
> with the data based on their selection.
>
> For example. I have a list of countries. I want it so that when they
> choose their country, the states appear for that country. and when  
> they
> choose their state, the cities appear for that state.
>
>
> That is what i am trying to do... I just don't know how to submit the
> form onclick/onchange of their selection choice.








function go()
{
document.forms.sendMe.submit();
}


-- John

>
> thanks.
>
>
> On Jan 16, 2:49 pm, "John David Anderson (_psychic_)"
> <[EMAIL PROTECTED]> wrote:
>> On Jan 16, 2007, at 2:17 PM, salimk786 wrote:
>>
>>
>>
>>> Hello,
>>
>>> I was hoping someone can piont me in the right direction.
>>> I want to have a select tag where they choose their country and once
>>> they choose a country, anotherselectTagappears asking them to choose
>>> their state and once they choose their state, they type in a message
>>> and hit submit...how can i do this?
>>
>>> So far i have this
>>> $this->set('list_countries',$this->Country->generateList(null, 'code
>>> ASC', null, '{n}.Country.code', '{n}.Country.name');
>>
>>> I dont' know how to write the view to do the stuff... please  
>>> advise.This really isn't a Cake question, so you'll have to look  
>>> in some
>> other places. If you're using prototype/scriptaculous, you could tie
>> the onChange event on one of your select elements to a Effect.Appear
>> effect described here:
>>
>> http://wiki.script.aculo.us/scriptaculous/show/Effect.Appear
>>
>> -- John
>
>
> >


--~--~-~--~~~---~--~~
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: Same result from the same method with a different argument

2007-01-25 Thread Samuel DeVore

did you add the cache querie in that function like is in the paste now?

http://bin.cakephp.org/view/2040641251

On 1/25/07, Steniskis <[EMAIL PROTECTED]> wrote:
>
> It is in the model, Sam
>
> http://bin.cakephp.org/view/2040641251"; target="_blank">here
> is the link
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~-~--~~~---~--~~
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: Model for my SQL-query

2007-01-25 Thread Chris Hartjes

On 1/25/07, Barma3 <[EMAIL PROTECTED]> wrote:
>
> > Step one is for you to define your models
> > Step two is for you to define the associations between the two models
> > so you can use the nicely formatted results array.
> > Step three is to start messing around with passing selection criteria
> > via your model->find() method.
>
> What method of associations should I use? Sorry, I'm a beginner in
> CakePHP :). Could you write sample code?
>
>

http://manual.cakephp.org/chapter/models

Tells you everything you need to get yourself going with my suggestions.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digitial photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: Model for my SQL-query

2007-01-25 Thread Barma3

> Step one is for you to define your models
> Step two is for you to define the associations between the two models
> so you can use the nicely formatted results array.
> Step three is to start messing around with passing selection criteria
> via your model->find() method.

What method of associations should I use? Sorry, I'm a beginner in
CakePHP :). Could you write sample code?


--~--~-~--~~~---~--~~
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: Ajax to show hidden select Tag.

2007-01-25 Thread salimk786

Thanks John for that.
However, I'd like the form to be submitted when they choose something
from the drop down and based on that selection, my hidden field appears
with the data based on their selection.

For example. I have a list of countries. I want it so that when they
choose their country, the states appear for that country. and when they
choose their state, the cities appear for that state.


That is what i am trying to do... I just don't know how to submit the
form onclick/onchange of their selection choice.

thanks.


On Jan 16, 2:49 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Jan 16, 2007, at 2:17 PM, salimk786 wrote:
>
>
>
> > Hello,
>
> > I was hoping someone can piont me in the right direction.
> > I want to have a select tag where they choose their country and once
> > they choose a country, anotherselectTagappears asking them to choose
> > their state and once they choose their state, they type in a message
> > and hit submit...how can i do this?
>
> > So far i have this
> > $this->set('list_countries',$this->Country->generateList(null, 'code
> > ASC', null, '{n}.Country.code', '{n}.Country.name');
>
> > I dont' know how to write the view to do the stuff... please advise.This 
> > really isn't a Cake question, so you'll have to look in some  
> other places. If you're using prototype/scriptaculous, you could tie  
> the onChange event on one of your select elements to a Effect.Appear  
> effect described here:
>
> http://wiki.script.aculo.us/scriptaculous/show/Effect.Appear
> 
> -- John


--~--~-~--~~~---~--~~
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: Model for my SQL-query

2007-01-25 Thread Chris Hartjes

On 1/25/07, Anggie Bratadinata <[EMAIL PROTECTED]> wrote:
>
> Model->findBySql($sql)
>
> --

C'mon now, that's cheating...

Step one is for you to define your models
Step two is for you to define the associations between the two models
so you can use the nicely formatted results array.
Step three is to start messing around with passing selection criteria
via your model->find() method.

Sure, you can use findBySql but the resulting array is coyote-ugly.
Less work to setup, but one should always strive for elegance in your
code.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digitial photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: how can I pass two or more params to controller

2007-01-25 Thread Chris Hartjes

On 1/25/07, the_woodsman <[EMAIL PROTECTED]> wrote:
>
> Hi Chris,
>
> I mean Cake specifically - i've seen the name:val syntax for GET
> requests on Cake sites and examples, and never understood if this maps
> them somehow, or is just to icnrease the usability of the URL...
>

I've done similar things, so my educated guess would be that it's a
Cake thing, and probably not totally due to usability of the URL.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digitial photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: how can I pass two or more params to controller

2007-01-25 Thread the_woodsman

Hi Chris,

I mean Cake specifically - i've seen the name:val syntax for GET
requests on Cake sites and examples, and never understood if this maps
them somehow, or is just to icnrease the usability of the URL...

On Jan 25, 3:30 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 1/25/07, the_woodsman <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hmm, sorry to hijack, but something I've never understood about HTTP
> > GET params - sometimes see them in the form
> > controller/action/name:val/name:val
>
> > Does this have any real affect (map to the names for your action's
> > method params, for example), or is it just for readability?All hijackers 
> > should be shot ;)
>
> You can pass the parameters anyway you want, your code just have to be
> able to parse out what your looking for.
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> rallyhat.com - digitial photo scavenger hunt
> @TheBallpark -http://www.littlehart.net/attheballpark
> @TheKeyboard -http://www.littlehart.net/atthekeyboard


--~--~-~--~~~---~--~~
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: Model for my SQL-query

2007-01-25 Thread Anggie Bratadinata

Model->findBySql($sql)

--
Anggie Bratadinata
www.masputih.com
I N D O N E S I A



Barma3 wrote:
> Could somebody tell me how to use Cake's model for this query:
> 
> SELECT tmp_table.mfr, COUNT(item_sale.mfr) as count FROM (SELECT
> DISTINCT mfr FROM item) tmp_table LEFT JOIN item_sale ON tmp_table.mfr
> = item_sale.mfr GROUP BY tmp_table.mfr
> 
> I have two tables. First for items, second for posts. Finally I need a
> list of items from first table with a number of posts from second
> table.
> 
> Thanks.

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



Re: drawbacks of model coupling

2007-01-25 Thread jyrgen

thanks Chris for your hint.
In the manual i couldn't find anything about this
particular value for $recursive. it just tells about
values between 1 and 3.
j.


> You can pass an optional variable called $recursive via your find
> statements  set to -1 to stop your find from pulling in any associated
> records:
> 
> http://manual.cakephp.org/chapter/models
> 
> --


--~--~-~--~~~---~--~~
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: drawbacks of model coupling

2007-01-25 Thread jyrgen


Yes i have considered doing this, but in a certain way it
appeared to me a bit unappropriate for my goal, which was
just to avoid undefined model variables.

In other words : why on earth should i unbind models
from each other in order to get my different views straight ?

And because the model does not know which data are being
pulled and which are missing, i was not able to decide in the
callback whether to proccess $results or not.

I'm learning slow and the problem was somewhere else...

jyrgen


> Sounds like a good idea - have you seen the bind related methods of the
> model class?
> They allow you to add/remove model relations on the fly.
> See the manual on models for more info...


--~--~-~--~~~---~--~~
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: drawbacks of model coupling

2007-01-25 Thread jyrgen

thank you, i'll give it a try !
for now everything is running fine :-)
jyrgen

On 25 Jan., 15:58, "dkarlson" <[EMAIL PROTECTED]> wrote:
> Or try this approach. I started using it because I wanted to recurse on
> some associated models but not all. I didn't need the extra data, and
> didn't want the additional queries.
> 
> http://bakery.cakephp.org/articles/view/185
>


--~--~-~--~~~---~--~~
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: how can I pass two or more params to controller

2007-01-25 Thread Chris Hartjes

On 1/25/07, the_woodsman <[EMAIL PROTECTED]> wrote:
>
> Hmm, sorry to hijack, but something I've never understood about HTTP
> GET params - sometimes see them in the form
> controller/action/name:val/name:val
>
> Does this have any real affect (map to the names for your action's
> method params, for example), or is it just for readability?
>

All hijackers should be shot ;)

You can pass the parameters anyway you want, your code just have to be
able to parse out what your looking for.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digitial photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: drawbacks of model coupling

2007-01-25 Thread the_woodsman

maybe i have to decouple certain models for certain views"

Sounds like a good idea - have you seen the bind related methods of the
model class?
They allow you to add/remove model relations on the fly.
See the manual on models for more info...

On Jan 25, 11:02 am, "jyrgen" <[EMAIL PROTECTED]> wrote:
> hi list,
>
> with your help and guidelines i was able to add checkbox data
> un/serialisation methods via the beforeSave() and afterFind()
> model callbacks.
>
> But i ran into heavy trouble, because models are associated
> in my design (i have authors and articles basically).
> I had errors in my views of the type ("undefined index...").
> For example in a simple article index list of one author,
> cake pulls *every* associated data, i.e. author profiles and
> so on. This lead to the errors mentioned above.
>
> I thought "ok, maybe i have to decouple certain models for
> certain views", or "ok, i have to check $result in afterFind()
> whether a certain array key exists..." and so on.
>
> Finally, after 3 hours i ended up putting the un/serialisation
> methods back into the controllers, which is not so nice, but
> at least i don't get any errors in my views.
>
> Please let me know, if you need to see some code or if i have
> described my problem precisely enough.
> 
> jyrgen


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



Model for my SQL-query

2007-01-25 Thread Barma3

Could somebody tell me how to use Cake's model for this query:

SELECT tmp_table.mfr, COUNT(item_sale.mfr) as count FROM (SELECT
DISTINCT mfr FROM item) tmp_table LEFT JOIN item_sale ON tmp_table.mfr
= item_sale.mfr GROUP BY tmp_table.mfr

I have two tables. First for items, second for posts. Finally I need a
list of items from first table with a number of posts from second
table.

Thanks.


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



Re: how can I pass two or more params to controller

2007-01-25 Thread the_woodsman

Hmm, sorry to hijack, but something I've never understood about HTTP
GET params - sometimes see them in the form
controller/action/name:val/name:val

Does this have any real affect (map to the names for your action's
method params, for example), or is it just for readability?

On Jan 25, 12:48 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> :) I forgot that ... what a shame..
>
> thx anyway
>
> On 1月25日, 下午8时09分, "Dr. Tarique Sani"
>
> <[EMAIL PROTECTED]> wrote:
> > On 1/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > > how can I pass two or more params to 
> > > controller?http://blah.com/controller/action/param1/param2
>
> > HTH
> > Tarique
>
> > --
> > =
> > PHP for E-Biz:http://sanisoft.com
> > Cheesecake-Photoblog:http://cheesecake-photoblog.org
> > =


--~--~-~--~~~---~--~~
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: drawbacks of model coupling

2007-01-25 Thread dkarlson

Or try this approach. I started using it because I wanted to recurse on
some associated models but not all. I didn't need the extra data, and
didn't want the additional queries.

http://bakery.cakephp.org/articles/view/185

D

On Jan 25, 8:52 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 1/25/07, jyrgen <[EMAIL PROTECTED]> wrote:
>
>
>
> > hi list,
>
> > But i ran into heavy trouble, because models are associated
> > in my design (i have authors and articles basically).
> > I had errors in my views of the type ("undefined index...").
> > For example in a simple article index list of one author,
> > cake pulls *every* associated data, i.e. author profiles and
> > so on. This lead to the errors mentioned above.You can pass an optional 
> > variable called $recursive via your find
> statements  set to -1 to stop your find from pulling in any associated
> records:
>
> http://manual.cakephp.org/chapter/models
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> rallyhat.com - digitial photo scavenger hunt
> @TheBallpark -http://www.littlehart.net/attheballpark
> @TheKeyboard -http://www.littlehart.net/atthekeyboard


--~--~-~--~~~---~--~~
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: Finally a good Editor for Windows

2007-01-25 Thread Mandy

crazylegs -

That is not what I was talking about. I know we can do that.

But, suppose I was editing a jsp file, so I opened it in the jsp
editor.

Now, I have a javascript snippet inside of it. And I would like to take
advantage of js snippets and editing features that my js editor has.
Then, I will close the file and say open with js editor and so on and
so forth for html, css, etc.

But, with this editor (I agree very early stages) I can open the file,
then do Ctrl+Alt+J to shift to js mode, Ctrl+Alt+H for xhtml
mode..Ctrl+Alt+C for css mode...and no need to open the file a number
of times...

-Mandy.

On Jan 25, 2:10 am, "CraZyLeGs" <[EMAIL PROTECTED]> wrote:
> > In Eclipse I am not sure you can bind a file with a
> > phpEditor/cssEditor/javascriptEditor etc at the same time?Sure you can. 
> > even multiple editors for the same type of files.
> rightclick open with..
>
> Eclipse for project Management and just uh-huh everything.
> NotePad++ for quick rightclick open.
> In the nix world I use vim.
>
> On Jan 25, 12:14 am, Langdon Stevenson <[EMAIL PROTECTED]>
> wrote:
>
> > Hi Pje
>
> > > I think that Intype will be a good replacement for TextMate, to people
> > > who uses Windows. It will not be a replacement for Eclipse or any other 
> > > IDE.
>
> > > Actually, who don't use a IDE in Windows uses EditPlus, UltraEdit,
> > > Notepad++, etc... this is the market that Intype developers are looking
> > > for.Sounds reasonable.  I used Homesite before I switched to Eclipse and I
> > can see the attraction of a more powerful (IDE like perhaps?) text editor.
>
> > Still, I think it will be a hard slog for a commercial product in that
> > market space.  If the price is right (and it is looking good so far)
> > then they may have a shot.
> 
> > Regards,
> > Langdon


--~--~-~--~~~---~--~~
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: drawbacks of model coupling

2007-01-25 Thread Chris Hartjes

On 1/25/07, jyrgen <[EMAIL PROTECTED]> wrote:
>
> hi list,
>
>
> But i ran into heavy trouble, because models are associated
> in my design (i have authors and articles basically).
> I had errors in my views of the type ("undefined index...").
> For example in a simple article index list of one author,
> cake pulls *every* associated data, i.e. author profiles and
> so on. This lead to the errors mentioned above.
>

You can pass an optional variable called $recursive via your find
statements  set to -1 to stop your find from pulling in any associated
records:

http://manual.cakephp.org/chapter/models

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

rallyhat.com - digitial photo scavenger hunt
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
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: Same result from the same method with a different argument

2007-01-25 Thread Samuel DeVore

where is this function?  is it in the model or the controller

can you paste in http://bin.cakephp.org  (will give better formatting
and it's just nicer to read and edit)

Sam D

On 1/25/07, Steniskis <[EMAIL PROTECTED]> wrote:
>
> Thank you all for your smart answers.
> According to your suggestion, Samuel, I tried
> $this->cacheQueries = false;
> But it did not change the result.
> Djiize, I can't use $this->Agent->findAllByTypeId(1)
>
> here is my function
>
> function listedesagents ($role=null){
>
> $this->sql_desagents = $this->findAll('IDS_role='.$role);
> foreach ($this->sql_desagents as $rang) {
>
> $IDP_agent= $rang['Agent']['IDP_agent'];
>
> $nomAgent= utf8_decode($rang['Agent']['prenomAgent']);
> $nomAgent.=' '. utf8_decode($rang['Agent']['nomAgent']);
>
>   $this->desagents[$IDP_agent] = $nomAgent;
> }
> return $this->desagents;
> }
>
> here is the table:
>
> TABLE `tb_agents` (
>   `IDP_agent` int(10) unsigned NOT NULL auto_increment,
>   `nomAgent` varchar(50) NOT NULL default '',
>   `prenomAgent` varchar(25) NOT NULL default '',
>   `IDS_creneau` int(4) default NULL,
>   `IDS_role` int(1) default NULL,
>   PRIMARY KEY  (`IDP_agent`)
> )
>
> Thank you for any suggestion
> Steniskis
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~-~--~~~---~--~~
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: error in default.thtml

2007-01-25 Thread Samuel DeVore

Actaully you don't need to copy the app_controller  from core, just
make a new one that has just this

class AppController extends Controller  {
var $components = array('Acl','Output');   // components you want for
all controllers
var $helpers = array('html', 'ajax'); //helpers you want for all 
views

}

The thing you should know is that these arrays are not additive
(though there are some ways to make them that way)  and put this in
your app's main folder.

this is mentioned briefly in http://manual.cakephp.org/chapter/controllers

some interesting reading on this can be found with

http://cakephp.org/search?q=appcontroller

HTH

Sam D

On 1/25/07, kabturek <[EMAIL PROTECTED]> wrote:
>
> Hi
> On Jan 25, 6:58 am, "lukemack" <[EMAIL PROTECTED]> wrote:
> > thanks guys - i resolved it by adding the helpers in
> > cake\app_controller.php. what would be the point of having this in the
> > \app folder? does it override the default one?
>
> You shouldn't edit anything in the /cake folder - these are the core
> libs and when upgrading to newer version your changes will be
> overwritten.
> Copy the app_controller to the /app and edit it there - it will have
> the same effect.
>
> greets,
>
>
> >
>


-- 
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you

--~--~-~--~~~---~--~~
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: how can I pass two or more params to controller

2007-01-25 Thread [EMAIL PROTECTED]

:) I forgot that ... what a shame..

thx anyway

On 1月25日, 下午8时09分, "Dr. Tarique Sani"
<[EMAIL PROTECTED]> wrote:
> On 1/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > how can I pass two or more params to 
> > controller?http://blah.com/controller/action/param1/param2
>
> HTH
> Tarique
>
> --
> =
> PHP for E-Biz:http://sanisoft.com
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> =


--~--~-~--~~~---~--~~
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: bake.php script writes models, but not controller or views

2007-01-25 Thread biesbjerg

Hi miggs,

I recently had this problem. Turns out I had made a copy of a model
(backed up app/models/media_folder.php as app/models/media_folder -
Copy.php)

I deleted this file and everything worked fine again.


Guess app/models is only for models, eh? ;-)

On Jan 17, 11:09 pm, "miggs" <[EMAIL PROTECTED]> wrote:
> I've used thebake.php script in the past with great results, but
> recently when I try to create acontroller, it goes through the script
> like normal, but never writes the files.  I've tried both building the
> conroller interactively as well as not.  I was wondering if anyone had
> any experience with this happening?  It's probably something simple I'm
> missing, but I'm stumped.


--~--~-~--~~~---~--~~
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: how can I pass two or more params to controller

2007-01-25 Thread heberm

And in your controller you will have

function action($param1,$param2){
  //your code...
}

Regards,
Heber

On 25 jan, 10:09, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 1/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > how can I pass two or more params to 
> > controller?http://blah.com/controller/action/param1/param2
>
> HTH
> Tarique
>
> --
> =
> PHP for E-Biz:http://sanisoft.com
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> =


--~--~-~--~~~---~--~~
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: Wizard creation headaches ... validation and save problems. How do I do this?

2007-01-25 Thread Dr. Tarique Sani

On 1/25/07, Flexewebs <[EMAIL PROTECTED]> wrote:
> Using this piece of code:
>
> tagErrorMsg('mail_code', 'Mail code is required') ?>
Try tagErrorMsg('Order/mail_code', 'Mail code is required') ?>

Tarique

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

--~--~-~--~~~---~--~~
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: how can I pass two or more params to controller

2007-01-25 Thread Dr. Tarique Sani

On 1/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> how can I pass two or more params to controller?

http://blah.com/controller/action/param1/param2

HTH
Tarique

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

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



URLs with Ajax confusion

2007-01-25 Thread quincy

Hi,

I was recently using $this->render("xyz", "ajax") until i realised that
if a user typed a URL directly it would render a messed up non-ajax
page.  So I promptly removed the "ajax" parameter and now the pages
render correctly when the URL is entered directly. I take it from my
travels here that the request handler does this work for me.

However (drumroll please) now when you type the URL, the page renders
fine but all the ajax links on that page seem to be dead, and do
nothing when clicked.

I am, to say the least, a bit confused!!

Any thoughts?

I'll take this opportunity to say how great I think Cake is, it has
enabled me to develop (nearly finished!!) a pretty powerful and
flexible CMS system and has removed most of the headaches I would have
faced had I done it from scratch without a solid framework.  Its
changed the way I work for the better, and I'm eternally grateful!


--~--~-~--~~~---~--~~
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: Wizard creation headaches ... validation and save problems. How do I do this?

2007-01-25 Thread Flexewebs

Just to clarify.

Using this piece of code:

tagErrorMsg('mail_code', 'Mail code is required') ?>

Gives me this error now:

Notice: Undefined offset: 1 in
/var/www/html/white_label/cake/libs/view/helpers/html.php on line 949

I have set mail_code with in the controller using:

$this->Order->set('mail_code', $this->data['Order']['mail_code']);

The validation rules are working, but I can't get the error message to
display in my view. Utilising tagErrorMsg() would be great. If I can
only get that going now.

Thanks,

Jason


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



drawbacks of model coupling

2007-01-25 Thread jyrgen

hi list,

with your help and guidelines i was able to add checkbox data
un/serialisation methods via the beforeSave() and afterFind()
model callbacks.

But i ran into heavy trouble, because models are associated
in my design (i have authors and articles basically).
I had errors in my views of the type ("undefined index...").
For example in a simple article index list of one author,
cake pulls *every* associated data, i.e. author profiles and
so on. This lead to the errors mentioned above.

I thought "ok, maybe i have to decouple certain models for
certain views", or "ok, i have to check $result in afterFind()
whether a certain array key exists..." and so on.

Finally, after 3 hours i ended up putting the un/serialisation
methods back into the controllers, which is not so nice, but
at least i don't get any errors in my views.

Please let me know, if you need to see some code or if i have
described my problem precisely enough.

jyrgen


--~--~-~--~~~---~--~~
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: how to acess attribution in join table

2007-01-25 Thread [EMAIL PROTECTED]

I figure a better way

we can still use hasAndBelongsToMany association,and get the Song and
Chart ids and then use them to find out the other attribution through
the join table model ChartsSong.



On 1月25日, 下午1时55分, "Grant Cox" <[EMAIL PROTECTED]> wrote:
> The only way I have done it is to change the relationship to hasMany
> (both ways), with an actual model in between.
>
> So, you would have
> Song hasMany ChartSong
> Chart hasMany ChartSong
> ChartSong belongsTo Song, Chart
>
> now this model can have any amount of data you like, but you do need to
> manage the association connections yourself (ie creating, deleting).
>
> On Jan 25, 3:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > I have Song hasAndBelongsToMany Chart ,and there are table
> > 'charts','songs','charts_songs'
> > and I have a attribution besides chart_id and song_id ,how can I acess
> > this attribution?


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



how can I pass two or more params to controller

2007-01-25 Thread [EMAIL PROTECTED]

how can I pass two or more params to controller?

any help is appr.


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



Where to store application-wide array definition

2007-01-25 Thread jyrgen

Can some point me to a location where i can store
an array so it can be evaluated in two or more
controllers and models ?
thanks very much 
jyrgen


--~--~-~--~~~---~--~~
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: View caching, routes and perfomance issues

2007-01-25 Thread Dr. Tarique Sani

On 1/25/07, Klaus <[EMAIL PROTECTED]> wrote:
> > Do you mean  is not working for login forms?
>
> No. A cached view should be deleted anytime an INSERT, UPDATE or DELETE
> operation is done by it's related model

True - my question was specific about the login form - I presume that
login will just read data...

Tarique

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

--~--~-~--~~~---~--~~
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: View caching, routes and perfomance issues

2007-01-25 Thread Klaus

> > First of all, the routing mechanism -and please correct me if I'm
> > wrong- is not correctly working with view caching. I make heavy use of
> > routes in the shake of user friendlyness and search engine
> > optimization, so the 'controller/view/parameter' paradigm doesn't fit
> > my URIs in most cases, and the cache mechanism works incorrecly under
> > this circumstance:
> >
> > Views with $_POST data were actually being cached, which included
> > sometimes failed user logins being cached and thus passwords stored in
> > the static generated view.
>
> Do you mean  is not working for login forms?

No. A cached view should be deleted anytime an INSERT, UPDATE or DELETE
operation is done by it's related model (this behaviour is also
detailed in CakePHP's online manual). This is checked by the private
method _clearCache() in /cake/libs/model/model_php4.php. But this
method spects the URI to be in a '/controller/view/parameter/' format
-or at least that's what I think.

When a routes are used, the URI format can be different, and in this
case the _clearCache() method is not able to find the cached filename
and delete it. So the cached view is never deleted. I've made the
little workaround (patch) I wrote in the previous post, which is
working for me.

> > Also, views weren't deleted after an INSERT,
> > UPDATE, or DELETE operations, because they tried to delete a cache file
> > stored under the 'controller_view_parameter.php' format, which is not
> > always true when routing is used.
>
> I guess this is a bug deserves a ticket in the Trac - if possible
> provide a patch to fix the problem.

I think that too :-) But maybe someone here is having the same problem
and can give some feedback, or maybe a CakePHP guru can give here some
hints before opening a ticket.

> > in subdirectories ordered by their first character. Something like
> > /views/a/, /views/b/, and so on.
>
> Yes what you have heard is true and what you are proposing is somewhat
> similar to what SMARTY does but with SMARTY it replicates the real
> application directory structure.

Great! If that's true and there is a perfomance involvement, maybe I'll
contribute a patch. Seems to be easy to implement, but -again- I'd like
some feedback because I'm not completely sure this will be accepted.

> > Anyway, and in spite of this little issues, the view cache has
> > *dramatically* reduced my server's load and the number of queries per
> > hour.
>
> If you could share some benchmarks it would be very much appreciated.

I'm afraid this is going to be impossible, because my server
environment is not the best to make a benchmark (I have many other
services and sites on the same machine which I cannot stop). However, I
will try to get some conclusions about the cache, if finally I
implement the proposed directory structure, and I'll share it here if I
find something intersting.

Regards,

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


--~--~-~--~~~---~--~~
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: A new music thing with CakePHP

2007-01-25 Thread Sam Sherlock
Hi Tom,

That good work indeed very expansive too.

Seems to not be working right now unless you click that top 25. The other
day I was really impress with the range of results.

Are having to make a xml file or add each artist / band to a db?
for example Iggy returned a number of stuff, but searching for 'kenny dope'
and clicking through to Kenny 'Dope' Gonzalez listed nearly nothing - in
reality he has done loads.
Are you parsing xml within cakePHP? - who did you achieve this by using
vendor()?
Is it using web services?  I would love to no a bit more about the
underlying mechanics

Not detracting from your efforts at all great stuff :)

- S



On 25/01/07, tom <[EMAIL PROTECTED]> wrote:
>
>
> Yep. Trying to get help from the jQuery folks, it's mostly a JS
> problem.
>
> Should try to get this done before my classes wind up.
>
> On Jan 22, 4:21 am, "Eric C Blount" <[EMAIL PROTECTED]> wrote:
> > It blew up.
> >
> > 1) Not typing anything in the search box and submitting yields several
> > error messages (not a big deal, but I thought you should know)
> >
> > 2) I typed "cream", selected the band Cream, clicked on Eric Clapton
> > and nothing happened. In fact, I can't get it to go past that first
> > page. The album title links are not working either.
> >
> > I'm using IE 6 on WinXP (no flames, I know it sucks, it's a work
> computer).
> >
> > I like the concept, please let me know what happens.
> >
> > Eric
>
>
> >
>

--~--~-~--~~~---~--~~
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: Same result from the same method with a different argument

2007-01-25 Thread Steniskis

Thank you all for your smart answers.
According to your suggestion, Samuel, I tried
$this->cacheQueries = false;
But it did not change the result.
Djiize, I can't use $this->Agent->findAllByTypeId(1)

here is my function

function listedesagents ($role=null){

$this->sql_desagents = $this->findAll('IDS_role='.$role);
foreach ($this->sql_desagents as $rang) {

$IDP_agent= $rang['Agent']['IDP_agent'];

$nomAgent= utf8_decode($rang['Agent']['prenomAgent']);
$nomAgent.=' '. utf8_decode($rang['Agent']['nomAgent']);

  $this->desagents[$IDP_agent] = $nomAgent;
}
return $this->desagents;
}

here is the table:

TABLE `tb_agents` (
  `IDP_agent` int(10) unsigned NOT NULL auto_increment,
  `nomAgent` varchar(50) NOT NULL default '',
  `prenomAgent` varchar(25) NOT NULL default '',
  `IDS_creneau` int(4) default NULL,
  `IDS_role` int(1) default NULL,
  PRIMARY KEY  (`IDP_agent`)
)

Thank you for any suggestion
Steniskis


--~--~-~--~~~---~--~~
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: how to make bake in tables as 'tb_pedidos' and 'tb_pedidos_itens'?

2007-01-25 Thread mindcharger

Let's keep it in English, please...

It's better a "Bad English" than "No English".

If it's "Bad English" everyone can understand and help...if it's
Portuguese or whatever language, only those who speak that language
will be able to follow.

You are free to use "Reply to Author" and speak whatever language you
want, but when posting a topic please keep it in English.

Thanks.

Erick Tedeschi wrote:
> Opa tem pessoal brasileiro aqui tb!
> Então, eu estou em um ambiente que já possuí as tabelas do mysql
> prontas que não podem ser alteradas.
> Por isso vou ter que criar o modelo na unha, mas não sei como.
> E tb queria saber se depois que eu criar os modelos na unha o bake vai
> criar direitinho o controller e as views.
> 
> falow


--~--~-~--~~~---~--~~
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: Wizard creation headaches ... validation and save problems. How do I do this?

2007-01-25 Thread Flexewebs

Related query I have now is this:

I seem to have got the logic/syntax of the validates() within my
controller working now using the above snippet of code (I am not using
the FormWizard class).

So what happens now is that I get the controller to carry out correct
validation based on my model rules, however, I am wondering what I need
to do now in order to echo back relevant messages into the view in
order to let the user know that certain fields have not been filled in
properly?

Can anyone shed some light on this?

My assumptions so far are:

tagErrorMsg() won't work since that only works in conjunction with
save() (if I am understanding right). It certainly doesn't work for me
at the moment.
validate() or validateErrors() would need to be utilised within the
view, but that currently gives me errors if I try to do it and I not
really sure how to plug that into the view code anyway at the moment.

Has someone used this sort of logic before? 

Thanks,

Jason


--~--~-~--~~~---~--~~
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: Finally a good Editor for Windows

2007-01-25 Thread [EMAIL PROTECTED]

On Jan 24, 11:34 pm, "Grant Cox" <[EMAIL PROTECTED]> wrote:
> Is there really no undo/redo?  Seems like a surprising omission, even
> from an alpha release.

sorry but that doesn't much sense to me.  the product is still in very
early stage of development, miles away from being finished.
If you first build very common features like undo/redo, you have
nothing to show off.  I can understand they first want to show off
their "cool" stuff and then build in the standard features.
This is not about "omitting things" but choosing about what you want to
show first to the public, to get some buzz.


--~--~-~--~~~---~--~~
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: error in default.thtml

2007-01-25 Thread kabturek

Hi
On Jan 25, 6:58 am, "lukemack" <[EMAIL PROTECTED]> wrote:
> thanks guys - i resolved it by adding the helpers in
> cake\app_controller.php. what would be the point of having this in the
> \app folder? does it override the default one?

You shouldn't edit anything in the /cake folder - these are the core
libs and when upgrading to newer version your changes will be
overwritten.
Copy the app_controller to the /app and edit it there - it will have
the same effect.

greets,


--~--~-~--~~~---~--~~
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: Finally a good Editor for Windows

2007-01-25 Thread CraZyLeGs

> In Eclipse I am not sure you can bind a file with a
> phpEditor/cssEditor/javascriptEditor etc at the same time?

Sure you can. even multiple editors for the same type of files.
rightclick open with..

Eclipse for project Management and just uh-huh everything.
NotePad++ for quick rightclick open.
In the nix world I use vim.

On Jan 25, 12:14 am, Langdon Stevenson <[EMAIL PROTECTED]>
wrote:
> Hi Pje
>
> > I think that Intype will be a good replacement for TextMate, to people
> > who uses Windows. It will not be a replacement for Eclipse or any other IDE.
>
> > Actually, who don't use a IDE in Windows uses EditPlus, UltraEdit,
> > Notepad++, etc... this is the market that Intype developers are looking
> > for.Sounds reasonable.  I used Homesite before I switched to Eclipse and I
> can see the attraction of a more powerful (IDE like perhaps?) text editor.
>
> Still, I think it will be a hard slog for a commercial product in that
> market space.  If the price is right (and it is looking good so far)
> then they may have a shot.
> 
> Regards,
> Langdon


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



obAuth Session Errors

2007-01-25 Thread Makea

Anyone know why I'm getting session errors with obAuth? Sessions work
fine (doing a print_r($_SESSION) with obAuth disabled), just pukes with
obAuth:
Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at
/Library/WebServer/Documents/cake_1.1.12.4205/ngo_reservation/controllers/components/ob_auth.php:117)
in /Library/WebServer/Documents/cake_1.1.12.4205/cake/libs/session.php
on line 146


--~--~-~--~~~---~--~~
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: Bake doesn't show all available tables

2007-01-25 Thread Preloader

Hi Tom,

thank you for your hints, but I still have the problem.

The tables really have been generated (I checked that in the
MySQL-Query-Browser), I even filled them with data.

I will try to drop the database und start the whole project (it's the
"Cook up Web sites fast with CakePHP" tutorial by Duane O'Brien) from
scratch. Maybe then I hit on the problem.

Thanks, Christoph :-)


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