Re: Threaded menu

2007-08-02 Thread phirschybar

there is a model behavior called 'tree'. Have never used it but might
be worth taking a look.

On Aug 2, 12:48 pm, omeck <[EMAIL PROTECTED]> wrote:
> Hi,
> I have done menu with submenus. I used relations
> Menu hasMany Link
> Link belongsTo Menu
>
> I get data by $this->set('menusLeft', $this->Menu->findAll('page_pos =
> 1', '', 'Menu.pos ASC'));
> and display:
>  foreach ($menusRight as $menu) {
> echo '' . $menu['Menu']['name'] . '';
>
> foreach ($menu['Link'] as $link) {
> if ($link['new_window'] == 1)
> echo '' . 
> $html->link($link['name'], '/links/view/' . $link['url'], array('onclick' =>
>
> 'return!window.open(this.href)')).'';
> else
> echo '' . 
> $html->link($link['name'], '/links/
> view/' . $link['url']).'';
> }
> echo $menu['Menu']['code_block'];}
>
> ?>
>
> So I get:
>
> Menu1
> * submenu1
> * submenu2
> * sumbenu3
> Menu2
> * sumbenu5
> * submenu6
>
> etc.
>
> Today I decided that I need sumenus to submenus - submenus should have
> children. I added filed 'parent_id'  to links table.
>
> My problem is how to prapare data?
> $this->Menu->findAll() and $this->Menu->Link->findAllThreaded() give
> me different results which a cannot( or i am not able to ;-)) use to
> build structure:
>
> Menu1
> *submenu1
> * submenu2
>* sumbenu3
>*submenu4
> * submenu5


--~--~-~--~~~---~--~~
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: Newbie Introduction Book ... reviews anyone?

2007-07-27 Thread phirschybar

I'd like to take a look. Thanks. benhirsch AT gmail DOT com

On Jul 27, 2:14 pm, Dave <[EMAIL PROTECTED]> wrote:
> I'm working on a Newbie's Introduction to CakePHP book and would like
> to invite anyone who would like to review it for errors or
> considerations I may have overlooked. Let me know, and I'll send you a
> PDF copy of the current edition.


--~--~-~--~~~---~--~~
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: Mambo to use CakePHP for V5

2007-07-24 Thread phirschybar

Welcome Mambo team and community!!!

On Jul 24, 8:24 pm, cauld <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> My name is Chad Auld.  I am the Project Leader for Mambo.  Seemed
> appropriate to stop by this thread and introduce myself.  We are
> excited about the decision and looking forward to forming a very close
> relationship with the CakePHP development team and community.  Anyway,
> we are here and paying attention to current CakePHP developments and
> the Google Group discussions for now.  More to come as it happens...
>
> Cheers!
>
> On Jul 23, 10:48 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
>
> > Exciting news  -http://www.source.mambo-foundation.org/content/view/126/1/
>
> > Will there be a corresponding announcement from CSF?
>
> > What does it mean for future of CakePHP?
>
> > T
>
> > --
> > =
> > Cheesecake-Photoblog:http://cheesecake-photoblog.org
> > PHP for E-Biz:http://sanisoft.com
> > =


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



View this page "Cake Apps/Sites In The Wild"

2007-07-24 Thread phirschybar

added Mambo CMS 5.0 [under development]

Click on http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild
- or copy & paste it into your browser's address bar if that doesn't
work.


--~--~-~--~~~---~--~~
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: email trigger function

2007-07-24 Thread phirschybar

you could use afterSave() in your model. Have it check for the fields
and run another function which emails the user. Sorry it's a bit vague
but so is your question. :)

On Jul 24, 6:56 pm, rtanz <[EMAIL PROTECTED]> wrote:
> hi i have a table containing a number of fields. Is there a way to
> make the system check that when some particular fields are no longer
> empty an email is sent to a user? 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
-~--~~~~--~~--~--~---



Best Practices with: Model->beforeValidate()

2007-07-20 Thread phirschybar

I want to use beforeValidate() to make some edits to data before it
gets validated (combining 2 input fields, etc.).

Does beforeValidate get called on EVERY save, including on UPDATE? Or
just the initial save?

What is the best practice here. If I want to just look for an initial
SAVE, rather than an UPDATE, do I just check that

!isset($this->data['Model']['id'])


--~--~-~--~~~---~--~~
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: CakePHP Planet

2007-03-19 Thread phirschybar

http://www.google.com/coop/cse?cx=006850030468302103399%3Amqxv78bdfdo

On Mar 19, 12:40 pm, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> https://trac.cakephp.org/ticket/1795
>
> Comino soon...
>
> -MI
>
> ---
>
> Remember, smart coders answer ten questions for every question they ask.
> So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> blog:http://www.MarianoIglesias.com.ar
>
> -Mensaje original-
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de digital spaghetti
> Enviado el: Lunes, 19 de Marzo de 2007 01:27 p.m.
> Para: cake-php@googlegroups.com
> Asunto: Re: CakePHP Planet
>
> That is good, but certinly all the "big" projects like Drupal or
> Ubuntu have their own planet subdomain - which people now more
> commonly expect.  Maybe pointing planet.cakephp.org to that site would
> do it rather than develop another one?


--~--~-~--~~~---~--~~
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: Thank You for CakePHP

2007-03-17 Thread phirschybar

true that.

On Mar 17, 2:38 pm, "yolabingo" <[EMAIL PROTECTED]> wrote:
> Ditto all above.


--~--~-~--~~~---~--~~
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: Best Practices: Toggle Item In Element

2007-03-13 Thread phirschybar

Actually both seemed to work for me. Thanks to you both. Anyone know
the difference, out of curiousity?

On Mar 12, 8:49 am, "jmn2k1" <[EMAIL PROTECTED]> wrote:
> I guess this gives the same error, bc the index is still undefined, so
> you should try with isset()
>
> On Mar 9, 9:30 am, "jitka" <[EMAIL PROTECTED]> wrote:
>
> > if (!empty($data['ticker']))


--~--~-~--~~~---~--~~
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: Account Parameter

2007-03-12 Thread phirschybar

I just posted a question like this and got some info:

http://groups.google.com/group/cake-php/browse_frm/thread/aa65e794df4e064a/8d9e875d51f97d2e?lnk=st&q=&rnum=6#8d9e875d51f97d2e

On Mar 11, 1:52 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Applications like Basecamp and Backpack use the account name in the
> url - specifically a subdomain like account.backpackit.com or
> account.projectpath.com.  Does Cake let you capture this subdomain in
> your app?  I'm sure it involves some httpd.conf settings, but is it
> ultimately available in Cake to use?
>
> Another option would be to use it before the controller name, like how
> plugins or admin routes work, 
> likewww.whatever.com/account/controller/action/params.
> Is there any way to have a parameter before the controller name?
> Maybe using the new routing capabiliites in 1.2 as described 
> inhttp://cake.insertdesignhere.com/posts/view/10?
>
> I know it could just be used as a normal parameter after controller/
> action, but for the app I'm looking at that parameter is needed in
> every url and looks nicer before the controller.


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



FTP Component for Cake

2007-03-12 Thread phirschybar

Is there any kind of FTP functions wrapper in Cake? I searched the API
and saw nothing. Anybody making or has made an FTP component?

If not, I will be needing a lot of FTP functions for an app so I may
have to build a component myself (or maybe it should be a plugin?).
Any requests on functionality if you need something like this too?
Thoughts on plugin vs. component?


--~--~-~--~~~---~--~~
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: Fetching rows one by one

2007-03-09 Thread phirschybar

findAll($conditions = null, $fields = null, $order = null, $limit =
null, $page = 1, $recursive = null);

You can specify the fields you want to return, along with conditions,
limits, just like any basic query.

On Mar 9, 7:39 am, "Adrian Maier" <[EMAIL PROTECTED]> wrote:
> On 3/9/07, phirschybar <[EMAIL PROTECTED]> wrote:
>
>
>
> > Take a look at this article:
> >http://www.thinkingphp.org/2007/02/24/cake-12s-set-class-eats-arrays-...
>
> > Dealing with big fat arrays in Cake can be a struggle at first but
> > using the Set::extract method can pull out a set of the data you need
> > very elegantly. See how Felix also uses array_combine to get just a
> > nice set of key/value pairs out a deeply nested array?
>
> Thanks for the link.
> However it seems to me that the article is dealing with another issue :
> this Set is another method of traversing an array and getting only some values
> from that tree.  But it still requires you to do a $users =
> $this->User->findAll().
>
> My issue is that i want to avoid the creation of that tree of arrays ,
> in order to
> reduce the memory footprint.
>
> > Anyways I would use extract to get the data you need from Table 1 and
> > then loop over the array and do your UPDATE queries on your second
> > table.
>
> It looks like indeed it's not possible to fetch records the way i'd like. If i
> get into memory limitations  i'll just increase php's limit ...
>
> Cheers,
> Adrian Maier


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



Best Practices: Toggle Item In Element

2007-03-09 Thread phirschybar

Ok so I have a bunch of views, called by different controllers that
each reference the same element 'post'. Each controller passes a set
of parameters to the element via the renderElement('post', $data)
method. All the parameters are passed through $data and all is peachy.

However, ONE of the views has a special little parameter called
'ticker' passed through $data['ticker']. In my view I have set
$data['ticker'] = 1 to indicate that the little ticker should be shown
in the element only for this one view!

In my 'post' element I say:

if ($data['ticker']){
   // show that ticker!!!
}

Problem is that for ALL the other controllers->views I get a 'missing
index' for ticker. So, what I am asking is what is the best php5 /
cake practice for handling this. I would rather not have to define
$data['ticker'] in every other view or anywhere else. Is there a way
to define it in the element and then overwrite it on load (or
something). I am trying to determine the best, most agile practice for
this situation.


--~--~-~--~~~---~--~~
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: Strange result with findCount

2007-03-09 Thread phirschybar

I don't have a definite answer but I 'think' status is a reserved word
in MySQL. I only say this because when I type it into the query box in
my MySQL client, it gets highlighted as if it is reserved. Wanna try
changing it to see?

On Mar 9, 6:42 am, "szeta" <[EMAIL PROTECTED]> wrote:
> Hm,
>
> findCount('Install_Count',0) works fine
> findCount('Status',0) does not work (returns 0)
>
> Both Fields are in the same table and both are the same data-type
> (VARCHAR 255)
>
> Is this a bug in CakePHP? Is 'Status' a keyword? How can I use this as
> normal Table Field for findCount?
> I have searched the whole CakePHP Code for "Status", but I did not
> find anything suspicious.
>
> I'd be glad for any hint!
>
> On 8 Mrz., 18:00, "phirschybar" <[EMAIL PROTECTED]> wrote:
>
> > try:
>
> > $this->set('test', $this->Rat->findCount('Install_Count = "7"',0));
>
> > quotes around the 7. does it work? might be because it is a varchar
>
> > On Mar 8, 10:48 am, "szeta" <[EMAIL PROTECTED]> wrote:
>
> > > Hello,
>
> > > if I'm using
>
> > > $this->set('test', $this->Rat->findCount('Install_Count = 7',0));
>
> > > I get a result, but if I do it on
>
> > > $this->set('test', $this->Rat->findCount('Status = 7',0));
>
> > > (the only difference is the given Condition Field)
>
> > > I always get "0" in return, even if i know that there are several "7".
> > > A direct Select Statement with "WHERE Status = 7" works fine.
>
> > > Both fields ("Status" and "Install_Count") are a VARCHAR(255)
>
> > > Any suggestion how I may count my "Status"?
>
> > > Regards
> > > Ralph


--~--~-~--~~~---~--~~
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: Fetching rows one by one

2007-03-09 Thread phirschybar

Take a look at this article:
http://www.thinkingphp.org/2007/02/24/cake-12s-set-class-eats-arrays-for-breakfast/

Dealing with big fat arrays in Cake can be a struggle at first but
using the Set::extract method can pull out a set of the data you need
very elegantly. See how Felix also uses array_combine to get just a
nice set of key/value pairs out a deeply nested array?

Anyways I would use extract to get the data you need from Table 1 and
then loop over the array and do your UPDATE queries on your second
table.

On Mar 9, 6:02 am, "Adrian Maier" <[EMAIL PROTECTED]> wrote:
> On 3/9/07, AD7six <[EMAIL PROTECTED]> wrote:
>
>
>
> > > Are there better ways to fetch the query result one by one  ?
>
> > Why do you want to, what is the goal you want to achieve?
>
> In short: I'm reading the tuples from table T1, and for each tuple i'm
> searching for corresponding tuple in table T2 and , if neccessary, update
> some fields of T2 according to the current tuple of T1.
>
> Sometimes, if there are enough records in T1, my action reaches
> PHP's maximum memory limit.  I haven't researched to see exactly
> what is the number of records when the memory gets filled (but was
> less than 15000 records).
>
> What i want is to fetch the query results one by one, because in this
> case i really don't need the array with all the records.
>
> --
> Adrian Maier


--~--~-~--~~~---~--~~
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: Unique subdomain for each user

2007-03-08 Thread phirschybar

Brian,

Right that makes perfect sense and it keeps better aligned with the
routing hierarchy (controller/action/etc..). It didn't make sense to
have the username at the top from an application perspective, although
I guess it doesn't really matter.

Still working out the apache setup and server config to be able to set
these up on the fly. Any tips in that department?

On Mar 8, 12:24 pm, "Brian French" <[EMAIL PROTECTED]>
wrote:
> If you want the address bar to always display something like
> phirschybar.cakephp.org then you dont have to touch any of the apache
> settings from the default ones in cake.
>
> all you have to do is in your app_controller -> beforefilter() do the
> following:
> $this->Session->write('Username',array_shift(explode('.',
> $_SERVER['HTTP_HOST'])));
>
> then your url can look like username.domain.com/controller/action
>
> On Mar 7, 5:52 am, "phirschybar" <[EMAIL PROTECTED]> wrote:
>
> > Brian, is this after you did your apache setup?
>
> > On Mar 6, 2:01 pm, "Brian French" <[EMAIL PROTECTED]>
> > wrote:
>
> > > I'm dealing with his now. the way i have figured it out is to check
> > > the domain in the app_controller.php's beforeFilter() method. Then
> > > look up that user info based on the domain and save the user's info in
> > > the session. Then in your other controllers you do:
>
> > > $this->model->findAll("model.user_id='".$this->Session-
>
> > > >read('User.id')."'");
>
> > > There may be a better way, but this seems to work the best for me.


--~--~-~--~~~---~--~~
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: New Cake FAQ

2007-03-08 Thread phirschybar

ha! Hey Nate I think the problem may be that it is not immediately
obvious how to attach to the ticket. See what I mean?

What about if we make a page on this group for now??

Ben

On Mar 8, 1:00 pm, "nate" <[EMAIL PROTECTED]> wrote:
> Wow, uh, okay, I guess I'll take everyone's enthusastic silence to
> mean that our documentation is perfect, no one has any questions, and
> we can just go ahead and close this mailing list, since everybody
> seems to know everything.  That's amazing.
>
> However, if anyone (and yes, *you* are included in 'anyone') happens
> to have a great, good, decent, or, hell, even a crappy, retarded
> question, please don't hesitate to attach it to the ticket linked
> above, with or without an answer.
>
> On Mar 7, 10:43 pm, "nate" <[EMAIL PROTECTED]> wrote:
>
> > Hey Y'all,
>
> > We're putting together an official CakePHP FAQ.  So add your
> > recommended frequently asked questions (and answers) 
> > here:https://trac.cakephp.org/ticket/1576


--~--~-~--~~~---~--~~
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: Strange result with findCount

2007-03-08 Thread phirschybar

try:

$this->set('test', $this->Rat->findCount('Install_Count = "7"',0));

quotes around the 7. does it work? might be because it is a varchar

On Mar 8, 10:48 am, "szeta" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> if I'm using
>
> $this->set('test', $this->Rat->findCount('Install_Count = 7',0));
>
> I get a result, but if I do it on
>
> $this->set('test', $this->Rat->findCount('Status = 7',0));
>
> (the only difference is the given Condition Field)
>
> I always get "0" in return, even if i know that there are several "7".
> A direct Select Statement with "WHERE Status = 7" works fine.
>
> Both fields ("Status" and "Install_Count") are a VARCHAR(255)
>
> Any suggestion how I may count my "Status"?
>
> Regards
> Ralph


--~--~-~--~~~---~--~~
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: SQL/Query - get months with posts

2007-03-08 Thread phirschybar

You could do a query like this:

SELECT DISTINCT YEAR(date) AS year, MONTH(date) AS month, count(id) AS
numb
FROM articles
GROUP BY YEAR(date), MONTH(date)
ORDER BY date DESC

This way you get the results grouped by year, with each month and the
number of articles per month. Bam.



On Mar 8, 7:25 am, "hausburger" <[EMAIL PROTECTED]> wrote:
> something like that?
>
> function getRange() {
>
>   $q = "
>   SELECT  date_format(`date` , '%M %Y' ) AS month_year
>   FROM posts
>   WHERE active = '1'
>   GROUP BY date_format(`date` , '%m-%Y' )
>   LIMIT 0, 12";
>
>   $result = $this->query($q);
>   return $result;
>}
>
> On 8 Mrz., 10:43, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
>
> > hi,
>
> > we have a blog app [http://www.webmarketingblog.co.uk/blog] and in the
> > sidebar we want to have a list of months that have posts, eg:
>
> > Febuary 2007
> > March 2007
> > ... etc etc
>
> > any pointers on querying my model so I can get a list of months with
> > active posts?
>
> > many thanks,
>
> > Jon
>
> > --
>
> > 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: Unique subdomain for each user

2007-03-07 Thread phirschybar

Brian, is this after you did your apache setup?

On Mar 6, 2:01 pm, "Brian French" <[EMAIL PROTECTED]>
wrote:
> I'm dealing with his now. the way i have figured it out is to check
> the domain in the app_controller.php's beforeFilter() method. Then
> look up that user info based on the domain and save the user's info in
> the session. Then in your other controllers you do:
>
> $this->model->findAll("model.user_id='".$this->Session-
>
> >read('User.id')."'");
>
> There may be a better way, but this seems to work the best for me.


--~--~-~--~~~---~--~~
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: Unique subdomain for each user

2007-03-06 Thread phirschybar

yep. some interesting comments here as well: 
http://www.eukhost.com/forums/showthread.php?p=7176

figured somebody has dealt with this here or might have a tip. would
appreciate any feedback. thanks.

On Mar 6, 1:40 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> As u suggested this is an apache question. Nothing wrong with asking
> here, but u will likely a better faster answer at an apache forum.
> Google your question, and u will find many such questions asked and
> answered.
>
> There might even be an example of what you want 
> here:http://httpd.apache.org/docs/1.3/misc/rewriteguide.html
>
> cook
>
> On Mar 6, 1:09 pm, "phirschybar" <[EMAIL PROTECTED]> wrote:
>
> > This is probably just an apache question but I figure somebody in the
> > group would know the answer...
>
> > My app needs to work so that username.appdomain.com maps to
> > appdomain.com/username/controller/action/..
>
> > Is this a simple apache setup trick?
>
> > Users need to be able to create accounts themselves so I cannot do
> > manual httpd.conf edits for each user...
>
> > Thoughts?


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



Unique subdomain for each user

2007-03-06 Thread phirschybar

This is probably just an apache question but I figure somebody in the
group would know the answer...

My app needs to work so that username.appdomain.com maps to
appdomain.com/username/controller/action/..

Is this a simple apache setup trick?

Users need to be able to create accounts themselves so I cannot do
manual httpd.conf edits for each user...

Thoughts?


--~--~-~--~~~---~--~~
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 editor and view

2007-03-04 Thread phirschybar

gwoo's method is the way to go. I wouldn't recommend editing the
webroot/index.php

On Mar 4, 4:23 am, "gwoo" <[EMAIL PROTECTED]> wrote:
> this should work too. In AppController or any other Controller.
> Remember to include RequestHandler in your components array.
>
> functon beforeRender() {
> if($this->RequestHandler->isAjax() || $this->RequestHandler->isXml()) {
>
> Configure::write('debug', 0);
> }
>
> }


--~--~-~--~~~---~--~~
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: Multiple file upload ?

2007-03-03 Thread phirschybar

any chance you'd share the component source for use in cake? :)

On Mar 3, 5:42 pm, "Brad Daily" <[EMAIL PROTECTED]> wrote:
> We do use a similiar uploading process for Director, but it is mostly
> homegrown. The swfupload project looks like a good one, I just didn't
> know about it when we built ours :)
>
> I used a Flash/Rails example I found here[1] as a starting point.
>
> [1]http://blog.vixiom.com/2006/09/08/multiple-file-upload-with-flash-and...
>
> On Mar 3, 4:08 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
>
> > Brad Daily uses something similar in ssp Director which is a cakePHP App.
>
> > its either similar or its the same.
>
> > The director multi - upload works very well.
>
> > On 03/03/07, phirschybar <[EMAIL PROTECTED]> wrote:
>
> > > I'd love to see somebody try this:http://swfupload.mammon.se/
>
> > > Yeah, it's flash and 3rd party but it has a nice multiple upload
> > > feature because it uses flash's native upload dialogue. I plan to try
> > > it out on a project soon.
>
> > > Anybody seen or tried this?
>
> > > On Mar 2, 11:28 am, "Mech7" <[EMAIL PROTECTED]> wrote:
> > > > Is there a explanation or tutorial anywhere which explains how to do
> > > > multiple file uploads and store the name in the database?
>
> > > > I have found this:http://thinkingphp.org/demos/cake-timer/
> > > > but it looks a little complicated and uses a perl script :(


--~--~-~--~~~---~--~~
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 this page "Cake Apps/Sites In The Wild"

2007-03-03 Thread phirschybar

looks like the survey link is broken.

On Mar 3, 5:46 pm, "Olwen Williams" <[EMAIL PROTECTED]> wrote:
> I added a couple of mine.
>
> On 04/03/07, phirschybar <[EMAIL PROTECTED]> wrote:
>
>
>
> > I started a page to feature Cake apps and sites in the wild. Hoping
> > this will help to garner some more attention on Cake and rally the
> > community. :)
>
> > Click 
> > onhttp://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild
> > - or copy & paste it into your browser's address bar if that doesn't
> > work.


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



View this page "Cake Apps/Sites In The Wild"

2007-03-03 Thread phirschybar

some organization.

Click on http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild
- or copy & paste it into your browser's address bar if that doesn't
work.


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



View this page "Cake Apps/Sites In The Wild"

2007-03-03 Thread phirschybar

I started a page to feature Cake apps and sites in the wild. Hoping
this will help to garner some more attention on Cake and rally the
community. :)

