Re: Help Me Please

2008-06-11 Thread Marcos Aruj
You are right. Plus, there's already a HABTM add/delete/update behaviour in
the bakery that deals with extra fields.

On Wed, Jun 11, 2008 at 12:46 AM, Joel Perras <[EMAIL PROTECTED]> wrote:

>
>
> On Jun 6, 1:14 pm, "b logica" <[EMAIL PROTECTED]> wrote:
> > That's not going to work. In fact, if you figured out a way to get
> > Cake to make it work, I'd file a ticket to say that it was a bug, not
> > a feature.
> >
> > A "join table" should have only fields which are foreign keys to other
> > tables. Its sole purpose is to join records between 2 or more tables,
> > nothing else.
>
> I beg to differ.  From Mariano's own blog:  http://tinyurl.com/4kbe9q
> In Cake 1.2, extra fields in the join models are easy to integrate
> into your application.
>
> There are plenty of situations where additional information in the
> join table is useful, the simplest being the date/time that the join
> record was created, such as in the prototypical articles_tags example;
> sometimes it is useful to know when a particular article was
> associated with a particular tag, or vice versa.  Other examples could
> include an online shopping system, where you would have products,
> carts, and carts_products (taken from an old thread on this group).
> The logical location to indicate the quantity of a product in a cart
> would be in the carts_products join table.
>
> -Joel.
>
> >
>


-- 
Marcos Aruj Alvarez
Ingeniero de Software
---
[EMAIL PROTECTED]
-

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



Re: Run bake.php on Linux

2008-06-11 Thread Marcos Aruj
Thanks everybody for your answers! Daniel's approach worked for me. :)

Regards,

Marcos

On Wed, Jun 11, 2008 at 8:35 AM, Smelly_Eddie <[EMAIL PROTECTED]> wrote:

>
> Change to the parent folder...
>
> call the scipt in cake/script, specifying the php engine to read it.
>
>
> At the prompt, type sumin like...
>
>
> $ cd /srv/www/htdocs/cake
> $php cake/scripts/bake.php
>
>
>
>
> On Jun 11, 1:42 am, Bayuadji <[EMAIL PROTECTED]> wrote:
> > You have to add/include
> > cake and cake.php in your /usr/bin or /usr/sbin
> > use ln
> >
> > after that you can call cake
> >
> > =BAD=
> >
> > On Wed, Jun 11, 2008 at 11:41 AM, Marcos Aruj <[EMAIL PROTECTED]>
> wrote:
> > > Hi all,
> >
> > > How can I run bake.php on Ubuntu Linux. I installed php5-cli via
> apt-get,
> > > but can't find the proper command to run it.
> > > Any ideas?
> >
> > > Thanks,
> >
> > > Marcos
> >
> > --
> > --
> http://www.tumbletooth.org
> > my linkedin profile :http://www.linkedin.com/in/bayuadji
> > --
> >
>

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



Run bake.php on Linux

2008-06-10 Thread Marcos Aruj
Hi all,

How can I run bake.php on Ubuntu Linux. I installed php5-cli via apt-get,
but can't find the proper command to run it.
Any ideas?

Thanks,

Marcos

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



Getting context info for embedded objects with Cake

2008-06-05 Thread Marcos Aruj
Hi all,

I'm doing a website that provides some content that can be embedded on other
websites(like youtube videos). But I want to show content related to the
site embedding our objects. (something like google ads).
What's the best way of achieving this with Cakephp (1.2). I'll need maybe
the page's keywords or someother meta-data. What do you think?

Thanks in advance,

Marcos

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



Re: New User

2008-05-21 Thread Marcos Aruj
I think you are looking for "layouts". That's where you can join all
different parts of the page and style them. Look for them in the tutorial.
Hope this helps.

On Wed, May 21, 2008 at 2:21 PM, Rob Wilkerson <[EMAIL PROTECTED]> wrote:

>
> Hey guys -
>
> I'm new to Cake and have walked through a tutorial or two, but it
> occurs to me that most of what I've read with respect to getting
> started with Cake is very simplistic.  I haven't seen any "advanced"
> examples so far.  That got me thinking that most sites aren't so
> simplistic as CRUD+view for a single class of object (like, say,
> features).  If all I wanted to display was features, then sure, a
> simple m, v and c for the feature class is all I'd need, but as often
> as not, pages are kind of mashups of different objects.
>
> So what's the core strategy for creating a page view that is
> effectively a mashup displaying features, sponsors, events, etc.?  I'm
> sure it can be done, I just haven't read anything that offers an
> example.
>
> Thanks for the input.
>
> Rob
>
> >
>


-- 
Marcos Aruj Alvarez
Ingeniero de Software
---
[EMAIL PROTECTED]
-

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



Re: Blog Tutorial Error

2008-05-21 Thread Marcos Aruj
I had this same error, because i Was using cake 1.1, which doesn;t have a
formHelper, only a htmlHelper. That tutorial applies to cake 1.2.
I just start using 1.2 and it works perfectly. You may want to upgrade as
well, or use the old blog tutorial that uses the htmlHelper.

Regards,

Marcos

On Wed, May 21, 2008 at 12:31 PM, patcoll <[EMAIL PROTECTED]> wrote:

>
> It seems as though you don't have the FormHelper loaded by default.
> Add this line as an attribute in your controller:
>
> var $helpers = array('Html', 'Form');
>
> And the view should load the FormHelper into that $form variable
> automagically.
>
> HTH
>
> On May 21, 12:34 pm, Lokase <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have completed the blog tutorial up to the add.ctp section.
> >
> > The link from the view is hitting the add.ctp file but I am getting a
> > "Call to a member function on a non-object" error on the first line of
> > the PHP code:
> >
> > Add Post
> >  > echo $form->create('Post');
> > //echo $form->input('title');
> > //echo $form->input('body', array('rows' => '3'));
> > //echo $form->end('Save Post');
> > ?>
> >
> > Any suggestions of where I may be going wrong?
> >
> > Thanks,
> >
> > Lokase
> >
>


-- 
Marcos Aruj Alvarez
Ingeniero de Software
---
[EMAIL PROTECTED]
-

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



Re: Custom field name in Form helper

2008-05-21 Thread Marcos Aruj
Maybe passing an options array to the input method, with "label"=>"My Label"
inside may work :)

On Wed, May 21, 2008 at 10:10 AM, Travis <[EMAIL PROTECTED]> wrote:

>
> I was reading through the Form helper for 1.2 and couldn't find
> anything that allowed you to change the field name.  Here is the code
> I'm using:
>
> 
>echo $form->create('Form', array('action' => $form_id));
>
>foreach($form_data['Attribute'] as $attribute) {
>echo $form->input($attribute['name']);
>}
>
>echo $form->end('Save');
> 
>
> which outputs the fields roughly like this...
>
> ...
>
>Client Name
> id="FormClientName" />
>
> ...
>
> I would like the name to stay "data[Form][Client Name]", but I would
> like the label to be something different.  Anty suggestions?  Thanks!
> >
>


-- 
Marcos Aruj Alvarez
Ingeniero de Software
---
[EMAIL PROTECTED]
-

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



Re: Pretty urls not working

2008-05-19 Thread Marcos Aruj
Hi again,

I've installed the 1.2 version, since the 1.1 was not working fine without
mod_rewrite.
With 1.2, I get to the page I want by doing:

http://www.mysite.com/index.php?url=controller/action

But I think Cake is handling the URLs in a different way internally. When I
try to use the add form

http://www.mysite.com/index.php?url=controller/add

it redirects to http://www.mysite.com/index.php/controller/action

which throws a: No input file specified and no record is saved.

Any clues?

Thanks!

On Fri, May 16, 2008 at 1:33 PM, Marcos Aruj <[EMAIL PROTECTED]> wrote:

> Anyone? :(
> Or does any body has deployed cake php on a godaddy hosting? Any steps to
> follow? Things to check?
> Thanks again.
>
>
> On Fri, May 16, 2008 at 9:48 AM, Marcos Aruj <[EMAIL PROTECTED]>
> wrote:
>
>> Thanks fot the suggestion. With no slash (
>> http://www.mysite.com/index.php?url=surveys/index) I get this:
>>  CakePHP Rapid Development
>> Missing controller
>>
>> You are seeing this error because controller *Controller* could not be
>> found.
>>
>> *Notice:* If you want to customize this error message, create
>> app/views/errors/missing_controller.thtml.
>>
>> *Fatal*: Create the class below in file : app/controllers/controller.php
>> > class Controller extends AppController {
>>var $name = '';
>> }
>> ?>
>>
>> **
>> It's not parsing the controller name at all.. :(
>> Any other suggestion? Thanks for helping ;)
>>
>> On Fri, May 16, 2008 at 5:14 AM, Esoteric <[EMAIL PROTECTED]>
>> wrote:
>>
>>>
>>> Try:
>>> www.mysite.com/index.php?url=controller/action (no slash before
>>> controller)
>>>
>>> Let us know.
>>> -Erik
>>>
>>> On May 15, 6:44 pm, Markitusss <[EMAIL PROTECTED]> wrote:
>>> > Hi all,
>>> >
>>> > I've been trying to run cake on a godaddy hosting service. mod_rewrite
>>> > is not  available, so I set up cake to use its Pretty URLs, by
>>> > uncommenting the line inside core.php and by deleting .htaccess files.
>>> > I got the index page to perfectly, with CSS styling and connection to
>>> > the database, but I can't access controllers/actions. I get a 404 not
>>> > found. I tried
>>> >
>>> >
>>> www.mysite.com/index.php/controller/actionandwww.mysite.com/index.php?url=/controller/actionwithno
>>>  success.
>>> >
>>> > On my computer, everything works fine with mod_rewrite, but I can'
>>> > make it to work on the server. Is it something special with godaddy,
>>> > or am I missing some other settings. Please help.
>>> >
>>> > I also tried this fix:https://trac.cakephp.org/ticket/812
>>> >
>>> > 1. The URL's need to contain the extra '?'. In app/config/core.php
>>> > [line 42] you will have uncommented this line for no mod_rewrite.
>>> > Change it to:
>>> >
>>> > define('BASE_URL',env('SCRIPT_NAME') . '?');
>>> >
>>> > 2. Need to extract the controller/view differently. Index.php (line
>>> > 68) currently reads:
>>> >
>>> > $uri = setUri();
>>> >
>>> > Change this line to:
>>> >
>>> > $uri = env('PHP_SELF') . env('QUERY_STRING');
>>> >
>>> > but no luck...
>>> >
>>> > Thanks in advance,
>>> >
>>> > Best regards,
>>> >
>>> > Marcos
>>> >>>
>>>
>>
>>
>> --
>> Marcos Aruj Alvarez
>> Ingeniero de Software
>> ---
>> [EMAIL PROTECTED]
>> -
>
>
>
>
> --
> Marcos Aruj Alvarez
> Ingeniero de Software
> ---
> [EMAIL PROTECTED]
> -
>



-- 
Marcos Aruj Alvarez
Ingeniero de Software
---
[EMAIL PROTECTED]
-

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



Re: Pretty urls not working

2008-05-16 Thread Marcos Aruj
Anyone? :(
Or does any body has deployed cake php on a godaddy hosting? Any steps to
follow? Things to check?
Thanks again.

On Fri, May 16, 2008 at 9:48 AM, Marcos Aruj <[EMAIL PROTECTED]> wrote:

> Thanks fot the suggestion. With no slash (
> http://www.mysite.com/index.php?url=surveys/index) I get this:
> CakePHP Rapid Development
> Missing controller
>
> You are seeing this error because controller *Controller* could not be
> found.
>
> *Notice:* If you want to customize this error message, create
> app/views/errors/missing_controller.thtml.
>
> *Fatal*: Create the class below in file : app/controllers/controller.php
>  class Controller extends AppController {
>var $name = '';
> }
> ?>
>
> **
> It's not parsing the controller name at all.. :(
> Any other suggestion? Thanks for helping ;)
>
> On Fri, May 16, 2008 at 5:14 AM, Esoteric <[EMAIL PROTECTED]>
> wrote:
>
>>
>> Try:
>> www.mysite.com/index.php?url=controller/action (no slash before
>> controller)
>>
>> Let us know.
>> -Erik
>>
>> On May 15, 6:44 pm, Markitusss <[EMAIL PROTECTED]> wrote:
>> > Hi all,
>> >
>> > I've been trying to run cake on a godaddy hosting service. mod_rewrite
>> > is not  available, so I set up cake to use its Pretty URLs, by
>> > uncommenting the line inside core.php and by deleting .htaccess files.
>> > I got the index page to perfectly, with CSS styling and connection to
>> > the database, but I can't access controllers/actions. I get a 404 not
>> > found. I tried
>> >
>> >
>> www.mysite.com/index.php/controller/actionandwww.mysite.com/index.php?url=/controller/actionwithno
>>  success.
>> >
>> > On my computer, everything works fine with mod_rewrite, but I can'
>> > make it to work on the server. Is it something special with godaddy,
>> > or am I missing some other settings. Please help.
>> >
>> > I also tried this fix:https://trac.cakephp.org/ticket/812
>> >
>> > 1. The URL's need to contain the extra '?'. In app/config/core.php
>> > [line 42] you will have uncommented this line for no mod_rewrite.
>> > Change it to:
>> >
>> > define('BASE_URL',env('SCRIPT_NAME') . '?');
>> >
>> > 2. Need to extract the controller/view differently. Index.php (line
>> > 68) currently reads:
>> >
>> > $uri = setUri();
>> >
>> > Change this line to:
>> >
>> > $uri = env('PHP_SELF') . env('QUERY_STRING');
>> >
>> > but no luck...
>> >
>> > Thanks in advance,
>> >
>> > Best regards,
>> >
>> > Marcos
>> >>
>>
>
>
> --
> Marcos Aruj Alvarez
> Ingeniero de Software
> ---
> [EMAIL PROTECTED]
> -




-- 
Marcos Aruj Alvarez
Ingeniero de Software
---
[EMAIL PROTECTED]
-

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



Re: Pretty urls not working

2008-05-16 Thread Marcos Aruj
Thanks fot the suggestion. With no slash (
http://www.mysite.com/index.php?url=surveys/index) I get this:
CakePHP Rapid Development
Missing controller

You are seeing this error because controller *Controller* could not be
found.

*Notice:* If you want to customize this error message, create
app/views/errors/missing_controller.thtml.

*Fatal*: Create the class below in file : app/controllers/controller.php


**
It's not parsing the controller name at all.. :(
Any other suggestion? Thanks for helping ;)
On Fri, May 16, 2008 at 5:14 AM, Esoteric <[EMAIL PROTECTED]> wrote:

>
> Try:
> www.mysite.com/index.php?url=controller/action (no slash before
> controller)
>
> Let us know.
> -Erik
>
> On May 15, 6:44 pm, Markitusss <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I've been trying to run cake on a godaddy hosting service. mod_rewrite
> > is not  available, so I set up cake to use its Pretty URLs, by
> > uncommenting the line inside core.php and by deleting .htaccess files.
> > I got the index page to perfectly, with CSS styling and connection to
> > the database, but I can't access controllers/actions. I get a 404 not
> > found. I tried
> >
> >
> www.mysite.com/index.php/controller/actionandwww.mysite.com/index.php?url=/controller/actionwithno
>  success.
> >
> > On my computer, everything works fine with mod_rewrite, but I can'
> > make it to work on the server. Is it something special with godaddy,
> > or am I missing some other settings. Please help.
> >
> > I also tried this fix:https://trac.cakephp.org/ticket/812
> >
> > 1. The URL's need to contain the extra '?'. In app/config/core.php
> > [line 42] you will have uncommented this line for no mod_rewrite.
> > Change it to:
> >
> > define('BASE_URL',env('SCRIPT_NAME') . '?');
> >
> > 2. Need to extract the controller/view differently. Index.php (line
> > 68) currently reads:
> >
> > $uri = setUri();
> >
> > Change this line to:
> >
> > $uri = env('PHP_SELF') . env('QUERY_STRING');
> >
> > but no luck...
> >
> > Thanks in advance,
> >
> > Best regards,
> >
> > Marcos
> >
>


-- 
Marcos Aruj Alvarez
Ingeniero de Software
---
[EMAIL PROTECTED]
-

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