Re: integrating pusher.com with cakephp

2012-08-17 Thread Ryan Snowden (Gmail)
Go on 

On Aug 17, 2012, at 11:46 PM, Nick Crane  wrote:

> OK, got it working with the pusher "Event Creator" fine, but when it came to 
> including the  $pusher->trigger('channel','event',arrayofdata);  in a 
> controller method, no joy, there seems to be a timing issue.
> 
> Tried it with pubnub, a very similar implementation, it works fine. If anyone 
> is that interested i can post a more detailed explanation. 
> 
> On Tuesday, 14 August 2012 15:05:10 UTC+1, Nick Crane wrote:
> I'm trying to implement a web socket with PUSHER within an existing cakephp 
> 2.2.1 application. Has anyone attempted anything similar or come across any 
> resources that define what is required, how this can be achieved?
> -- 
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>  
>  

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: CakePHP 2.X

2011-12-21 Thread M Kaufman (Gmail)
What about one with a 42u rack in his random location without Internet, 
operating quite securely, and avoiding theft or notice?

Sent from my iPhone

On Dec 21, 2011, at 4:50 PM, euromark  wrote:

> a (web)programmer that doesnt have internet? :)
> 
> 
> On 21 Dez., 23:56, Ucha19871  wrote:
>> ooh thx.. I know this documentation,but .. do you have a PDF version
>> of this documentation .. or .CHM file..
>> so i can use it locally, without Internet..
> 
> -- 
> 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


Re: CAKEPHP Email component not working in live server.. how to get the error response why that mail is not going

2011-08-29 Thread Gmail Support
Hi

  Thanx for your response. But my controller has 4 mail functions but none
of the mails are going in Live server only. Still I try to find a solution.

When a third party guys hitting our url we are sending mail to users. This
is working in my local. But i not used auth component or any authentication
in this controller.
So I thinking that problem regarding that only. So I Plan to copy and move
the email contents to another controller, at the same time i will follow
your things



On Tue, Aug 23, 2011 at 12:13 PM, ShadowCross  wrote:

> If using the EmailComponent works in other parts of your controller,
> and the "code excerpt" you provided was just manually entered into
> your original email (the first two lines would have resulted in a
> syntax error as it is written) you can try adding
>
>  $this->Email->return = "Mysitename ";
>
> before the call to $this->Email->send().  This will add the
> appropriate mail header to indicate what email address to send
> bounceback emails.  I've had some domains (such as gmail.com) refuse
> emails from my webserver because its a shared host that was at one
> time flagged as a potential spam source.  The bounceback emails are
> normally sent to the FROM address, but it looks like the FROM you are
> using is something like 'no-re...@mysite.com', which probably doesn't
> exist, so any delivery errors (remote mailserver down, remote user has
> exceeded his quota, unknown user, etc.) are being delivered into the
> ether.
>
> It may also be possible that the receiving email client is routing
> your email to a spam folder. In this case, there will be no bounceback
> email. You could display a message like "The email has been sent to
> . Please make sure that  is on
> your list of trusted senders to avoid the mail being sent to your Spam
> folder.".  Of course, this will only work if the email is being sent
> as a direct result of the user interacting with your website.
>
> Note: The fact that $this->Email->send() returns true doesn't mean the
> email was delivered; usually, it will use the PHP mail() function, and
> according to the PHP manual (http://php.net/manual/en/
> function.mail.php):
>
>  Returns TRUE if the mail was successfully accepted for delivery,
> FALSE otherwise.
>  It is important to note that just because the mail was accepted for
> delivery, it does NOT mean the mail will actually reach the intended
> destination
>
> BTW: Is there a reason you are wrapping the $this->Email->send()
> within ob_start()/ob_end_clean() ? Output buffering generally only
> deals with output that is being sent to the client browser, but $this-
> >Email->send() and $this->log() shouldn't be sending anything to the
> browser (unless you have Debug > 0, in which case you WANT to see the
> debug messages).
>
> --
> 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


Re: CAKEPHP Email component not working in live server.. how to get the error response why that mail is not going

2011-08-22 Thread Gmail Support
no dude... other mail functions from this controller are working fine

On Mon, Aug 22, 2011 at 2:05 PM, abhimanyu bv  wrote:

> maybe you have forgot to configure smtp settings in your cakephp.
>
> --
> 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


CAKEPHP Group by problem in paginate..

2011-07-23 Thread Gmail Support
CAKEPHP Group by problem in paginate..

