Re: Media Plugin - Set Up Many Custom Settings example

2011-01-15 Thread huoxito
I ended up creating a lot of attachments models, because each one of them 
had to have different settings, some would require only three images, other 
two, other images and pdf files ...

and I put the Configure::write('Media.Filter' ... configuration array on the 
constructor of each one of those models. LIke this:

function __construct(){
  parent::__construct();
  $l = array('convert' => 'image/jpeg', 'fit' => array(600, 450));
  $m = array('convert' => 'image/jpeg', 'fitCrop' => array(318, 160));
  $s = array('convert' => 'image/jpeg', 'fit' => array(200, 125));
  Configure::write('Media.filter', array('image' => compact('m','l','s'),
   'document' => array()));
 }

It's been some weeks I don't work on this app, but I guess it worked at that 
time. Still I don't understand why the plugin developer put the 
configurations of images sizes, and other files like one unique array on a 
core.php file. It sounds a lot more usual to me that different models would 
mostly require different upload settings ... 

anyway, the plugin is really interesting, I intend to stick with it and 
hopefully adapt it to my specific needs ...

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: ACL Question

2011-01-15 Thread John Maxim
Hi Ed,

You can customise your users permission using ACL plugin. I suggest
finding one on your own, the current one I use has a drawback when I
have over 10 groups with different permission settings. The role
permission setting stops working. However, it's still effective if I
view users roles or users permission, and from there we can customise
the users permission.

You may want to refer to this:

http://www.alaxos.net/blaxos/pages/view/7

I'm not sure if you can find a better one or make one. The recommended
ACL plugins can be found here:

Mark Story's ACL extras and menu components.

http://josediazgonzalez.com/2010/08/16/cakephp-plugins-a-biblical-retelling/


If anytime you managed to get one working better than any above, share
with me.

:-)

Best regards,
Maxim.


On Jan 16, 9:59 am, Ed Propsner  wrote:
> I've been plugging away with Cake for some time now with extremely few
> issues. I recently decided that ACL was the right choice for my app ... now
> I have issues :)
>
> I've toyed with it long enough now that I understand the concept and
> mechanics of it but the issue I'm having is this:
> When granting access, it seems to be all or nothing. If I take the Group
> users for example, access has to be at
> CRUD 1 1 1 1 or sitewide access is denied. Changing it to CRUD 1 1 1 0
> denies access not just to the controller or parts of it,
> but the entire app. I was assuming that ultimately I would be able deny
> access to any controller/action that I want but it
> doesn't seem to be working out that way for me.
>
> What I am overlooking here? I referenced the tutorial in the book when
> putting the ACL together so the set-up is
> very straightforward. I didn't try to do anything fancy or creative with it,
> it's all by the book.

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


ACL Question

2011-01-15 Thread Ed Propsner
I've been plugging away with Cake for some time now with extremely few
issues. I recently decided that ACL was the right choice for my app ... now
I have issues :)

I've toyed with it long enough now that I understand the concept and
mechanics of it but the issue I'm having is this:
When granting access, it seems to be all or nothing. If I take the Group
users for example, access has to be at
CRUD 1 1 1 1 or sitewide access is denied. Changing it to CRUD 1 1 1 0
denies access not just to the controller or parts of it,
but the entire app. I was assuming that ultimately I would be able deny
access to any controller/action that I want but it
doesn't seem to be working out that way for me.

What I am overlooking here? I referenced the tutorial in the book when
putting the ACL together so the set-up is
very straightforward. I didn't try to do anything fancy or creative with it,
it's all by the book.

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: App:import not working on hosting providers

2011-01-15 Thread roman_coder
thanks for the quick response. I've cleared my cache a number of times
but I have the same problem. The plugin isn't finding the file.

Any tips on how to debug this?  I've been adding debug echo statements
in the cake/lib trying to find where the include is.  I'm sure there
is a better way of doing this.

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: Retrieve specific Associated Models

2011-01-15 Thread alaxos
you're welcome :-)

