Monday, December 31, 2012

Re: Cake Bake cannot connect to my database

Try to use:

Terminal:
sudo mkdir /var/mysql

sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock



Em sexta-feira, 21 de outubro de 2011 13h34min04s UTC-4, Nate escreveu:
In manually setting everything up, I'm able to successfully add,
modify, view, and remove products with scaffolding enabled.

However, when I go into Bake, and I choose to create a [C]ontroller -
it then asks for my database (default).  I confirm that setting and I
get this error:

Warning Error: PDO::__construct(): [2002] No such file or directory
(trying to connect via unix:///var/mysql/mysql.sock) in [/Users/nate/
Sites/tor.local/html/lib/Cake/Model/Datasource/Database/Mysql.php,
line 160]

Any ideas? Thanks

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: Cake 2.2 Auth login failure

What does your login() method look like? Maybe if you can give some more details we can assist you.

On Monday, 31 December 2012 16:40:48 UTC-5, Martin Halla wrote:
Hi,

I have this app that uses the Auth component for login Everything works on the local machine, but fails big time live at :


Can you tell me why ?

Here are more details :

password : password
acl plugin by alexo

Thanks!

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: cakephp admin app

You can use the admin section as a plugin, something like: https://github.com/Maldicore/Admin

Regards

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: Admin as a plugin

You can use the admin section as a plugin, something like: https://github.com/Maldicore/Admin

Regards

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: Admin Section as plugin

You can use the admin section as a plugin, something like: https://github.com/Maldicore/Admin

Regards

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Cake 2.2 Auth login failure

Hi,

I have this app that uses the Auth component for login Everything works on the local machine, but fails big time live at :

http://ncln.halladesign.com

Can you tell me why ?

Here are more details :

user : test@test.com 
password : password
acl plugin by alexo

Thanks!

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: Many to Many with extra data

Your joining table needs to be become its own model as a belongs to for Table1 and Table2 and then Table2 has many Table1_Table2 and same for Table1.


On Mon, Dec 31, 2012 at 5:34 AM, Anis Ghabri <ghabrianis@gmail.com> wrote:
Hi
I couldn't find the to solve this.
here is my problem

I have two tables related with many to many relation

Table1(id, t1_field1, t1_field2,...);

Table2(id, t2_field1, t2_field2,...);

and the association table

table1_table2(id,table1_id,table2_id,extra_field1, extra_field2extra_field3);

My problem is how to add these extra fields; When I try it only adds the two tables ids and nothing else.

Pleas Help

regards

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Fixture for the model of a HABTM relationship generates invalid SQL

Hey,

I'm having a slight issue with a fixture I'm attempting to create.

Basically I have a Member model and a Group model, and they have a HABTM relationship, I've specified a custom model to handle this relationship 'GroupsMember' as I wish to add methods to that model to query the join table directly.

So when I set this table up in the databse (I use MySQL) I set it up like this:

CREATE TABLE IF NOT EXISTS `member_group` (
`member_id` int( 11 ) NOT NULL ,
`grp_id` int( 11 ) NOT NULL ,
PRIMARY KEY ( `member_id` , `grp_id` )
) ENGINE = InnoDB DEFAULT CHARSET = latin1;


This was all working ok until I attempted to create a fixture for the 'GroupsMember' model. The code I use to do that is as follows:

class GroupsMemberFixture extends CakeTestFixture 
{
public $useDbConfig = 'test';
public $table = 'member_group';

public $fields = array(
         'member_id' => array('type' => 'integer', 'null' => false, 'key' => 'primary'),
         'grp_id' => array('type' => 'integer', 'null' => false, 'key' => 'primary'),
      );

public $records = array(
array('member_id' => 0, 'grp_id' => 1),
);
}

However, when I run the test I get the following error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'instrumentation_test.member_group' doesn't exist

So I decided to log all the SQL queries being generated, and the last one is this:

CREATE TABLE `instrumentation_test`.`member_group` (
`member_id` int(11) NOT NULL AUTO_INCREMENT,
`grp_id` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY  (`grp_id`)) ENGINE=MEMORY;

