Tuesday, July 31, 2012

Problem With console plugin

Hi

I'm get trouble to bake a plugin with cakephp 2.x , I'm searching days a solution and didn't find any answer
I'm working with ubuntu and I install cake in the directory /usr/share/php/cake/ and my website directory is /home/hugo/www/miko/

I try to bake a model in my plugin Miko with this commande:
hugo@hugo-Presario-C700-Notebook-PC:~/www/miko/app$ cake bake plugin Miko

Welcome to CakePHP v2.1.4 Console
---------------------------------------------------------------
App : app
Path: /home/hugo/www/miko/app/
---------------------------------------------------------------
1. /home/hugo/www/miko/app/Plugin/
2. /usr/share/php/cake/plugins/
Choose a plugin path from the paths above. 
> 1
---------------------------------------------------------------
Plugin Name: Miko
Plugin Directory: /home/hugo/www/miko/app/Plugin/Miko
---------------------------------------------------------------
Look okay? (y/n/q)
[y] > y


cake bake model --plugin Miko

and it show me wrong directory

Welcome to CakePHP v2.1.4 Console
---------------------------------------------------------------
App : app
Path: /home/hugo/www/miko/app/
---------------------------------------------------------------
---------------------------------------------------------------
Bake Model
Path: /usr/share/php/cake/plugins/Miko/Model/
---------------------------------------------------------------
Use Database Config: (default/test)

Is Anyone know where is my mistake?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: How to upload and retrieve an image from databse/dir?

It will be better if you can save the image inside  app/webroot/image/ folder rather than saving the images in database . In datatbase you can save the name of images .

If you will be saving it in database you have to worry the type of image and the size of image will can make the database huge.
But, if you want to save it in database follow this link:
http://vikasmahajan.wordpress.com/2010/07/07/inserting-and-displaying-images-in-mysql-using-php/

On Tue, Jul 31, 2012 at 10:16 PM, rahul <rahul.mamtani123@gmail.com> wrote:
Hi i am new to cakephp.I have created a registration form and i want when i fill this form and select
an image for a person i can save information with image in database.After saving information i will
be able to view that information along with that image.

Can anyone help me?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Is CakePHP more suitable for web services or Zend Framework?

If you are sure that your project is always going to be web service
only I would suggest start with a framework dedicated for such task.
eg: Slim http://www.slimframework.com/

Both CakePHP and ZendFW will be an overkill

HTH
Tarique

On Wed, Aug 1, 2012 at 6:55 AM, Lightee <lightaiyee@gmail.com> wrote:
> Dear CakePHP gurus,
>
> I have no intention to start an emotional thread about which framework is
> better. Asking this question on this forum is also rather stupid because
> members here are likely to be biased. Nevertheless, I hope to get objective
> replies.
>
> I would like to build a website that focuses on web services - particularly
> CRUD, search and query functions. From what I read on the net, Zend
> Framework supporters say that Zend has much more components than CakePHP to
> support web services. On the other hand, my understanding of CakePHP is that
> Zend Framework components can be imported into CakePHP vendors folder. If
> that is the case, wouldn't it be a no-brainer to use CakePHP? In that
> regard, I have a few questions ...
> - How easy is it to import Zend components into CakePHP? Do we need to
> modify the Zend components such that they follow certain naming conventions?
> - Can most Zend components or only selected ones be imported? How about the
> ones that deal with web services?
>
> Thank you for your help.
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php



--
=============================================================
PHP for E-Biz: http://sanisoft.com
=============================================================

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


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

Re: Auth sessions not working in firefox or ie7

Im having the same problem with cakePHP2+ . Please let me know if you have found a solution.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Is CakePHP more suitable for web services or Zend Framework?

Dear CakePHP gurus,

I have no intention to start an emotional thread about which framework is better. Asking this question on this forum is also rather stupid because members here are likely to be biased. Nevertheless, I hope to get objective replies.

I would like to build a website that focuses on web services - particularly CRUD, search and query functions. From what I read on the net, Zend Framework supporters say that Zend has much more components than CakePHP to support web services. On the other hand, my understanding of CakePHP is that Zend Framework components can be imported into CakePHP vendors folder. If that is the case, wouldn't it be a no-brainer to use CakePHP? In that regard, I have a few questions ...
- How easy is it to import Zend components into CakePHP? Do we need to modify the Zend components such that they follow certain naming conventions?
- Can most Zend components or only selected ones be imported? How about the ones that deal with web services?

Thank you for your help.


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Attempting to reparent a TreeBehavior node -- assign new parent_id, lft, and rght values

