Strange error within a controller action

2013-11-26 Thread Pierre
Good evening

I am using responsiveFilemanager9 http://www.responsivefilemanager.com/with 
cakePHP to manage the image. It's great tools and it work excepted 
with the TinyMCE.

From tinyMCE when I would like to to add a image, filemanager9 is opening 
and I got an error message as this

Missing Method in FilemanagerController
  
 Error: The action admin_dialog.php is not defined in controller 
 FilemanagerController
  
 Error: Create FilemanagerController::admin_dialog.php() in file: 
 app/Controller/FilemanagerController.php.
  
 ?php
 class FilemanagerController extends AppController {
  
  
 public function admin_dialog.php() {
  
 }
  
 }
  
 Notice: If you want to customize this error message, create 
 app/View/Errors/missing_action.ctp

 
 
It's strange because it asks an action call

public function admin_dialog.php()  (with a .php)

I tryed to create taht function but of course it did not work

Do you have an idea, how I can solved that problem?

Cheers

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Multitable problem

2013-02-11 Thread Jean-Pierre Bolengo
Hello all together
I've the follwoing problem:
1. I have a customer table with adresses
2. I have a orders table
1. - 2. One cutomer may have many orders, one order belongs to one 
customer

3. I have a supplier
4. Each supplier has different glasses
5. Each glass may have a color 
6. Each glass may have a tint

3. - 4. One supplier may have many glasses, one glass belongss to one 
customer
4. - 5. Multiple glasses may have multiple colors
4. - 6. Multiple glasses may have multiple tints

So how can I realize this with cakePHP?

Thank you for your help
Jean-Pierre 

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Tests - Fixture does not truncate tables

2012-05-23 Thread Pierre Boutet
Hi,

I am using Cake Tests, on cake 2.1.1 (upgraded from cake 1.3) and I
have a problem : when running tests, tables are not truncated after
each test.

I use the params $dropTables = false; because I don't want create
tables before each test, only fill them and truncate after tests.

I don't find how to force truncate in my app, but I do it by modifying
CakePhp code, in file Cate/TestSuite/Fixture/CakeFixtureManager.php :
I modify function unload() like this : (added lines are the ones
begining by # )
public function unload(CakeTestCase $test) {
$fixtures = !empty($test-fixtures) ? $test-fixtures : array();
foreach (array_reverse($fixtures) as $f) {
if (isset($this-_loaded[$f])) {
$fixture = $this-_loaded[$f];

if (!empty($fixture-created)) {
foreach ($fixture-created as $ds) {
$db = 
ConnectionManager::getDataSource($ds);
debug($fixture-truncate($db));
}
}
# else {
# $db = ConnectionManager::getDataSource($fixture-useDbConfig);
# $fixture-truncate($db);
# }
}
}
}

Is it a bug in Cake lib or did I miss something ?

-- 
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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Unexpected clear of cached elements

2011-11-29 Thread Pierre UNGLAS
Hello,

I can see in my app\tmp\cache\views that all the elements that I Have
cached create in this folder a cached view. The problem is that these
cached views seems to have a very short time of life and even
sometimes they disappear.
For the moment I couldn't find what happen.

The debug level of core.php is set to 0.

Can you help me to find what is happenning ?

-- 
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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: 2.0 Cheat Sheet pdf

2011-11-10 Thread Kervin L. Pierre
This cheatsheet is great,  if anyone updates it for 2.0 please post

Best regards,
Kervin


From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of 
Justin Edwards
Sent: Thursday, November 10, 2011 11:29 AM
To: cake-php@googlegroups.com
Subject: Re: 2.0 Cheat Sheet pdf

That is very cool.  If someone makes a personal one for 2.0, I would be 
interested. 
On Thu, Nov 10, 2011 at 9:06 AM, Yves S. Garret yoursurrogate...@gmail.com 
wrote:
Yup, it's right here.

http://cakephp.org/files/Resources/CakePHP-1.2-Cheatsheet.pdf

Where is the one for 1.3 and 2.0?

amykhar, you're better off using the old one as a template and building on top 
of that for 2.0

On Thu, Nov 10, 2011 at 9:41 AM, Benni Graf bennig...@gmail.com wrote:
http://lmgtfy.com/?q=cakephp+cheatsheet

:-)
-- 
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+unsubscr...@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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Privacy Behavior

2010-09-15 Thread Pierre Lechelle
Hello,

In my application, i have a model named Privacy who define if a user
can access or not to an element.

For the moment, i've created a function in my AppController who
returns me all the conditions to retrieve only the elements that the
user can see.

I want to simplify this method. I've tried :
- Override the find function in AppModel (can't access to user_id)
- Creating a Behavior (can't access to user_id and can't modify
conditions)

I just want to modify the conditions of all models attached to this
behavior.

Thank's in advance for your help

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Reasons for moving from the MIT license to the 3-clause BSD one

2009-07-16 Thread Pierre MARTIN

Hi all!
Cake3 is a wonderful project, and you might know that I really like
it :o)

However I just notice that the license will be changed from MIT to the
3-clause BSD one, which is a bit obscure to me. As a developer who
made a quick topology of FLOSS licenses, I do not see the difference
between these two licenses as they both are not copylefted.

It would be awesome if someone could explain to the curious guy I am
what are the differences between these two licenses, and the reason of
this choice.

Thanks in advance!
Pierre
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Poll: what do you hate about CakePHP?

2009-05-19 Thread Pierre MARTIN

+1 for the MeioUpload behavior and its seamless integration ... or
something similar to be included int the core behaviors.

On 19 mai, 07:17, DanielMedia danielmedi...@gmail.com wrote:
 +1 with Matt Curry on this:

 Remove Model::recursive.  All find calls would return just the model
 and if you wanted associated models you HAVE TO use Containable.

 - Built in functionality for custom find types. Right now there are
 some nice hacks that you can put into your AppModel to define your own
 custom find types but this should work out of the box.

 - The MEIO upload behavior (or something like it) could be added to
 the core. That behavior has greatly simplified managing uploads for me
 and is quite flexible.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Poll: what do you hate about CakePHP?

2009-05-13 Thread Pierre MARTIN

+1 for a slug automagical field !

On 13 mai, 05:47, Reuben Helms reuben.he...@gmail.com wrote:
 Cake PHP is leaps and bounds ahead of what I used to use, but I'd like to
 see...
 * Improved support for Search Engine Friendly URLs.  There are many types of
 SEF, and while there are already published versions of a few of them, I'd
 like to see some core support, so that a new revision of Cake doesnt break
 them. Types of SEF support I'd like to see are:
   * SEF Slug additions.  This is the one that usually gets used. The a
 search engine friendly slug is appended to the URL. i.e.
 /controller/view/1/my-content-title
   * SEF Slug replacements.  This is were the id gets replaced with a SEF
 slug.  i.e. /controller/view/my-content-title maps to /controller/view/1
   * Virtual Paths.  This is where a controller/action/id gets mapped to a
 virtual path.  Probably the trickiest to do, and perhaps well beyond the
 scope of supporting in Cake Core.  The path would be mapped to a
 controller/action/id on the way in, and links would be recognised and
 converted on the way out.

 * Naming of helpers.  Often, I need to overload the Form or HTML helper with
 custom actions, or additional actions. When I do this, I have a
 CustomFormHelper that extends the default FormHelper, but I then have to
 reference the newer helper via $customForm.  Given that I'm extending
 FormHelper, and still have access to all of those functions provided to it,
 I'd like to specify that $form references CustomFormHelper.  Downside of
 this is that the programmer becomes partially responsible for resolving for
 variable conflicts if they incorrectly name something, or have a helper in
 the app controller that conflicts with a helper name in the actual
 controller.

 On Fri, May 8, 2009 at 8:29 AM, Nate nate.ab...@gmail.com wrote:

  Well, maybe hate's a strong word.  Let's say, what do you like the
  least?  Kind of an odd question, I know, but since we've kick-started
  development of a new version, I'd like to know what the most
  frustrating things with the framework are, even if they're things we
  can't fix right away.

  I'll get us started: PHP 4 support.

  Who's next? TIA for the input.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Poll: what do you hate about CakePHP?

2009-05-12 Thread Pierre MARTIN

Thanks (again) nate for this opening to the community !

My 2 cents :
- CakePHP (Several good things have already been said so I kept the
most important to me)
+ No namespaces : CakePHP 2.0 must be PHP5.3+
+ Better plugin management : dependencies management, versions, some
API changes (HTMLHelper ...) to make it easier to use in plugins
+ Bake might permit to choose the application language
+ A CoffeeBehavior ... because it's a shame to not have a good coffee
to go with a beautiful Cake :o)