If I run that in phpMyAdmin then it fails with the following error:

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key

So the addition of the AUTO_INCREMENT is messing things up, and the primary key is only set to be the grp_id not both the grp_id and the members_id.

Is there any-way I can override the SQL cake is generating for this case?

If I change it so that I create the table in the test database and tell the fixture to import the structure from there (using public $import = 'GroupsMember';) then cake generates the following SQL:

CREATE TABLE `instrumentation_test`.`member_group` (
`member_id` int(11) NOT NULL AUTO_INCREMENT,
`grp_id` int(11) NOT NULL AUTO_INCREMENT,
`id` varchar(255) NOT NULL, PRIMARY KEY  (`id`)) ENGINE=MEMORY;

which apart from adding the extra 'id' column has the same AUTO_INCREMENT issue.

What is it that tells cakephp that those fields should be AUTO_INCREMENT? And is it possible for me to make cake specify the primary key as the same as it was for the table I generated?

Thanks,
Andrew

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

MY Site not working properlly

Hi to all.


I am new to cakephp, and tryd to upload one site, its based on cakephp frame work and hosted in linux  Apache, mysql db. whats the problem means my site is now up.

i have home page in that page login information its asked i give user name & password it will redirect to another page.

But the another page it will only show header information not values from DB may i know why?..

please let me know.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Needed Kindergarten Special Education Co-Lead Teacher (Washington, United States)

Needed Kindergarten Special Education Co-Lead Teacher (Washington, United States)

Start date: February 4, 2013
Application deadline: February 4, 2013
Education requirements: 4-year degree, Special Education, Early Childhood Special Education
Languages needed: English
Employment type: Full time
Professional level: Professional
Salary range (annual, U.S. $): 42,000 - 65,000
Salary details: Salary based on education and years of experience
Benefits: Medical, dental & personal / sick days
Job function: Education
Owners areas of focus: Hands-On Learning, Inclusion, Disability, Youth, Education, Disability issues

Bridges is now interviewing for a Co-Lead Teacher for a high level special education kindergarten classroom starting in January 2013 or February 2013.



Bridges mission is to provide an exemplary educational program that includes students with special needs. Our developmentally appropriate, student and family-centered educational approach nurtures students to expand their developmental skills, in order to build a foundation for life-long learning. For the 2012-2013 school year we are serving students in grades preschool -- kindergarten. Bridges Public Charter School is expanding into an elementary school program. We will add a grade level each year reaching capacity at 5th grade in the 2017- 2018 school year.



Spanish-speakers and persons of color are strongly encouraged to apply.This is a classroom based position co-leading a teaching team to educate and support students with high level special needs. Classroom size is 8 students.



QUALIFICATIONS:



The ideal candidate will:



  • Be "highly qualified" in accordance with the No Child Left Behind Act of 2001 and have: a BA and certification in Special Education; a Masters in Early Childhood Special Education or Special education; or a Masters and certification.
  • Have 1 รข€" 2 years of successful classroom teaching experience in an urban school setting. 2 or more years of teaching experience is preferred.
  • Be a strong classroom manager.
  • Have experience with Applied Behavior Analysis (ABA/VB).
  • Be committed to meeting the needs of a diverse student population.
  • Have a track record of being a team player and community minded.
  • Be committed to their own learning.

RESPONSIBILITIES INCLUDE:



  • Co-plan and manage a classroom for high level special needs kindergarten age students.
  • Co- plan and implement a program of instruction using the schools curriculum to meet individual students goals and objectives on their IEP.
  • Develop meaningful learning expeditions and projects for students with special needs.
  • Assess student progress regularly and use data to plan for instruction.
  • Collaborate and manage work with special education service providers (speech, PT,OT), ELL teacher and Assistant Teacher(s) or Teaching Fellow(s).
  • Write IEP goals, progress summaries and report cards.
  • Learn about ABA / VB and be part of classroom instruction of students using VB.
  • Create a classroom culture and environment that develops and nurtures the emotional, cognitive and social abilities of the students.
  • Respond to students behavior appropriately and successfully.
  • Engage parents and families in their students learning and acting as an ambassador for the school in the community.
  • Contribute productively to the school as a whole.
  • Attend and participatie in school events outside of regular school hours.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Many to Many with extra data