cricket:

Thank you, so very much. It was definitely "spinning its wheels" because of the lack of redirect statement. Thank you.

In addition, in my model, I had added SELF ASSOCIATIONS: belongsTo ParentTopic and hasMany ChildTopic. As soon as I commented those out and added the redirect, it works great. I guess those associations are not required when I have added  $actsAs => array('Tree').

Thank you, again!

Kevin

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Selecting hasMany fields

I have an Order that hasMany LineItems.  I only want to extract an Order if certain LineItems.fields meet my conditions.

I'm using

$this->Order->find('list', array(
                'conditions' => array('LineItem.event_id' => '3',
                                      'LineItem.pulled' => '1'),
        //        'order' => array(Order.id => 'asc'),
                'recursive' => '2'
        ));

However all I get is ALL Orders.

Any ideas, thanks
Brian

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Attempting to reparent a TreeBehavior node -- assign new parent_id, lft, and rght values

On Mon, Jul 30, 2012 at 5:58 PM, Kevin Mitchell <kevin@ncbible.com> wrote:
>
> public function reparent($id=null) {
> $this->TopicTree->id = $id;
> $newParentId = 51191;
> $this->TopicTree->save(array('parent_id' => $newParentId));
> }

I'm no expert but I think that should work. Without diving into the
source, the only suggestion I have is to ensure that there is in fact
a row in the DB with id = 51911.

> CakePHP just spins its wheels; nothing happens.

What do you mean by "spins its wheels"? Is this a controller action or
model method? If the former, perhaps you're missing a redirect? If the
latter, should it be returning something?

> I assume this will only work with a model that has $actsAs =
> array('Tree').

Yes, of course.

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


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

Re: Linking Models Together


http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#belongsto 
...is where belongsTo is documented, you should look over that.

But -- even though I hate to be that jerk who points out problems other than the one you asked about -- before you get too far, the data model you describe only lets a book have a single author.  If you're storing actual real-world books in there, you probably want to support books having multiple authors, which means a HABTM "hasAndBelongsToMany" association.  For that you need a third table authors_books, etc as described in the cookbook.

Good luck

;Daniel

On Wed, Aug 1, 2012 at 7:53 AM, newt_e <newt_e@blueyonder.co.uk> wrote:
Hi,

Thanks for the response, but I'm not entirely sure what your suggesting.

An author has many books, and so I can amend the author model to point author.id at book.authorid.
Conversely, many books have the same author, so I want the book model to allow book.authorid to reference author.id. However, as has been pointed out, the model on book wants to use the primary key for book which would be book.id and not book.authorid. There are a number of other fields I need to apply this too as well.

Looking through the cakePHP cookbook, there's section on models and linking models together. At the bottom of the section on hasMany (User hasMany Comment), it says 

"One thing to remember is that you'll need a complimentary Comment belongsTo User association in order to get the date in both directions."

However, it doesn't give any suggestion on what this needs to look like, and that's what I'm trying to set up.

I've not tried this, but do I need to give both keys the same name or something like that?

N.

On Sunday, July 29, 2012 9:58:00 PM UTC+1, MaJerle.Eu wrote:
it always search for primary key, set $primaryKey variable in model to your column
--
Lep pozdrav, Tilen Majerle



2012/7/29 newt_e <snip>

Hi,

I've have two tables:
authors, has a column called id (amongst others)
books, has columns called id and authorid  (amongst others)

Obviously a book has an author, so any value of authorid must exist in the authors table.

When I retrieve an authors row, I also want to return the corresponding authors row (books.authorid = authors.id). 

However, when trying to update my Book model, it always seems to link from the id column - how do I make it work against a different column?

Cheers,
N.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php



--
Daniel Baird
I've tried going to the XHTML <bar /> a few times, but it's always closed.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Linking Models Together

Hi,

Thanks for the response, but I'm not entirely sure what your suggesting.

An author has many books, and so I can amend the author model to point author.id at book.authorid.
Conversely, many books have the same author, so I want the book model to allow book.authorid to reference author.id. However, as has been pointed out, the model on book wants to use the primary key for book which would be book.id and not book.authorid. There are a number of other fields I need to apply this too as well.

Looking through the cakePHP cookbook, there's section on models and linking models together. At the bottom of the section on hasMany (User hasMany Comment), it says 

"One thing to remember is that you'll need a complimentary Comment belongsTo User association in order to get the date in both directions."

However, it doesn't give any suggestion on what this needs to look like, and that's what I'm trying to set up.