- Community
+ More tolerance towards ticket openers : I saw many people totally
hate you guys because their tickets go won't fix because a test was
missing ... everyone can't spend 2 hours on a ticket, it has to be
understood otherwise no more feedbacks !
+ Missing a Uber-Bakery containing official plugins, behaviors ...
with their SCM. The place where one can find the right code when he
needs it. Note: it does not means that a messy bakery is not useful,
but in my opinion the community needs a place to find the best plugins
and behaviors to contribute instead of reinventing the wheel.
+ Less tools but more homogeneity : tools are not clear enough for
newcomers (or not so good english speakers). Between thechaw, bakery,
cake, cakeforge, IRC, Google group, CakePlanet (blogs), Ohloh, twitter
(etc.) it's hard to follow everything without missing important
announcements.
+ (Last but not least ^^) Include local communities for communication
purposes. As one of the french community leader, I cannot read all the
google groups messages or announcement or other discussions because we
have our own forum with people to help, discussions, tutorials to
maintain and several other things. However, it would be great if this
kind of discussion was broadcasted through local communities along
with announcements. PROPOSAL = send an email to each community
contact (e.g cakephp-translators mailing-list) when an important
announcement is made so we can transmit it to our communities.
... and my multi-language Cake with built-in translations !

Thanks again for this interesting discussion, I hope a summary of all
these points will be communicated elsewhere.
I love CakePHP and its developers, thank you for everything which has
been done ...

Pierre (aka real34)

On 12 mai, 22:18, yodi y...@yodi.web.id wrote:
 1. PHP 4 Support *let's make CakePHP more fast with full PHP 5
 2. Prototype and Scriptlous * it's better using Jquery
 3. No CounterCache HABTM
 4. Complex and heavy ACL * it's works to me but very hard for newbie
 5. Still not effective form helper html

 imagine how long code using form helper for link of image like this :
 lt;a href=gt;imglt;/agt;

 On Thu, 2009-05-07 at 15:29 -0700, Nate wrote:
  Well, maybe hate's a strong word.  Let's say, what do you like the
  least?  Kind of an odd question, I know, but since we've kick-started
  development of a new version, I'd like to know what the most
  frustrating things with the framework are, even if they're things we
  can't fix right away.

  I'll get us started: PHP 4 support.

  Who's next? TIA for the input.
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Poll: what do you hate about CakePHP?

2009-05-08 Thread Pierre MARTIN

Good initiative !

This poll has been relayed on the french forum (http://forum.cakephp-
fr.org/viewtopic.php?pid=3340).
I'll send you a summary in the next few days !

Pierre

On 8 mai, 14:28, jstein jst...@image.dk wrote:
 On May 8, 10:39 am, Affinity goo...@affinitywebsolutions.co.uk
 wrote:

  Lack of a good, proper support forum.

 I'll vote for that too. I would surely be more active, if the forum
 had an NNTP-interface.

   Regards

     Jonathan
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Distributing a translation memory of the CookBook

2009-04-24 Thread Pierre MARTIN

Hi nuto,

We also plan to share our French TM across French translators, and I
would be interested in the information you have about it.
Did you find an easy collaborative way for sharing it with a seamless
OmegaT integration?

Thanks in advance for the information you will provide, be sure it
will help us!
Pierre

On 26 fév, 16:00, nuto akaimuras...@gmail.com wrote:
 Hi Gwoo,

 Thank you very much for your reply.
 I will distribute a TM for the Japanesetranslation.
 It will be great help to other translators and Japanese bakers.

 Sincerely yours

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP in Google Summer of Code

2009-03-12 Thread Pierre MARTIN

Or something oriented MDD.
For example 
http://linux.softpedia.com/get/Programming/Code-Generators/DBDesigner-4-Scaffold-Tools-for-CakePHP-30893.shtml
Or even better, working on real MDA tools by extending this Acceleo
plugin : http://www.acceleo.org/pages/uml2-to-php-generator/en

That would definitely make CakePHP the best framework ever !
Pierre

On 12 mar, 15:00, jcorrea javier.cor...@gmail.com wrote:
 Why not do something about cake's performance?

 On 11 mar, 13:14, Diego Caro A. diegoc...@gmail.com wrote:

  Hello everyone,
             today I went to a talk by Google Summer of Code[1], a
  google program for open source projects. This program offers student
  developers stipends to write code.

  Well, I want CakePHP in Google SoC. For this, we need a send a
  proposal with ideas to Google with a mentor (dedicated to the new
  developer guide), more info at [2].

  My first idea for develop in this program are:
   - Mechanism to search into different models (like
  searchable-behaviour-for-cakephp [3]) for mysql and postgresql.

  Now, we need ideas, get a mentor and submit CakePHP into Google SoC

  Bye, and discuss this!.

  [1]:http://code.google.com/soc/
  [2]:http://socghop.appspot.com/
  [3]:http://code.google.com/p/searchable-behaviour-for-cakephp/
  --
  Diego Caro A.
  Estudiante Ing. Civil Informática

  diegocaro |http://diego.bloog.cl

  No tengo talentos especiales, pero sí soy
   profundamente curioso, Albert Einstein.

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Duplicate a CakePHP project

2008-07-17 Thread Pierre MARCOURT
Hi,

I made a project in CakePHP for my company at : 
http://www.website.com/myproject
The thing is the company does not use CakePHP, so I had to install it in 
the directory /myproject
The project was supposed to be used only by my company, but, victim of 
his success ;-), I have to set up the same project for another company 
at http://www.website.com/project-orther-company
The thing is, i don't want to duplicate all my files, because if I make 
an update, i will have to do it twice (and maybe more if I have to set 
it up for more company).
The main difference is the connection to the database, because we don't 
want them to use the same as us.
Plus, in my JavaScript files the path will change, /myproject should be 
replaced by /project-orther-company
I don't know if there is an easy way to do that thanks to CakePHP ?

Thanks for your help

-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


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



Send text/plain email using PHPMailer

2008-07-17 Thread Pierre MARCOURT
Hi,

I try to send an text/plain email via PHPMailer but it continues to send 
it in HTML.
I tried this :
$this-Email-sendAs = 'text';
$this-Email-subject = test;
$this-Email-to = [EMAIL PROTECTED];
$this-Email-Body = this is a test;
$this-Email-send();

I keep receiving it in HTML with my default email template.
I hope that someone can help me..

Thanks.

-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
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: Duplicate a CakePHP project

2008-07-17 Thread Pierre MARCOURT
Thanks for the answers.
I am going to check that and see what is the easiest way...


BrendonKoz wrote:
 ...or you could use mod_rewrite.  :)

 The difficulty would be detecting the path for your core database
 config to determine which database to use depending on the requested
 path.  I can't currently see how it could be done, but I don't think
 it would require all that much work so long as all of the files will
 in fact remain exactly the same but with different images/js/css and
 database data.


 On Jul 17, 11:20 am, the_woodsman [EMAIL PROTECTED] wrote:
   
 I'm sure Cake could make this easier, but I believe it's the wrong
 tool for the job.

 You want to be using version control, i.e subversion.
 You can then easily branch your code for myproject, and merge changes
 from one app to the other as you need.

 On Jul 17, 1:44 pm, Pierre MARCOURT [EMAIL PROTECTED] wrote:

 
 Hi,
   
 I made a project in CakePHP for my company at 
 :http://www.website.com/myproject
 The thing is the company does not use CakePHP, so I had to install it in
 the directory /myproject
 The project was supposed to be used only by my company, but, victim of
 his success ;-), I have to set up the same project for another company
 athttp://www.website.com/project-orther-company
 The thing is, i don't want to duplicate all my files, because if I make
 an update, i will have to do it twice (and maybe more if I have to set
 it up for more company).
 The main difference is the connection to the database, because we don't
 want them to use the same as us.
 Plus, in my JavaScript files the path will change, /myproject should be
 replaced by /project-orther-company
 I don't know if there is an easy way to do that thanks to CakePHP ?
   
 Thanks for your help
   
 --
  *Pierre MARCOURT*
   
 *IT Department*
 *CableOrganizer.com*
 5610 NW 12th Ave, suite 214
 Fort Lauderdale, FL 33304
   
 Phone: 954-861-6310
 Fax: 954-861-2001
   
 
   


-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
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: Duplicate a CakePHP project

2008-07-17 Thread Pierre MARCOURT
Thanks Daniel,
i think your article deals exactly with my problem.