Hi
I couldn't find the to solve this.
here is my problem

I have two tables related with many to many relation

Table1(id, t1_field1, t1_field2,...);

Table2(id, t2_field1, t2_field2,...);

and the association table

table1_table2(id,table1_id,table2_id,extra_field1, extra_field2extra_field3);

My problem is how to add these extra fields; When I try it only adds the two tables ids and nothing else.

Pleas Help

regards

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Sunday, December 30, 2012

Re: Missing Controller Error

you need to add "<?php"

# cat PostsController.php
<?php
class PostsController extends AppController {

    public function index() {
        $this->set('posts', $this->Post->find('all'));
    }
}
?>

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: Missing Controller Error

Hello

I am having the same error, I thought that it could be related to the file permissions but I've changed them and I am having the same result,

thank your for your help

josexato

On Sunday, December 30, 2012 8:02:27 AM UTC-5, Harish Geeth wrote:
Hi,

Did you find out what the problem is ? I am running into same issue. COuld you please provide details if you know what the issue is.

Thank you

On Thursday, May 31, 2012 10:13:09 PM UTC-4, Kid Noire wrote:
I've just installed CakePHP and trying to get myself through
Andrewperk's blog tutorial but I get this error  after the second
video...

Missing Controller
Error: PostsController could not be found.
Error: Create the class PostsController below in file: app/Controller/
PostsController.php
<?php
class PostsController extends AppController {

}

I've tried to Google my way out of this one but don't have the
technical expertise to comprehend the suggestions I find.  I'm
assuming my routes are a bit f'd up so if anyone could help me I would
be greatly appreciative.



Sincerely,

A Noob


------------

BTW I'm using XAMPP on a Mac

Thanks!



--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: Dealing with Image Uploads

That is my current approach.
The image is added from the news / product add form. I suppose on the edit page I could show all related images with option to delete or add more. Also a js add input to add more file inputs so they can upload multiple images as needed could be an option.

On Sun, Dec 30, 2012 at 6:50 PM, Sven Pype <sven@dskbvba.be> wrote:
My solution alows me to have a form that creates the record andere directly attach the picture to it. Thats how it works with me.

I ad a word to the dictionary and in the same form I can select and upload a image for the word to illustrate it.

Not sure if this is what you're looking for.

Advantage+ <movepixels@gmail.com>schreef:


I am using Miles Johnson's Plugin for the uploads which works great now that I have it working.

Problem is this client wants to upload images for products which might may many alternate images but from a user stand point it seems wrong to create the product record, then go to Image Manager to upload photos. Same with news section. Images for news and other places thruout the site.

 

Just need a solution and hoping to find some ideas or suggestions on how to handle that.

 

Thanks all and happy new years to all J

 

Dave

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of SvenP
Sent: Sunday, December 30, 2012 10:37 AM
To: cake-php@googlegroups.com
Subject: Re: Dealing with Image Uploads

 

Hi,

 

I have this in one of my apps: if I remember correctly I used: http://github.com/josegonzalez/upload/zipball/master

 

It's well explained in the readme section. You can set different thumbnailsizes:

 

Code in the model:

 

public $actsAs = array(

        'Upload.Upload' => array(

            'foto'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}',

            'thumbnailSizes' => array(

                    'xvga' => '1024x768',

                    'vga' => '640x480',

                    'thumb' => '80x80'

                )),

                'audio1'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}'

                ),

                'audio2'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}'     

                ),
            ),
    ); 


On Friday, December 28, 2012 6:44:38 AM UTC+1, advantage+ wrote:

I need to figure out the best way from the backed the admin can upload images, the tricky part is the site has all different kinds of images (small product thumbs, large version, they want to be able to upload images into the jquery slider on the home page, images for a new sections, featured product on index page to name a few of the different sizes)

 

And there is no way to know if they are even going to upload the right dimensions for each type of image.

 