I've not tried this, but do I need to give both keys the same name or something like that?

N.

On Sunday, July 29, 2012 9:58:00 PM UTC+1, MaJerle.Eu wrote:
it always search for primary key, set $primaryKey variable in model to your column
--
Lep pozdrav, Tilen Majerle



2012/7/29 newt_e <snip>
Hi,

I've have two tables:
authors, has a column called id (amongst others)
books, has columns called id and authorid  (amongst others)

Obviously a book has an author, so any value of authorid must exist in the authors table.

When I retrieve an authors row, I also want to return the corresponding authors row (books.authorid = authors.id). 

However, when trying to update my Book model, it always seems to link from the id column - how do I make it work against a different column?

Cheers,
N.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

html2pdf and cakephp 1.3

Hi there,

I'm getting a weird error with html2pdf, which I'm using as described here: http://bakery.cakephp.org/articles/Casmo/2010/06/26/creating-pdf-files-with-html2ps-html2pdf

I have two domains, both are pointing to the same folder on my web server (both tld's and sub domains are configured the same on the server):

http://abc.tld1.com
http://abc.tld2.com

both pointing to /cake/app/myApp/

in /myApp i have one controller generating a pdf file via html2pdf. Now the part I don't understand any more: if I'm using tld1 it all works finr, but if I'm using tld2 I just get a plain (white) pdf with no error message.
I checked with a full text search if I hard coded the tld's by accident anywhere, but that is not the case. Does anyone have an idea where this issue might come from or where to start searching for the issue? I'm really out of ideas...

Thanks,
Christian

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: control visibility of field with second level of depth

Have you tried using the 'Containable' behavior? http://book.cakephp.org/1.3/view/1323/Containable 

2012/7/30 Mariano C. <mariano.calandra@gmail.com>:
> I have this json:
>
> {
>
> Offices:
> [
>
> {
>
> Office:
> {
>
> address: "JR street"
> Company:
> {
>
> id: "3",
> name: "ABC Software"
>
> },
>
> },
> Person:
> {
>
> id: "1",
> first_name: "M",
> last_name: "c",
>
> }
>
> }
>
> }
>
> I want to show only few fields of the entire set, for example I would show
> just Office.Company.name but if I write this into model:
>        
>>
>> $options['fields'] = array("Person.id", "Person.first_name",
>> "Person.last_name", "Office.region", "Company.name");
>
>  or
>
>> $options['fields'] = array("Person.id", "Person.first_name",
>> "Person.last_name", "Office.region", "Office.Company.name");
>
>
> This will get me an error cause Company.name or Office.Company.name is
> unknown.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>  
>  
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php



--
-Carlos

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: find with complex conditions ("AND" and "OR")

Try something like this:

$params = array('contain' => 'Product.name',
'fields' => array('DISTINCT(Equipment.product_id) AS
id', 'Product.name'),
'order' => array('Product.name'),
'group' => array('Equipment.product_id'),
'conditions' => array(
'AND' => array(
'Equipment.company_id' => $this->passedArgs['company'],
'Equipment.deleted' => 0,
'OR' => array(
'Equipment.location_id' => null,
'Equipment.location_id' => -1,
'Equipment.location_id' => -2
)
)
));

Allowing the "OR" subset to be one of the elements considered inside the AND

2012/7/31 scs <jsfink92@gmail.com>:
> I'm trying to perform what has been called a complex condition in some of
> the documentation I have found. I want to use "AND" and "OR" in the
> conditions portion of my query via find('all', $params). I haven't been able
> to find anything that seems to match my issue (although I'm sure it's out
> there).
>
> I'm not sure what to do. I've tried many different variations of the
> conditions array, none seem to work. At best, the query is built with only 1
> of the "OR" items, always the last one in the array.
>
> Here's the information:
> $params = array('contain' => 'Product.name',
> 'fields' => array('DISTINCT(Equipment.product_id) AS id',
> 'Product.name'),
> 'order' => array('Product.name'),
> 'group' => array('Equipment.product_id'),
> 'conditions' => array('AND' => array('Equipment.company_id'
> => $this->passedArgs['company'], 'Equipment.deleted' => 0,),
> 'OR' => array('Equipment.location_id'
> => null, 'Equipment.location_id' => -1, 'Equipment.location_id' => -2))
> );
> $equipList = $this->Equipment->find('all', $params);
>
> The sql debugged is: SELECT DISTINCT(`Equipment`.`product_id`) AS id,
> `Product`.`name`, `Product`.`id` FROM `equipment` AS `Equipment` LEFT JOIN
> `products` AS `Product` ON (`Equipment`.`product_id` = `Product`.`id`) WHERE
> ((`Equipment`.`company_id` = 23) AND (`Equipment`.`deleted` = 0)) AND
> `Equipment`.`location_id` = -2 GROUP BY `Equipment`.`product_id` ORDER BY
> `Product`.`name` ASC
>
> What I am looking for is: SELECT DISTINCT(`Equipment`.`product_id`) AS id,
> `Product`.`name`, `Product`.`id` FROM `equipment` AS `Equipment` LEFT JOIN
> `products` AS `Product` ON (`Equipment`.`product_id` = `Product`.`id`) WHERE
> ((`Equipment`.`company_id` = 23) AND (`Equipment`.`deleted` = 0)) AND
> (`Equipment`.`location_id` IS NULL OR `Equipment`.`location_id` = -1 OR
> `Equipment`.`location_id` = -2) GROUP BY `Equipment`.`product_id` ORDER BY
> `Product`.`name` ASC
>
> Any and all help is greatly appreciated.
> Thanks.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php



--
-Carlos

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


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

find with complex conditions ("AND" and "OR")

I'm trying to perform what has been called a complex condition in some of the documentation I have found. I want to use "AND" and "OR" in the conditions portion of my query via find('all', $params). I haven't been able to find anything that seems to match my issue (although I'm sure it's out there).

I'm not sure what to do. I've tried many different variations of the conditions array, none seem to work. At best, the query is built with only 1 of the "OR" items, always the last one in the array.

Here's the information:
$params = array('contain' => 'Product.name',
                'fields' => array('DISTINCT(Equipment.product_id) AS id', 'Product.name'),
                'order' => array('Product.name'),
                'group' => array('Equipment.product_id'),
                'conditions' => array('AND' => array('Equipment.company_id' => $this->passedArgs['company'], 'Equipment.deleted' => 0,),
                                      'OR' => array('Equipment.location_id' => null, 'Equipment.location_id' => -1, 'Equipment.location_id' => -2))
                );
$equipList = $this->Equipment->find('all', $params);

The sql debugged is: SELECT DISTINCT(`Equipment`.`product_id`) AS id, `Product`.`name`, `Product`.`id` FROM `equipment` AS `Equipment` LEFT JOIN `products` AS `Product` ON (`Equipment`.`product_id` = `Product`.`id`) WHERE ((`Equipment`.`company_id` = 23) AND (`Equipment`.`deleted` = 0)) AND `Equipment`.`location_id` = -2 GROUP BY `Equipment`.`product_id` ORDER BY `Product`.`name` ASC

What I am looking for is: SELECT DISTINCT(`Equipment`.`product_id`) AS id, `Product`.`name`, `Product`.`id` FROM `equipment` AS `Equipment` LEFT JOIN `products` AS `Product` ON (`Equipment`.`product_id` = `Product`.`id`) WHERE ((`Equipment`.`company_id` = 23) AND (`Equipment`.`deleted` = 0)) AND (`Equipment`.`location_id` IS NULL OR `Equipment`.`location_id` = -1 OR `Equipment`.`location_id` = -2) GROUP BY `Equipment`.`product_id` ORDER BY `Product`.`name` ASC

Any and all help is greatly appreciated.
Thanks.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

How to upload and retrieve an image from databse/dir?

Hi i am new to cakephp.I have created a registration form and i want when i fill this form and select
an image for a person i can save information with image in database.After saving information i will
be able to view that information along with that image.

Can anyone help me?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Error: The requested address was not found on this server.

Any further suggestions on this issue are very welcome. Thank you.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Web Illustrations | HTML v. Plain Text | Social Surgeon

 

Jul
31
 
  Cannot see this email? View in browser
   
 
Web Marketing Today
 
 
  Latest Articles - July 31, 2012  
 
18 Websites Featuring Beautiful Illustrations
In "10 Web Design Trends for 2012," I listed large illustrations as a growing trend in web design. Website illustrations can add personality to even the smallest sites and invite visitors to stay awhile and explore. Here are 18 websites with compelling illustrations.
  Read the Article  
 
 
 
Sending HTML and Plain Text Email Simultaneously
With so many different smartphones and tablets, it's important to be able to display your company's emails in the way that the mobile browser is best suited. Some mobile browsers will show your email in its full HTML form. Others will default to just plain text.
  Read the Article  
 
 

- Advertisement -
 
Free Email Marketing Starter Kit
Growing your business is easy with iContact's Email Marketing Starter Kit. Sign up today, and get everything you need to create successful email marketing campaigns: a free trial of iContact's solution, a 30-Day Starter Plan for Email Marketing, and award-winning support from a team of product experts.
  Download the Kit Today  
 
 
 
Plastic Surgeon Drives Business With Social Media
Michael Salzhauer is a plastic surgeon with a passion for Internet marketing. He attributes virtually all of his new-patient business to it. His company, Bal Harbour Plastic Surgery, has posted videos on YouTube that have attracted many views. The company's Twitter page has more than 11,000 followers.
  Read the Article  
 
 

- Advertisement -
 
Be Relevant. Go Local. Lift Conversions.
Create deeper engagement with local online marketing. Examine trends in local retail online marketing. Understand the benefits of location, proven techniques using IP geo-targeting and the growing importance of localized display advertising. Learn how to become more relevant and lift sales.
  Download the whitepaper  
 
 
Share:


Web Marketing Today®
518 28 Road, Suite B-203, Grand Junction, CO, 81501, U.S. 970-257-0606
Contact Us

Copyright © 2012 Web Marketing Today. All rights reserved.
Please do NOT reprint or host on your website without explicit permission.
 

 



This message was sent to php.itmatchonline@gmail.com from:

Web Marketing Today | 518 28 Road, Suite B-203 | Grand Junction, CO 81501

Manage Your Subscription  |  Forward To a Friend

Re: Choose what field show when depth level is 2

You can use Containable behavior and write something like this:

$Office->find('all', array(
   ...
   'contain' => array(//or 'contains' -> check manual ;)
    'Company' => array('fields' => array('name')),
    'Person' => array(
        'fields' => array('mail'),
        'OfficePersonTask' => array( )
             'Office' => array('fields' => 'name'),
             'Task' => array('fields' => 'name'),
        ),
   ),
   ...
));

Or try setting the fields names in $hasMany, $hasOne, etc array http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html#hasone

On Tuesday, July 31, 2012 12:16:38 PM UTC+2, Mariano C. wrote:
In CakePHP 2.1 I have prepared a Json webservice. This is an excerpt of what I get:

    {
       Offices:[
          {
             Office:{
                id:"1",
                Company:{
                   id:"1",
                   name:"ABC Software"
                }
             },
             Person:{
                mail:"sASa@sAAsS.it",
                OfficePersonTask:[
                   {
                      office_id:"1",
                      person_id:"1",
                      task_id:"1"
                   }
                ]
             }
          }
       ]
    } 

What I want is the possibility to show only some field from relative database, so the method that query the database have `$options['fields']` properly setting, so if I want to show person's mail I write:

$options['fields'] = array("Person.mail");

but what if I want to show company's id or company's name whice is one level deeper?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Choose what field show when depth level is 2

In CakePHP 2.1 I have prepared a Json webservice. This is an excerpt of what I get:

    {
       Offices:[
          {
             Office:{
                id:"1",
                Company:{
                   id:"1",
                   name:"ABC Software"
                }
             },
             Person:{
                mail:"sASa@sAAsS.it",
                OfficePersonTask:[
                   {
                      office_id:"1",
                      person_id:"1",
                      task_id:"1"
                   }
                ]
             }
          }
       ]
    } 

What I want is the possibility to show only some field from relative database, so the method that query the database have `$options['fields']` properly setting, so if I want to show person's mail I write:

$options['fields'] = array("Person.mail");

but what if I want to show company's id or company's name whice is one level deeper?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: [Models] saveAll doesn't work

Up. 

Thanks ! 

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Controllers with same name



On Tuesday, July 31, 2012 11:28:57 AM UTC+7, André Luis wrote:
Well, i´ve disabled the Cache and it works fine now, it must be a issue... latter i will submit as a issue.

Em segunda-feira, 30 de julho de 2012 10h55min45s UTC-3, André Luis escreveu:
Hi all, i am in a big trouble, and i dont know if it´s Cake PHP Issue, or am i doing something wrong...

But i have the Controller Categories at Representatives Plugin, also i have Categories at Contact plugin.
When i try to access /admin/representatives/categories it tryes to reach the categories controller from contact plugin, also sometimes the contact´s catgories tryes to reach representatives categories.

What am i doing wrong? or is it a issue?

This is not a bug. You just don't use the classes with the same name, even though it's in a different plugin.

I think I have already pointed this out to you a couple of days back.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Monday, July 30, 2012

Re: Debugging tool for cakephp

As @Alejandro said DebugKit is a very good solution that would do the job in most cases. If you want to be able to insert breakpoints, right inside PHP's ZEnd Engine (while it is executing) you can use XDebug of ZendDebug, but this second option will be needed very rarely. It should be used when "no other options are left". Such a Debugging perspective also provides a nice insight on what is happening in the Zend Engine.

Cheers,
   Borislav.

On Tuesday, 31 July 2012 05:43:01 UTC+3, Lightee wrote:
Dear cakephp experts,

I am a newbie to php. Can someone recommend a good debugging tool that they personally use for cakephp? I am open to all because I know nothing at the moment.

Thank you for your help.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Tool to visualize database schema on cakephp

Hi.

Such a toll cannot be bundled with Cake itself because Cake can use different DataSources.

The best tool I've used (for MySQL) is MySQL Workbench. It does design and forward/reverse engineering for MySQL only, but for "schema visualization" it will do the trick for all.
I've incorporated this wonderful piece of software in my dev process and I can freely say that there are many benefits, some being:
- An always up to date model of the database
- All changes to the DB are made from MySQL Workbench
- Versioning for DB changes
- Real easiness  for "Database Forward/Reverse Engineering"
- Generation of SQL divs
- ...

Of course all of its features would work only on MySQL (and its forks maybe like MariaDB), but if you would only like to visualize then it will do wonders for you. You can also check out Dia - the open source diagram editor, with which you can create graphs, but you wouldn't have any of the other features, as
it is not solely a DB design tool. Try Workbench out.

Cheers,
   Borislav.

On Tuesday, 31 July 2012 05:41:13 UTC+3, Lightee wrote:
Dear cakephp experts,

Does anyone know of tools that can help us visualize the database schema on cakephp? Hopefully, it can show the relationship (1 to many, 1 to 1) between different tables.

Thank  you.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Entity Relationship: What's the best solution for CakePHP?

1. 
One Source has Many Comments? 

2.
One Comment has Many Sources?

3.
The same Source can have Many Comments?



1.
Comments table should have source_id inside.
($belongsTo = array('source'); )

2.
Sources table should have comment_id inside.
($belongsTo = array('comment'); )

3.
Create a comments_sources table with
Id
Comment_id
Source_id


I would not create a comment table for every source, you don't need it.

http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html



=============================
Walter Raponi
Din S.r.l.
Via Donato Menichella 304
00156 Roma - Italy

Tel  0641227662
Fax 0641227664

Il giorno 30/lug/2012, alle ore 22:54, Leonhart <andrea.tantimonaco@gmail.com> ha scritto:

Hi guys ;)
I hope I'm not abusing this group for a technical question.

I'm kinda new in CakePHP and it's the first time I'm using it for a true-app development. I want to learn how to create the best suitable database for CakePHP and I'm stuck in the following scenario:
I've a "Comments" table and many sources for the comments. Should I create a "Sources" table for keeping just one comment table or create a comment table for each source? What's the best solution suitable for the CakePHP conventions?

Thanks in advance!!

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: How can I Populate my view from belongsTo relationship



On Tuesday, July 31, 2012 11:27:11 AM UTC+8, Ain Devonshire wrote:
I have a controller Users with function Profile

public function profile($id=null){
$log=$this->Auth->User('id'); 
$user = $this->User->UserProfile->find('first',array(
'conditions'=>array('User.id'=>$log),
'recursive'=>1
));
$this->set(compact('user'));
pr($user);
}

I also has a UserProfile Controller

how can i populate my Profile view i accessfully retrieve the data this is my array

Array  (      [UserProfile] => Array          (              [user_id] => 1              [phone] => 552-2947              [mobile] => 09063082315              [fax] => 552-2947              [civil_status] => 1              [nationality] => 1              [birthplace] => Zamboanga City              [birthdate] => 2012-07-27              [sex] =>           )        [User] => Array          (              [id] => 1              [tokenhash] => c484b7b64a68b409ba7d7043bc2b7464a19f4bf7              [active] => 1              [first_name] => Ian              [last_name] => Pansensoy              [middle_name] =>               [email] => vladimirdevonshire@gmail.com              [password] => 0df177a7cba3a96f3a73e8e126837f28e82b3dad              [role_id] => 1              [photo] => /img/users_avatar/2012-07-25-114258staff_image.jpg              [status] => 0              [created] => 2012-07-25 11:42:58              [modified] => 2012-07-27 11:46:34          )   
) 

BHUMP on this One 

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php