On 15 jan, 23:29, Santiago Basulto  wrote:
> This is exactly what i need!!
>
> Thank you very much brother!
>
> On Jan 15, 7:12 pm, alaxos  wrote:
>
> > Have you looked at the Containable behavior ? It can call the
> > unbindModel() for you.
>
> >http://book.cakephp.org/view/1323/Containable
>
> > Regards,
> > nIcO
>
> > On 15 jan, 20:56, Santiago Basulto  wrote:
>
> > > Hello people. I'm facing a little problem here.
>
> > > Supose i've my Car Model defined like this:
>
> > > class Car extends AppModel{
> > >    $name = 'Car';
>
> > >    // Associations
> > >    $hasOne = array('engine');
>
> > >    $hasMany = array('Tyre','Color','OtherModel', . );
>
> > > }
>
> > > I would like to read the data from my Car model but just get the data
> > > for the engine. Not the other associated models (Tyre, Color, etc).
>
> > > Something like this:
>
> > > $this->Car->read(null,$id) =
>
> > > array(
> > >    [Car] = Array(  //car data  )
> > >    [Engine] = Array(// Engine data)
> > > )
>
> > > if i set recursive to -1, i just get the Car data. If it's 1, i get
> > > all the data (Car, Engine, Tyre, etc).
>
> > > I could unbind the models i don't want to read, something like this:
>
> > > $this->Car->unbindMoldel(
> > > array('hasMany'=>array('Tyre','Color','OtherModel')), true).
>
> > > I was wondering if there's a better solution.
>
> > > Also, if i have my model "loaded" in $this->Car, how can i get the
> > > associated models from here?
> > > I mean, if i do this:
>
> > > $this->Car->recursive= -1;
> > > with a call to read() i get the Car data. How can, from here, get the
> > > other associated models?
>
> > > Something like:
> > > $this->Car->Engine->readCurrent ??
>
> > > Thanks
>
> > > --
> > > Santiago Basulto.-

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: Retrieve specific Associated Models

2011-01-15 Thread Santiago Basulto
This is exactly what i need!!

Thank you very much brother!

On Jan 15, 7:12 pm, alaxos  wrote:
> Have you looked at the Containable behavior ? It can call the
> unbindModel() for you.
>
> http://book.cakephp.org/view/1323/Containable
>
> Regards,
> nIcO
>
> On 15 jan, 20:56, Santiago Basulto  wrote:
>
> > Hello people. I'm facing a little problem here.
>
> > Supose i've my Car Model defined like this:
>
> > class Car extends AppModel{
> >    $name = 'Car';
>
> >    // Associations
> >    $hasOne = array('engine');
>
> >    $hasMany = array('Tyre','Color','OtherModel', . );
>
> > }
>
> > I would like to read the data from my Car model but just get the data
> > for the engine. Not the other associated models (Tyre, Color, etc).
>
> > Something like this:
>
> > $this->Car->read(null,$id) =
>
> > array(
> >    [Car] = Array(  //car data  )
> >    [Engine] = Array(// Engine data)
> > )
>
> > if i set recursive to -1, i just get the Car data. If it's 1, i get
> > all the data (Car, Engine, Tyre, etc).
>
> > I could unbind the models i don't want to read, something like this:
>
> > $this->Car->unbindMoldel(
> > array('hasMany'=>array('Tyre','Color','OtherModel')), true).
>
> > I was wondering if there's a better solution.
>
> > Also, if i have my model "loaded" in $this->Car, how can i get the
> > associated models from here?
> > I mean, if i do this:
>
> > $this->Car->recursive= -1;
> > with a call to read() i get the Car data. How can, from here, get the
> > other associated models?
>
> > Something like:
> > $this->Car->Engine->readCurrent ??
>
> > Thanks
>
> > --
> > Santiago Basulto.-

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: Retrieve specific Associated Models

2011-01-15 Thread alaxos
Have you looked at the Containable behavior ? It can call the
unbindModel() for you.

http://book.cakephp.org/view/1323/Containable

Regards,
nIcO

On 15 jan, 20:56, Santiago Basulto  wrote:
> Hello people. I'm facing a little problem here.
>
> Supose i've my Car Model defined like this:
>
> class Car extends AppModel{
>    $name = 'Car';
>
>    // Associations
>    $hasOne = array('engine');
>
>    $hasMany = array('Tyre','Color','OtherModel', . );
>
> }
>
> I would like to read the data from my Car model but just get the data
> for the engine. Not the other associated models (Tyre, Color, etc).
>
> Something like this:
>
> $this->Car->read(null,$id) =
>
> array(
>    [Car] = Array(  //car data  )
>    [Engine] = Array(// Engine data)
> )
>
> if i set recursive to -1, i just get the Car data. If it's 1, i get
> all the data (Car, Engine, Tyre, etc).
>
> I could unbind the models i don't want to read, something like this:
>
> $this->Car->unbindMoldel(
> array('hasMany'=>array('Tyre','Color','OtherModel')), true).
>
> I was wondering if there's a better solution.
>
> Also, if i have my model "loaded" in $this->Car, how can i get the
> associated models from here?
> I mean, if i do this:
>
> $this->Car->recursive= -1;
> with a call to read() i get the Car data. How can, from here, get the
> other associated models?
>
> Something like:
> $this->Car->Engine->readCurrent ??
>
> Thanks
>
> --
> Santiago Basulto.-

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 would you solve this problem?

2011-01-15 Thread Ryan Schmidt

On Jan 14, 2011, at 23:23, Adam wrote:

> Disclaimer: I can't program. 

> My ideal solution: 
> I write some code or have someone help me write the code that gets the info, 
> converts it to local time, and displays it on a webpage with dynamic 
> content. What programing language do I need to learn?

What you've described should be easy enough for a programmer to bang out in a 
couple hours, but if you can't program, as you mentioned, then you may want to 
employ the services of someone who can. Any scripting language (php, perl, 
python, ruby, etc.) should be able to do what you want. The choice of 
programming language is probably less important than choosing a programmer 
confident in his or her ability to complete this task.


> My organization insists on having this information in a powerpoint 
> presentation form

> Even better would be putting it into google docs presentation automatically!

Automatically formatting the result into a PowerPoint or Google Docs 
presentation is probably the most difficult part of your request; if you can 
exclude that part, then it should be relatively straightforward.



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


Retrieve specific Associated Models

2011-01-15 Thread Santiago Basulto
Hello people. I'm facing a little problem here.

Supose i've my Car Model defined like this:

class Car extends AppModel{
   $name = 'Car';

   // Associations
   $hasOne = array('engine');

   $hasMany = array('Tyre','Color','OtherModel', . );
}

I would like to read the data from my Car model but just get the data
for the engine. Not the other associated models (Tyre, Color, etc).

Something like this:

$this->Car->read(null,$id) =

array(
   [Car] = Array(  //car data  )
   [Engine] = Array(// Engine data)
)

if i set recursive to -1, i just get the Car data. If it's 1, i get
all the data (Car, Engine, Tyre, etc).

I could unbind the models i don't want to read, something like this:

$this->Car->unbindMoldel(
array('hasMany'=>array('Tyre','Color','OtherModel')), true).

I was wondering if there's a better solution.

Also, if i have my model "loaded" in $this->Car, how can i get the
associated models from here?
I mean, if i do this:

$this->Car->recursive= -1;
with a call to read() i get the Car data. How can, from here, get the
other associated models?

Something like:
$this->Car->Engine->readCurrent ??

Thanks

-- 
Santiago Basulto.-

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: error ??

2011-01-15 Thread Ryan Schmidt

On Jan 14, 2011, at 23:28, chris...@yahoo.com wrote:

> getting error on first attempt to access the user page,... after
> all,... refresh,... it getting thru and working... why...? Did anyone
> know why...?
> 
> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
> allocate 311296 bytes) in /home/zipmaniak/zippopeople.com/html/app/
> views/users/show.ctp on line 344

As the error message says, your PHP process ran out of memory. Your php.ini is 
currently configured to allow each PHP process only 8MB of memory, and this was 
clearly not enough. Allow each PHP process to have more memory, by editing the 
appropriate value in your php.ini.



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: Plugins

2011-01-15 Thread Jeremy Burns | Class Outfit
I wrote an Authorize.net component a while back...I'll drag a copy out and post 
it.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 15 Jan 2011, at 14:09, Larry E. Masters wrote:

> Write the plugin if you need it. Chances are if you have not found it using a 
> google search or on Github there is not one publicly available.
> 
> --
> Larry E. Masters
> 
> 
> On Sat, Jan 15, 2011 at 12:52 AM, earth  wrote:
> Any update on the plugins for Authorize.net (AIM method) and iTransact
> payment gateways.
> 
> On Jan 14, 7:34 pm, earth  wrote:
> > Hello,
> >
> > Is their any cakePHP plugin for Authorize.net (AIM method) and
> > iTransact payment gateways.
> 
> 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
> 
> 
> 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

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: More than 1 layout

2011-01-15 Thread John Maxim
Yes, I get it, Renato. Thanks.

Regards,
Maxim

On Jan 15, 11:01 pm, Renato de Freitas Freire 
wrote:
> Hi.
>
> If you want to change the layout for all actions of your controller,
> you can add this line near var uses()
> Var $layout = "default_news";
>
> Otherwise you can change the layout for an especific action, adding
> the line INSIDE the action.
> $this->layout = "default_news";
>
> Got it?
>
>
>
> On Saturday, January 15, 2011, John Maxim  wrote:
> > TYPO: I mean I created DEFAULT_NEWS.ctp
>
> > On Jan 15, 10:35 pm, John Maxim  wrote:
> >> Hi,
>
> >> How am I going to set a different layout for my News::controller ?
> >> Currently, I'm using default.ctp for all controllers. I created
> >> another layout called news_default.ctp in app/views/layout/
>
> >> So upon reading this:http://book.cakephp.org/view/1080/Layouts
>
> >> I created in users::controller
>
> >> function viewActive() {
> >>                         $this->layout = 'default_news';
> >>     }
>
> >> But where am I going to place this: var $layout = 'default_news';
> >> ?
>
> >> How does it know when to use default_news.ctp when we browse to
> >> news::controller?
>
> >> This is a bit confusing.
>
> >> Can anyone explain a bit more in depth and clearer?
>
> >> Thanks,
> >> Maxim
>
> > 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.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> --
>
> --
> Renato de Freitas Freire
> ren...@morfer.org

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: App:import not working on hosting providers

2011-01-15 Thread WyriHaximus
Aye every time you push an update to a site, for your own sanity and
your users user experience clear your cache.

On Jan 15, 3:48 pm, euromark  wrote:
> you need to clear your cache
> then it will find it again :)
>
> On 15 Jan., 08:56, roman_coder  wrote:
>
>
>
>
>
>
>
> > I'm working on Cakephp 1.3.6 and leveraging JonBradley's S3 plugin
> > (https://github.com/jonbradley/CakePHP-S3-Upload).  It works great on
> > my local dev box but once I put it on a hosting provider I get the
> > class not found error.  I've tried both Joyent (old TextDrive & 1and1)
> > & got the same error.
>
> > Fatal error: Class 'S3' not found in /homepages/6/d271502791/htdocs/
> > demo/app/plugins/upload/controllers/components/upload.php on line 26
>
> > The import for the S3 class is here: -upload.php on line 26.
>
> > App::import('Vendor', 'Upload.S3');
>
> > I've even tried the below and got the same error:
>
> > App::import('Vendor', 'Upload.S3', array('file'=>'/demo/app/plugins/
> > upload/vendors/S3/S3.php'));
>
> > Anyone have any ideas why it's not finding this class?

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: More than 1 layout

2011-01-15 Thread Renato de Freitas Freire
Hi.

If you want to change the layout for all actions of your controller,
you can add this line near var uses()
Var $layout = "default_news";

Otherwise you can change the layout for an especific action, adding
the line INSIDE the action.
$this->layout = "default_news";

Got it?




On Saturday, January 15, 2011, John Maxim  wrote:
> TYPO: I mean I created DEFAULT_NEWS.ctp
>
> On Jan 15, 10:35 pm, John Maxim  wrote:
>> Hi,
>>
>> How am I going to set a different layout for my News::controller ?
>> Currently, I'm using default.ctp for all controllers. I created
>> another layout called news_default.ctp in app/views/layout/
>>
>> So upon reading this:http://book.cakephp.org/view/1080/Layouts
>>
>> I created in users::controller
>>
>> function viewActive() {
>>                         $this->layout = 'default_news';
>>     }
>>
>> But where am I going to place this: var $layout = 'default_news';
>> ?
>>
>> How does it know when to use default_news.ctp when we browse to
>> news::controller?
>>
>> This is a bit confusing.
>>
>> Can anyone explain a bit more in depth and clearer?
>>
>> Thanks,
>> Maxim
>
> 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
>

-- 

--
Renato de Freitas Freire
ren...@morfer.org

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: More than 1 layout

2011-01-15 Thread John Maxim
SOLVED.

http://groups.google.com/group/cake-php/browse_thread/thread/b05e1b7d24d89f8c

Kind of hard to get back on track after going through REST, I was
reading back some post and solved this, have been unRESTful.

:-)

Thanks for looking.

On Jan 15, 10:38 pm, John Maxim  wrote:
> TYPO: I mean I created DEFAULT_NEWS.ctp
>
> On Jan 15, 10:35 pm, John Maxim  wrote:
>
> > Hi,
>
> > How am I going to set a different layout for my News::controller ?
> > Currently, I'm using default.ctp for all controllers. I created
> > another layout called news_default.ctp in app/views/layout/
>
> > So upon reading this:http://book.cakephp.org/view/1080/Layouts
>
> > I created in users::controller
>
> > function viewActive() {
> >                         $this->layout = 'default_news';
> >     }
>
> > But where am I going to place this: var $layout = 'default_news';
> > ?
>
> > How does it know when to use default_news.ctp when we browse to
> > news::controller?
>
> > This is a bit confusing.
>
> > Can anyone explain a bit more in depth and clearer?
>
> > Thanks,
> > Maxim

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: App:import not working on hosting providers

2011-01-15 Thread euromark
you need to clear your cache
then it will find it again :)

On 15 Jan., 08:56, roman_coder  wrote:
> I'm working on Cakephp 1.3.6 and leveraging JonBradley's S3 plugin
> (https://github.com/jonbradley/CakePHP-S3-Upload).  It works great on
> my local dev box but once I put it on a hosting provider I get the
> class not found error.  I've tried both Joyent (old TextDrive & 1and1)
> & got the same error.
>
> Fatal error: Class 'S3' not found in /homepages/6/d271502791/htdocs/
> demo/app/plugins/upload/controllers/components/upload.php on line 26
>
> The import for the S3 class is here: -upload.php on line 26.
>
> App::import('Vendor', 'Upload.S3');
>
> I've even tried the below and got the same error:
>
> App::import('Vendor', 'Upload.S3', array('file'=>'/demo/app/plugins/
> upload/vendors/S3/S3.php'));
>
> Anyone have any ideas why it's not finding this class?

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: More than 1 layout

2011-01-15 Thread John Maxim
TYPO: I mean I created DEFAULT_NEWS.ctp

On Jan 15, 10:35 pm, John Maxim  wrote:
> Hi,
>
> How am I going to set a different layout for my News::controller ?
> Currently, I'm using default.ctp for all controllers. I created
> another layout called news_default.ctp in app/views/layout/
>
> So upon reading this:http://book.cakephp.org/view/1080/Layouts
>
> I created in users::controller
>
> function viewActive() {
>                         $this->layout = 'default_news';
>     }
>
> But where am I going to place this: var $layout = 'default_news';
> ?
>
> How does it know when to use default_news.ctp when we browse to
> news::controller?
>
> This is a bit confusing.
>
> Can anyone explain a bit more in depth and clearer?
>
> Thanks,
> Maxim

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


More than 1 layout

2011-01-15 Thread John Maxim
Hi,

How am I going to set a different layout for my News::controller ?
Currently, I'm using default.ctp for all controllers. I created
another layout called news_default.ctp in app/views/layout/

So upon reading this: http://book.cakephp.org/view/1080/Layouts

I created in users::controller

function viewActive() {
$this->layout = 'default_news';
}

But where am I going to place this: var $layout = 'default_news';
?

How does it know when to use default_news.ctp when we browse to
news::controller?

This is a bit confusing.

Can anyone explain a bit more in depth and clearer?

Thanks,
Maxim

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: setflash edit

2011-01-15 Thread lvdb
Hello Dr. Loboto,

Thank you, it works.

Leo


On 13 jan, 02:34, "Dr. Loboto"  wrote:
> You see page cached by browser when hit "previous" button there.
> Disable cache at all by $this->disableCache() in controller, or do not
> use "previous" button.
>
> On 13 янв, 02:14, lvdb  wrote:
>
>
>
> > Hello Amit,
>
> > Thank you for your reply.
> > I will try to explain it
>
> > First I am editing a record in the edit view. When I save the record
> > it redirects me to the index view and give a message "Job has been
> > updated".
> > Second step is I go to the detail view and check the details after
> > that I go back to the index view (with the button "previous" in the
> > browser).
> > But when I enter the index view it gives me again the message "Job has
> > been updated".
> > I looked in the source of the index view and this div has been
> > created:
>
> > Job has been updated
>
> > When I now refresh the page with F5 the div is gone.
>
> > I hope you understand it
>
> > Leo van den Berg
>
> > On 12 jan, 04:58, Amit Badkas  wrote:
>
> > > Hi,
>
> > > As I already mentioned "You don't need to delete flash message in session
> > > explicitly, $this->Session->flash() does it automagically.", the message
> > > doesn't appear after page refresh.
>
> > > In the first message you mentioned "But when I go after the edit to the
> > > details view and back to the index view it gives me the message 'your job
> > > has been updated'." and now you are asking "How can I refresh the page to
> > > remove the flash message from the page?". So, I am confused about what
> > > exactly you need. Please be specific about your problem.
>
> > > Amit Badkas
>
> > > PHP Applications for E-Biz:http://www.sanisoft.com
>
> > > On Tue, Jan 11, 2011 at 11:42 PM, lvdb  wrote:
> > > > Hello Amit,
>
> > > > Thank you for your answer. When I refresh the view page the message is
> > > > gone.
> > > > It is not done automatically. How can I refresh the page?
>
> > > > Leo
>
> > > > On 10 jan, 07:31, Amit Badkas  wrote:
> > > > > Hi,
>
> > > > > Does the details page output flash message? You don't need to delete
> > > > flash
> > > > > message in session explicitly, $this->Session->flash() does it
> > > > > automagically.
>
> > > > > Amit Badkas
>
> > > > > PHP Applications for E-Biz:http://www.sanisoft.com
>
> > > > > On Sat, Jan 8, 2011 at 1:13 AM, lvdb  
> > > > > wrote:
> > > > > > Hello,
>
> > > > > > I have made a flash message "your job has been updated". When I 
> > > > > > edit a
> > > > > > job and have been redirected to the index view the message appears
> > > > > > (and after 3 seconds it hides). This is working fine. But when I go
> > > > > > after the
> > > > > > edit to the details view and back to the index view it gives me the
> > > > > > message "your job has been updated".
> > > > > > Must I delete the session and how do I do that?
>
> > > > > > Thank you in advance for your answer.
>
> > > > > > Leo van den Berg
>
> > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > > > 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-Tekstuitoorspronkelijk
> > > > bericht niet weergeven -
>
> > > > > - Tekst uit oorspronkelijk bericht weergeven -
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers
> > > > 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-Tekstuit oorspronkelijk 
> > > >bericht niet weergeven -
>
> > > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk 
> > > bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

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: Plugins

2011-01-15 Thread Larry E. Masters
Write the plugin if you need it. Chances are if you have not found it using
a google search or on Github there is not one publicly available.

-- 
Larry E. Masters


On Sat, Jan 15, 2011 at 12:52 AM, earth  wrote:

> Any update on the plugins for Authorize.net (AIM method) and iTransact
> payment gateways.
>
> On Jan 14, 7:34 pm, earth  wrote:
> > Hello,
> >
> > Is their any cakePHP plugin for Authorize.net (AIM method) and
> > iTransact payment gateways.
>
> 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


App:import not working on hosting providers

2011-01-15 Thread roman_coder
I'm working on Cakephp 1.3.6 and leveraging JonBradley's S3 plugin
(https://github.com/jonbradley/CakePHP-S3-Upload).  It works great on
my local dev box but once I put it on a hosting provider I get the
class not found error.  I've tried both Joyent (old TextDrive & 1and1)
& got the same error.

Fatal error: Class 'S3' not found in /homepages/6/d271502791/htdocs/
demo/app/plugins/upload/controllers/components/upload.php on line 26

The import for the S3 class is here: -upload.php on line 26.

App::import('Vendor', 'Upload.S3');

I've even tried the below and got the same error:

App::import('Vendor', 'Upload.S3', array('file'=>'/demo/app/plugins/
upload/vendors/S3/S3.php'));

Anyone have any ideas why it's not finding this class?




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: Plugins

2011-01-15 Thread earth
Any update on the plugins for Authorize.net (AIM method) and iTransact
payment gateways.

On Jan 14, 7:34 pm, earth  wrote:
> Hello,
>
> Is their any cakePHP plugin for Authorize.net (AIM method) and
> iTransact payment gateways.

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: Media Plugin - Set Up Many Custom Settings example

2011-01-15 Thread Cameron
I'm curious how this ended up working out for you as an overall
solution.

~Cameron

On Dec 7 2010, 10:50 pm, huoxito  wrote:
> I've been struggling for two days to understand theMediaPlugin.
> Intend to use it to deal with allmediafiles, mostly images and pdfs,
> for this project I'm developing.
>
> I still have doubts on how I'm gonna do a lot of stuff with theplugin
> but so far I'd like to share an example with you and hear your
> thoughts about it.
>
> Here is a minified context of the app:
>
> I have a News model which will need at least two different images with
> different sizes attached to it.
> There's also a Download model which will need an image, using size
> settings different from the one on news model, and a pdf file.
>
> To be able to have different validations settings and image size
> settings I first changed the attachments element. When calling it I
> added a group variable to it. For example:
>
> echo $this->element('attachments',
>                     array('plugin' => 'Media',
>                           'assocAlias' => 'Attachment.0',
>                           'model' => 'Download',
>                           'label' => 'Image',
>                           'group' => 'img'));
> echo $this->element('attachments',
>                     array('plugin' => 'Media',
>                           'assocAlias' => 'Attachment.1',
>                           'model' => 'Download',
>                           'label' => 'Pdf File',
>                           'group' => 'pdf'));
>
> This way I am able to have custom validation rules on model for each
> type of file and then give differents responses for the user on each
> input instance.
>
> On attachments model I added this beforeValidate function where I
> intend to write custom settings for each upload case on the
> application.
>
> function beforeValidate(){
>
>     if($this->data['Attachment']['model'] === 'Download'){
>         $m = array('convert' => 'image/jpeg', 'fitCrop' => array(150,
> 210));
>         Configure::write('Media.filter', array('image' =>
> compact('m')));
>     }
>
>     if($this->data['Attachment']['group'] === 'pdf'){
>         $this->validate = array(
>             'file' => array(
>                 'size'       => array(
>                     'rule' => array('checkSize', '2M'),
>                 ),
>                 'extension'  => array(
>                     'rule' => array('checkExtension', false,
> array('pdf')),
>                 ),
>                 'mimeType'   => array(
>                     'rule' => array('checkMimeType', false,
>                                 array('application/pdf')),
>                 )
>             ),
>         );
>         $this->Behaviors->detach('Media.Generator');
>     }else{
>         $this->validate = array(
>             'file' => array(
>                 'size'       => array(
>                     'rule' => array('checkSize', '1M'),
>                 ),
>                 'extension'  => array(
>                     'rule' => array('checkExtension', false,
> array('jpg', 'jpeg', 'png','gif')),
>                 ),
>                 'pixels'     => array(
>                     'rule' => array('checkPixels', '1600x1600'),
>                 ),
>                 'mimeType'   => array(
>                     'rule' => array('checkMimeType', false,
>                                 array('image/jpeg', 'image/png',
> 'image/gif')),
>                 )
>             ),
>         );
>         $this->Behaviors->attach('Media.Generator');
>     }
>     return true;
>
> }
>
> I'd really like to hear what you guys think of the approach used
> above. I made these conditions on a beforeValidate function because I
> couldn't figure out a way to change input file names and still make
> thepluginauto magically upload the files and save them on a
> database. I'm also wondering that if this Attachments model get too
> huge of conditions I'd better create one model for eachattachment
> related model to let validations and other settings more clear.
>
> Also found the architecture thepluginreally fantastic, it'd take a
> life for a begginer cakephp developer and object stuff student to
> develop something like that.
>
> Hope my english was good enough to make my point.

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


Client side jquery validation

2011-01-15 Thread pave2009
Hi All,

 Can anyone suggest me, how to implement client side (Before form
submission)  jquery validation in cakephp?
Do we have any useful helper available for cakephp 1.3 ?

Thanks
Pave

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


Earn upto Rs. 9,000 pm with PaisaLive.com!

2011-01-15 Thread Amit Rawat
--
Earn upto Rs. 9,000 pm with *Paisa**Live.com!*
--

Hi ,

I have something interesting for you - you can easily *earn regular income
online* via PaisaLive.com!

It’s really amazing! You get paid to open & read the contents of PaisaLive
mails. You also receive special discount coupons, promotions and free passes
to various events in your city.

Join now and *get Rs. 99* instantly, just for joining. What more, as a
special bonus you get paid for inviting your friends also!

Create your PaisaLive Account & refer your friends to earn launch referral
bonus on every new registration.

http://www.PaisaLive.com/register.asp?1354913-4842784

PaisaLive - Get Paid to read emails

{Amit Rawat}

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