What is the best way to do this? I cannot seem to think of anything having a table for each_image how it relates to that page, that seems like the opposite of what should be done.

 

Any idea would be great.

 

Thanks, Dave

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

RE: Dealing with Image Uploads

My solution alows me to have a form that creates the record andere directly attach the picture to it. Thats how it works with me.

I ad a word to the dictionary and in the same form I can select and upload a image for the word to illustrate it.

Not sure if this is what you're looking for.

Advantage+ <movepixels@gmail.com>schreef:

I am using Miles Johnson's Plugin for the uploads which works great now that I have it working.

Problem is this client wants to upload images for products which might may many alternate images but from a user stand point it seems wrong to create the product record, then go to Image Manager to upload photos. Same with news section. Images for news and other places thruout the site.

 

Just need a solution and hoping to find some ideas or suggestions on how to handle that.

 

Thanks all and happy new years to all J

 

Dave

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of SvenP
Sent: Sunday, December 30, 2012 10:37 AM
To: cake-php@googlegroups.com
Subject: Re: Dealing with Image Uploads

 

Hi,

 

I have this in one of my apps: if I remember correctly I used: http://github.com/josegonzalez/upload/zipball/master

 

It's well explained in the readme section. You can set different thumbnailsizes:

 

Code in the model:

 

public $actsAs = array(

        'Upload.Upload' => array(

            'foto'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}',

            'thumbnailSizes' => array(

                    'xvga' => '1024x768',

                    'vga' => '640x480',

                    'thumb' => '80x80'

                )),

                'audio1'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}'

                ),

                'audio2'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}'     

                ),
            ),
    ); 


On Friday, December 28, 2012 6:44:38 AM UTC+1, advantage+ wrote:

I need to figure out the best way from the backed the admin can upload images, the tricky part is the site has all different kinds of images (small product thumbs, large version, they want to be able to upload images into the jquery slider on the home page, images for a new sections, featured product on index page to name a few of the different sizes)

 

And there is no way to know if they are even going to upload the right dimensions for each type of image.

 

What is the best way to do this? I cannot seem to think of anything having a table for each_image how it relates to that page, that seems like the opposite of what should be done.

 

Any idea would be great.

 

Thanks, Dave

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

RE: Dealing with Image Uploads

I am using Miles Johnson's Plugin for the uploads which works great now that I have it working.

Problem is this client wants to upload images for products which might may many alternate images but from a user stand point it seems wrong to create the product record, then go to Image Manager to upload photos. Same with news section. Images for news and other places thruout the site.

 

Just need a solution and hoping to find some ideas or suggestions on how to handle that.

 

Thanks all and happy new years to all J

 

Dave

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of SvenP
Sent: Sunday, December 30, 2012 10:37 AM
To: cake-php@googlegroups.com
Subject: Re: Dealing with Image Uploads

 

Hi,

 

I have this in one of my apps: if I remember correctly I used: http://github.com/josegonzalez/upload/zipball/master

 

It's well explained in the readme section. You can set different thumbnailsizes:

 

Code in the model:

 

public $actsAs = array(

        'Upload.Upload' => array(

            'foto'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}',

            'thumbnailSizes' => array(

                    'xvga' => '1024x768',

                    'vga' => '640x480',

                    'thumb' => '80x80'

                )),

                'audio1'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}'

                ),

                'audio2'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}'     

                ),
            ),
    ); 


On Friday, December 28, 2012 6:44:38 AM UTC+1, advantage+ wrote:

I need to figure out the best way from the backed the admin can upload images, the tricky part is the site has all different kinds of images (small product thumbs, large version, they want to be able to upload images into the jquery slider on the home page, images for a new sections, featured product on index page to name a few of the different sizes)

 

And there is no way to know if they are even going to upload the right dimensions for each type of image.

 

What is the best way to do this? I cannot seem to think of anything having a table for each_image how it relates to that page, that seems like the opposite of what should be done.

 

Any idea would be great.

 

Thanks, Dave

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: I dont understand extend view



Le dimanche 30 dรฉcembre 2012 13:46:35 UTC-5, cPage a รฉcrit :
The example : 