This is my table structure


  Friends Table
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user1_id` int(11) NOT NULL DEFAULT '0',--> UserFrom
  `user2_id` int(11) NOT NULL DEFAULT '0',---> UserTo

I need to get all the unique records of one user and his user1_id = 100

There are lot of duplicate values in user2_id. I need to get the unique
values
While i trying this code it returns only first 12 values(according to
limit).
If i commented the group by line then all records are displaying (including
duplicate values)




  $this->paginate = array(
'conditions' => $conditions,
'contain'=>array(
'UserFrom'=>array(
'fields'=>array(
   'UserFrom.id',
   'UserFrom.first_name',
   'UserFrom.last_name',
   ),
 ),
 'UserTo'=>array(
'fields'=>array(
'UserTo.id',
'UserTo.first_name',
'UserTo.last_name',
)
 )
),'limit' => 12,
'order' => array('Friend.id' => 'desc'),
'recursive'=>0,
'fields'=>array('DISTINCT Friend.user2_id','Friend.*'),
'group'=>array('UserTo.id'),
);

-- 
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: Accessing data just saved from view

2010-10-11 Thread Vivian Bogdan Gmail

 On 10/12/2010 4:43 AM, Jonathan Sibley wrote:

Hi all,

After a long search, I posted here for help, and after even more
search I found the solution I was looking for.  In the PhotoController
add() I am passing the data from the recently saved Photo row to the
view with:

function add() {
if (!empty($this->data)) {
$this->Photo->create();
$this->Photo->set('user_id', 
$this->AuthExt->user('id'));

if ($this->Photo->save($this->data)) {
$this->Session->setFlash(__('The photo has been 
saved', true));
// Pass the data that was just added to the 
database back to the
"add" view so that a thumbnail can be displayed.
$id = $this->Photo->getLastInsertId();

$this->set('photoObjJustSaved',$this->Photo->findById($id));
} else {
$this->Session->setFlash(__('The photo could 
not be saved. Please,
try again.', true));
}
}
}


So I guess my question now is, is using:

$id = $this->Photo->getLastInsertId();

$this->set('photoObjJustSaved',$this->Photo->findById($id));

the best way to do it?  It seems like another database query when one
might not be required.

Thanks,
Jonathan

On Oct 11, 8:54 pm, Jonathan Sibley  wrote:

Hello,

I have a form to add a Photo in my "add" view (add.ctp).  I have two
fields in the view:

echo $form->hidden('Photo.user_id',array('value'=>$user['User']
['id']));
echo $form->input('file', array('type' =>  'file'));

Although there are only two fields here, I am using a Helper that
takes the uploaded image and saves file_name, file_type, file_size and
some other columns to the database.

I would like to be able to use this data immediately after the user
submits the form to render the image the image for the user (i.e. in
add.ctp again).

When I try $this->data['Photo'] I just get:
array(
 "user_id" =>  "1",
 "file" =>  array()
)

Which is simply the data I submitted.  I would like to pass back the
data from my PhotoController via my add() function, but I can't quite
figure out how.  Can anyone help?

Thanks in advance,
Jonathan

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

Hello

We can use:
$saved =  $this->Photo->save($this->data)

and you will have the saved data into $saved.

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


Curl NOBODY problem

2010-06-15 Thread Manolet Gmail
Hi, i want to obtain the headers for this link

http://freedfd.googlecode.com/files/FreeDFD-1.1.zip

i set up this config for curl:

$ch = curl_init();
  curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, true);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE
5.01; Windows NT 5.0)");
curl_setopt ($ch, CURLOPT_NOBODY, 1); // and *only* get the header
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt ($ch, CURLOPT_CUSTOMREQUEST, 'HEAD');
curl_setopt ($ch, CURLOPT_FRESH_CONNECT, 1); // don't use a cached
version of the url
$resultado = curl_exec($ch);
$error = curl_error($ch);
$info = curl_getinfo($ch);

i dont want the file, just the headers, so i set NOBODY to 1, the problem is
that if i set it Google Servers return an error page. but if i dont set it i
receive the rights headers.

I dont want the body since is a file and can be so big and i just want to
verify if the link is working.

Some idea of how to cancel the download when headers are received?

Arnold

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


rendimiento al editar archivos binarios

2010-05-26 Thread Manolet Gmail
Saludos, la pregunta que hare aqui no esta necesariamente relacionada con
cake, pero cometo el pecado de hacerla en la lista por si alguien sabe como
ayudarme, pues estoy usando cakephp en el proyecto.

Actualmente tengo una aplicacion que edita un archivo binario cambiando 16
bytes que estan en la misma posicion siempre (640 bytes despues del inicio
del archivo), sin embargo lo que estoy haciendo es leer TODO el archivo para
luego escribirlo usando la funcion pack, lo que siento que es bastante torpe
y desconsiderado con la memoria ram (considerando que necesito hacer esto
cientos de veces al instante). Este es el código que estoy utilizando:

if ( !file_exists($cache) || @$this->params['named']['cache'] ===
0){
$handle = fopen($filename, "r+b");
$init = fread($handle, 640);
  fread($handle, 16); //esto debe ser exactamente igual
a lo que se reemplaza.
$full= fread($handle, filesize($filename)); // leemos el
resto para escribirlo despues
fclose($handle);

//las concateno para que sea human readable
$contents = pack('a640'.'A16'.'a*', $init, $this->params['id'],
$full);

$handle = fopen($cache, "w+b");
fwrite($handle, $contents);
fclose($handle);
FireCake::fb(" GENERADO ("@$this->params['named']['cache'].")
$referer ($cache)");
}

Alguna idea de como hacerlo "mas eficiente"? ¿puedo editarlo sin necesidad
de cargar todo el archivo en memoria?

Arnold

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


Re: how to add a relationship whit other key different to the PK

2010-04-28 Thread Manolet Gmail
the problem is that i need to user the value of software_id for the query.

for example, the HasMany query should be:

SELECT `Mirror`.`id`,   FROM `mirrors` AS `Mirror` WHERE
`Mirror`.`software_id` = (6)

But how i can put in the query, or in the conditions value add the id of
software_id??

Thanks in advance

On Wed, Apr 28, 2010 at 4:35 AM, Martin Westin
wrote:

> You can set foreign_key to false and instead use the condition of the
> relationship. This is usually used for things like User.active => true
> and simple things like that but I think it can be used for your
> purpose.
>
> COme to think of it, I may be wrong. I vaguely recall an RC for
> Cake1.2 causing problems when the condition is not an array... and I
> think you might need a string contition.
>
>
> On Apr 28, 12:54 am, Manolet Gmail  wrote:
> > Hi, i have this tables:
> >
> > Software
> > Reviews
> > Mirror
> > Requirements
> > Published
> >
> > Now, this is the relations:
> >
> > Software Has Many Reviews
> > Software Has Many Mirrors
> > Software HABTM Requirements
> >
> > Works fine.
> >
> > The problem is that i need to resume the tables to get a better response
> > from mysql, the reviews tables have text fields and are classified by
> > language, so, for the public site i do a Published table for each
> language,
> > i mean: language_en language_es language_fr and load the data
> automatically
> > into that tables...
> >
> > The Published table is a merge of the Software and Review Table. The PK
> of
> > Published table is 'id', and is the same number of the reviews table.
> >
> > I want to establish this relationship: Published.software_id (not the PK)
> > Has Many Mirrors.software_id
> >
> > The key has a Unique index, the problem is that aparently i can use the
> > foreign_key attribute when declaring the relationship to set the Mirror
> > model field, but i cant set the field that i want to use on the Published
> > model, it uses the PK by default.
> >
> > Is there a way to force it to use other key different to the PK for the
> > queries?
> >
> > Currently im using afterFind function and works okey, but dont allows me
> to
> > use "contain" or "fields".
> >
> > Hope you can understand me and help me
> >
> > thanks for you time,
> >
> > Manolo
> >
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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.comFor
> >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


how to add a relationship whit other key different to the PK

2010-04-27 Thread Manolet Gmail
Hi, i have this tables:

Software
Reviews
Mirror
Requirements
Published

Now, this is the relations:

Software Has Many Reviews
Software Has Many Mirrors
Software HABTM Requirements

Works fine.

The problem is that i need to resume the tables to get a better response
from mysql, the reviews tables have text fields and are classified by
language, so, for the public site i do a Published table for each language,
i mean: language_en language_es language_fr and load the data automatically
into that tables...

The Published table is a merge of the Software and Review Table. The PK of
Published table is 'id', and is the same number of the reviews table.

I want to establish this relationship: Published.software_id (not the PK)
Has Many Mirrors.software_id

The key has a Unique index, the problem is that aparently i can use the
foreign_key attribute when declaring the relationship to set the Mirror
model field, but i cant set the field that i want to use on the Published
model, it uses the PK by default.

Is there a way to force it to use other key different to the PK for the
queries?

Currently im using afterFind function and works okey, but dont allows me to
use "contain" or "fields".

Hope you can understand me and help me

thanks for you time,

Manolo

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


Re: Redirect and ajax form error.

2010-02-01 Thread Manolet Gmail
$this->redirect(array('controller' => 'authors','action'=>'index', 'admin'
=> true));

stilll broken... i think is a cake bug...

On Mon, Feb 1, 2010 at 4:30 PM, ecommy.com  wrote:

> hmm, maybe try adding the admin url parameter for this->redirect
>
> On Feb 1, 10:19 pm, Manolet Gmail  wrote:
> > Hi.
> >
> > Im sending a form by ajax to /admin/authors/add , the problem is that it
> > tries to execute for 30 seconds and next give up with an error. The
> problem
> > is obviusly is with this line of code:
> >
> > $this->redirect(array('controller' => 'authors','action'=>'index'));
> >
> > on the admin_add method.
> >
> > If i change it with:
> >
> > $this->redirect('/admin/authors/index');
> >
> > The code executes without any problem... i know i can solve in that way,
> but
> > i dont understand why this happends just because im sending the form
> trought
> > ajax.
> >
> > Thanks in advance.
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Redirect and ajax form error.

2010-02-01 Thread Manolet Gmail
Hi.

Im sending a form by ajax to /admin/authors/add , the problem is that it
tries to execute for 30 seconds and next give up with an error. The problem
is obviusly is with this line of code:

$this->redirect(array('controller' => 'authors','action'=>'index'));

on the admin_add method.

If i change it with:

$this->redirect('/admin/authors/index');

The code executes without any problem... i know i can solve in that way, but
i dont understand why this happends just because im sending the form trought
ajax.

Thanks in advance.

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


Redirect and ajax form error.

2010-02-01 Thread Manolet Gmail
Hi.

Im sending a form by ajax to /admin/authors/add the problem is that it tries
to execute for 30 seconds and next give up with an error. The problem is
obviusly this line of code:

$this->redirect(array('controller' => 'authors','action'=>'index'));

on the add method.

If i change it with:

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


Plural Singular with software

2009-07-30 Thread Manolet Gmail
Hi, im building an application to collect pieces of software. the problem is
that "software" dont have a plural form.
i dont know what to do, i know i can create an inflector but... i dont know
how to call the array for the foreachs, i mean

foreach ($software(plural) as $software(singular)

i know i can use whatever like $software_many but... im looking for the
right way to do it..

any ideas?

--~--~-~--~~~---~--~~
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: cake:nocache and uncached views

2009-02-16 Thread Keith Norris Gmail

I think Alfredo probably meant wrap just the nocache tags, like this:

 
 
  check('Message.flash')) $session->flash(); ?>


 

- Keith 




--~--~-~--~~~---~--~~
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: Question on the best way to proceed and stay true to MVC/CakePHP philosophy

2008-10-14 Thread Manolet Gmail
you can do a command controller, but anyway you should write the list of
commands,

there is a quick example (please correct it is just a guide)

class commandcontroller extends appcontroller{

function index($command = 'error'){
if(function_exist( $this->{$command}()) ){
$this->{$command}()
}else{
$this->error();
}
}

function commandOne(){
}
function commandTwo(){}
function error(){
echo "the command doesnt exist";
}

}

On Tue, Oct 14, 2008 at 6:50 PM, Chez17 <[EMAIL PROTECTED]> wrote:

>
> So I have an ajax chat application that I am working on. If a user
> types a comment the starts with '/' it sends the comment to the
> 'command' function in my controller (as opposed to a normal 'add'
> function for chats). For example if the user types "/help" it will
> list all the possible commands. Now the command function is going to
> have to parse the command and return the proper information. The way I
> did the first couple commands was just a switch statement. But I got
> to thinking if there was a better or more "cake" way to do it. Are
> there better ways then just a giant switch statement? Should I try to
> create my own component? What are your thoughts on this? Any help will
> be greatly appreciated.
> >
>

--~--~-~--~~~---~--~~
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: Working with INNER JOIN tables

2008-02-24 Thread gmail (codehooligans)

Taka,

I'm fairly new to Cake myself but can tell you that is you have your  
model setup correct to link the tables then this INSERT, UPDATE,  
DELETE will be taken care of (see further below). If you are running  
the INNER JOIN as some custom code in the controller then you are  
pretty much on your own. From what I know at the moment.

As an example of a setup model here is one I'm working with. This is a  
model for my Accounts table. There are two other tables in the system:  
Residence and User. The Residence table contains a field/column of  
'account_id'. This is the foreign key to the Account Table. The Users  
table contains a field/column of 'residence_id' This is the foreign  
key to the Residence table.

So to sort of draw things out we have the following 3-tier  
relationship between the Account, Residence and User table

Account -> Residence (account_id) -> User (residence_id).

What all this means and how things work is when I write code in the  
controller for say the View function I pass in an account_id. When the  
Account record is read in it automagically read in the referenced row  
from the Residence and the User tables as well. All 3 table sets are  
included at one. Nothing to worry about. Hope all this helps. And  
really I've only been working with Cake about a month. I'm sure one of  
the more experienced users on this list will comment I'm total F'in  
wrong.

Below is my actual model code. This was generated using the bake  
command. Note I had the MySQL tables already setup.


function view($id = null) {
if (!$id) {
$this->Session->setFlash('Invalid id for Account.');
$this->redirect('/accounts/index');
}
$this->set('account', $this->Account->read(null, $id));
}





array('className' => 'Residence',
'foreignKey' => 'account_id',
'conditions' => '',
'fields' => '',
'order' => '',
'dependent' => ''
),
'User' =>
array('className' => 'User',
'foreignKey' => 'residence_id',
'conditions' => '',
'fields' => '',
'order' => '',
'dependent' => ''
),

);

}
?>






On Feb 23, 2008, at 9:00 PM, takabanana wrote:

>
> Bueller?  :-)  Can anyone help, or point me in the right direction?
> Thanks!
>
> -taka
>
> On Feb 22, 1:06 am, takabanana <[EMAIL PROTECTED]> wrote:
>> How does CakePHP handle (or "With CakePHP, how do you do...") INSERT,
>> UPDATE, and DELETE across multiple tables with an INNER JOIN query?
>>
>> sorry - still very very new to CakePHP.  Looking for books/tutorials
>> in working with INNER JOIN table queries since my projects use  
>> those a
>> TON.
>>
>> Thanks for any help/pointers!
>>
>> -taka
> >


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



R: Menu from database

2007-03-18 Thread GMail

I made a little test and I have put:

 pr($this->uses);
 exit();
 
in cake/libs/controller/controller.php __construct() function, before it
exiting.
What I discovered was that if you set $uses to null or an empty array() in
your controller 
it overrides the declaration in app_controller, dunno if it's a bug or a
features, but
I suggest to use this snippets, to dinamically load data from menu table,
that for me is preferred
method, or better you can write a component and a helper but this is another
story ;).

class AppController extends Controller {
   // var $uses=array('MenuItem'); // There is no more need for this

   function beforeFilter() {
 parent::beforeFilter();
 loadModel("MenuItem");
 $menuItem = new MenuItem;
 $this->set('menuElement', $MenuItem->findAll());
   }
}

I have not tested this, it's based on my little knowledge.
If there is somethingh wrong let me know.
cheers 


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



R: Overriding foreign key conventions

2007-03-18 Thread GMail

Yes you can
For belongsTo:
var $belongsTo = array( 
'BelongClass' => array(
  'classname'  => 'BelongClass',
  'foreignKey' => 'your_foreign_key_field_id'
)
  );

  var $hasMany = array(
'HasManyClass' => array(
  'className'   => 'HasManyClass',
  'foreignKey'  => 'your_foreign_key_field_id'
);
   

> -Messaggio originale-
> Da: cake-php@googlegroups.com 
> [mailto:[EMAIL PROTECTED] Per conto di korcs
> Inviato: domenica 18 marzo 2007 14.59
> A: Cake PHP
> Oggetto: Overriding foreign key conventions
> 
> 
> Hi Bakers,
> 
> i have  a database table (table name: 'relations') which 
> related to other tables via a foreign key (field name: 
> related_table_id). I want, that whenever i fetch an entry 
> from the table 'relation', the associated table entry will be 
> fetched as well (like the posts and comments in the manual). 
> The problem is, that I should name this field like  table name>_id, but i have 7 different tables related to the 
> table 'relation'. Do you have any idea, how could i solve 
> this problem?
> 
> Regards,
> 
> Korcs
> 
> 
> > 


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



R: Class dependence and overriding Methods to do garbage collection on files

2007-03-17 Thread Marco \(GMail\)

Looking at the Api the beforedelete function is cahined from the del 
function del($id = null, $cascade = true) {
00957 if ($id) {
00958 $this->id = $id;
00959 }
00960 
00961 $id = $this->id;
00962 
00963 if ($this->exists() && $this->beforeDelete()) { 

As you can see on line 958 the passed id is assigned to model->id 

Then you can surely write

function beforeDelete() {
$photo = $this->Photo->findById($this->id); // NOTE $this->id
instead of $id

$file_path = substr($photo['Photo']['file_path'], 1); // remove the
leading slash for cake
// Code from Chris Partridge:
if($file = new File($file_path)) {
if(!$file->delete()) {
trigger_error('delete error');
return false;
}
} else {
return false;
}
return true;
}

-Messaggio originale-
Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Per conto
di Joshua McFarren
Inviato: sabato 17 marzo 2007 19.49
A: Cake PHP
Oggetto: Re: Class dependence and overriding Methods to do garbage
collection on files


> I'm new to cake so I may not be 100% right, but why not you create a
> beforeDelete() method in your Photo model? Use this delete the 
> associated image file.

This looked promising until i realized that I need the $id to get the file
path of the photo and delete it. I would need to put something like this in
my Model:

function beforeDelete($id) {
$photo = $this->Photo->findById($id);
$file_path = substr($photo['Photo']['file_path'], 1); // remove the
leading slash for cake
// Code from Chris Partridge:
if($file = new File($file_path)) {
if(!$file->delete()) {
trigger_error('delete error');
return false;
}
} else {
return false;
}
return true;
}

Unfortunately, looking at the API the beforeDelete method takes no arguments
when its called by del:

http://api.cakephp.org/model__php4_8php-source.html#l00956

So how would my beforeDelete method know what to do?

Is this a dead end or am I wrong?




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



R: Format ID field throughout

2007-03-17 Thread Marco \(GMail\)

 All ok  but you must return $results ;-)
 function afterFind($results) {
  foreach ($results as $result_id => $result) {
$results[$result_id]['Model']['id'] = 'FLW' . $result['Model'] ['id'];
  }
  return $results; // <<
}

-Messaggio originale-
Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Per conto
di djiize
Inviato: sabato 17 marzo 2007 19.35
A: Cake PHP
Oggetto: Re: Format ID field throughout


try to play with the Model's function afterFind

A quick try, in your model:
function afterFind($results) {
  foreach ($results as $result_id => $result) {
$results[$result_id]['Model']['id'] = 'FLW' . $result['Model'] ['id'];
  }
}

On 17 mar, 13:30, "Mike Digital Egg" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am looking for the best way to format an ID field every time it 
> appears, without having to specifcally tell it to. Let me explain a 
> bit further:
>
> I have a table called Projects, each project has an ID (numeric auto
> increment) so a typical output from a db call would be:
>
> ID, Project Name, Owner, Created
> 1,My Project,Mike,14/03/2007
> 2,My Second Project,Nigel,16/03/2007
>
> Idealy I would like to transform the ID field output to something
> like:
>
> FWL0001
> FWL0002
>
> I know this can be done easily in the view, but what if I could make 
> the model output the ID in this format every time.
>
> I think this is possible in RoR but I'm not sure how to do it in Cake, 
> is this what the 'behaviors' folder is for in the model folder?
>
> Any help would be appreciated.
>
> Cheers
>
> Mike




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



R: savefield woes

2007-03-16 Thread GMail

I think you have a typo 

function admin_toggleactive($id = null){
 
if (!$id) return;

$this->layout = 'ajax';
$this->autoRender = false;
 
$this->Project->id = $id; // And not $this->id = $id
 
$project = $this->Project->read();



> -Messaggio originale-
> Da: cake-php@googlegroups.com 
> [mailto:[EMAIL PROTECTED] Per conto di [EMAIL PROTECTED]
> Inviato: venerdì 16 marzo 2007 7.44
> A: Cake PHP
> Oggetto: savefield woes
> 
> 
> Quick question:
> 
> I have this function to toggle an 'active' field un a project model,
> 
> 
>   function admin_toggleactive($id = null){
> 
>   $this->layout = 'ajax';
>   $this->autoRender = false;
> 
>   if ($id) {
>   $this->id = $id;
>   }
>   if (!$this->id) return;
> 
>   $project = $this->Project->read();
>   if($project['Project']['active']=='1'){
>   $this->Project->saveField('active','0');
>   }
>   else{
>   $this->Project->saveField('active','1');
>   }
> 
>   $this->data = $this->Project->read();
>   $this->render('../elements/project_set_unset_active');
> 
>   }
> 
> Now this wont work, the data returned to the element is the 
> same data (without the field toggled). BUT if I replace this line
> 
> $this->data = $this->Project->read();
> 
> to
> 
> $this->data = $this->Project->findById($id);
> 
> the element will be rendered with the new data (the actual 
> value of the toggled field).
> 
> Why does this happen ? Is this the only way to work around this?
> 
> 
> > 


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



R: Jake 1.0.3b Released (Joomla-CakePHP bridge)

2007-02-18 Thread GMail

After installe Jake component and configured jake.ini.
Clicking (from backend) on menu components/jake this happens.

Warning: __clone method called on non-object in
()\components\com_jake\lib\jake_component.class.php on line 294
Jake Error :: No default application is set on the configuration file 

this is the content of elements array:
Array
(
[settings] => Array
(
[default] => express
)

[express] => Array
(
[name] => Express Delivery System
[path] => ../cake/express/webroot
[url] => /express
)

[example] => Array
(
[name] => Example CakePHP application
[path] => ../cake/express/webroot
[url] => /express
[send] => param1=dummy1¶m2=dummy2
)

)
HTH

> -Messaggio originale-
> Da: cake-php@googlegroups.com 
> [mailto:[EMAIL PROTECTED] Per conto di Mariano Iglesias
> Inviato: domenica 18 febbraio 2007 15.24
> A: cake-php@googlegroups.com
> Oggetto: RE: Jake 1.0.3b Released (Joomla-CakePHP bridge)
> 
> 
> That's strange, I've tested Joomla 1.0 with PHP 5 and no problem.
> 
> What did it throw you?
> 
> -MI
> 
> --
> -
> 
> Remember, smart coders answer ten questions for every 
> question they ask. 
> So be smart, be cool, and share your knowledge. 
> 
> BAKE ON!
> 
> blog: http://www.MarianoIglesias.com.ar
> 
> -Mensaje original-
> De: cake-php@googlegroups.com 
> [mailto:[EMAIL PROTECTED] En nombre de GMail Enviado 
> el: Domingo, 18 de Febrero de 2007 10:53 a.m.
> Para: cake-php@googlegroups.com
> Asunto: R: Jake 1.0.3b Released (Joomla-CakePHP bridge)
> 
> There is other problemd related to clone method with php5.
> I've resolved applying this patch around line 294 of 
> jake_component.class.php
> 
> if (version_compare(phpversion(), '5.0') < 0) {
>   $settings = clone($elements['settings']); } else {
>   $settings = $elements['settings'];
> }
> Don't know if is the right way for every situation. This work 
> with my setup:
> 
> Joomla! 1.0.12 Stable [ Sunfire ] 25 December 2006 01:00 UTC 
> 
> cake 1.1.13.4450
> 
> Php 5.1.1 
> 
> 
> > 


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



R: Jake 1.0.3b Released (Joomla-CakePHP bridge)

2007-02-18 Thread GMail

Hello Mariano:
There is other problemd related to clone method with php5.
I've resolved applying this patch around line 294 of
jake_component.class.php

if (version_compare(phpversion(), '5.0') < 0) {
  $settings = clone($elements['settings']);
} else {
  $settings = $elements['settings'];
}
Don't know if is the right way for every situation. This work with my setup:

Joomla! 1.0.12 Stable [ Sunfire ] 25 December 2006 01:00 UTC 

cake 1.1.13.4450

Php 5.1.1 


> -Messaggio originale-
> Da: cake-php@googlegroups.com 
> [mailto:[EMAIL PROTECTED] Per conto di Mariano Iglesias
> Inviato: domenica 18 febbraio 2007 3.45
> A: cake-php@googlegroups.com
> Oggetto: Jake 1.0.3b Released (Joomla-CakePHP bridge)
> 
> 
> I'm very pleased to announce that the first beta version of 
> Jake 1.0.3 has been released. It is the first package 
> released to the public, and allows you to run any number of 
> CakePHP applications inside your Joomla website, without 
> having to touch your existing code. 
> 
> A lot has been covered and added since the alpha versions, so 
> the best thing you can do is read the documentation to find 
> out more about this release.
> Enjoy!
> 
> Project home page: http://dev.sypad.com/projects/jake
> 
> Documentation: http://dev.sypad.com/projects/jake/documentation/
> 
> Download: http://cakeforge.org/frs/?group_id=131
> 
> -MI
> 
> 
> > 


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



R: Any diagram to sql DDL script generator for MySQL?

2007-02-16 Thread Marco \(GMail\)

Try this

http://fabforce.net/dbdesigner4/

 

-Messaggio originale-
Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Per conto
di [EMAIL PROTECTED]
Inviato: venerdì 16 febbraio 2007 22.28
A: Cake PHP
Oggetto: Re: Any diagram to sql DDL script generator for MySQL?



The MySQL tools aren't bad, but I've also used Access a fair bit.
http://dev.mysql.com/downloads/gui-tools/5.0.html

The problem with Access is some slight compatibility issues with field
types, especially date/time.

phpMyAdmin is what I now use the most.

http://www.phpmyadmin.net/home_page/index.php

On Feb 17, 7:26 am, "einzeln" <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm new to LAMP and cake, trying to make a project from scratch. Is 
> there any GUI database creating tools from ER diagram recommended? So 
> i can work out my DB table definitions like in M$ Access, to jump into 
> baking rapidly.
>
> Thanks in advance.




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



R: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

2007-02-14 Thread GMail

Hello Mariano even I use exclusively both joomla and Cake for development of
my web projects.
Can I participate to this thing?
Maybe I can give my contribution.

TIA

> -Messaggio originale-
> Da: cake-php@googlegroups.com 
> [mailto:[EMAIL PROTECTED] Per conto di Mariano Iglesias
> Inviato: mercoledì 14 febbraio 2007 11.39
> A: cake-php@googlegroups.com
> Oggetto: RE: Wrapping Cake in a Joomla component, like Cake + 
> Drupal = Drake
> 
> 
> Check your email, it should be there. I'm already modifying 
> the code a bit but that'll give you an idea. Jeez we need a SVN.
> 
> -MI
> 
> --
> -
> 
> Remember, smart coders answer ten questions for every 
> question they ask. 
> So be smart, be cool, and share your knowledge. 
> 
> BAKE ON!
> 
> blog: http://www.MarianoIglesias.com.ar
> 
> 
> -Mensaje original-
> De: cake-php@googlegroups.com 
> [mailto:[EMAIL PROTECTED] En nombre de Max Enviado 
> el: Miércoles, 14 de Febrero de 2007 05:35 a.m.
> Para: Cake PHP
> Asunto: Re: Wrapping Cake in a Joomla component, like Cake + 
> Drupal = Drake
> 
> Also, I am looking forward to see your contribution so that 
> we can work together on the project.
> 
> 
> > 


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



R: How to validate a custom form?

2007-02-07 Thread GMail

Yes you are right Your answer is arrived me after I have posted mine.
The only advantage of my method is that you don't need to create the dummy
class
using  var $uses = null in your controller.

> 
> Follow my previous example. There's no need for you to add 
> the validation on
> your controller when it can be done on the model side. A 
> modeled piece of
> data can say when it is correctly modeled, or not. Decouple, baby.
> 
> -MI
> 


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



R: How to validate a custom form?

2007-02-07 Thread GMail

Yes you are right Your answer is arrived me after I have posted mine.
The only advantage of my method is 

> -Messaggio originale-
> Da: cake-php@googlegroups.com 
> [mailto:[EMAIL PROTECTED] Per conto di Mariano Iglesias
> Inviato: mercoledì 7 febbraio 2007 19.28
> A: cake-php@googlegroups.com
> Oggetto: RE: How to validate a custom form?
> 
> 
> Follow my previous example. There's no need for you to add 
> the validation on
> your controller when it can be done on the model side. A 
> modeled piece of
> data can say when it is correctly modeled, or not. Decouple, baby.
> 
> -MI


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



R: How to validate a custom form?

2007-02-07 Thread GMail

For example (If I have understood right)

Define a dummy model

custom.php
-


In your view use something like:

input('Custom/email'); ?>
tagErrorMsg('Custom/email', $emailError); ?>

And in your controller

if($this->data['Custom']['email'] == '') {
  $this->set('emailError', 'Email required');
  $this->Custom->invalidate('email'); 
}

Hope is what you need.


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



R: Custom Scaffold view

2007-02-06 Thread Marco \(GMail\)

This is tested and work :)

action == 'index') {
  unset($this->viewVars['fieldNames']['field01'];
  unset($this->viewVars['fieldNames']['field02'];
  unset($this->viewVars['fieldNames']['field03'];
}
return true;
  }
  
}
?>

-Messaggio originale-
Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Per conto
di Petry
Inviato: martedì 6 febbraio 2007 18.45
A: Cake PHP
Oggetto: Custom Scaffold view


Hi all

I have a table with 5 fields, and I temporary use scaffold for  list, edit
and delete functions. But in list view, all field are visible.
Why i set some items to invisible, only on list 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
-~--~~~~--~~--~--~---



R: Custom Scaffold view

2007-02-06 Thread Marco \(GMail\)

Excuse me for double posting but there is a typo in the preceding message
This is tested and work :)

action == 'index') {
  unset($this->viewVars['fieldNames']['field01']);
  unset($this->viewVars['fieldNames']['field02']);
  unset($this->viewVars['fieldNames']['field03']);
}
return true;
  }
  
}
?> 

-Messaggio originale-
Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Per conto
di Petry
Inviato: martedì 6 febbraio 2007 18.45
A: Cake PHP
Oggetto: Custom Scaffold view


Hi all

I have a table with 5 fields, and I temporary use scaffold for  list, edit
and delete functions. But in list view, all field are visible.
Why i set some items to invisible, only on list 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
-~--~~~~--~~--~--~---



R: Bake in tables without standard of cakephp

2007-02-06 Thread GMail

Just to know.

Is the name of your model filename: 
tb_cliente.php ?

Is the definition of your class: 
class TbCliente extends AppModel { ?

Have you defined in config/inflections.php something like:
$uninflectedPlural = array('*cliente'); ?
  (this only to prevent pluralization)


> -Messaggio originale-
> Da: cake-php@googlegroups.com 
> [mailto:[EMAIL PROTECTED] Per conto di Erick Tedeschi
> Inviato: martedì 6 febbraio 2007 12.36
> A: Cake PHP
> Oggetto: Bake in tables without standard of cakephp
> 
> 
> i am trying make bake on table such:
> 
> TABLE NAME: tb_cliente
> codigo int not null auto_increment primary key, nome_cliente 
> varchar(100) not null, endereco varchar(150), telefone 
> varchar(12), created date, updated date
> 
> But when I make controller with bake:
> PHP Fatal error: Class 'TbCliente' not found in 
> /var/www/htdocs/cake/ scripts/bake.php on line 1331
> 
> On model I change value of useTable to tb_cliente and value 
> of primaryKey to codigo.
> 
> 
> > 


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



R: idea: trace things into a log window

2007-01-29 Thread GMail

I had a little problem with firecake to work changed line 156 of the helper 
From:
// $b = file(ROOT . DS . APP_DIR . DS . 'webroot' . DS . 'index.php');
To:
   $b = file(WWW_ROOT . 'index.php'); 

This will work with installation of the site off of standard app\webroot (as
in my inst).


> -Messaggio originale-
> Da: cake-php@googlegroups.com 
> [mailto:[EMAIL PROTECTED] Per conto di gobblez
> Inviato: lunedì 29 gennaio 2007 10.21
> A: Cake PHP
> Oggetto: Re: idea: trace things into a log window
> 
> 
>  http://bin.cakephp.org/view/2045487177


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



R: Pluralisation and bake error

2007-01-26 Thread Marco \(GMail\)

In /app/config/inflections.php add all words that you want uninflected

For examples I think this can solve your problem

$uninflectedPlural = array('competencia'); 

-Messaggio originale-
Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Per conto
di albertordz
Inviato: sabato 27 gennaio 2007 2.17
A: Cake PHP
Oggetto: Re: Pluralisation and bake error


Hope this help you:
I had the same error, I got a Model named Reactivo which is associated with
model Competencia this way: Reactivo belongsTo Competencia Competencia has
the $displayField = 'competencia' declared variable and I realized that cake
was trying to singularize competencia into competencium (I don't know why)
What I did was to delete the line 181 from cake/libs/inflector

'/([ti])a$/i' => '\1um',

and now everything is ok




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



R: Ready to upload cakePHp files to my Hostgator account.

2007-01-26 Thread Marco \(GMail\)

I prefer this type of layout:

For single application
/Httpdocs
   /CakeCore
   /app
   /www

For multiple application on same web site
/Httpdocs
   /CakeCore
   /Application01
 /app
 /www
   /Application02
 /app
 /www

-Messaggio originale-
Da: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Per conto
di beetlecube
Inviato: venerdì 26 gennaio 2007 21.51
A: Cake PHP
Oggetto: Ready to upload cakePHp files to my Hostgator account.


HI,
  I have a question about folder organization of a CakePHp installation.

  I'm about to upload my cakephp files to my Hostgator "baby croc"
Shared server space.

 In the CAkePHP manual, the suggested folder structure is:

../path_to_cake_install
/app
/controllers
/models
/webroot <-- Should be DocumentRoot
.htaccess
index.php

Should I send a Support Email to Hostgator that I need to have the
httpd.conf changed for rmy account, so that my webroot is
"Mydomain.com/app/webroot"  ?

I really have no particular way that I prefer the folder organization to be.

I just want it to work, basically,  and preferably with the mod_rewrite
enabled, so that I don't have to stick that "index.php" in the middle
of everything.But if I do have to use the "index.php" inside the
URL,  no big deal even.

( if anyone has a method by which I need to rely on H.G. support as little
as possible, please let me know. )

Thanks, Steve




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



R: Component vs. AppController vs. requestAction

2007-01-26 Thread GMail

 

> -Messaggio originale-
> Da: cake-php@googlegroups.com 
> [mailto:[EMAIL PROTECTED] Per conto di AD7six
> Inviato: venerdì 26 gennaio 2007 14.21
> A: Cake PHP
> Oggetto: Re: Component vs. AppController vs. requestAction
> 
> 
> 
> 
> On Jan 26, 11:23 am, "marco" <[EMAIL PROTECTED]> wrote:
> > Hello All folks this is my first post.
> > I'm using cakephp for a intranet project in my company.
> > In my opinion the requestAction is the best method to mantain code
> > readability with large projects.
> > In my approach:
> > 1. Every controller maps its own model for CRUD:
> > 2. Expose methods like read, find, generatelist etc for interprocess
> > call.
> > for example in {Users Controller} that uses {User Model} I have the
> > function read($id) to return data to everyone needs a user record.
> > Really you don't need to declare the function in every 
> controller but
> > you can easily  move the logic in app_controller with something like
> >
> > function read( $id=null ) {
> >   // Its only an example
> >   if($id) {
> > $this->{$this-modelclass}->id = $id;
> > return $this->{$this-modelclass}->read();
> >   }
> >   return null;
> >
> > }It's my opinion would be glad to see yours
> > cheers.
> > Marco
> 
> Making use of $this->modelClass and class inheritance is a nice
> (standard?) technique. 

Ohps I know that my english is bad but I really think that have not said
this
> Are you saying that you prefer to use
> requestAction even when you could query the (associated) model?

I said that for me it's better to use only one model (the ref. model) for
each controller.
And use requestAction from one controller that not owned a model insted of
adding that model and duplicate actions.
I don't know of standards or best practices, I am curious instead to know
how others approach the problems.

> I hope not, others might follow that 
Even I :)
> and prompt the next 
> round of "what can I do to speed up my app" messages :P.

Regards


--~--~-~--~~~---~--~~
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: News Archive/Events Archive

2006-08-26 Thread John Zimmerman [gmail]
I am replying basically so this does not go unanswered.  Your question really covers too much to give a reply in a news group.Your desired functionality is not too hard to conceptualize once you get familiar with the Cake basics.
You should be able to start with the blog tutorial in the manual (http://manual.cakephp.org).The structure of your code for events and news should be very similar.
For additional functionality like pagination (groups of 10 items) someone has developed a pagination component to be used as an add on to applications that will work well.Searching will also not be difficult, but will be dependent on your data.  There are many ways to do it, but using a fulltext index in your database and a custom SQL query is a simple way to do it.
The cake conventions / MVC may take a little time to figure out, but once you do all of these things will become very clear.After you get the conventions checkout some of the projects at 
http://cakeforge.org.  You can download some of the source code there and possibly adapt that code for your purposes.  If you come up with something unique you can even give back to the community by starting your own project on CakeForge.
On 8/26/06, codigo <[EMAIL PROTECTED]> wrote:
Hello,I am new to cake, but I am very interested in these two topics. How doI maintain an events and news list so both can be archived? Forexample, I would like to show ten news items at a time. In order of
newest to oldest. I know I can just limit 10 ordered by id, but I wouldlike for the user to b able o click into all news items or even do asearch.Events would be the same, but divided into groups. Like:
Adult EventsJunior EventsKids EventsAll related to surfing. Please let me know if anyone has samolese theywould like to share.Thanks,Din
--~--~-~--~~~---~--~~
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: setup problem

2006-08-26 Thread John Zimmerman [gmail]
Yeah, that is why I wasn't getting it.The elearning folder should not have been created.On 8/26/06, bingo <
[EMAIL PROTECTED]> wrote:Hi John,I think there is some miscommunication. Sorry If I am confusing you.
Actually, everything is created within the application (app) folder.What I am not understanding is then why the bake script created the"elearning" folder. If all the models, controllers and view are to be
stored in "app" folder, then there is no need for "elearning" folder.Regards

--~--~-~--~~~---~--~~
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: setup problem

2006-08-26 Thread John Zimmerman [gmail]
That is odd.  Everything in the elearning folder should have been created in the app folder.If you merge your app folder and your elearning folder you should be good to go.I would try running the bake.php script one more time as well to see where it is creating the files for sure.  Maybe the mod_rewrite setting was interfering?
I have only used bake.php on unix/linux systems and the generated files end up in the /app folder.Anyway, see if that helps.On 8/26/06, bingo
 <[EMAIL PROTECTED]> wrote:Hi John
1. I am not developing a plugin2. No. I was just trying to use bake.php script from command line andit created a elearning folder.I used XAMPP to install Apache, PHP, and MySQL. Here is the current
folder structure of CakePHP1. D:\xampp\xampp\htdocs\cake   |-app  |--- models|--user.php
|--lession.php  |--- controller|--users_controller.php|--lession_controller.php  |--- view
   |-cake   |---\   |---\   |- elearning
   |--- model   |--- controller   |--- view   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  -~--~~~~--~~--~--~---


Re: setup problem

2006-08-26 Thread John Zimmerman [gmail]
Please post back with the paths relative to your cake installation.  It sounds like you are either confusing the way plugins are structured with the way a full application is structured or are trying to do things 'non-standard'.
Normally you would develop your whole application in /app and develop your plugins in /app/plugins.A plugin has the structure of a mini-application.So you should not really have a folder called 'elearning' where you are building your application unless you are developing a plugin.
If you want to rename the /app folder to elearning you can, but then you have to modify values in /.htaccess and /index.php to read from the new folder.  I wouldn't recommend doing this because any changes you make outside of the /app directory will be overwritten when you upgrade to the next release of cake.
bake.php will put the files in the right places.So questions from hereAre you developing a plugin?Do you have a reason not to develop your application in the location where 
bake.php puts the files?On 8/26/06, bingo <[EMAIL PROTECTED]> wrote:
Hi John,Can you tell me then what is the use of creating a 'elearning' andsubsequent 'elearning/models', 'elearning/view' etc folder. Also, thusit mean that when I am creating any view or stylesheet, all of this
will go in app folder and nothing in 'elearing' folderRegard

--~--~-~--~~~---~--~~
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: setup problem

2006-08-26 Thread John Zimmerman [gmail]
AFAIK bake.php will only operate on the /app folder structure.i.e. /app/controllers, /app/models, /app/views/controller_nameSo if my controller is called 'posts' and my model is called 'post' and I have the default actions 'add', 'view', 'edit', and 'delete' the 
bake.php script would generate the following files and nothing more.../app/controllers/posts_controller.php/app/models/post.php/app/views/posts/add.thtml/app/views/posts/edit.thtml/app/views/posts/view.thtml
/app/views/posts/delete.thtmlIf you are developing a plugin you will have to generate these with bake.php in the app directory and then move the files generated into the plugin structure.
On 8/26/06, bingo <[EMAIL PROTECTED]> wrote:
Hi John,Thanks for the hint. After google search on "cakephp xamppmod_rewrite", I got referred tohttp://wiki.cakephp.org/docs:mod_rewrite
.Now I able to get stylesheet working.But the other question still persist. I baked an application'elearning' using bake.php script. It created a folder 'elearning' andmodules, controller, and view folder within the 'elearning' folder. But
when I create modules and controller using bake.php, they are createdwithin app folder. Do I need to copy modules and controller from thereto my elearning folder ?thanks for the helpRegards

--~--~-~--~~~---~--~~
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: setup problem

2006-08-26 Thread John Zimmerman [gmail]
It sounds like mod_rewrite is not enabled.Please post back with the following and someone can walk you through enabling it on your system.Operating System:WebServer (i.e. Apache2):Bundle If Applicable (
i.e. WAMP, XAMPP, etc..):On 8/26/06, bingo <[EMAIL PROTECTED]> wrote:
hi,I have two questions regarding the setup1. I have downloaded CakePHP and placed the cake folder within thehtdocs folder i.e. my setup is as follows/htdocs/cake/cake   /htdocs/cake/app
But when I go to   http://localhost/cakeI am able to see the cakePHP page but not its style. Even the CakePHPicon is missing.where I am making a mistake ?
2. I created a new application 'elearning' using the bake.php script.It create a new folder for my application and it contains model,controller, view folder in it. But when I created my models andcontroller using the bake script, it placed them inside the 'app'
folder. I am not sure whether that's the right place or not. If it is,then what's the use of 'elearning' folder that was created by the bakescript.Looking forward for commentsRegards
--~--~-~--~~~---~--~~
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: search form.

2006-08-26 Thread John Zimmerman [gmail]
It is hard to give a specific example without your db schema and what type of search query you want to perform.But from the information you gave it seems that a "fulltext" search would be the easiest to implement.
Here is an article on how to setup fulltext on your database with how to query it.http://www.onlamp.com/pub/a/onlamp/2003/06/26/fulltext.html
To perform the query you will most likely need to use a custom sql statement within your model.http://manual.cakephp.org/chapter/modelsIf you scroll about 1/3 of the way down you will see the section on custom sql calls.
For your needs this solution should be quick and painless.Maybe someone has a better solution?On 8/26/06, 
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi.I would like to create a simple search form for my page.. it shouldsearch 1 table and show the result? Could not find any informationabout this (manual, wiki, forum etc.)  This is what I have tried so
far:controller:function search(){$conditions = $this->postConditions($this->data);$this->Recipe->findAll($conditions);}index:input('Recipe/name'); ?>
submit('search');?>Something is missing because nothing happens when I click search!Best regards.Asbjørn Morell.

--~--~-~--~~~---~--~~
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: Alternating Row Colors

2006-08-20 Thread John Zimmerman [gmail]
dangit, dangit, dangit..I need to research the helpers more.Thanks for the snippet, I will go back and recode the appropriate sections of my code.On 8/20/06, 
sicapitan <[EMAIL PROTECTED]> wrote:
AD7 is right, tablecells does this automatically, and you can set theclaternating colours$html->tableCells($tr, array('style'=>'background:#E4E4E4'),array('style'=>'background:transparent'));

--~--~-~--~~~---~--~~
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: User Bar Logic

2006-08-20 Thread John Zimmerman [gmail]
Is 'Username' really capitalized as the table name in your schema?Cake conventions would make this lowercase.So if you made it lower case in the db schema, but then try to refer to it as sentence/camel case the variable Username would not actually exist because it is really 'username'.
On 8/20/06, Simplerules <[EMAIL PROTECTED]> wrote:
No matter what I do it won't work here is the code:   //Get User Data;   $Profile = "">   if(isset($Profile['Username']))   { $this->set('logged_in', TRUE);
 $this->set('username', $Profile['Username']);   } else { $this->set('logged_in', FALSE);  }}and no matter where I put it I get:Notice: Undefined variable: logged_in in
\app\views\layouts\default.thtml on line 24

--~--~-~--~~~---~--~~
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: User Bar Logic

2006-08-19 Thread John Zimmerman [gmail]
I am pretty sure I have something in one of my apps setting variables in app_controller and readin the info in the default template.  I will double check.What I am doing for login info though is setting it in the session and then checking for it in the default template.
So you can always set a variable in the session and then check for it in your layouts.  This would bypass the need to use the set() method.On 8/19/06, 
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I understand why you would want to write it in the app_controler (sothat all controllers might inherit from this).  The problem is, theredoesn't seem to be a way to declare variables outside of functions.And, as you probably are finding out, when a application controller
inherits from the app_controller, the function declared inapp_controller (with the variable "foo", let's say) would beoverwritten.  Good question, but not sure how to make it work orachieve "visibility".

--~--~-~--~~~---~--~~
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: Alternating Row Colors

2006-08-19 Thread John Zimmerman [gmail]
I have been doing something something similar in my views. $row): ?>>
    I have the altRow class defined in my style sheet.
On 8/19/06, c_doug <[EMAIL PROTECTED]> wrote:
Can anyone tell me how to alternate row colors in CakePHP? Is itsimilar to doing it in regular PHP?Ex:$row_color = ($row_count % 2) ? $color1 : $color2;$row_count++;
--~--~-~--~~~---~--~~
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: Cross Application Sesssion

2006-08-18 Thread John Zimmerman [gmail]

You might hop on IRC for this one.  I am not sure many of us have
tried this before, but you should be able to find someone in the IRC
channel to give you a definitive answer.

On 8/18/06, Mandy Singh <[EMAIL PROTECTED]> wrote:
> I would be really helpful to get an answer on this one.
>
> I even tried using the database option but somehow it just doesn't work.
>
> Basically, I am trying to log the user in in /app1/ and then connecting to
> /app2/ which is /rdBloggery/ and want him autologged in there.
>
> Both apps are on the same domain but in diff folders under /cake/
>
> :(
>
> Mandy.
>
>  >
>

--~--~-~--~~~---~--~~
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: Trying CakePHP for the first time and get error

2006-08-18 Thread John Zimmerman [gmail]

Out of curiousity what zip program did you use to extract the
downloaded archive.

The empty directories are included in the archive, but some extraction
utilities do not create the empty directories upon extraction to the
filesystem.

On 8/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Figured it out. In case others get this. I found that if I created an
> empty "models" directory in the app folder, the warnings go away.
>
>
> >
>

--~--~-~--~~~---~--~~
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: Remove Powered By

2006-08-17 Thread John Zimmerman [gmail]
No.  Cake is distributed under the MIT license.http://en.wikipedia.org/wiki/MIT_Licensehttp://www.opensource.org/licenses/mit-license.php
On 8/17/06, Simplerules <[EMAIL PROTECTED]> wrote:
I couldn't find the exact license on the site, do I have to leave inthe 'Powered by CakePHP' icon and reference?.

--~--~-~--~~~---~--~~
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: Change Template

2006-08-17 Thread John Zimmerman [gmail]
copy the file from /cake/libs/view/templates/layouts/default.thtmlto/app/views/layouts/default.thtmlAnd start editing the new file in your application directory.  It will override the default.
On 8/17/06, Simplerules <[EMAIL PROTECTED]> wrote:
I just setup CakePHP, how can I change the default main HTML wrapper?The one that titles pages CakePHP and has a powered by CakePHP icon inthe footer.
--~--~-~--~~~---~--~~
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: How to operate relational database in cakephp

2006-08-16 Thread John Zimmerman [gmail]
Can you post pastes of your models?http://cakephp.org/pastes/addIt seems like if you get the relationships setup right and the table structure is solid it shouldn't be a problem.
I we can look at your models and possibly your DB schema we can suggest some changes and then at the very least you should be able to generate enough code with bake.php to get started.
On 8/16/06, Don DeCosta <[EMAIL PROTECTED]> wrote:
Chris Hartjes wrote:> Um, I think this is a question that goes beyond CakePHP.  This is> basic "how to create a page that has a form that you can submit".I have the same question and I think it is a CakePHP question.
I've got a view up that shows me a Client and lists its Sites and I'vegot a link that says, "Add Site"  I, obviously, want to add a Site tothe current Client... How to I pass the client_id to the Add Site view?
 (I'm using $this->Set(...)) to pass the client_id to site's Add viewand making it a hidden field on the form which then gets submitted backto the Add Site controller.But it's not very clean and I think I'm approaching the problem
wrong...  I've done these types of forms before using POP (Plain ol'PHP) so I know how to do a form and submit and a MySQL UPDATE and allthat jazz but I thought Cake would be a little cleaner.Any clues to how I'm misthinking the solution would be appreciated.
Don
--~--~-~--~~~---~--~~
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: How to associate models without tables?

2006-08-16 Thread John Zimmerman [gmail]
The flexibility of not having a table would only be short term however.When it comes time to add features or expand your application you might be finding yourself needing to add the table anyway.It is a little more work upfront, but in the long run it can save you some headache.
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Good Idea.The flexiblity of not having to have a database table for every model
would nice though.
--~--~-~--~~~---~--~~
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: Outputting Code on a Website

2006-08-16 Thread John Zimmerman [gmail]
It looks like CakeBin is using GeSHli (which looks like what I was looking for).Thanks for the replies.On 8/16/06, Chris Lamb <
[EMAIL PROTECTED]> wrote:HiOn Wed, 16 Aug 2006 15:19:59 -0700
"John Zimmerman [gmail]" <[EMAIL PROTECTED]> wrote:> Basically I just want to display php code within a web page.GeSHIi[0] seems to be the de-facto library for doing this.
Chris[0] http://qbnz.com/highlighter/-- Chris Lamb, Cambs, UK  WWW: http://chris-lamb.co.uk
  Q. Why is top posting bad? GPG: 0x634F9A20  A. Because it breaks the logical sequence of discussion

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


Outputting Code on a Website

2006-08-16 Thread John Zimmerman [gmail]
Here is what I want to do.  I have only done a little research, but just want to know if anyone has any recommendations.I want to output the contents of a php file to a webpage so that it willDisplay the complete unprocessed code within a box inside my layout
I would like it to format and do syntax highlighting as well.Useable via a component or vendor call in Cake.Basically I just want to display php code within a web page.Something like 
php.net does with code examples would probably work.Any ideas are appreciated.-John

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


Re: How to associate models without tables?

2006-08-16 Thread John Zimmerman [gmail]
You can setup a database table that is basically an index into your file system.This might be helpful if you want to store metadata about the files as well.  Gallery does this for images too.So your table would have and id, name, description, location, etc, and a path field.
The path field is where the file/picture is on the filesystem.Then cake can make associations using the standard id/inflection system.When deleting a picture in the model it will delete the database entry, you just add a piece of code to your model that also unlinks the file.
Scalability wise this will also be a more robust solution.On 8/16/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:Models without tables should still be able to be associated.
If I have aProduct hasMany ProductImage hasOne FileHandlerProductImage stores information about the file in the database.Filehandler handles uploading, deleting the file physically from the
disk.I could setup a really cool way to delete all product files when theProduct is deleted.  But , I need FileHandler to be associated toProductImage.Then I override function the delete function in ProductImage
del($id, $cascade = true){   parent::del($id,$cascade);   $this->FileHander->delete($whatever);}Perfect!!!However, Cake tries to do database stuff on FileHandler and it throws a
bunch of errors.Cake should know that $useTable = false; means that, even withassociations.Yah, I know, file a ticket, I will.  Anyone tried to do anything likethis successfully?
--~--~-~--~~~---~--~~
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: API documentation needs stylesheet change

2006-08-16 Thread John Zimmerman [gmail]
All I did was file the ticket.I don't do any "actual work" :-)Thanks gwoo/nate.On 8/16/06, 
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Wow! Fast work, gwoo and John. That is most helpful. You guys rock.Thank you.Best regards,Ralph

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


Re: How to upload image? Please give me a example,thanks!

2006-08-16 Thread John Zimmerman [gmail]
After you make the changes you can post back with code and/or errors if you are still having problems.If you paste your code into a bin at          http://cakephp.org/pastes/add
 we can look at your code easier and apply changes.Just post back with your problem and a link to your bin.On 8/15/06, georgeL <
[EMAIL PROTECTED]> wrote:you need to use the filehandler as a model and not inside your
controller. just copy the snippet into your model folder.when setup as a model you can use it like mentioned in the snippet andaccess it from your product model.
--~--~-~--~~~---~--~~
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: API documentation needs stylesheet change

2006-08-15 Thread John Zimmerman [gmail]
Gwoo updated the stylesheet already.http://api.cakephp.org/class_controller.htmlRefresh your the page if it doesn't show up.I marked it as trivial because it did not present a security concern or logical error in a code example that could lead to unworkable code (which can be very frustrating and/or lead to security problems/bugs later).
But I do think the suggestion is a good improvement to readability which is also important to reduce frustration.  Documentation is very important as well.  Priority just needs to be looked at in the scheme of all the work that needs to be done and what should be completed first.  Trivial items can often be taken care of faster than items marked as a higher priority.  So they might look for little things to do quickly (which may have been the case since gwoo already updated it).
It is always nice when a community can pitch in to help with bugs/improvements/suggestions etc.  I really like being able to tap into the community and the developers.I think one thing that is always good to remember that the developers/admins/documentation managers for the project do get quite a bit of flac for making CakePHP, its related documentation, and tools for the community available for all of us.  Phrasing suggestions and improvements in the most neutral and 
P.C. way possible will help everyone involved (even if you are frustrated and feel it is the developers' fault something isn't working).I do think it is more readable and that does make it more useful.Thanks!
On 8/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:Thank you for entering that ticket, John.I meant to write that you can see a sample of the improved appearance
athttp://jengels.maxsoft.com/test/versus the existing page athttp://api.cakephp.org/class_controller.html
(The top of my sample page is not rendered correctly. I didn't botherto fix those parts of the layout, because they are not relevant to thecomparison. The changes are further down the page.)This is a trivial problem only to those who believe clear documentation
is not very important. I think experience suggests otherwise. Even anincomplete project can be quite useful if it includes good, readabledocumentation.But I'm guessing you might agree, since you took the trouble to
ticket-ize it.Regards,Ralph

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


Re: Inflector bug or newbie mistake?

2006-08-15 Thread John Zimmerman [gmail]
Your controller needs to be plural.addresses_controller.phpclass AddressesController extends AppController{    var $name = "Addresses";}On 8/15/06, 
jbernat <[EMAIL PROTECTED]> wrote:
I am baking my first Cake app, and I created a controller named"address_controller.php" for a table named "addresses":class AddressController extends AppController{
var $name = 'Address';//var $scaffold;}?>I created a model called "address.php":class Address extends AppModel{var $name = 'Address';var $belongsTo = array('User' =>
   array('className'  => 'User', 'conditions' => '', 'order'  => '', 'foreignKey' => 'user_id'
   ) );}?>I attempt to access the URL .../address/add and get the following ModelNot Found error:Fatal: Unable to load model AddresFatal: Create Class:
class Addres extends AppModel{var $name = 'Addres';}?>in file : app\models\addres.phpWhy is it looking for addres.php with a class named 'Addres' instead of
address.php and 'Address'?Thanks in advance for your help!Jimhttp://www.photips.com

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


Re: API documentation needs stylesheet change

2006-08-15 Thread John Zimmerman [gmail]
Donehttps://trac.cakephp.org/ticket/1321On 8/15/06, nate <
[EMAIL PROTECTED]> wrote:We don't respond to requests or bugs posted here.  You can open a
ticket at https://trac.cakephp.org/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  -~--~~~~--~~--~--~---


Re: get CakePHP version

2006-08-09 Thread John Zimmerman [gmail]
Doing the following was easier than creating a new function and hooking into the constructor or before filter.Create a new static page in called...
/app/views/pages/cakeversion.thtmlIn that page put the following lines of code...$file = file_get_contents('../../VERSION.txt');pr($file);
?>Now access that page via...
http://example.com/pages/cakeversionInclude that one file in all your apps and you are good to go.  Even if the format of the VERSION.txt file changes, as long as the filename does not you are ok.  I have only tested the above on *NIX systems, Linux and BSD.  And you must be able to access the file_get_contents function for local files.  You can possibly just include the file as well.  Haven't tried it, but it will proably work and be more portable.
On 8/9/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
creat a function that checks parameters for a special keyword http://example.com/keyword
That function would be in app_controller.php and in your constructor you just check for the keyword and if it is there call your function.
Your function will then output the contents of the version.txt file to the browser.I will write something quick and reply back.
On 8/9/06, 
Martin Wood <[EMAIL PROTECTED]> wrote:

cwsTrummer wrote:> i need the version number only for customer support. when you have> installed your app on many servers and you make new versions some of> the customers use still the old versions. when you know that the
> customer uses an old version of cakephp and there was a bug you can ask> the customer see what cake version he is using!>> @martin wood> ok i can implement it. but i have to implement it everytime a new cake
> version is coming outnot if you implement it in /appif you upgrade the cake install it wont blow away your code and when you do anew project just copy it into the new /app directory :)

of course if they change the format of the VERSION.txt then you might have toupdate the code..




--~--~-~--~~~---~--~~
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: get CakePHP version

2006-08-09 Thread John Zimmerman [gmail]
creat a function that checks parameters for a special keyword http://example.com/keywordThat function would be in app_controller.php and in your constructor you just check for the keyword and if it is there call your function.
Your function will then output the contents of the version.txt file to the browser.I will write something quick and reply back.On 8/9/06, 
Martin Wood <[EMAIL PROTECTED]> wrote:
cwsTrummer wrote:> i need the version number only for customer support. when you have> installed your app on many servers and you make new versions some of> the customers use still the old versions. when you know that the
> customer uses an old version of cakephp and there was a bug you can ask> the customer see what cake version he is using!>> @martin wood> ok i can implement it. but i have to implement it everytime a new cake
> version is coming outnot if you implement it in /appif you upgrade the cake install it wont blow away your code and when you do anew project just copy it into the new /app directory :)
of course if they change the format of the VERSION.txt then you might have toupdate the code..

--~--~-~--~~~---~--~~
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: Can you find out the last controller/action?

2006-08-07 Thread John Zimmerman [gmail]
Thanks for the function.  I should have searched the API.On 8/7/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:Exactly what I was looking for Chris - 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  -~--~~~~--~~--~--~---


Re: Can you find out the last controller/action?

2006-08-07 Thread John Zimmerman [gmail]
This won't work all the time and can't be completely trusted, but you can write a function to deal with different scenarios based on the contents of $_SERVER['HTTP_REFERER'].Not all browsers will report it, and some will report it incorrectly on purpose.
But you should be able to determine the action requested from the referer in many cases, but you will need to have a default situation defined where you cannot accurately determine the referer.
On 8/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Is there any way to find out the controller/action that a user was atprior to the current controller/action?  Say you wanted to redirect auser back to the page they came from - how would you find out thatpage?
I'd prefer not to have to keep any sort of history, or last page, in asession.  Just wondering if the last controller/action comes for freein CakePHP.
--~--~-~--~~~---~--~~
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: Comment in Simple User Authentication example is wrong

2006-08-04 Thread John Zimmerman [gmail]
https://trac.cakephp.org/ticket/1268On 8/4/06, John Zimmerman [gmail] <
[EMAIL PROTECTED]> wrote:Sorry.  Didn't catch the first part of the post.  I will submit the bug right now.
What was the hangup with submitting a ticket on trac?On 8/4/06, John Zimmerman [gmail]
 <[EMAIL PROTECTED]> wrote:

Do you mind submitting a ticket on http://trac.cakephp.org
?That way it gets on their todo lists.
On 8/3/06, ebourqui
 <[EMAIL PROTECTED]> wrote:


Not really a question, but a statement, since I couldn't submit a bugat 
trac.cakephp.org
;The comment in the Simple User Authentication section of the CakePHPmanual (as of 8/3/2006) is wrong. It says:
// Note: hopefully your password in the DB is hashed,// so your comparison might look more like:// md5($somone['User']['password']) == ...it should read:// Note: hopefully your password in the DB is hashed,
// so your comparison might look more like:// ... == md5($this->data['User']['password']))because $someone is the data pulled from the database, which wouldalready be hashed, whereas $this->data['User']['password'] is the data
from the form, which has not been hashed yet.





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


Re: Comment in Simple User Authentication example is wrong

2006-08-04 Thread John Zimmerman [gmail]
Sorry.  Didn't catch the first part of the post.  I will submit the bug right now.What was the hangup with submitting a ticket on trac?On 8/4/06, John Zimmerman [gmail]
 <[EMAIL PROTECTED]> wrote:
Do you mind submitting a ticket on http://trac.cakephp.org?That way it gets on their todo lists.
On 8/3/06, ebourqui
 <[EMAIL PROTECTED]> wrote:

Not really a question, but a statement, since I couldn't submit a bugat trac.cakephp.org
;The comment in the Simple User Authentication section of the CakePHPmanual (as of 8/3/2006) is wrong. It says:
// Note: hopefully your password in the DB is hashed,// so your comparison might look more like:// md5($somone['User']['password']) == ...it should read:// Note: hopefully your password in the DB is hashed,
// so your comparison might look more like:// ... == md5($this->data['User']['password']))because $someone is the data pulled from the database, which wouldalready be hashed, whereas $this->data['User']['password'] is the data
from the form, which has not been hashed yet.



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


Re: Comment in Simple User Authentication example is wrong

2006-08-04 Thread John Zimmerman [gmail]
Do you mind submitting a ticket on http://trac.cakephp.org?That way it gets on their todo lists.On 8/3/06, ebourqui
 <[EMAIL PROTECTED]> wrote:
Not really a question, but a statement, since I couldn't submit a bugat trac.cakephp.org;The comment in the Simple User Authentication section of the CakePHPmanual (as of 8/3/2006) is wrong. It says:
// Note: hopefully your password in the DB is hashed,// so your comparison might look more like:// md5($somone['User']['password']) == ...it should read:// Note: hopefully your password in the DB is hashed,
// so your comparison might look more like:// ... == md5($this->data['User']['password']))because $someone is the data pulled from the database, which wouldalready be hashed, whereas $this->data['User']['password'] is the data
from the form, which has not been hashed yet.

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


Re: Pages Controller Subpages

2006-08-04 Thread John Zimmerman [gmail]
Gwoo answered my question on IRC.Here it is for anyone interested (was sort of obvious after he stated it).For static sub pages just create a subdirectory in your /app/views/pages directory.So if I wanted a page with url 
http://example.com/pages/about/companyThe path for that would be /app/views/pages/about/company.thtmlKind of a basic question but hope it helps someone else.
On 8/3/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
In the code for the pages controller there are variables there for subpages.Is anyone using static subpages with the pages controller?I browsed around for documentation about it, but came up empty.




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


Pages Controller Subpages

2006-08-03 Thread John Zimmerman [gmail]
In the code for the pages controller there are variables there for subpages.Is anyone using static subpages with the pages controller?I browsed around for documentation about it, but came up empty.

--~--~-~--~~~---~--~~
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: FCK eventually sorted out - For AD7Six (and those interested)

2006-08-01 Thread John Zimmerman [gmail]
Nevermind.  WidgEditor does not load if you have an onload function defined in your body tag.I had Kind of annoying.  I was preloading images with my startup function.
On 8/1/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
@Jon BennettCan you post a snippet of what you did to get widgEditor working?  I am trying to get it up and running but can't get it to load within cake.Thanks
On 7/24/06, 
Jon Bennett <[EMAIL PROTECTED]> wrote:

> > (and this is just my personal preference), I've much preferred TinyMCE> > to FCK.  It's much lighter-weight, has a more new-school API, and works> > well with Cake's field-naming conventions.
>> Thanks for that, I will definitely be checking out TinyMCE.I've just implementedTheManInBlue's widgEditor, very lightweight,though it also doesn't work with Cake's naming conventions (nothing in
_POST even, just 'true'), so I have to do:html_entity_decode($html->tagValue('News/body'); ?>
check out: http://www.themaninblue.com/experiment/widgEditor/
I need to extend it though to handle images better, what I'm, thinkingof doing is having a fixed height, scrollable div with all the
uploaded images as thumbnails in it, which if you click inserts thatimage into the textfield, hopefully at the last cursor insertationpoint, but at the beginning would be fine also.I'll try to knock up a snippet at some point if it all works according to plan.
jb--jon bennettt: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett


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


Re: FCK eventually sorted out - For AD7Six (and those interested)

2006-08-01 Thread John Zimmerman [gmail]
@Jon BennettCan you post a snippet of what you did to get widgEditor working?  I am trying to get it up and running but can't get it to load within cake.ThanksOn 7/24/06, 
Jon Bennett <[EMAIL PROTECTED]> wrote:
> > (and this is just my personal preference), I've much preferred TinyMCE> > to FCK.  It's much lighter-weight, has a more new-school API, and works> > well with Cake's field-naming conventions.
>> Thanks for that, I will definitely be checking out TinyMCE.I've just implementedTheManInBlue's widgEditor, very lightweight,though it also doesn't work with Cake's naming conventions (nothing in
_POST even, just 'true'), so I have to do:html_entity_decode($html->tagValue('News/body'); ?>
check out: http://www.themaninblue.com/experiment/widgEditor/I need to extend it though to handle images better, what I'm, thinkingof doing is having a fixed height, scrollable div with all the
uploaded images as thumbnails in it, which if you click inserts thatimage into the textfield, hopefully at the last cursor insertationpoint, but at the beginning would be fine also.I'll try to knock up a snippet at some point if it all works according to plan.
jb--jon bennettt: +44 (0) 1225 341 039 w: http://www.jben.net/iChat (AIM): jbendotnet Skype: jon-bennett
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Advanced Routing question/ 疑问

2006-07-29 Thread John Zimmerman [gmail]
I believe this would mean that either one or more of your .htaccess files are missing or mod_rewrite is not working.There are 3 .htaccess files/.htacess/app/.htaccess/app/webroot/.htaccess
Check to make sure they are all present and are readable by the webserver.If all are present and readable check to make sure mod_rewrite is enabled and configured properly.You can get your settings for PHP with the phpinfo() function.
On 7/29/06, JitZhang <[EMAIL PROTECTED]> wrote:
我配了/setingCAKE_ADMIN = 'edit'http://192.168.0.1/index.php/edit/accounts这个行/this is  OKhttp://192.168.0.1/edit/accounts
这个行不行/no ok不知怎么能去掉"index.php"?/how to move of "index.php"in URL望给我回信帮助!/help?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  -~--~~~~--~~--~--~---



Re: PagesController and titles

2006-07-28 Thread John Zimmerman [gmail]
I didn't find it in the manual either.  I just stumbled upon the variable playing around with pr() in various places and figured out I could set the variable in the view too.the pr() function is very useful for just exploring variables in Cake.
Just do a pr($this) in your controller, view, or model and you can get quite a bit of information.On 7/28/06, Sergei <
[EMAIL PROTECTED]> wrote:John Zimmerman [gmail] писал(а):> pageTitle = 'New Title For Static Page'; ?>
damnit. I knew there is a better method!Though I don't recall this in manual..S.
--~--~-~--~~~---~--~~
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: PagesController and titles

2006-07-28 Thread John Zimmerman [gmail]
An easier way is to set the page title in the actual static page file.You can do this at the top of the file in PHP code.  This way you do not have to modify the pages_controller.php unless you really want to.
So in your file /app/views/pages/my_static_page.thtmlPut this line at the top of the file and change the value to whatever you want.
pageTitle = 'New Title For Static Page'; ?>Then when you load example.com/pages/my_static_pageYou will get your new title instead of the default.  I did this with my 
resume.thtml file to display "Résumé" instead of "Resume".But if you are modifying the pages_controller already there may be fancier things you are trying to do.
On 7/28/06, Sergei <[EMAIL PROTECTED]> wrote:
Hi,if you need to set custom titles for static pages, here's a solution:1. just copy pages_controller.php to your app/controllers dir.2. make an array after linevar $uses = null;...like this:
var $titles = array ( 'help' => 'Ваша помощь', 'faq' => 'Вопросы и ответы', 'agreement' => 'Соглашение', 'your_view_name' => 'your_page_title', );3. change this line
96. $title = ucfirst($path[$count - 1]);to this:96. $title = $this->titles[$path[$count - 1]];That's it.S.
--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---



Pages / CMS / Routing Idea (looking for some feedback)

2006-07-26 Thread John Zimmerman [gmail]
Here is what I am currently thinking about doing (maybe someone has
already done it or tried).  I am just looking for some feedback on this.So the ultimate goal is to get rid of the "pages" or "posts" part of the url 
http://example.com/pages/home, without having to specify a new route definition for every page.
So instead of http://example.com/pages/home
 it would be http://example.com/home.So my idea is to have the following happen when a page is loaded (ignoring plugins and route definitions in this example)
Cake checks for a controller named 'home'If controller
does not exists it tries to use the default action in a specified
controller (like the pages controller) instead of displaying the
controller does not exist error.
This way I can have the following/products <--which is a controller/home <-- which is not a controllerand
/home will be passed as a parameter to a controller I have called
'cms_controller' for display instead of using something like /cms/home.
Anyone done this already?Anyone have any ideas on whether this is possible to implement in routes.php, bootstrap.php, or app_controller.php?Any input is appreciated.

--~--~-~--~~~---~--~~
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: website prototyping

2006-07-22 Thread John Zimmerman [gmail]
If you are looking to generate some UI mockups you could use http://www.nvu.com/index.phpIf you are looking to do sort of a screencast type demo, Wink is not open source, but it is a very good free program.  
http://www.debugmode.com/wink/On 7/22/06, codecowboy <[EMAIL PROTECTED]
> wrote:Does anyone know of any open source software for building prototypes
(screen shots) of your website.  Something that would be useful fordescribing various UI possibilities.thank you

--~--~-~--~~~---~--~~
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: How to use value used in input tag in view

2006-07-22 Thread John Zimmerman [gmail]
Also, I don't know if this is causing you a problem or not, but it would be a best practice to follow the Cake conventions (http://manual.cakephp.org/chapter/22) whenever it is practical to do so.
The piece of code I am refering to most is the capitalization of First_name, both in the database and in the code.Cake does a lot of "magic" behind the scene and following the conventions helps make it happen smoothly.
If you want the field to be capitalized on out put somewhere cake has some pretty cool functions in the Inflector class.You could do ...
echo Inflector::humanize('first_name');And the output would be "First Name".
But Ryan's suggestions sound like good ones.Let us know how it goes.On 7/22/06, ryanb006 <[EMAIL PROTECTED]
> wrote:Just noticed this:1) Your view file should be the same name as the function that renders
it.  (i.e. add.thtml)2) You may have just mistyped it, but your controller should beemployees_controller.phpYour paths/folders were fine though.Ryan
--~--~-~--~~~---~--~~
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: Why my fav.ico does not work properly?

2006-07-22 Thread John Zimmerman [gmail]
In Internet Explorer 6 save the page to your favorites.Then navigate to another page (i.e. Google.com).Then click on the page you saved in your favorites.That brings it up 100% in Internet Explorer for me.
Also, how did you create your favicon?  Did you embed sizes other than 16x16?On 7/22/06, RosSoft <[EMAIL PROTECTED]
> wrote:the correct way to use favicon is:webroot?>
favicon.ico"type="image/x-icon" />

--~--~-~--~~~---~--~~
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: How to use value used in input tag in view

2006-07-22 Thread John Zimmerman [gmail]
Is your field name actually 'First_name' or is it 'first_name'?This might be part of the problem.When you sumit the form via 'post' your value should come in an array called $data in the controller.
In the controller action you are submitting to insert the following code near the top and you can see how the data looks when it is submitted...if ( !empty($this->$data) ) {    pr($this->data);} else {
    echo "NO DATA SUBMITTED";}I did not actually run the above code but it should work to give you an idea of what is happening.If you still have problems post back with pastes ( 
http://cakephp.org/pastes/add ) for your database, controller, view, and model and someone will be able to help you sort it out.You can also build your MVC structure by using 'bake' from the command line.  Change directory to /cake.  then run 'php scripts/bake.php' and follow the directions from there to get started.
Baking the MVC structures (after you ahve created the database) will give you an idea for how it is to be setup.On 7/22/06, 
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
In my application, I am using  a  add form to add user records and forthis i am using the input tag in the view file but i am unable to getthis value in the controller so that i can save this value in thedatabase.
I am using the following input function :-$html->input('Employee/First_name', array('size' => 20))so the value stored in this input feild can be used in controllerthanks in advance
Neeraj
--~--~-~--~~~---~--~~
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: Installation Headaches

2006-07-21 Thread John Zimmerman [gmail]
I just took a look at your URL you provided.  It is displaying the contents of /app/webroot so it appears that  mod_rewrite is working, but since it is not making it out of /app/webroot I would double check that the .htaccess file at /app/.htaccess exists.
Also check to make sure the web server has permission to read them.If you have shell access to your hosting cd to your home directory at /hsphere/local/home/kumapage/Then type "chmod -R 755 *" prompt (minus the quotes).
That will make it so the webserver has read and execute permissions on your files.If you only have FTP access check your specific FTP client documentation for info regarding changing the permissions (which may also be called attributes depending on the client).
On 7/20/06, AD7six <[EMAIL PROTECTED]> wrote:
Hi Kuma,Only guessing :)this is being processed by cake: http://www.ludolab.org/app/asdfAnd this isn´t http://www.ludolab.org/asdf
So: It looks to me like you don´t have mod_rewrite enabled in yourbase folder do you have allowOverrides all?.Cheers,AD7sixPS IRC is the way forwards if you are still stuck(
http://irc.cakephp.org/irc.html if you don´t have a client)

--~--~-~--~~~---~--~~
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: Missing Database Table

2006-07-21 Thread John Zimmerman [gmail]
no problem.  glad it works.On 7/21/06, Matt2012 <[EMAIL PROTECTED]> wrote:
Argh! username was connecting but didnt have permission on that tablechanged it toon that has full access problem solved! Sorry for wasting your time onthis, but your questions stopped me going round and round in circles so
thanks anyway.
--~--~-~--~~~---~--~~
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: Missing Database Table

2006-07-21 Thread John Zimmerman [gmail]
One more thing before I think I am stumped.Can you post the contents of your /app/config/database.php file?So far everything looks ok as far as I can tell.If someone can't figure it out after that you might hop on the IRC channel and see if you can pick somebody's brain there.
On 7/21/06, Matt2012 <[EMAIL PROTECTED]> wrote:
Apache version  1.3.34 (Unix)MySQL version   4.1.19-standardPHP version 4.4.2//
-- -- Table structure for trains-- CREATE TABLE `trains`(`id` int(11) NOT NULL AUTO_INCREMENT ,`start_loc` varchar(255) ,`end_loc` varchar(255) ,
`start_datetime` datetime ,`end_datetime` datetime ,`created` datetime ,`updated` datetime ,PRIMARY KEY (`id`)) TYPE=MyISAM;
//ERROR ON DEBUG  3Missing Database TableNo Database table for model Train (expected "trains"), create it first.Notice: this error is being rendered by the
app/views/errors/missing_table.thtml view file, a user-customizableerror page.0 query took ms Nr  Query   Error   AffectedNum. rows   Took (ms)

--~--~-~--~~~---~--~~
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: Missing Database Table

2006-07-21 Thread John Zimmerman [gmail]
What versions of the following are you using: PHP, DB Type and Version (i.e. MySQL 5),  CakePHP?What operating system are you running the webserver on?And can you dump the SQL schema for your database as well?
One thing to double check is that the table name is the plural form instead of singular.  i.e. 'trains' instead of 'train'Set your debuge level in /app/config/core.php to 3 as well to get some more error messages.
On 7/21/06, Matt2012 <[EMAIL PROTECTED]> wrote:
well theres not all that much to it (I think you can ignore the view?)http://www.cakephp.org/pastes/show/2f021e23b8505de6867f55b79f090276
I appreciate the extra eyes..!
--~--~-~--~~~---~--~~
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: Missing Database Table

2006-07-21 Thread John Zimmerman [gmail]
http://www.cakephp.org/pastes/addCan you create some pastes of your code?On 7/21/06, Matt2012 <
[EMAIL PROTECTED]> wrote:Dont know whats happening - CAKE loading fine the homepage
definitely connecting to the right database but what ever table I putinuseTable its saying its missing. (I started off with the default table'trains' for model Train).Not had this problem before.
Anyone any ideas?
--~--~-~--~~~---~--~~
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: Bug: using multiple models in controller

2006-07-21 Thread John Zimmerman [gmail]
I believe if you add the multiverse onto the end of any line of your sources.list that has universe and then do an 'aptitude search java' you will get the sun packages again.  Just run 'aptitude install packagename'.
I did this with Ubuntu and it works fine.Should be similar with a straight Debian distro.On 7/17/06, invincible <
[EMAIL PROTECTED]> wrote:I've noticed.  Message passed.Debian doesn't seem to have a problem with the java licence anymore
(thanks to Sun).
--~--~-~--~~~---~--~~
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: creating a selectTag from an enum in the model

2006-07-21 Thread John Zimmerman [gmail]
I posted a solution for my enum problem as a snippet if anyone is interested.It needs some optimization and checking for robustness,  but it is a more generic solution that can be re-used in all your models/controllers.
http://cakeforge.org/snippet/detail.php?type=snippet&id=112If anyone has suggestions on how to make this more generic and to support more databases please post back with improvements.
I am only working with MySQLOn 6/12/06, naryga <[EMAIL PROTECTED]> wrote:
I've been dealing with the same issue.  If you use scaffolding, itworks just fine, producing a very nice select box.  If you use
bake.php, it produces LOT'S of errors.  Shold be consistent.  It seemslike there should be something in the manual about dealing with veriouscolumn types.
--~--~-~--~~~---~--~~
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: Save Date < 1970

2006-07-21 Thread John Zimmerman [gmail]
the $html->yearOptionTag() supports a minYear and maxYear parameter, but I can't find the same thing for dateTimeOptionTag().Anyway, you can use the concatenation method shown here 
http://manual.cakephp.org/chapter/10 (about half way down). To put the "date pieces" into the DATETIME format before save.If you didn't want to use a dropdown you can always just use a regular text input to have the year entered and then concatenate as shown later.
But in my testing, other than the dateTimeOptionTag problems with the range on years, there is nothing that is stopping me from storing dates below 1970On 7/21/06, 
John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
So far I am unable to get  $html->dateTimeOptionTag() to display a year below 1946, but I did manually modify the database entry to make the year 1700 and it displays correctly when I view the timestamp output by Cake, but when I go to edit that record the year still stops at 1946.
Anyone have any insight into the dateTimeOptionTag?On 7/21/06, John Zimmerman [gmail] <
[EMAIL PROTECTED]
> wrote:And the webserver is Apache on Debian
On 7/21/06, John Zimmerman [gmail] <

[EMAIL PROTECTED]> wrote:
What version of CakePHP are you using?  What version of PHP and MySQL?I just did a grep on the cake directory and found no reference to mktime().
I then setup a test model/controller/view and used a "DATETIME" MySQL field type.  I scaffolded everything and CakePHP brought up 1946 as the earliest year with no modifications on my part (in a dropdown box).
I am going to test out parameters, but everything saved correctly in 1946 for me.I am using CakePHP v1.1.6, PHP 5.x, and MySQL 5.x
On 7/21/06, 
Nick <[EMAIL PROTECTED]
> wrote:


How do I link into the existing Cake infrastructure for saving dates?Where is that specific code, where it's using the mktime function.







--~--~-~--~~~---~--~~
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: Save Date < 1970

2006-07-21 Thread John Zimmerman [gmail]
So far I am unable to get  $html->dateTimeOptionTag() to display a year below 1946, but I did manually modify the database entry to make the year 1700 and it displays correctly when I view the timestamp output by Cake, but when I go to edit that record the year still stops at 1946.
Anyone have any insight into the dateTimeOptionTag?On 7/21/06, John Zimmerman [gmail] <[EMAIL PROTECTED]
> wrote:And the webserver is Apache on Debian
On 7/21/06, John Zimmerman [gmail] <
[EMAIL PROTECTED]> wrote:
What version of CakePHP are you using?  What version of PHP and MySQL?I just did a grep on the cake directory and found no reference to mktime().
I then setup a test model/controller/view and used a "DATETIME" MySQL field type.  I scaffolded everything and CakePHP brought up 1946 as the earliest year with no modifications on my part (in a dropdown box).
I am going to test out parameters, but everything saved correctly in 1946 for me.I am using CakePHP v1.1.6, PHP 5.x, and MySQL 5.x
On 7/21/06, 
Nick <[EMAIL PROTECTED]> wrote:


How do I link into the existing Cake infrastructure for saving dates?Where is that specific code, where it's using the mktime function.





--~--~-~--~~~---~--~~
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: Save Date < 1970

2006-07-21 Thread John Zimmerman [gmail]
And the webserver is Apache on DebianOn 7/21/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
What version of CakePHP are you using?  What version of PHP and MySQL?I just did a grep on the cake directory and found no reference to mktime().
I then setup a test model/controller/view and used a "DATETIME" MySQL field type.  I scaffolded everything and CakePHP brought up 1946 as the earliest year with no modifications on my part (in a dropdown box).
I am going to test out parameters, but everything saved correctly in 1946 for me.I am using CakePHP v1.1.6, PHP 5.x, and MySQL 5.x
On 7/21/06, 
Nick <[EMAIL PROTECTED]> wrote:

How do I link into the existing Cake infrastructure for saving dates?Where is that specific code, where it's using the mktime function.



--~--~-~--~~~---~--~~
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: Save Date < 1970

2006-07-21 Thread John Zimmerman [gmail]
What version of CakePHP are you using?  What version of PHP and MySQL?I just did a grep on the cake directory and found no reference to mktime().I then setup a test model/controller/view and used a "DATETIME" MySQL field type.  I scaffolded everything and CakePHP brought up 1946 as the earliest year with no modifications on my part (in a dropdown box).
I am going to test out parameters, but everything saved correctly in 1946 for me.I am using CakePHP v1.1.6, PHP 5.x, and MySQL 5.xOn 7/21/06, 
Nick <[EMAIL PROTECTED]> wrote:
How do I link into the existing Cake infrastructure for saving dates?Where is that specific code, where it's using the mktime function.

--~--~-~--~~~---~--~~
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: Why my fav.ico does not work properly?

2006-07-21 Thread John Zimmerman [gmail]
Try the following...  "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    Title
    url('/favicon.ico');?>" type="image/x-icon" />
    charset('ISO-8859-1'); ?>
          
     css('default'); ?>

     

On 7/21/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
Didn't try your code out yet, but right off your closing head tag is invalidneeds to be On 7/21/06, saavedrajj
 <
[EMAIL PROTECTED]> wrote:
mmm... doesn't work, this is my code"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  Title
charset('ISO-8859-1'); ?>  
css('default'); ?>  




--~--~-~--~~~---~--~~
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: Why my fav.ico does not work properly?

2006-07-21 Thread John Zimmerman [gmail]
Didn't try your code out yet, but right off your closing head tag is invalidneeds to be On 7/21/06, saavedrajj <
[EMAIL PROTECTED]> wrote:mmm... doesn't work, this is my code"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  Title
charset('ISO-8859-1'); ?>  
css('default'); ?>  

--~--~-~--~~~---~--~~
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: Why my fav.ico does not work properly?

2006-07-21 Thread John Zimmerman [gmail]
url('/favicon.ico');?>" type="image/x-icon" />This one adds the full url using the Cake HtmlHelper
On 7/21/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
Also make sure to clear the cache, close, and then re-open the browser (especially IE) to get the favicon to display.  Some versions of IE only display the favicon if you save the site in your Favorites.

On 7/21/06, John Zimmerman [gmail] <[EMAIL PROTECTED]
> wrote:
Should be


And make sure your favicon is in /app/webroot/favicon.icoOn 7/21/06, saavedrajj <

[EMAIL PROTECTED]
> wrote:I just add the linein app/views/layouts/default.thtmland nothing happensif I copy the favicon.ico at app/webroot/imgand then add the line:type="image/x-icon">only works on Firefox...What I'm doing wrong?





--~--~-~--~~~---~--~~
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: Why my fav.ico does not work properly?

2006-07-21 Thread John Zimmerman [gmail]
Also make sure to clear the cache, close, and then re-open the browser (especially IE) to get the favicon to display.  Some versions of IE only display the favicon if you save the site in your Favorites.
On 7/21/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
Should be

And make sure your favicon is in /app/webroot/favicon.icoOn 7/21/06, saavedrajj <
[EMAIL PROTECTED]
> wrote:I just add the linein app/views/layouts/default.thtmland nothing happensif I copy the favicon.ico at app/webroot/imgand then add the line:type="image/x-icon">only works on Firefox...What I'm doing wrong?



--~--~-~--~~~---~--~~
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: Why my fav.ico does not work properly?

2006-07-21 Thread John Zimmerman [gmail]
Should be
And make sure your favicon is in /app/webroot/favicon.icoOn 7/21/06, saavedrajj <[EMAIL PROTECTED]
> wrote:I just add the linein app/views/layouts/default.thtmland nothing happensif I copy the favicon.ico at app/webroot/imgand then add the line:type="image/x-icon">only works on Firefox...What I'm doing wrong?

--~--~-~--~~~---~--~~
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: Point of Sanitize->sql?

2006-07-21 Thread John Zimmerman [gmail]
Only if magic quotes is enabled in php.iniOn 7/20/06, yeastinflexion <[EMAIL PROTECTED]> wrote:
i thought php automatically addslashes to posted data?

--~--~-~--~~~---~--~~
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: Admin Route

2006-07-20 Thread John Zimmerman [gmail]
I have the same kind of setup going except that my 'admin_controller.php' is actually called 'administrators_controller.php'My route looks like
$Route->connect('/admin', array('controller' =>'administrators', 'action' =>'index'));I have no problems using it this way, and I maintain administrators seperate from other users so in my case 'administrators' makes sense, since there can be multiple administrators.
CakePHP is probably having a problem with routing with admin routes enabled along with the index action of your admin controller.My guess is that your best option would be to rename your admin_controller.php to administrators_controller.php.  I know that works at least.
On 7/20/06, cammo <[EMAIL PROTECTED]> wrote:
Hi There,I am able to get the admin route to work for everything except for thehttp://path/to/admin/ I can get it to work forhttp://path/to/admin/users
 http://path/to/admin/add etc... but not thedefault admin path. I tried adding a route to the routes.php file$Route->connect('/admin', array('controller' => 'admin', 'action' =>
'index'));I have an admin controller and an index funtion and view but it comesup with address not found, has anybody had this problem before?Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Need examples of CakePHP driven e-commerce sites

2006-07-20 Thread John Zimmerman [gmail]
BakeSale is one in progress I believe.I will have a custom site done by the end of the month that is an ecommerce store.  After it is running I will look at extracting a distributable application with it.Can you think of any reason not to use it for ecommerce?
On 7/20/06, 379 the manifesto <[EMAIL PROTECTED]> wrote:
Could anybody point me towards a CakePHP driven e-commerce site please?I need to convince the other guys at work that Cake would be areasonable framework to build our next project with.I think its great, but some of my colleagues are more set in their
ways...
--~--~-~--~~~---~--~~
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: Getting scaffolding to work in /admin

2006-07-19 Thread John Zimmerman [gmail]
Baking your controllers for the admin section would be the best solution.You will get the main funcitonality of scaffolds which can then be customized to create a proper admin interface and change over time.
Even if it worked, if you rely on scaffolding for any part of your site that is not temporary, the next release of Cake could produce slightly different scaffolding which completely breaks what you were relying on for the admin interface
There is a reason not to rely on scaffolding for anything other than initial development.On 7/19/06, [EMAIL PROTECTED]
 <[EMAIL PROTECTED]> wrote:
Hey guys,I've done a search and can't seem to find anything concrete on how toget the scaffolding working for models when using the CAKE_ADMINsetting.I've seen 
https://trac.cakephp.org/ticket/327 and phpNut, I take yourpoint about scaffolding not being suitable for production but in someinstances, it would be really handy.So, if this is not possible, should I use the 
bake.php script andcreate the everything that way?Sorry, I'm still just learning about everything and I'm still sussingout best practices.Best Regards,Ryno
--~--~-~--~~~---~--~~
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  -~--~~~~--~~--~--~---


  1   2   3   >