Daniel Hofstetter wrote:
 Hi Pierre,

   
 I made a project in CakePHP for my company at 
 :http://www.website.com/myproject
 The thing is the company does not use CakePHP, so I had to install it in
 the directory /myproject
 The project was supposed to be used only by my company, but, victim of
 his success ;-), I have to set up the same project for another company
 athttp://www.website.com/project-orther-company
 The thing is, i don't want to duplicate all my files, because if I make
 an update, i will have to do it twice (and maybe more if I have to set
 it up for more company).
 The main difference is the connection to the database, because we don't
 want them to use the same as us.
 Plus, in my JavaScript files the path will change, /myproject should be
 replaced by /project-orther-company
 I don't know if there is an easy way to do that thanks to CakePHP ?
 

 Maybe this article helps you: 
 http://cakebaker.42dh.com/2007/11/10/one-application-multiple-configurations/

 --
 Daniel Hofstetter
 http://cakebaker.42dh.com
 
   


-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


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



Send text/plain Email using CRON

2008-07-16 Thread Pierre MARCOURT
Hello,

I am currently running a Cron file to execute a CakePHP controller.
The Cron file runs every minute and has to send reminders by email.
For that, I use PHPMailer and the users receive an HTML email. So it 
works great.

But, at the same time I send a HTML email I need to send a text/plain 
email for text message reminder. The thing is, it keeps sending the 
email in HTML even if I put : $this-Email-sendAs = 'text'; or 
$this-Email-IsHTML(false);

So I tried to send an email via the mail() PHP function but it does not 
works. No email are sent.
But if i run the Cron file manually, the email will be sent as I want.

Is there something wrong with mail() PHP function in CakePHP ? Or do you 
know what I should do with PHPMailer to send text/plain email ?

Thanks.

-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


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



Call JavaScript function in Ajax view

2008-07-15 Thread Pierre MARCOURT
Hello,

I am using CakePHP v1.1 and it seems that for some reason, I am not able 
to call JavaScript function in an Ajax View.
Is there something I have to do for that ?

Thanks.

-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


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



set debug to 2 regarding the user connected otherwise set it to 0

2008-07-07 Thread Pierre MARCOURT
Hello all,

I would like to know if it is possible to set the debug to a certain 
value regarding the user who is connected.
I put my project in test today, so my company can test it but I don't 
want them to see all the debug stuff.
But me, I would like to see it.
To connect to my project, there is an identification, is there a chance 
that i can do something like this :

if($user == me) { set(debug) to 2 }

It maybe an easy question, but I did not find out a way to do that...
So if you have an idea, it would be great !

Thanks

-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
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: set debug to 2 regarding the user connected otherwise set it to 0

2008-07-07 Thread Pierre MARCOURT
Thanks a lot Daniel.
That's just what i needed.


Daniel Hofstetter wrote:
 Hi Pierre,

   
 I would like to know if it is possible to set the debug to a certain
 value regarding the user who is connected.
 I put my project in test today, so my company can test it but I don't
 want them to see all the debug stuff.
 But me, I would like to see it.
 To connect to my project, there is an identification, is there a chance
 that i can do something like this :

 if($user == me) { set(debug) to 2 }

 It maybe an easy question, but I did not find out a way to do that...
 So if you have an idea, it would be great !
 

 Configure::write('debug', 2);

 --
 Daniel Hofstetter
 http://cakebaker.42dh.com
 
   


-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


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



Error using Cron

2008-06-24 Thread Pierre MARCOURT
Hello all,

i have an error using Cron and CakePHP...**

I have defined a cron_dispatcher.php file in my app/webroot/ (cf. 
http://www.lost-in-code.com/27/cakephp-crontab/ and 
http://bakery.cakephp.org/articles/view/calling-controller-actions-from-cron-and-the-command-line)
 but I have an issue and I don't understand why.

My command in my cron file is :


/usr/local/bin/php -q 
/home/lifeorganizers/www/taskmanager/app/webroot/cron_dispatcher.php 
/tasks/cron/

And i receive an error email from Cron which contains :

PHP Fatal error: Cannot redeclare loadmodels() (previously declared 
in /home/lifeorganizers/www/taskmanager/cake/basics.php:113) in 
/home/lifeorganizers/www/taskmanager/cake/basics.php on line 142

Fatal error: Cannot redeclare loadmodels() (previously declared in 
/home/lifeorganizers/www/taskmanager/cake/basics.php:113) in 
/home/lifeorganizers/www/taskmanager/cake/basics.php on line 142

If someone has an idea, it would be great ?!

Thanks for your help.
-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
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: email headers visible in content of message?

2008-06-20 Thread Pierre MARTIN

Thank you very much jsntv200 !!
It works perfectly ...

Pierre

On 20 juin, 15:56, jsntv200 [EMAIL PROTECTED] wrote:
 I won't mention the wasted hours I spent trying to resolve this one,
 so thought i'd save you some pain. Basically boils down to line
 breaks.

 The email component has them set as :

 $_newLine = \r\n;

 Setting it to '\n' seemed to fix it for me.

 $this-Email-_newLine = \n;

 I do an svn update most days to grab the latest cake updates and
 noticed that the line breaks in v7220 of the email component is now
 set to \n, so the problem should be fixed in a future release.

 cheers
 jason

 On Jun 19, 2:08 am, aranworld [EMAIL PROTECTED] wrote:

  When sending email with the Email Component, some of my emails include
  the following types of headers in the body of the message:

  
  Content-Type: text/plain; charset=UTF-8

  Content-Transfer-Encoding: 7bit
  Message-Id: [EMAIL PROTECTED]
  Date: Wed, 18 Jun 2008 11:01:31 -0500 (CDT)
  

  Anyone know if there is a way via CakePHP to prevent these headers
  from appearing in the recieved messages?  It happens in both text and
  html email.

  -Aran
--~--~-~--~~~---~--~~
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: email headers visible in content of message?

2008-06-19 Thread Pierre MARTIN

Hello aranworld,

I've got the same kind of problem (http://bin.cakephp.org/view/
743099631).
Thus I'm interested in your solution ... and if this is a bug to fix,
I hope somebody will read these page.

If somebody needs further information, I'll be there.
Pierre MARTIN

On 18 juin, 18:08, aranworld [EMAIL PROTECTED] wrote:
 When sending email with the Email Component, some of my emails include
 the following types of headers in the body of the message:

 
 Content-Type: text/plain; charset=UTF-8

 Content-Transfer-Encoding: 7bit
 Message-Id: [EMAIL PROTECTED]
 Date: Wed, 18 Jun 2008 11:01:31 -0500 (CDT)
 

 Anyone know if there is a way via CakePHP to prevent these headers
 from appearing in the recieved messages?  It happens in both text and
 html email.

 -Aran

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



Email CakePHP

2008-06-17 Thread Pierre MARCOURT
Hello,

I am using PHPMailer and i have an issue when the email is sent.
When the user forgot is password, I generate another one and I send it 
to him.
The thing is, when he submits the form, my view disappear.

If i try this :
$this-Email-send();
$this-set('msg', 'The email has been successfully sent');
I never see the message and my form disappear.