// app/View/Common/view.ctp
<h1><?php echo $this->fetch('title'); ?></h1>
<?php echo $this->fetch('content'); ?>

<div class="actions">
    <h3>Related actions</h3>
    <ul>
    <?php echo $this->fetch('sidebar'); ?>
    </ul>
</div>

// app/View/Posts/view.ctp
$this->extend('/Common/view');

$this->assign('title', $post);

$this->start('sidebar');
?>
<li>
<?php
echo $this->Html->link('edit', array(
    'action' => 'edit',
    $post['Post']['id']
)); ?>
</li>
<?php $this->end(); ?>

// The remaining content will be available as the 'content' block
// in the parent view.
<?php echo h($post['Post']['body']);

Didn't work ?? I get : 

Blocks can only contain strings.

Error: An Internal Error Has Occurred. 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: CAKEPHP 2.1.x on Pagodabox | foreach multiple items for each slide (bootstrap carousel)

Yes,

Each ad relates to a sponsor... works perfect.

array(  	(int) 0 => array(  		'Ad' => array(  			'id' => '2',  			'sponsor_id' => '0',  			'title' => '...',  			'body' => '...',  			'link' => 'www....com'  		),  		'Sponsor' => array(  			'id' => '8',  			'name' => ...,  			'contact_first_name' => ...,  			'contact_name' => ...,  			'contact_tel' => ...,  			'contact_email' => ...  		)  	),

On Sunday, December 30, 2012 7:20:54 PM UTC+1, cricket wrote:
die(debug($ads));

Are you certain of the array structure?

On Sat, Dec 29, 2012 at 5:39 PM, SvenP <sv...@dskbvba.be> wrote:
> Hi,
>
> I'm looking for a way to show multiple 'Ads' / slide with a foreach loop
> from the db. ( each client has ads tied to them.)
>
> My code now works great but only shows one ad / slide.
>
> Thanks for your time!
>
> Sven
>
> Code:
> ___________
>
> <div class="carousel-inner">
> <?php foreach ($ads as $indexValue => $ad):
> if($indexValue == 0){?>
> <div class="item active">
> <a class="adshref" href="//<?php echo $ad['Ad']['link']?>"><?php echo
> $ad['Ad']['title']?></a><br>
> <span class="adslink"><?php echo $ad['Ad']['link']?></span><br>
> <span class="adsbody"><?php echo $ad['Ad']['body']?></span><br></div><?php
> } else { ?>
> <div class="item">
> <a class="adshref" href="//<?php echo $ad['Ad']['link']?>"><?php echo
> $ad['Ad']['title']?></a><br>
> <span class="adslink"><?php echo $ad['Ad']['link']?></span><br>
> <span class="adsbody"><?php echo $ad['Ad']['body']?></span><br></div>
> <?php } endforeach; ?>  </div>
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake...@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+u...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

I dont understand extend view

The example : 

// app/View/Common/view.ctp
<h1><?php echo $this->fetch('title'); ?></h1>
<?php echo $this->fetch('content'); ?>

<div class="actions">
    <h3>Related actions</h3>
    <ul>
    <?php echo $this->fetch('sidebar'); ?>
    </ul>
</div>

// app/View/Posts/view.ctp
$this->extend('/Common/view');

$this->assign('title', $post);

$this->start('sidebar');
?>
<li>
<?php
echo $this->Html->link('edit', array(
    'action' => 'edit',
    $post['Post']['id']
)); ?>
</li>
<?php $this->end(); ?>

// The remaining content will be available as the 'content' block
// in the parent view.
<?php echo h($post['Post']['body']);

Didn't work ?? I get : 

Error: The view for PostsController::view() was not found.

Error: Confirm you have created the file: C:\wamp\www\cakephp-2.2.4\app\View\Common\view.ctp


--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: Not able to view anything on the page

From the folder structure it appears you're using version 1.3. If you're new to Cake you should download the 2.2.x version.

On Sat, Dec 29, 2012 at 7:20 PM, Harish Geeth <harish.upad@gmail.com> wrote:
Hi,

I am new to cakePHP and downloaded the framework and started playing with it. I am using NetBeans to edit PHP files. I am able to cinfigure the CakePHP as expected. I get successful messages when I try to hit the webserver. But for some reason when I try to run the application after adding Model and Controller, I don't see the results as exected.


 
Folder structure is 


CONTROLLER

<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of blog_controller
 *
 * @author harishupadhyayula
 */
class BlogsController extends AppController {
    
    var $name = 'Blog';
    var $uses = array('Blog');
    
    
    var $scaffold;
}

?>

MODEL

<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of blog
 *
 * @author harishupadhyayula
 */
class Blog extends AppModel {
    var $name = 'Blog';
}

?>
I modified my dabase.php files as well. I am not sure where it's going wrong and I tried all day to figure this out but i had not luck.

Any help is appreciated.


--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: CAKEPHP 2.1.x on Pagodabox | foreach multiple items for each slide (bootstrap carousel)

die(debug($ads));

Are you certain of the array structure?

On Sat, Dec 29, 2012 at 5:39 PM, SvenP <sven@dskbvba.be> wrote:
> Hi,
>
> I'm looking for a way to show multiple 'Ads' / slide with a foreach loop
> from the db. ( each client has ads tied to them.)
>
> My code now works great but only shows one ad / slide.
>
> Thanks for your time!
>
> Sven
>
> Code:
> ___________
>
> <div class="carousel-inner">
> <?php foreach ($ads as $indexValue => $ad):
> if($indexValue == 0){?>
> <div class="item active">
> <a class="adshref" href="//<?php echo $ad['Ad']['link']?>"><?php echo
> $ad['Ad']['title']?></a><br>
> <span class="adslink"><?php echo $ad['Ad']['link']?></span><br>
> <span class="adsbody"><?php echo $ad['Ad']['body']?></span><br></div><?php
> } else { ?>
> <div class="item">
> <a class="adshref" href="//<?php echo $ad['Ad']['link']?>"><?php echo
> $ad['Ad']['title']?></a><br>
> <span class="adslink"><?php echo $ad['Ad']['link']?></span><br>
> <span class="adsbody"><?php echo $ad['Ad']['body']?></span><br></div>
> <?php } endforeach; ?> </div>
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.

Re: Submit separably triggered form parts at once

On Sat, Dec 29, 2012 at 5:44 PM, Yousg27 <yous.g27@gmail.com> wrote:
>
> The problem is that when I trigger several of the hidden parts I can submit
> them all to the data base at once.

You can, or cannot?

> each of them was triggered at a different
> time and it has its own save button.

When you load the new form elements, don't wrap them in their own form
tags. Just add the elements themselves.

If the elements you're adding are always the same -- that is, they do
not depend on what has already been filled in by the user -- you could
just load them elsewhere on the page and hide them, then move them
inside the form and reveal them. Then you won't need to use AJAX.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.

Re: Dealing with Image Uploads

Hi,

I have this in one of my apps: if I remember correctly I used: http://github.com/josegonzalez/upload/zipball/master

It's well explained in the readme section. You can set different thumbnailsizes:

Code in the model:

public $actsAs = array(

        'Upload.Upload' => array(

            'foto'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}',

            'thumbnailSizes' => array(

                    'xvga' => '1024x768',

                    'vga' => '640x480',

                    'thumb' => '80x80'

                )),

                'audio1'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}'

                ),

                'audio2'=> array(

            'pathMethod' => 'flat',

        'path' => '{ROOT}webroot{DS}files{DS}'     

                ),
            ),
    ); 