Click on http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild
- or copy & paste it into your browser's address bar if that doesn't
work.


--~--~-~--~~~---~--~~
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: Multiple file upload ?

2007-03-03 Thread phirschybar

Wow. That's really cool. I use SSP (the flash component) regularly.
Had no idea director was running on cake.

There really needs to be a place where Cake apps in the wild are
featured. I will go ahead and make a page in this group and hopefully
others will contribute.

Check out the pages section.

On Mar 3, 4:31 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> as of ssp director 1.0.8 -  (12/27/06)
>
>1. [NEW] Director has been ported to the CakePHP framework for more
>agile, rapid development.
>
> http://slideshowpro.net/forums/viewtopic.php?id=4http://blog.bradleyboy.com/2007/01/08/distributing-cakephp-apps-handl...
>
> On 03/03/07, phirschybar <[EMAIL PROTECTED]> wrote:
>
>
>
> > Are you referring to slide show pro director? thats a cakePHP app?
>
> > oh I am looking at this:http://blog.bradleyboy.com/interesting. How
> > do we know it's cake?
>
> > Ben
>
> > On Mar 3, 4:08 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> > > Brad Daily uses something similar in ssp Director which is a cakePHP
> > App.
>
> > > its either similar or its the same.
>
> > > The director multi - upload works very well.
>
> > > On 03/03/07, phirschybar <[EMAIL PROTECTED]> wrote:
>
> > > > I'd love to see somebody try this:http://swfupload.mammon.se/
>
> > > > Yeah, it's flash and 3rd party but it has a nice multiple upload
> > > > feature because it uses flash's native upload dialogue. I plan to try
> > > > it out on a project soon.
>
> > > > Anybody seen or tried this?
>
> > > > On Mar 2, 11:28 am, "Mech7" <[EMAIL PROTECTED]> wrote:
> > > > > Is there a explanation or tutorial anywhere which explains how to do
> > > > > multiple file uploads and store the name in the database?
>
> > > > > I have found this:http://thinkingphp.org/demos/cake-timer/
> > > > > but it looks a little complicated and uses a perl script :(


--~--~-~--~~~---~--~~
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: Multiple file upload ?

2007-03-03 Thread phirschybar

Are you referring to slide show pro director? thats a cakePHP app?

oh I am looking at this: http://blog.bradleyboy.com/ interesting. How
do we know it's cake?

Ben

On Mar 3, 4:08 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> Brad Daily uses something similar in ssp Director which is a cakePHP App.
>
> its either similar or its the same.
>
> The director multi - upload works very well.
>
> On 03/03/07, phirschybar <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'd love to see somebody try this:http://swfupload.mammon.se/
>
> > Yeah, it's flash and 3rd party but it has a nice multiple upload
> > feature because it uses flash's native upload dialogue. I plan to try
> > it out on a project soon.
>
> > Anybody seen or tried this?
>
> > On Mar 2, 11:28 am, "Mech7" <[EMAIL PROTECTED]> wrote:
> > > Is there a explanation or tutorial anywhere which explains how to do
> > > multiple file uploads and store the name in the database?
>
> > > I have found this:http://thinkingphp.org/demos/cake-timer/
> > > but it looks a little complicated and uses a perl script :(


--~--~-~--~~~---~--~~
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: Lightbox + Cake

2007-03-03 Thread phirschybar

hmm. not sure I understand what you mean. Can you give an example?

On Mar 3, 1:32 pm, "Mech7" <[EMAIL PROTECTED]> wrote:
> Well the problem is when it is in a subdir then this does not work,
> since you need the subdir in front of it, but when it changed you need
> to edit them manual again :(
>
> On Mar 3, 6:21 pm, "phirschybar" <[EMAIL PROTECTED]> wrote:
>
> > if you prepend the image path with a '/' like '/img/...' it will trace
> > back to the web document root and hit the right directory every time.
>
> > So wherever you see images/ in the .js file, change it to /img or
> > whatever you want.
>
> > On Mar 3, 12:11 pm, "Mech7" <[EMAIL PROTECTED]> wrote:
>
> > > The problem is it does not work like css where it links relative from
> > > the file, but instead it writes html via dom in the document when
> > > needed.. so the path will link from a different directory depeding on
> > > which controller or page i am on :(
>
> > > On Mar 3, 6:06 pm, "Grant Cox" <[EMAIL PROTECTED]> wrote:
>
> > > > If you put the lightbox images in the js folder (where your
> > > > lightbox.js is) then they should work.  A bit messy perhaps, but
> > > > otherwise just edit the javascript file yourself to point to the
> > > > correct location (ie ../img/ )


--~--~-~--~~~---~--~~
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: Multiple file upload ?

2007-03-03 Thread phirschybar

I'd love to see somebody try this: http://swfupload.mammon.se/

Yeah, it's flash and 3rd party but it has a nice multiple upload
feature because it uses flash's native upload dialogue. I plan to try
it out on a project soon.

Anybody seen or tried this?

On Mar 2, 11:28 am, "Mech7" <[EMAIL PROTECTED]> wrote:
> Is there a explanation or tutorial anywhere which explains how to do
> multiple file uploads and store the name in the database?
>
> I have found this:http://thinkingphp.org/demos/cake-timer/
> but it looks a little complicated and uses a perl script :(


--~--~-~--~~~---~--~~
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: Lightbox + Cake

2007-03-03 Thread phirschybar

if you prepend the image path with a '/' like '/img/...' it will trace
back to the web document root and hit the right directory every time.

So wherever you see images/ in the .js file, change it to /img or
whatever you want.

On Mar 3, 12:11 pm, "Mech7" <[EMAIL PROTECTED]> wrote:
> The problem is it does not work like css where it links relative from
> the file, but instead it writes html via dom in the document when
> needed.. so the path will link from a different directory depeding on
> which controller or page i am on :(
>
> On Mar 3, 6:06 pm, "Grant Cox" <[EMAIL PROTECTED]> wrote:
>
> > If you put the lightbox images in the js folder (where your
> > lightbox.js is) then they should work.  A bit messy perhaps, but
> > otherwise just edit the javascript file yourself to point to the
> > correct location (ie ../img/ )


--~--~-~--~~~---~--~~
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: Lightbox + Cake

2007-03-03 Thread phirschybar

I know if you are on linux you could do a symlink (symbolic link) so
that the content of the lightbox images folder can be found in the
default place for images where cake looks or vice versa.

the command is:

ln -s /path/to/folder/with/images name-of-shortcut

does that help?

On Mar 3, 8:21 am, "Mech7" <[EMAIL PROTECTED]> wrote:
> Hi, I am trying to use lightbox in cake only the images paths for the
> html are defined in the javascript file. Is there anyway to get them
> linked automatically if they are in a different controller or
> hompeage ? As it then links from other directory ?


--~--~-~--~~~---~--~~
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: So frustrated

2007-03-02 Thread phirschybar

John,

Thanks for taking the lead on the docs. How is it coming?

On Mar 2, 2:59 pm, "John David Anderson (_psychic_)"
<[EMAIL PROTECTED]> wrote:
> On Mar 2, 2007, at 11:54 AM, [EMAIL PROTECTED] wrote:
>
>
>
> > If you are going to continue developing with cakePHP get used to this.
> > I love cakePHP for a lot of things, but this community has some
> > terrible documentation.
>
> I'm not a community, actually, as I'm the only one working on the
> docs. Thanks for that, though.
>
> -- 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: Cache an object, not a view

2007-03-02 Thread phirschybar

Where would those first 2 functions go, ideally? In
app_controller.php? Still getting feet warm with cake. Thanks.

On Mar 2, 12:50 pm, "Mandy" <[EMAIL PROTECTED]> wrote:
> http://mandysingh.blogspot.com/2007/02/caching-with-cakephp.html
>
> On Mar 2, 3:32 pm, "phirschybar" <[EMAIL PROTECTED]> wrote:
>
> > well gee. There you have it ;). Thanks.
>
> > On Mar 1, 11:03 pm, "Grant Cox" <[EMAIL PROTECTED]> wrote:
>
> > >http://bakery.cakephp.org/articles/view/249
>
> > > phirschybar wrote:
> > > > I see lots of info on caching views in the manual but I am wondering
> > > > of I can cache an object as easily. Just a simple array of data so
> > > > that I do not have to hit the DB on every page.- Hide quoted text -
>
> > - Show quoted text -


--~--~-~--~~~---~--~~
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: Cache an object, not a view

2007-03-02 Thread phirschybar

well gee. There you have it ;). Thanks.

On Mar 1, 11:03 pm, "Grant Cox" <[EMAIL PROTECTED]> wrote:
> http://bakery.cakephp.org/articles/view/249
>
> phirschybar wrote:
> > I see lots of info on caching views in the manual but I am wondering
> > of I can cache an object as easily. Just a simple array of data so
> > that I do not have to hit the DB on every page.


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



Cache an object, not a view

2007-03-01 Thread phirschybar

I see lots of info on caching views in the manual but I am wondering
of I can cache an object as easily. Just a simple array of data so
that I do not have to hit the DB on every page.


--~--~-~--~~~---~--~~
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: Call to a member function requestAction() on a non-object

2007-03-01 Thread phirschybar

AD7 and Mariano, thanks. Yeah I'll be digging through the source
before long ;)

On Mar 1, 11:12 am, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> Models are instantiated before running beforeFilter(). You can see this by
> looking at dispatch() in class Dispatcher, located at cake/dispatcher.php:
>
> 1. Creates the controller: $controller =& new $ctrlClass();
>
> 2. Initializes components: $controller->_initComponents()
>
> 3. Initializes models in the controller: $controller->constructClasses()
>
> 4. Invokes the action: $this->_invoke($controller, $params, $missingAction)
>
> Then Dispatcher::_invoke():
>
> 1. Starts the controller (see below): $this->start($controller);
>
> 2. Executes the action and get its output.
>
> 3. Runs afterFilter(): $controller->afterFilter();
>
> Now Dispatcher::start() does:
>
> 1. If there are functions defined in the array $beforeFilter, execute each
> one of them (if they are callables): $controller->$filter();
>
> 2. Runs main beforeFilter: $controller->beforeFilter();
>
> 3. Starts up each component: $controller->{$c}->startup($controller);
>
> I guess my point is by looking at the source code you can learn a lot. Just
> ask Felix and Andy ;)
>
> -MI
>
> ---
>
> Remember, smart coders answer ten questions for every question they ask.
> So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> blog:http://www.MarianoIglesias.com.ar
>
> -Mensaje original-
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de AD7six
> Enviado el: Jueves, 01 de Marzo de 2007 12:42 p.m.
> Para: Cake PHP
> Asunto: Re: error: Call to a member function requestAction() on a non-object
>
> So this: var $uses = array('Category'); is the key here. Because I am doing
> a beforeFilter(), my model wasn't loaded yet.?


--~--~-~--~~~---~--~~
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: Call to a member function requestAction() on a non-object

2007-03-01 Thread phirschybar

OK.

So this: var $uses = array('Category'); is the key here. Because I am
doing a beforeFilter(), my model wasn't loaded yet.?

On Mar 1, 8:58 am, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> On 3/1/07, AD7six <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Mar 1, 2:49 am, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> > > requestAction is a method of Controller not Model
>
> > Well.. actually it's a method of object. The error is caused by doing
> > $this->SomethingThatDoesn'tExist->method();
>
> And the funny thing is I even linked to it in class_object.html in the api...
> --
> ==
> S. DeVore
> (the old fart) the advice is free, the lack of crankiness will cost you
>
> - its a fine line between a real question and an idiot


--~--~-~--~~~---~--~~
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: Call to a member function requestAction() on a non-object

2007-02-28 Thread phirschybar

ahh. Thanks for the info.. makes sense.

On Feb 28, 8:49 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> requestAction is a method of Controller not Model
>
> try
>
> $this->requestAction(...
>
> seehttp://api.cakephp.org/class_object.html#c40a38b60a3748b9cf75215b92ee...
> andhttp://manual.cakephp.org/chapter/controllers
>
> On 2/28/07, phirschybar <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I am trying to make it so that some data to an element is present on
> > EVERY page on my entire app. So, to do this I made an
> > app_controller.php in /app and I have the following:
>
> > class AppController extends Controller {
>
> > function beforeFilter() { // grab all of the categories.
>
> > $this->set('navItems', 
> > $this->Category->requestAction('/categories/
> > getCategoryList', array('return'=>1)));
>
> > }
> > }
>
> > The problem is that I am getting the above error: Call to a member
> > function requestAction() on a non-object. This seems to indicate that
> > there is an issue with my model as it is not registering as an object
> > however. My Category model seems to be intact. I tested it by sending
> > my browser to '/categories/' and '/categories/getCategoryList' with
> > success using a controller and view.
>
> > Model for category.php, simple:
>
> > class Category extends AppModel{
>
> > var $name = 'Category';
>
> > }
>
> > I am using cake 1.2 .. I must be missing something obvious.
>
> --
> ==
> S. DeVore
> (the old fart) the advice is free, the lack of crankiness will cost you
>
> - its a fine line between a real question and an idiot


--~--~-~--~~~---~--~~
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: Call to a member function requestAction() on a non-object

2007-02-28 Thread phirschybar

I am trying to make it so that some data to an element is present on
EVERY page on my entire app. So, to do this I made an
app_controller.php in /app and I have the following:

class AppController extends Controller {

function beforeFilter() { // grab all of the categories.

$this->set('navItems', 
$this->Category->requestAction('/categories/
getCategoryList', array('return'=>1)));

}
}

The problem is that I am getting the above error: Call to a member
function requestAction() on a non-object. This seems to indicate that
there is an issue with my model as it is not registering as an object
however. My Category model seems to be intact. I tested it by sending
my browser to '/categories/' and '/categories/getCategoryList' with
success using a controller and view.

Model for category.php, simple:

class Category extends AppModel{

var $name = 'Category';

}

I am using cake 1.2 .. I must be missing something obvious.


--~--~-~--~~~---~--~~
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: Switch Element On/Off

2007-02-28 Thread phirschybar

scragz: that sounds silly unless there is a slick way of doing
'includes' with parts of layouts. In your case I would be repeating a
lot of layout code.

GreyCells: thats exactly what I ended up doing. In my controller, I
set a boolean and then just did a simple check for it in the view
before rendering the element. I guess I could have also rendered the
element and did the check inside of that but why bother including an
extra file on every hit.. right?

Thanks for the advice, guys.

Ben

On Feb 28, 4:01 pm, "GreyCells" <[EMAIL PROTECTED]> wrote:
> Determine the business logic in the controller and use controller->set
> to communicate the decisions to the views/elements.
>
> Don't get too hung up on strict seperation of M->V->C there's plenty
> of grey across the boundaries... A pragmatic approach if generally
> more productive :)
>
> Interesting discussion here:
>
> http://groups.google.com/group/cake-php/browse_thread/thread/77860241...
>
> ~GreyCells
>
> On Feb 28, 7:44 pm, "phirschybar" <[EMAIL PROTECTED]> wrote:
>
> > Hey all..
>
> > What if I have an element and I want to switch it on for some pages
> > and off for others?
>
> > I could easily pass it some data and do the logic to determine if it
> > should be shown right within the element itself or even in the default
> > layout but then I would have business logic right in the views,
> > violating MVC...
>
> > How can I do the logic in the controller where it should be and only
> > call the element from there?


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



Switch Element On/Off

2007-02-28 Thread phirschybar

Hey all..

What if I have an element and I want to switch it on for some pages
and off for others?

I could easily pass it some data and do the logic to determine if it
should be shown right within the element itself or even in the default
layout but then I would have business logic right in the views,
violating MVC...

How can I do the logic in the controller where it should be and only
call the element from there?


--~--~-~--~~~---~--~~
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: Link An Image

2007-02-27 Thread phirschybar

yeah. good idea. thanks!

I was just curious to know there was something in the core already.
Appreciate it!

On Feb 27, 1:26 pm, "Daniel Hofstetter" <[EMAIL PROTECTED]> wrote:
> That's the correct way. If you want it shorter, you could write your
> own helper. Something like
>
> class ImageHelper extends AppHelper {
> var $helpers = array('Html');
>
> function link($file) {
>  return $this->Html->link($this->Html->image($file, array('border'
> => '0')), '/',
> null, null, false);
>
> }
> }
>
> should do the trick (not tested).
>
> HTH
>
> --
> Daniel Hofstetterhttp://cakebaker.42dh.com


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



Link An Image

2007-02-27 Thread phirschybar

To link an image I am doing:

$html->link($html->image('image.jpg', array('border' => '0')), '/',
null, null, false);

is there a better shortcut I am missing?


--~--~-~--~~~---~--~~
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: Cake Hosting

2006-12-27 Thread phirschybar


stay away from media temple.

On Dec 27, 9:16 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

I actually use LunarPages...it's on the west coast...but works pretty
well for me. Will have all your needs covered. I've only had minor
trouble with them on their shared hosting accounts(temporary
outages because they are resetting their servers to add new accounts,
etc.) ..but probably most bang for your buck without running into a
poor quality host...and their tech support is top notch. ..so you could
always ask them about things if you had questions for what they do and
don't support. I taken advantage of mod_rewrite on Lunarpages, custom
php.ini files, htaccess of course, and I've even used ioncube runtimes
for projects that are encoded (they also have support for zend).

MediaTemple is reliable, a bit more expensive and you get less space.

www.itxdesign.com- *should* have mod_rewrite and everything you need.
They are on the east coast and are reliable.



--~--~-~--~~~---~--~~
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: Reverse recursive findAllThreaded queries?

2006-12-26 Thread phirschybar


So, essentially you're trying to find "breadcrumbs" to your selection?

Maybe a function could be added to the tree helper. Like..

/// Usage in view:

$tree->showCrumbs(99, 'Section/name', $data);

/// New function in tree helper class:

function showCrumbs($id, $name, $data)
 {
   /// .. something clever with a recursive use of php array_keys()
function
   /// .. would have to track back to the parent returning the names
and ids
   /// .. of the sections. Thoughts anyone?
 }

On Dec 26, 10:35 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

Yes, there is a single table that references itself with a "parent_id"
field. This is pratically identical to how it laid out in this 
example:http://bakery.cakephp.org/articles/view/63

On Dec 26, 5:08 pm, "phirschybar" <[EMAIL PROTECTED]> wrote:

> Are all of the items in your hierarchy one type of data? In other
> words, are they all in one table with an association of "has and
> belongs to many"?

> Ben

> On Dec 26, 7:32 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> > I have a situation where I know the id of a child, but I need the
> > parental hierarchy. Using the structure in this (excellent) Bakery
> > example, I have the following:

> > 1. Art
> >   1. Film
> >   2. Music
> > 1. Jazz
> > 2. Pop
> > 2. History
> >   1. Archaeology
> >   2. War
> > 3. Science
> >   1. Biology
> >   2. Chemistry
> >   3. Physics
> > 4. Technology
> >   1. Computing
> > 1. Hardware
> > 2. Software
> >   2. Engineering

> > In my situation, I know of "Hardware", but I need to know the
> > following:

> > 4. Technology
> >   1. Computing
> > 1. Hardware

> > Or if I know of "Physics", I need to know:

> > 3. Science
> >   3. Physics

> > Does anyone know how to accomplish this in a Cake-ish way (without
> > hacking a bunch of queries together in my controller)?

> > Thanks in advance!



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



Re: Reverse recursive findAllThreaded queries?

2006-12-26 Thread phirschybar


Are all of the items in your hierarchy one type of data? In other
words, are they all in one table with an association of "has and
belongs to many"?

Ben

On Dec 26, 7:32 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

I have a situation where I know the id of a child, but I need the
parental hierarchy. Using the structure in this (excellent) Bakery
example, I have the following:

1. Art
  1. Film
  2. Music
1. Jazz
2. Pop
2. History
  1. Archaeology
  2. War
3. Science
  1. Biology
  2. Chemistry
  3. Physics
4. Technology
  1. Computing
1. Hardware
2. Software
  2. Engineering

In my situation, I know of "Hardware", but I need to know the
following:

4. Technology
  1. Computing
1. Hardware

Or if I know of "Physics", I need to know:

3. Science
  3. Physics

Does anyone know how to accomplish this in a Cake-ish way (without
hacking a bunch of queries together in my controller)?

Thanks in advance!



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



Re: Table associations the CakePHP way

2006-12-26 Thread phirschybar


you can ask for just the specific fields but if the other fields aren't
too heavy (in terms of bytes of returned content) I don't think there
is a reason to do so. I would avoid using a custom query unless you
absolutely need it. You are able to specify the fields you want
returned without using a custom query.

On Dec 26, 10:32 am, "phpjoy" <[EMAIL PROTECTED]> wrote:

hey adrian,

the table names are right, and work great with scuffold. it works
without scuffold too, i just want to make it more efficient.
on some of the models i used hasmany, belongsto, and hasone. i get the
table category and layout dumped, the problem is that i get all of the
information from the fields => and not just category.name, or
layout.name.

there are a few ways to handle this. there are two ways I know:
1) do a mysql query
2) ask for specific fields in the hasone/belongsto/hasmany, ..

i just wanna hear what else you guys are doing.. the cakephp way. :)

yossi

Adrian Godong wrote:
> First you'll have to create correct associations for your Models (if you
> don't know how or too lazy to read the manual, ask again).

> Second, try dumping the whole thing you got from the Model->findAll or
> findBy... using debug($[modelname]->[functionname]);

> You'll see that accessing category.name and layout.name is just an array
> away from the main result.

> Still having problem? Print out to us the result of the steps above...

> On 12/26/06, phpjoy <[EMAIL PROTECTED]> wrote:

> > I have a controller, and I want to fetch information from tables.
> > With scaffold, it works wonderfully.. However I wanna load the
> > information smartly for my app.

> > These are my tables:
> > section:
> > id
> > name
> > field1
> > field2
> > layout_id
> > category_id

> > category:
> > id
> > name
> > field3
> > field4
> > field5
> > field6

> > layout:
> > id
> > name
> > field7
> > field8

> > I want to put the information from the section table in the view.
> > the category_id and layout_id should have category.name and layout.name
> > instead of the id of the category.
> > I could build a MySQL query for this, but I wonder what's the CakePHP
> > way.
> > (The more ways, the marrier it is ;))

> --
> Adrian Godong
> [EMAIL PROTECTED]

> Microsoft Student Ambassador



--~--~-~--~~~---~--~~
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: force swf refresh

2006-12-25 Thread phirschybar


gabordemeter:

sorry I missed the part about it working in FF. But still doesn't the
SWF have to grab the data on every load, even if the SWF is cached?

Claudio:

to satisfy my curiosity.. what file do you think IE is caching?

On Dec 25, 11:25 am, Claudio Poli <[EMAIL PROTECTED]> wrote:

no problem,
I know the issue because I've worked with swf charts and IE keeps
caching the file.
there's something you can do, instead of putting an hash to swf, try
putting something like this in source url:
/controller/action/param?uniqueid='.uniqid(rand(),true)

kain

On 25/dic/06, at 17:11, gabordemeter wrote:



> Thanks for the feedback Claudio. Alreay tried doing:

> display('/swf/chart.swf?nocache='.floor(rand(1,
> 100)/rand(1, 1)), 'Chart', '800' , '350', '7' , '#fff'); ?>

> IE doesn't seem to care. Still showing the old chart.

> Any other suggestion. Is it possible to send something in the
> header of
> the page to force the browser to download the swf as opposed to
> caching
> it?

> Changing the name of the file every time is not a good option as the
> same .swf will be used by all users (the graph is drawn dinamically in
> AS after receiving the data from cake via amfphp).

> On Dec 25, 10:56 am, "Claudio Poli  " <[EMAIL PROTECTED]> wrote:
>> don't know if it will work, but maybe you can prevent caching
>> appending
>> a ? to chart.swf.
>> hash can be generated in multiple ways, like a date or a md5 hash.



--~--~-~--~~~---~--~~
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: force swf refresh

2006-12-25 Thread phirschybar


If the movie is grabbing data every time it is loaded, the issue is
probably not with caching the actual flash movie but maybe the DATA the
movie is grabbing from the controller is coming from a cached source.
If you need it to be fresh on every page load, make sure that it is not
grabbing the data from a cache. Make sense?

On Dec 25, 10:56 am, "Claudio Poli  " <[EMAIL PROTECTED]> wrote:

don't know if it will work, but maybe you can prevent caching appending
a ? to chart.swf.

hash can be generated in multiple ways, like a date or a md5 hash.



--~--~-~--~~~---~--~~
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: debugging documentation for cake internals

2006-12-23 Thread phirschybar


http://www.thinkingphp.org/2006/09/25/learning-from-the-cakephp-source-code-part-i/

Here is a nice little summary in 2 parts. Helps with getting going...

On Dec 23, 3:55 pm, "keymaster" <[EMAIL PROTECTED]> wrote:

It would be very helpful while debugging if there was some
documentation on the internals of cake:

eg.

- overview of main classes, files.
- execution sequence from main index.php until your controller is
called with it's parameters.

etc.

Is there any developer documentation on the internals of cake?

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