If i try this :
$this-Email-send();
$this-Session-setFlash('The email has been successfully sent');
$this-redirect('/users/forgotpwd'); //the same view
exit();
It works but I cannot write a message via $this-Session-setFlash('The 
email has been successfully sent'); because I am using Ajax when I call 
the others view : registration and login. So the message is always 
present, and i don't want that.

I would like that my form does not disappear when the user submit the 
form. And I know that it is due to the line $this-Email-send(); 
because if I comment it, the message The email has been successfully 
sent is displayed and my form present.

Does Someone know what i should do to fix this ?

Thanks for your help

-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


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



UTF-8 : I don't get it !

2008-06-10 Thread Pierre MARCOURT
Hi,

I have just uploaded my CakePHP project on a remote server but I meet an 
issue.
In all my views, I get the text    on the top.
I know this is a problem (on FF) regarding to the character encoding 
(cf. 
http://groups.google.com/group/cake-php/browse_thread/thread/28f129e2d31ea263) 
but in local, I don't have this problem !
Moreover, in my default.thtml layout I set the character encoding thanks 
to : ?php echo $html-charsetTag('UTF-8').\n; ?
If I look at the source code, I have the meta UTF-8 defined.
But if I check the character encoding of my FF browser, it is : Western 
(ISO-8859-1).
Plus, it is working well on IE 7 and Safari 3.1.1.
Finally in my editor : Dreamweaver (Sorry, cf 
http://groups.google.ch/group/cake-php/browse_thread/thread/392484f521fd3f87/aca9db69f8f18aca?lnk=raot)
 
I have set up character encoding at UTF-8 without BOMs.

Please help me because I don't have more idea to fix this.

Regards,

-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
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: UTF-8 : I don't get it !

2008-06-10 Thread Pierre MARCOURT
I double checked and I noticed something strange.
If I set the character encoding to UTF-8 without BOM via an editor and 
then I upload it on the remote server, when I download the same file 
from the remote server and open it with the same editor, the character 
encoding of this file is not UTF-8 anymore but ISO.
I checked that because I don't have any trouble about character encoding 
on local, and this problem happened when I uploaded all my project on a 
remote server.

I have to set up cakephp in a particular folder, let's say /cake/
So you can find my project at http://www.my-web-site.com/cake/
The rest of the website http://www.my-web-site.com is encoding with 
Western (ISO).
Could it be the source of my trouble ? Is this a problem regarding the 
configuration of PHP ?
The thing is, I don't have access to any files, I am just allow to work 
in my /cake/ folder...


Marcin Jaworski wrote:

 On 10 Cze, 16:23, Pierre MARCOURT [EMAIL PROTECTED] wrote:
   
 Hi,

 I have just uploaded my CakePHP project on a remote server but I meet an
 issue.
 In all my views, I get the text    on the top.
 I know this is a problem (on FF) regarding to the character encoding
 (cf.http://groups.google.com/group/cake-php/browse_thread/thread/28f129e2...)
 but in local, I don't have this problem !
 Moreover, in my default.thtml layout I set the character encoding thanks
 to : ?php echo $html-charsetTag('UTF-8').\n; ?
 If I look at the source code, I have the meta UTF-8 defined.
 But if I check the character encoding of my FF browser, it is : Western
 (ISO-8859-1).
 Plus, it is working well on IE 7 and Safari 3.1.1.
 Finally in my editor : Dreamweaver (Sorry, 
 cfhttp://groups.google.ch/group/cake-php/browse_thread/thread/392484f52...)
 I have set up character encoding at UTF-8 without BOMs.

 Please help me because I don't have more idea to fix this.

 Regards,

 

 The problem with page charset is because PHP sends HTTP Header
 Content-Type: text/html; charset=iso-8859-1. You could try and
 override the default_charset php ini parameter by calling this as
 early as possible:

 ini_set('default_charset', '');

 This will clear the default charset setting in php and allow to set
 the charset by http equiv tag in page header.
 

   


-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
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: UTF-8 : I don't get it !

2008-06-10 Thread Pierre MARCOURT
Thanks Marcin,

I am still having this problem.
I tried what you say but it is the same.
I did the comment, and I also add the line in the bootstrap.php but it 
does not work.
I don't get it...


Marcin Jaworski wrote:
 The problem with UTF-8 is that you can't autodetect that the file is
 using this charset until you use characters from outside the ascii
 range. UTF-8 uses 1-byte encoding for this range and it isn't much
 different from ISO then. When you use some characters from outside of
 ASCII charset then UTF-8 encodes those characters using two bytes. If
 you use files without BOM, then the only way to detect if file is
 UTF-8 encoded is to check if it contains any 2-byte encoded
 characted.

 Dreamweaver does that exactly in the same way. You probably don't have
 any 2-byte character in your source so DW won't detect the file as
 UTF-8. Do the test: put a comment inside some php file and place some
 non-ascii characters in it. For example (at the end are some polish
 characters, hope you will see them):
 // this is a test ąśćżźó

 Save the file with this comment as UTF-8, send it to the server and
 then try to open it with DW. You will see that it will open as UTF-8.

 About the page encoding problem: you don't need to edit any server
 configuration file. Open app/config/bootstrap.php file and add at the
 end:
 ini_set('default_charset', '');

 This should do the trick.

 On 10 Cze, 17:37, Pierre MARCOURT [EMAIL PROTECTED] wrote:
   
 I double checked and I noticed something strange.
 If I set the character encoding to UTF-8 without BOM via an editor and
 then I upload it on the remote server, when I download the same file
 from the remote server and open it with the same editor, the character
 encoding of this file is not UTF-8 anymore but ISO.
 I checked that because I don't have any trouble about character encoding
 on local, and this problem happened when I uploaded all my project on a
 remote server.

 I have to set up cakephp in a particular folder, let's say /cake/
 So you can find my project athttp://www.my-web-site.com/cake/
 The rest of the websitehttp://www.my-web-site.comis encoding with
 Western (ISO).
 Could it be the source of my trouble ? Is this a problem regarding the
 configuration of PHP ?
 The thing is, I don't have access to any files, I am just allow to work
 in my /cake/ folder...



 Marcin Jaworski wrote:

 
 On 10 Cze, 16:23, Pierre MARCOURT [EMAIL PROTECTED] wrote:
   
 Hi,
 
 I have just uploaded my CakePHP project on a remote server but I meet an
 issue.
 In all my views, I get the text    on the top.
 I know this is a problem (on FF) regarding to the character encoding
 (cf.http://groups.google.com/group/cake-php/browse_thread/thread/28f129e2...)
 but in local, I don't have this problem !
 Moreover, in my default.thtml layout I set the character encoding thanks
 to : ?php echo $html-charsetTag('UTF-8').\n; ?
 If I look at the source code, I have the meta UTF-8 defined.
 But if I check the character encoding of my FF browser, it is : Western
 (ISO-8859-1).
 Plus, it is working well on IE 7 and Safari 3.1.1.
 Finally in my editor : Dreamweaver (Sorry, 
 cfhttp://groups.google.ch/group/cake-php/browse_thread/thread/392484f52...)
 I have set up character encoding at UTF-8 without BOMs.
 
 Please help me because I don't have more idea to fix this.
 
 Regards,
 
 The problem with page charset is because PHP sends HTTP Header
 Content-Type: text/html; charset=iso-8859-1. You could try and
 override the default_charset php ini parameter by calling this as
 early as possible:
   
 ini_set('default_charset', '');
   
 This will clear the default charset setting in php and allow to set
 the charset by http equiv tag in page header.
   
 --
  *Pierre MARCOURT*  

 *IT Department*
 *CableOrganizer.com*
 5610 NW 12th Ave, suite 214
 Fort Lauderdale, FL 33304

 Phone: 954-861-6310
 Fax: 954-861-2001
 
 

   


-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
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: UTF-8 : I don't get it !

2008-06-10 Thread Pierre MARCOURT
Thank you all !
Finally, thanks to the last tip from Jonathan I added  
*ini_set('default_charset', 'utf-8');*  instead of  
ini_set('default_charset', '');  and now it is working well !!!
Thank you very much!



Jonathan Snook wrote:
 I think it'd be more appropriate to be explicit:

 ini_set('default_charset', 'utf-8');

 Alternatively, you can set the charset manually using:
 header('Content-type: text/html; charset=utf-8');

 -Jonathan

 On Tue, Jun 10, 2008 at 1:34 PM, Pierre MARCOURT
 [EMAIL PROTECTED] wrote:
   
 Thanks Marcin,

 I am still having this problem.
 I tried what you say but it is the same.
 I did the comment, and I also add the line in the bootstrap.php but it does
 not work.
 I don't get it...


 Marcin Jaworski wrote:

 The problem with UTF-8 is that you can't autodetect that the file is
 using this charset until you use characters from outside the ascii
 range. UTF-8 uses 1-byte encoding for this range and it isn't much
 different from ISO then. When you use some characters from outside of
 ASCII charset then UTF-8 encodes those characters using two bytes. If
 you use files without BOM, then the only way to detect if file is
 UTF-8 encoded is to check if it contains any 2-byte encoded
 characted.

 Dreamweaver does that exactly in the same way. You probably don't have
 any 2-byte character in your source so DW won't detect the file as
 UTF-8. Do the test: put a comment inside some php file and place some
 non-ascii characters in it. For example (at the end are some polish
 characters, hope you will see them):
 // this is a test ąśćżźó

 Save the file with this comment as UTF-8, send it to the server and
 then try to open it with DW. You will see that it will open as UTF-8.

 About the page encoding problem: you don't need to edit any server
 configuration file. Open app/config/bootstrap.php file and add at the
 end:
 ini_set('default_charset', '');

 This should do the trick.

 On 10 Cze, 17:37, Pierre MARCOURT [EMAIL PROTECTED] wrote:


 I double checked and I noticed something strange.
 If I set the character encoding to UTF-8 without BOM via an editor and
 then I upload it on the remote server, when I download the same file
 from the remote server and open it with the same editor, the character
 encoding of this file is not UTF-8 anymore but ISO.
 I checked that because I don't have any trouble about character encoding
 on local, and this problem happened when I uploaded all my project on a
 remote server.

 I have to set up cakephp in a particular folder, let's say /cake/
 So you can find my project athttp://www.my-web-site.com/cake/
 The rest of the websitehttp://www.my-web-site.comis encoding with
 Western (ISO).
 Could it be the source of my trouble ? Is this a problem regarding the
 configuration of PHP ?
 The thing is, I don't have access to any files, I am just allow to work
 in my /cake/ folder...



 Marcin Jaworski wrote:



 On 10 Cze, 16:23, Pierre MARCOURT [EMAIL PROTECTED] wrote:


 Hi,


 I have just uploaded my CakePHP project on a remote server but I meet an
 issue.
 In all my views, I get the text    on the top.
 I know this is a problem (on FF) regarding to the character encoding
 (cf.http://groups.google.com/group/cake-php/browse_thread/thread/28f129e2...)
 but in local, I don't have this problem !
 Moreover, in my default.thtml layout I set the character encoding thanks
 to : ?php echo $html-charsetTag('UTF-8').\n; ?
 If I look at the source code, I have the meta UTF-8 defined.
 But if I check the character encoding of my FF browser, it is : Western
 (ISO-8859-1).
 Plus, it is working well on IE 7 and Safari 3.1.1.
 Finally in my editor : Dreamweaver (Sorry,
 cfhttp://groups.google.ch/group/cake-php/browse_thread/thread/392484f52...)
 I have set up character encoding at UTF-8 without BOMs.


 Please help me because I don't have more idea to fix this.


 Regards,


 The problem with page charset is because PHP sends HTTP Header
 Content-Type: text/html; charset=iso-8859-1. You could try and
 override the default_charset php ini parameter by calling this as
 early as possible:


 ini_set('default_charset', '');


 This will clear the default charset setting in php and allow to set
 the charset by http equiv tag in page header.


 --
  *Pierre MARCOURT*

 *IT Department*
 *CableOrganizer.com*
 5610 NW 12th Ave, suite 214
 Fort Lauderdale, FL 33304

 Phone: 954-861-6310
 Fax: 954-861-2001




 --
  Pierre MARCOURT

 IT Department
 CableOrganizer.com
 5610 NW 12th Ave, suite 214
 Fort Lauderdale, FL 33304


 Phone: 954-861-6310
 Fax: 954-861-2001
 

 

   


-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake

UNION CakePHP/MySQL

2008-05-16 Thread Pierre MARCOURT
Hi,

I would like to make a MySQL request with an UNION but I can't find out 
a way to do it by using CakePHP methods.
I looked at Google but it seems that the only way to do it is to make a 
custom request by using /query()/.
But I don't want to do it that way because I need the recursive option 
that we can have with /find()/ or /findAll()/.
So, to make it works, I am doing 2 different requests (by using 
/findAll()/) and I merge the 2 results in a array().
To be honest, I don't like my idea at all.

I would like to know if there is another way to do it better ?

Thanks.

-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
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: UNION CakePHP/MySQL

2008-05-16 Thread Pierre MARCOURT
Here are the requests I am doing :

$tab1 = $this-Task-findAll('user_id = ' . $user_id . ' AND duedate = 
' . date('Y-m-d') . '', null, 'duedate ASC');
$tab2 = $this-Task-findAll('alternate_id = ' . $user_id . ' AND 
user_id != '.$user_id.' AND duedate = ' . date('Y-m-d') . '', null, 
'duedate ASC');
$tasks = array_merge($tab1, $tab2);
$this-set('tasks', $tasks);

I don't like that way, because I am using twice /findAll()/ on the same 
table and for only one result at the end.
That's why I was wondering if there is a way to do it better.

I think that your example is better than mine because you are doing a 
simple query ($tmp) to get the ids (this query should not take too long) 
and then the /findAll()/ query.
I don't like my way because, by using twice /findAll()/, my requests 
could take too long for a lot of rows... And I don't see how to rewrite 
it without using UNION because there is the condition user_id != 
'.$user_id.' in the 2nd one which is the contrary of 'user_id = ' . 
$user_id . ' in the first one...

Anyway, thanks for you help !


grigri wrote:
 In a word, no.

 In a UNION, MySQL does not return any table information with each
 column [since it can't, because a union can be from different tables],
 and cakephp's dbo_mysql class relies on this information to map the
 result rows to the originating model (think left joins).

 What exactly is the query you're trying to produce? There must be a
 way to rewrite it to not use a union (which are not usually that
 efficient anyway).

 If the union query you're creating is from the same table, you could
 always perform the union as a query(), but only return the row ids,
 then use Set::extract() on the result to get the ids into a flattened
 list, then call findAll with the id list:

 $tmp = $this-query('SELECT Product.id FROM [complicated sql] UNION
 SELECT Product.id FROM [complicated sql]');
 $ids = Set::extract($tmp, '{n}.0.id');
 $products = $this-findAll(array('Product.id' = $ids));

 hth
 grigri

 On May 16, 2:17 pm, Pierre MARCOURT [EMAIL PROTECTED] wrote:
   
 Hi,

 I would like to make a MySQL request with an UNION but I can't find out
 a way to do it by using CakePHP methods.
 I looked at Google but it seems that the only way to do it is to make a
 custom request by using /query()/.
 But I don't want to do it that way because I need the recursive option
 that we can have with /find()/ or /findAll()/.
 So, to make it works, I am doing 2 different requests (by using
 /findAll()/) and I merge the 2 results in a array().
 To be honest, I don't like my idea at all.

 I would like to know if there is another way to do it better ?

 Thanks.

 --
  *Pierre MARCOURT*

 *IT Department*
 *CableOrganizer.com*
 5610 NW 12th Ave, suite 214
 Fort Lauderdale, FL 33304

 Phone: 954-861-6310
 Fax: 954-861-2001
 
 
   


-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
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: UNION CakePHP/MySQL

2008-05-16 Thread Pierre MARCOURT
It does not work...
I have a SQL Error.
Here it is :

*Notice*: Undefined offset: 0 in 
*Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on 
line *1388*
*Notice*: Undefined offset: 0 in 
*Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on 
line *1390*
*Notice*: Undefined offset: 0 in 
*Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on 
line *1393*
*Notice*: Undefined offset: 0 in 
*Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on 
line *1397*
*Notice*: Undefined offset: 0 in 
*Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on 
line *1400*
*Notice*: Undefined offset: 1 in 
*Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on 
line *1390*
*Notice*: Undefined offset: 1 in 
*Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on 
line *1393*
*Notice*: Undefined offset: 1 in 
*Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on 
line *1397*
*Notice*: Undefined offset: 1 in 
*Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on 
line *1400*

*Notice*: Array to string conversion in 
*Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on 
line *1149*
*Query:* SELECT Array, duedate ASC, `Task`. FROM `tasks` AS `Task` LEFT 
JOIN `users` AS `User` ON (`Task`.`user_id` = `User`.`id`) LEFT JOIN 
`users` AS `Assigned` ON (`Task`.`assigned_id` = `Assigned`.`id`) LEFT 
JOIN `marks` AS `Mark` ON (`Task`.`mark_user_id` = `Mark`.`mark_id`) 
LEFT JOIN `progresses` AS `Progress` ON (`Task`.`progress_id` = 
`Progress`.`progress_id`) LEFT JOIN `priorities` AS `Priority` ON 
(`Task`.`priority_id` = `Priority`.`priority_id`) WHERE all LIMIT 1
*Warning*: *SQL Error:* 1064: You have an error in your SQL syntax; 
check the manual that corresponds to your MySQL server version for the 
right syntax to use near 'ASC, `Task`. FROM `tasks` AS `Task` LEFT JOIN 
`users` AS `User` ON (`Task`.`user' at line 1 in 
*Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on 
line *440*


I try by changing your code regarding to the error but I still get a SQL 
Error...


grigri wrote:
 Try this:

 $tasks = $this-Task-find('all', array(
   'conditions' = array(
 'or' = array(
   array('user_id' = $user_id),
   array('alternate_id' = $user_id, 'user_id' = ' ' . $user_id)
 ),
 'duedate' = date('Y-m-d')
   ),
   'order' = 'duedate ASC'
 ));

 On May 16, 2:53 pm, Pierre MARCOURT [EMAIL PROTECTED] wrote:
   
 Here are the requests I am doing :

 $tab1 = $this-Task-findAll('user_id = ' . $user_id . ' AND duedate =
 ' . date('Y-m-d') . '', null, 'duedate ASC');
 $tab2 = $this-Task-findAll('alternate_id = ' . $user_id . ' AND
 user_id != '.$user_id.' AND duedate = ' . date('Y-m-d') . '', null,
 'duedate ASC');
 $tasks = array_merge($tab1, $tab2);
 $this-set('tasks', $tasks);

 I don't like that way, because I am using twice /findAll()/ on the same
 table and for only one result at the end.
 That's why I was wondering if there is a way to do it better.

 I think that your example is better than mine because you are doing a
 simple query ($tmp) to get the ids (this query should not take too long)
 and then the /findAll()/ query.
 I don't like my way because, by using twice /findAll()/, my requests
 could take too long for a lot of rows... And I don't see how to rewrite
 it without using UNION because there is the condition user_id !=
 '.$user_id.' in the 2nd one which is the contrary of 'user_id = ' .
 $user_id . ' in the first one...

 Anyway, thanks for you help !



 grigri wrote:
 
 In a word, no.
   
 In a UNION, MySQL does not return any table information with each
 column [since it can't, because a union can be from different tables],
 and cakephp's dbo_mysql class relies on this information to map the
 result rows to the originating model (think left joins).
   
 What exactly is the query you're trying to produce? There must be a
 way to rewrite it to not use a union (which are not usually that
 efficient anyway).
   
 If the union query you're creating is from the same table, you could
 always perform the union as a query(), but only return the row ids,
 then use Set::extract() on the result to get the ids into a flattened
 list, then call findAll with the id list:
   
 $tmp = $this-query('SELECT Product.id FROM [complicated sql] UNION
 SELECT Product.id FROM [complicated sql]');
 $ids = Set::extract($tmp, '{n}.0.id');
 $products = $this-findAll(array('Product.id' = $ids));
   
 hth
 grigri
   
 On May 16, 2:17 pm, Pierre MARCOURT [EMAIL PROTECTED] wrote:
   
 Hi,
 
 I would like to make a MySQL request with an UNION but I can't find out
 a way to do it by using CakePHP methods.
 I looked at Google but it seems that the only way to do it is to make a
 custom request by using /query()/.
 But I don't want to do it that way because I need the recursive option
 that we can have with /find

Re: UNION CakePHP/MySQL

2008-05-16 Thread Pierre MARCOURT
I am using 1.1 and your last code works just fine !!!
Thank you very much, it is just what I needed !


grigri wrote:
 Very odd indeed. Works fine for me... what version are you using? This
 was on a bleeding edge 1.2 but it works on older versions too.

 If you're on 1.1, try this:

 $tasks = $this-Task-findAll(
   array(
 'or' = array(
   array('user_id' = $user_id),
   array('alternate_id' = $user_id, 'user_id' = ' ' . $user_id)
 ),
 'duedate' = date('Y-m-d')
   ),
   null,
   'duedate ASC'
 ));

 On May 16, 3:23 pm, Pierre MARCOURT [EMAIL PROTECTED] wrote:
   
 It does not work...
 I have a SQL Error.
 Here it is :

 *Notice*: Undefined offset: 0 in
 *Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on
 line *1388*
 *Notice*: Undefined offset: 0 in
 *Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on
 line *1390*
 *Notice*: Undefined offset: 0 in
 *Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on
 line *1393*
 *Notice*: Undefined offset: 0 in
 *Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on
 line *1397*
 *Notice*: Undefined offset: 0 in
 *Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on
 line *1400*
 *Notice*: Undefined offset: 1 in
 *Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on
 line *1390*
 *Notice*: Undefined offset: 1 in
 *Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on
 line *1393*
 *Notice*: Undefined offset: 1 in
 *Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on
 line *1397*
 *Notice*: Undefined offset: 1 in
 *Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on
 line *1400*

 *Notice*: Array to string conversion in
 *Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on
 line *1149*
 *Query:* SELECT Array, duedate ASC, `Task`. FROM `tasks` AS `Task` LEFT
 JOIN `users` AS `User` ON (`Task`.`user_id` = `User`.`id`) LEFT JOIN
 `users` AS `Assigned` ON (`Task`.`assigned_id` = `Assigned`.`id`) LEFT
 JOIN `marks` AS `Mark` ON (`Task`.`mark_user_id` = `Mark`.`mark_id`)
 LEFT JOIN `progresses` AS `Progress` ON (`Task`.`progress_id` =
 `Progress`.`progress_id`) LEFT JOIN `priorities` AS `Priority` ON
 (`Task`.`priority_id` = `Priority`.`priority_id`) WHERE all LIMIT 1
 *Warning*: *SQL Error:* 1064: You have an error in your SQL syntax;
 check the manual that corresponds to your MySQL server version for the
 right syntax to use near 'ASC, `Task`. FROM `tasks` AS `Task` LEFT JOIN
 `users` AS `User` ON (`Task`.`user' at line 1 in
 *Z:\dev\frameworks\cake\cake\libs\model\datasources\dbo_source.php* on
 line *440*

 I try by changing your code regarding to the error but I still get a SQL
 Error...



 grigri wrote:
 
 Try this:
   
 $tasks = $this-Task-find('all', array(
   'conditions' = array(
 'or' = array(
   array('user_id' = $user_id),
   array('alternate_id' = $user_id, 'user_id' = ' ' . $user_id)
 ),
 'duedate' = date('Y-m-d')
   ),
   'order' = 'duedate ASC'
 ));
   
 On May 16, 2:53 pm, Pierre MARCOURT [EMAIL PROTECTED] wrote:
   
 Here are the requests I am doing :
 
 $tab1 = $this-Task-findAll('user_id = ' . $user_id . ' AND duedate =
 ' . date('Y-m-d') . '', null, 'duedate ASC');
 $tab2 = $this-Task-findAll('alternate_id = ' . $user_id . ' AND
 user_id != '.$user_id.' AND duedate = ' . date('Y-m-d') . '', null,
 'duedate ASC');
 $tasks = array_merge($tab1, $tab2);
 $this-set('tasks', $tasks);
 
 I don't like that way, because I am using twice /findAll()/ on the same
 table and for only one result at the end.
 That's why I was wondering if there is a way to do it better.
 
 I think that your example is better than mine because you are doing a
 simple query ($tmp) to get the ids (this query should not take too long)
 and then the /findAll()/ query.
 I don't like my way because, by using twice /findAll()/, my requests
 could take too long for a lot of rows... And I don't see how to rewrite
 it without using UNION because there is the condition user_id !=
 '.$user_id.' in the 2nd one which is the contrary of 'user_id = ' .
 $user_id . ' in the first one...
 
 Anyway, thanks for you help !
 
 grigri wrote:
 
 In a word, no.
   
 In a UNION, MySQL does not return any table information with each
 column [since it can't, because a union can be from different tables],
 and cakephp's dbo_mysql class relies on this information to map the
 result rows to the originating model (think left joins).
   
 What exactly is the query you're trying to produce? There must be a
 way to rewrite it to not use a union (which are not usually that
 efficient anyway).
   
 If the union query you're creating is from the same table, you could
 always perform the union as a query(), but only return the row ids,
 then use Set::extract() on the result to get the ids into a flattened
 list, then call

Re: UNION CakePHP/MySQL

2008-05-16 Thread Pierre MARCOURT
Yes I do.
In your code, you do a or condition. I did not think it was possible 
that way because of my second condition user_id != $user_id.
But now I know by using 'or' and '' I can make it works.
Thanks !


grigri wrote:
 I am using 1.1 and your last code works just fine !!!
 Thank you very much, it is just what I needed !
 

 Glad I could help. Do you understand *why* it works?
 
   


-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


--~--~-~--~~~---~--~~
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: Ajax + JS (unobtrusive date picker)

2008-05-09 Thread Pierre MARCOURT
Hi CakeFan,

Have you solved your problem ?
I am asking you because I have exactly the same problem as you !
I try to use the unobtrusive date picker, and in my ajax view (which is 
also a view to add a task...) the date picker is missing...
Please let me know if you have a solution.


Cake Fan wrote:
 Working with cakephp 1.2 here.  I have a somewhat simple problem that
 I can't seem to resolve with what I've found so far in the GG's..

 I have a simple page that submits a task via AJAX.  This form
 contains the unobtrusive date picker (http://bakery.cakephp.org/
 articles/view/using-the-unobtrusive-date-picker-widget-in-cakephp).

 -
 Layout header contains the necessary JS:
 ?php
 if (isset($javascript)) {
 echo $javascript-link('scriptaculous/protoculous-packer.js');
 echo $javascript-link('datepicker/datepicker.js');
 }
 ?
 -
 The view looks something like this [add_task.ctp]:

 ?php echo $ajax-form(array('action' = '/Tasks/addTask'), 'post',
 array('update' = 'task')); ?
 div id=task style=display: none;
   ?php echo $form-input('text', array('label' = false)); ?
?php echo $form-input('Task/dateOnly', array('size' = '15',
 'class' = 'w8em format-m-d-y divider-dash highlight-days-12 no-
 transparency', 'label' = false));?
?php echo $form-hour('Task/time'); ?
?php echo $form-minute('Task/minute'); ?
?php echo $form-meridian('Task/meridian'); ?
   ?php echo $form-input('category', array('label' = false)); ?
   /p
   ?php echo $form-submit('Add Task'); ?
 /div
 /form
 -

 The ajax view looks like this [ajax_add_task.ctp]:

 ?php echo $form-input('text', array('label' = false)); ?
?php echo $form-input('Task/dateOnly', array('size' = '15',
 'class' = 'w8em format-m-d-y divider-dash highlight-days-12 no-
 transparency', 'label' = false));?
?php echo $form-hour('Task/time'); ?
?php echo $form-minute('Task/minute'); ?
?php echo $form-meridian('Task/meridian'); ?
   ?php echo $form-input('category', array('label' = false)); ?
   /p
   ?php echo $form-submit('Add Task'); ?
 -

 The initial page load of the above code works just fine.  The
 datepicker shows up just fine and all is well.  When the form submits
 (via ajax), I want it to add the task and then return the same fields
 again... so the user can add many task quickly and easily.

 However, when the form comes back after the ajax call, the datepicker
 piece is missing.  I understand this has to do with the fact that the
 the original datepicker JS isn't being executed when the we do an ajax
 layout, so I probably need to use the 'onComplete' ajax option to
 restart the script again.  However, I can't get the onComplete to work
 at all.  It never fires off anything (I even just tried basic
 alerts).

 I was using the following context:
 ?php echo $ajax-form(array('action' = '/Tasks/addTask'), 'post',
 array('update' = 'task', 'onComplete' = alert('test');)); ?

 When the ajax task completes, nothing happens (the alert doesn't show
 up in the source code anywhere).

 Also, I tried simply including the datepicker.js file in the ajax view
 itself as well (thinking it might be executed), but no luck there
 either.


 Any ideas would be greatly appreciated!

 - Cake Fan
 
   


-- 
 *Pierre MARCOURT*  
 
*IT Department* 
*CableOrganizer.com*
5610 NW 12th Ave, suite 214
Fort Lauderdale, FL 33304
 


Phone: 954-861-6310
Fax: 954-861-2001


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



Problem using Dialog.confirm due to my controller...

2008-05-05 Thread Pierre MARCOURT
Hi,

I am using the Dialog.confirm function from Prototype.
Let me explain what I do.
First, I have a link to Add a Memo in the layout (in order to be always 
present) :

?php echo $html-link('Add a memo','#', array('onclick' =
'add_memo(?php echo $user_id; ?);')) ?


This link call the Dialog.confirm function and load a form.

function add_memo(id) {
Dialog.confirm($('addmemo').innerHTML, {
 className:alphacube, width:500,
 okLabel: Submit, cancelLabel: Close,
 onOk:function(win){
 if($('memotitle').value == '' ||
$('memodesc').value == '') {
$('response').innerHTML='Please fill the
bTitle/b and the bDescription/b';
$('response').show();
}else{
new

Ajax.Request(ajax-add-memo.php?id=+id+title=+$('memotitle').value+desc=+$('memodesc').value,
{ method:'GET', contentType:'application/x-www-form-urlencoded' });
}
Windows.focusedWindow.updateHeight();
new
Effect.Shake(Windows.focusedWindow.getId()); return false;}});
}


I am using a PHP file : ajax-add-memo.php (which is in my /webroot) 
because the user is able to add a Memo in all the web site, whatever the 
controller or the view.
This PHP file is a basic file with code to save the data in the database.

_The problem_ :
When the user submits the form, sometimes the data are not saved.
It depends of the controller.
Actually, when the user navigate in the website, when he is positioned 
on some controllers, the save in the database does not work.
I have 7 controllers, and for 2 of them, the user could not add a memo. 
He will have to change of page and find a good one to save the data.

_My question_ :
Is there something to do or to not do when you use new Ajax.Request ?
Because I don't see a big difference in my 7 controllers.

Thanks for your help.

-- 
Pierre

[EMAIL PROTECTED]
_

CableOrganizer.com
5610 NW 12th Ave, suite 214
Ft.Lauderdale, FL 33309
Phone: 954-861-6310


--~--~-~--~~~---~--~~
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: Slow...

2008-04-25 Thread Pierre MARCOURT

Thanks for all your advices.
I actually did not use the Bindable behavior and the packing Scriptaculous.
You are right NOSLOW about the Debug, I set it to 0 and it is better but 
still not the way I want.
Anyway, thanks for the tips, I going to look at these right now !


NOSLOW a écrit :
 I, too, use the Bindable behavior (couldn't live without it now ;). My
 point was that Cake will still load all the related models recursively
 for the controller action you're calling before you can dynamically
 unbind the relationships. The only way I saw to prevent this was to
 not define all the relationships in your model. I haven't gone into
 production yet with my app so I haven't figured out what I'm going to
 do about this. Optimization comes last (although it's slowing me down
 a bit during development).
 
   


-- 
Pierre

[EMAIL PROTECTED]
_

CableOrganizer.com
5610 NW 12th Ave, suite 214
Ft.Lauderdale, FL 33309
Phone: 954-861-6310


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



Slow...

2008-04-24 Thread Pierre MARCOURT
Hi,

I am programming using CakePHP / Ajax and the more I program, the more 
my website is slow.
I don't understand why, because I am programming the way you have to 
when you use CakePHP.
And I don't think that I am doing to much queries.

Is there some important things I have to avoid when I program ?
I am using a lot Ajax and Scritptaculous, is that a problem ? Almost my 
entire site is in Ajax.
In my /app_controller.php/, I am using the /beforRender()/ function 
where I  do some queries. Is that function slow down the website ?

Actually, I don't know what is the problem, because everything works 
fine but it is too slow (3 seconds to load a page) !

So, if you have tips, something I have to do or not do, just tell me please.

Thanks !

--~--~-~--~~~---~--~~
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: Slow...

2008-04-24 Thread Pierre MARCOURT
I am doing some queries in /beforeRender()/ because I have to set 
variables in the layout.
When users Log In in my system, they can change the order of the 
elements (little calendar, etc.) of the layout.
And then I save this order in the database.
So I am using the /beforeRender()/ function to set the order of the 
elements in the layout when the user load a page.

For the JavaScript part, what I can do ? I have only 2 links :
?php echo $javascript-link('prototype') ?
?php echo $javascript-link('scriptaculous') ?
and I am using them with drag  drop, InPlaceEditor, etc.

Thanks your your help.


Chris Hartjes a écrit :
 On Thu, Apr 24, 2008 at 8:33 AM, Pierre MARCOURT
 [EMAIL PROTECTED] wrote:
   
  I am using a lot Ajax and Scritptaculous, is that a problem ? Almost my
 entire site is in Ajax.
 

 Yes, that is bound to be slow without a lot of thought on the use of
 unobtrusive javascript.

   
  In my app_controller.php, I am using the beforRender() function where I  do
 some queries. Is that function slow down the website ?

 

 Why are you doing that in beforeRender()?  Is there any reason why you
 couldn't do it in controller methods.

   


-- 
Pierre

[EMAIL PROTECTED]
_

CableOrganizer.com
5610 NW 12th Ave, suite 214
Ft.Lauderdale, FL 33309
Phone: 954-861-6310


--~--~-~--~~~---~--~~
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: Slow...

2008-04-24 Thread Pierre MARCOURT
yes, I am using Firebug in Firefox. I tried with Firebug turning off but 
it is the same.
However, if I test it in IE 7 or Safari 3.1, it is a lot better !
But most of the users of my system will use FireFox...


hydra12 a écrit :
 Are you using firebug in firefox?  I've noticed that sites with lots
 of javascript run VERY slow under firebug.  Try testing in another
 browser or turning firebug off and see if that helps.

 On Apr 24, 9:32 am, Pierre MARCOURT [EMAIL PROTECTED] wrote:
   
 Thanks for the advice Chris,

 I am going to try jQuery and see if it is better.

 Chris Hartjes a écrit :



 
 On Thu, Apr 24, 2008 at 10:22 AM, Pierre MARCOURT
 [EMAIL PROTECTED] wrote:
   
  I am doing some queries in beforeRender() because I have to set variables
 in the layout.
  When users Log In in my system, they can change the order of the elements
 (little calendar, etc.) of the layout.
  And then I save this order in the database.
 
 I understand...unavoidable I guess.
   
  So I am using the beforeRender() function to set the order of the elements
 in the layout when the user load a page.
 
  For the JavaScript part, what I can do ? I have only 2 links :
  ?php echo $javascript-link('prototype') ?
  ?php echo $javascript-link('scriptaculous') ?
  and I am using them with drag  drop, InPlaceEditor, etc.
 
 I'd stop using the built-in helpers and use jQuery.
   
 --
 Pierre

 [EMAIL PROTECTED]
 _

 CableOrganizer.com
 5610 NW 12th Ave, suite 214
 Ft.Lauderdale, FL 33309
 Phone: 954-861-6310
 
 

   


-- 
Pierre

[EMAIL PROTECTED]
_

CableOrganizer.com
5610 NW 12th Ave, suite 214
Ft.Lauderdale, FL 33309
Phone: 954-861-6310


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



Problem on serializing Ajax data with Cake

2008-04-17 Thread Pierre MARCOURT
Hi,

I am using the $ajax-sortable function to change the order of a list (3 
items).
Then I want to save the order in a database but I have a problem.
When I use Sortable.serialize to send the data to my controller, my 
array is empty...

Here is the code I use in my view :
?php echo $ajax-sortable(sortable_list, array('handle' = 
'title_rbox', 'constraint' = 'false', 'onChange' = '
function() { 
new Ajax.Request(/users/ajaxorderlist, { 
method: post, 
parameters: { data: 
Sortable.serialize(sortable_list) } 
})
}
'));
?

The POST['data'] I receive in my controller is :
sortable_list[]=sortable_list[]=sortable_list[]=

I don't understand why I don't have the id of the different item, like 
that : sortable_list[]=item_2sortable_list[]=item_1sortable_list[]=item_3

I did not find out the answer of my question on Google, so if someone 
has an idea ?

Thanks.

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



Re: Submit “multipart/form-data” forms with CakePHP / Ajax

2008-04-14 Thread Pierre MARCOURT
Yes Chris, I am using CakePHP 1.1.19.6305 so it does not work...
Thank you for the link Adam but it is not the solution I was looking 
for. I don't want that the user has to change a setting in his browser.
It is not going to be easy to use... I am using Ajax to have a tool 
user friendly, so I don't want to ask for changing setting in the 
browser...
So I don't know yet how to make it work, if someone has another idea ?
Thanks.


Chris Hartjes a écrit :
 On Fri, Apr 11, 2008 at 4:40 PM, Pierre MARCOURT
 [EMAIL PROTECTED] wrote:
   
  Thanks Chris,

  but when I try to use the create method, I have the Fatal error :
  Call to undefined method FormHelper::create()
 

 That link was for CakePHP 1.2.


   


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



Re: Submit multipart/form-data forms with CakePHP / Ajax

2008-04-14 Thread Pierre MARCOURT
Thanks Adam.
You are right, there is no way to make it work without using iFrame or 
SWFUpload.
I have chosen the first option and now it is working well.
To make it work, I used this tutorial : 
http://elmicoxcodes.blogspot.com/2007/03/asynchronous-upload-like-ajax-1.html


Adam Royle a écrit :
 My point was that Ajax doesn't let you use multipart/data. You'll need
 to either use something like swfupload or post to an iframe, etc.

 http://www.railsforum.com/viewtopic.php?id=11430

 On Apr 14, 11:29 pm, Pierre MARCOURT [EMAIL PROTECTED]
 wrote:
   
 Yes Chris, I am using CakePHP 1.1.19.6305 so it does not work...
 Thank you for the link Adam but it is not the solution I was looking
 for. I don't want that the user has to change a setting in his browser.
 It is not going to be easy to use... I am using Ajax to have a tool
 user friendly, so I don't want to ask for changing setting in the
 browser...
 So I don't know yet how to make it work, if someone has another idea ?
 Thanks.

 Chris Hartjes a écrit :

 
 On Fri, Apr 11, 2008 at 4:40 PM, Pierre MARCOURT
 [EMAIL PROTECTED] wrote:
   
  Thanks Chris,
 
  but when I try to use the create method, I have the Fatal error :
  Call to undefined method FormHelper::create()
 
 That link was for CakePHP 1.2.
   
 

   


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



Problem in using Ajax to submit a form

2008-04-11 Thread Pierre MARCOURT
Hi,

I must clarify that I did several tutorials.
I tried with the Cakebaker tutorial : 
http://cakebaker.42dh.com/2006/01/18/submit-a-form-with-ajax/
I looked at the API but I don't understand what's going on.

If someone has an idea...


Pierre MARCOURT a écrit :
 Hi,

 I have a problem when I try to submit a form by using Ajax.
 If I submit this form by using html, it works well.
 Since I changed the code and try to do it with Ajax, FireBug give this 
 error :

 $(form) has no properties
 return $A($(form).getElementsByTagName('*')).inject([], in 
 prototype.js (line 1222)

 It would be great if someone could help me.
 Here is my view :

 ?php $ajax-form('/users/ajaxchangepwd', 'post', array('update' = 
 'ajax')); ?
 div id=ajax
 ?php echo $form-labelTag('User/oldpass', 'Old password');?
 ?php echo $html-passwordTag('User/oldpass'); ?

 ?php echo $form-labelTag('User/newpass', 'New password');?/b/td
 ?php echo $html-passwordTag('User/newpass'); ?

 ?php echo $form-labelTag('User/newpassagain', 'Repeat new password');?
 ?php echo $html-passwordTag('User/newpassagain'); ?

 ?php echo $ajax-submit(); ?
 /div
 /form

 Thanks.


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



Submit “multipart/form-data” forms with CakePHP / Ajax

2008-04-11 Thread Pierre MARCOURT

Hi,

Is there a way to submit “multipart/form-data” forms with CakePHP / Ajax ?
I can’t manage uploading files this way…
It seems that it is not possible due to security restrictions in the 
browser, is it ?

Does someone know a way to manage it (without using IFrames or similar) ?

Thanks.

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



Re: Submit “multipart/form-data” forms with CakePHP / Ajax

2008-04-11 Thread Pierre MARCOURT
Thanks Chris,

but when I try to use the create method, I have the Fatal error :
/Call to undefined method FormHelper::create()
/
That's why I was trying to submit the file by using :

?php
echo $ajax-submit('Upload', array(
'div' = false,
'url' = /users/changepic/,
'enctype' = multipart/form-data,
'update' = 'changepic',
'indicator' = 'loading',
'loading' = document.getElementById('response').innerHTML = 
'nbsp;img src=\/img/ajax-loader.gif\/nbsp;';));
?

But it does not work... I can't upload the file, I get Notices :
/Uninitialized string offset: 0
/


Chris Hartjes a écrit :
 On Fri, Apr 11, 2008 at 3:40 PM, Pierre MARCOURT
 [EMAIL PROTECTED] wrote:
   
  Hi,

  Is there a way to submit multipart/form-data forms with CakePHP / Ajax ?
  I can't manage uploading files this way...
  It seems that it is not possible due to security restrictions in the
  browser, is it ?
 

 http://book.cakephp.org/view/182/forms

   


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



Re: Multiple Query Results One Large List

2007-09-24 Thread Pierre Lombard

Hi,

On Sep 22, 5:28 pm, benr [EMAIL PROTECTED] wrote:
 I'm looking for a way for an admin to get get all the recent activity
 across multiple content types in one large list.

 I have multiple tables containing different content types (subpages,
 news, events, etc) all of which have similar fields (name, crated,
 status, user_id).  Is there a way to find all the most recent activity
 from those tables and combine the results into one large list that is
 sorted by created date?

 I'm not sure if I'm missing something obvious that cake has already
 built in or if I will just need to do an array merge or something.

As for there being a native cakephp to do it, I can't really tell.

For complicated things, I tend to resort to plain SQL to let the
DBMS handle (and optimize) the request.
A single SQL request with UNION's and ORDER BY called by
a query() call will fetch and order everything you need.

There may be also some cleaner solutions with SQL advanced
structures (views, ...) but I would need to check how that's
supported in cake (it may also add a dependency
on your DBMS).

Of course, if someone as a simple cakephp-native method,
I'd like to know too :-)

Regards,
--
Pierre


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



Validating two models

2007-02-05 Thread Pierre

Hi,

I'm currently trying to save two models from a single form. While the
saving part is working just fine, i can't find a way to display
error messages in my form. I'm not passing any paramaters to the
validateErrors() function in my controller, should I ?

In other words, is it enough to call validateErrors(), without any
parameter, in my controller in order to populate all the error tags in
my view ?


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



Re: Components

2006-05-16 Thread Pierre

Thanks brandags... But i figured out the error... It was an incorrect
Sql query... Sorry to have wasted your time and good
night/morning/afternoon (i don't know where you're from ^^)


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



Re: About PagesController

2006-05-07 Thread Pierre

Thanks a lot for such a quick response!

Pierre


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