On Friday, December 28, 2012 6:44:38 AM UTC+1, advantage+ wrote:

I need to figure out the best way from the backed the admin can upload images, the tricky part is the site has all different kinds of images (small product thumbs, large version, they want to be able to upload images into the jquery slider on the home page, images for a new sections, featured product on index page to name a few of the different sizes)

 

And there is no way to know if they are even going to upload the right dimensions for each type of image.

 

What is the best way to do this? I cannot seem to think of anything having a table for each_image how it relates to that page, that seems like the opposite of what should be done.

 

Any idea would be great.

 

Thanks, Dave

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: Missing Controller Error

Hi,

Did you find out what the problem is ? I am running into same issue. COuld you please provide details if you know what the issue is.

Thank you

On Thursday, May 31, 2012 10:13:09 PM UTC-4, Kid Noire wrote:
I've just installed CakePHP and trying to get myself through
Andrewperk's blog tutorial but I get this error  after the second
video...

Missing Controller
Error: PostsController could not be found.
Error: Create the class PostsController below in file: app/Controller/
PostsController.php
<?php
class PostsController extends AppController {

}

I've tried to Google my way out of this one but don't have the
technical expertise to comprehend the suggestions I find.  I'm
assuming my routes are a bit f'd up so if anyone could help me I would
be greatly appreciative.



Sincerely,

A Noob


------------

BTW I'm using XAMPP on a Mac

Thanks!



--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

Re: Dealing with Image Uploads

hi. do not need that, using bootstrap, and you can avoid all that code. example:

the original image is 1197x755px  -- dominator-platinum-landing-C.png




2012/12/29 Advantage+ <movepixels@gmail.com>
Thanks, I have it working to a point.
Images get uploaded and associated correct but my model field is always
empty

Image Model:

public $belongsTo = array(
                'Product' => array(
                        'className' => 'Product',
                        'foreignKey' => 'id',
                        'conditions' => array(
                                'Image.model' => 'Product'),
                        'dependant' => true
                )
        );

Product Model:
public $hasMany = array(
                'Image' => array(
                        'className' => 'Image',
                        'foreignKey' => 'foreign_key',
                        'dependent' => true));

Do I need to add something to the Product Model relation?
Or I manually have to add in the $this->request-data['Image']['model'] =
'Product'; before the save?

Thanks again,

Dave

-----Original Message-----
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of lowpass
Sent: Friday, December 28, 2012 3:17 PM
To: cake-php@googlegroups.com
Subject: Re: Dealing with Image Uploads

One approach is to add foreign_key and model columns to your images table so
you can create associations between Image and other models like this:

public $belongsTo = array(
        'Publication' => array(
                'className' => 'Publication',
                'foreignKey' => 'foreign_key',
                'conditions' => array(
                        'Image.model' => 'Publication'
                ),
                'dependent' => true
        ),
        'Author' => array(
                'className' => 'Author',
                'foreignKey' => 'foreign_key',
                'conditions' => array(
                        'Image.model' => 'Author'
                ),
                'dependent' => true
        )
);

You can then store settings for the various models within the Image class:

public $settings = array(
        'Publication' => array(
                'directory' => 'img/publications',
                'width' => 220,
                'height' => 288,
                'wp' => 220,
                'hp' => 288,
                'wl' => 220,
                'hl' => 288
        ),
        ...
);

Then create an ImageComponent to handle the upload and resize, accessing the
required settings much the same way that a behavior reads its own settings
for a given model. That is,
$this->__Controller->{$model}->Image->settings[$model]['width'], or
something similar. Of course, you'll need to pass the desired model somehow,
either in the upload form or as a parameter passed from the controller to
the component.

For Thumbnails, create a separate table and associate them by image_id. The
class itself can also have a $settings array similar to that in Image, so
that you can have various sizes of thumb.

On Fri, Dec 28, 2012 at 12:44 AM, Advantage+ <movepixels@gmail.com> wrote:
> I need to figure out the best way from the backed the admin can upload
> images, the tricky part is the site has all different kinds of images
> (small product thumbs, large version, they want to be able to upload
> images into the jquery slider on the home page, images for a new
> sections, featured product on index page to name a few of the
> different sizes)
>
>
>
> And there is no way to know if they are even going to upload the right
> dimensions for each type of image.
>
>
>
> What is the best way to do this? I cannot seem to think of anything
> having a table for each_image how it relates to that page, that seems
> like the opposite of what should be done.
>
>
>
> Any idea would be great.
>
>
>
> Thanks, Dave
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP Find us on
> Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>

--
Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter
http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.



--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.



--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.