Re: CakePDF Change page orientation

2012-07-19 Thread Борислав Събев
It says how to use it in the plugin's documentation:

https://github.com/coisa/CakePDF/blob/master/README.markdown

When initializing the component:

public $components = array(
'CakePdf.CakePdf' => array(
'prefix' => 'pdf',
'layout' => 'CakePdf.pdf',
'filename' => '{name_of_action}.pdf', // this is the name on output pdf 
(when force download occurs)
'orientation' => 'P',  *// accept 'P' for portrait and 'L' for 
landscape*
'paper' => 'A4' // accept all paper types of tcpdf library
)..

So, *P *for Portrait, *L *for Landscape.


On Friday, 20 July 2012 00:59:07 UTC+3, Elisio Leonardo wrote:
>
> Hi guys,
>
> How can I change page orientation from portrait to landscape with CakePDF 
> plugin?
>
> I have looked at the source code and in CakePDF class i can see the 
> $_orientation variable, so the main question is, where should i use the 
> CakePDF class? In my controller or in views?
>

-- 
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: How does cakephp works internally?

2012-07-19 Thread Roy Wong
Actually no lol. I thought it was just a link to the book which I had
already read except for the tutorials of course.

I think that's what I'm looking for
Thanks!

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


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


Re: How does cakephp works internally?

2012-07-19 Thread Dr. Tarique Sani
Did you care to take a look at the link I posted?

T

On Fri, Jul 20, 2012 at 8:30 AM, resting  wrote:
> While the book explains how to use each components, and has an overview of
> the MVC structure, it doesn't say how each components are being initialized
> and pulled together to work as a framework.
>
> Was hoping to not only know how to use it, but how it works internally.
> Just wondering if there's some flow diagram or such floating around that
> didn't make its way to the book.
>
> --
> 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



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

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


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


Re: How does cakephp works internally?

2012-07-19 Thread resting
While the book explains how to use each components, and has an overview of 
the MVC structure, it doesn't say how each components are being initialized 
and pulled together to work as a framework.

Was hoping to not only know how to use it, but how it works internally.
Just wondering if there's some flow diagram or such floating around that 
didn't make its way to the book.

-- 
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: File Downloads corrupted with CRLF at beginning

2012-07-19 Thread Dr. Tarique Sani
On Thu, Jul 19, 2012 at 8:58 PM, Ernesto  wrote:
> i solved :)
>
> the issues were a double CRLF after the PHP closing tag in one of my helpers

Reason to not use the closing tag in pure php files

:-)

Tarique

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

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


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


Re: How does cakephp works internally?

2012-07-19 Thread Dr. Tarique Sani
Start by reading the Good Book end to end

http://book.cakephp.org/2.0/en/getting-started/a-typical-cakephp-request.html

Tarique

On Thu, Jul 19, 2012 at 9:15 PM, resting  wrote:
> I wish to cakephp inside out.
> Tried to following the bootstrap.php but am not sure how it loads the
> controllers, components, helpers etc etc.
>
> Any documentations out there that explains the internal working of cake?
> Like what actually happens when a user hits the index page.
>
> Thanks.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php



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

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


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


Router::Connect does not appear to work with more than one routeClass in v1.3.14

2012-07-19 Thread swissmant
I have inherited a project which was developed in cakePHP v1.3.14.

I am trying to route several different URLs to the same controller and 
function, but whichever I list as the second option in routes.php does not 
work.

Here is the code from routes.php:

Router::connect('/:city/locations/*', array('controller' => 'listings', 
> 'action' => 'index_filter'), array('routeClass' => 'FilterRoute','pass' => 
> array('city')));
> Router::connect('/:city/cuisines/*', array('controller' => 'listings', 
> 'action' => 'index_filter'), array('routeClass' => 'FilterRoute','pass' 
> => array('city')));


The custom routeClass, 'FilterRoute' is as follows:

class FilterRoute extends CakeRoute {
function parse ( $url ) {
$params = CakeRoute::parse ( $url );
$filter_args = split ( "/" , substr($url,1) );
if ( count ( $filter_args ) < 1 ) {
return false;
}
$city = array_shift ( $filter_args );

$array_to_pass = array();

while ( count ( $filter_args ) > 1 ) {
$item1 = array_shift ( $filter_args);
$item2 = array_shift ( $filter_args );
$array_to_pass[ $item1 ] = $item2;
}
$params['pass'] = $array_to_pass;
return $params;
}
}

This class works fine and returns the expected array when I enter the first 
URL, but not for the second. I have reversed the order and again, it will 
work with the first URL, but not the second.

Any ideas how I can have them both working? I am trying to do it this way 
with the URL as the client does not want a word such as 'search' within the 
URL and we don't know which items will be listed as filter terms.

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


Over PHP based ACL configuration file

2012-07-19 Thread RománMussi


Hello,

I am interested in using the PHP base ACL configuration file 
(app/Config/acl.php) and I have some doubts:

1) Does anyone know whether there were plans to create support for this 
strategy configuration for ACL?

2) (most important) will keep this technique in future versions or will be 
abandoned? 

Thank you very much for any help or guidance.

Regards
Román Mussi

-- 
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: Over PHP base ACL configuration file

2012-07-19 Thread RománMussi
Sorry for my bad English,

Where it says:
1) is provided to document this configuration strategy for ACL? 

It should say:
1) Does anyone know whether there were plans to create support for this 
strategy configuration for ACL?

Regards
Román Mussi

El jueves, 19 de julio de 2012 19:19:38 UTC-3, RománMussi escribió:
>
> Hello,
> I am interested in using the PHP base ACL configuration file 
> (app/Config/acl.php) and I have some doubts:
>
> 1) is provided to document this configuration strategy for ACL?
>
> 2) (most important) will keep this technique in future versions or will be 
> abandoned?
>
> Thank you very much for any help or guidance.
>
> Regards
> Román Mussi
>

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


Over PHP base ACL configuration file

2012-07-19 Thread RománMussi
Hello,
I am interested in using the PHP base ACL configuration file 
(app/Config/acl.php) and I have some doubts:

1) is provided to document this configuration strategy for ACL?

2) (most important) will keep this technique in future versions or will be 
abandoned?

Thank you very much for any help or guidance.

Regards
Román Mussi

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


CakePDF Change page orientation

2012-07-19 Thread Elisio Leonardo
Hi guys,

How can I change page orientation from portrait to landscape with CakePDF 
plugin?

I have looked at the source code and in CakePDF class i can see the 
$_orientation variable, so the main question is, where should i use the 
CakePDF class? In my controller or in views?

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


Chosen doesn't work after ajax request

2012-07-19 Thread mebibyte
Hey 

I'm using chosen for a dynamic multiselect, see 
link
. 
I works perfectly but when I put it in a view which a call with ajax the 
javascript doesn't work anymore.
So how can I run a javascript after a ajax request.

the view with the request:

Form->create('SearchForQuestions');
?>


Form->input('mainTopic',array('label' => 'Vak:','empty' 
=> true));  ?>
 Html->image('loader.gif'); ?>
 


observeField('SearchForQuestionsMainTopic',
 array(
'url' => array( 'action' => 'get_children' ),
'frequency' => 0.2,
'indicator' => 'loader',
'update' => 'childTopics'
 )
); 
 echo $this->Form->end();
?>

the view which is called with ajax:
Html->css(array('chosen'),'stylesheet', array('inline' => 
false ) ); ?>
 Chosen
   

  
Multiple Select with Groups

  
 
Dallas Cowboys
New York Giants
Philadelphia Eagles
Washington Redskins

  
Chicago Bears
Detroit Lions
Green Bay Packers
Minnesota Vikings
 

  

 
 https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"; 
type="text/javascript">
 
  
  
  document.observe('dom:loaded', function(evt) {
var select, selects, _i, _len, _results;
if (Prototype.Browser.IE && (Prototype.BrowserFeatures['Version'] === 6 
|| Prototype.BrowserFeatures['Version'] === 7)) {
  return;
}
selects = $$(".chzn-select");
_results = [];
for (_i = 0, _len = selects.length; _i < _len; _i++) {
  select = selects[_i];
  _results.push(new Chosen(select));
}
deselects = $$(".chzn-select-deselect");
for (_i = 0, _len = deselects.length; _i < _len; _i++) {
  select = deselects[_i];
  _results.push(new Chosen(select,{allow_single_deselect:true}));
}
return _results;
  });

  

-- 
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: WHMCS Api - Component

2012-07-19 Thread lowpass
You need to change "extends Object" to "extends Component".

http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html#components

On Wed, Jul 18, 2012 at 10:47 PM, elogic  wrote:
> I have then updated the first line to: App::uses('HttpSocket',
> 'Network/Http'); and that error is by passed, now I get this:
>
> Warning (2): call_user_func_array() expects parameter 1 to be a valid
> callback, class 'WhmcsComponent' does not have a method 'initialize'
> [CORE\Cake\Utility\ObjectCollection.php, line 130]
>
>
> --
> 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: LESS CSS

2012-07-19 Thread Thiago Belem
He can be using less.js  while developing the site..

@André
You can do this:

$this->Html->css($this->Html->url('/css/file.less', true), false,
array('inline'=>false))

If the CSS url starts with "http" Cake will not append the .css extension,
and with Html::url() you get a complete URL to the file.

Cya,
--
***Thiago Belem*
Desenvolvedor
Rio de Janeiro - RJ - Brasil

*Assando Sites* - Curso online de *CakePHP*
assando-sites.com.br 

thiagobelem.net
cont...@thiagobelem.net

*Skype / gTalk **»* thiago.belem.web
*LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt



On Thu, Jul 19, 2012 at 10:10 AM, Jeremy Burns | Class Outfit <
jeremybu...@classoutfit.com> wrote:

> Why?
>
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 19 Jul 2012, at 13:41:39, André Luis wrote:
>
> The problem is: I need to add the less css inside a view using
> $this->Html->css('file.less',false,array('inline'=>false));
>
> In my opinion it would be nice if CakePHP checks for the extension, if
> there is no extension it adds .css, but if exists, it doesnt.
>
> Em quinta-feira, 19 de julho de 2012 09h25min59s UTC-3, André Luis
> escreveu:
>>
>> Hi people, i dont know if here is the right place to ask for this, but it
>> would be nice if the HTML helper detects if the desired css file is a .css
>> or .less, them it doesnt put a .css in front of the file, i always need to
>> change my core files to accept the less files. And the less script doesnt
>> accepts .css files =(
>>
>> The site for lesscss is http://www.lesscss.org if anyone want to see
>> more about what i am talking about
>>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

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


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


How does cakephp works internally?

2012-07-19 Thread resting
I wish to cakephp inside out.
Tried to following the bootstrap.php but am not sure how it loads the 
controllers, components, helpers etc etc.

Any documentations out there that explains the internal working of cake?
Like what actually happens when a user hits the index page.

Thanks.

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


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


Re: File Downloads corrupted with CRLF at beginning

2012-07-19 Thread Ernesto
i solved :)

the issues were a double CRLF after the PHP closing tag in one of my helpers

Il giorno giovedì 19 luglio 2012 17:10:08 UTC+2, Ernesto ha scritto:
>
> Hi all
>
> i have an action wich generates a CSV list that the user can download.
> This CSV gets corrupted by a CRLF placed at the beginning of the file.
>
> i tried these 2 ways:
>
> *A - using CakeResponse and passing the fileContent directly, without 
> creating any file*
> $this->autoRender = false;
> $this->response->type("application/csv");
> $this->response->download("list.csv");
> $this->response->body($fileContent);
>
> *B - writing a file on server's hdd and then download it using MediaView*
> App::uses("File", "Utility");
> $file = new File ($filePath . $fileName, true);
> $file->write($listaTaglio);
> $file->close();
> $this->viewClass = "Media";
>
> $this->set(array(
> "id"=> $fileName,
> "download"  => true,
> "path"  => $filePath
> ));
> *
> *
> In both cases i get the same issue.
> My server runs on W7Pro, PHP 5.3.13, Apache 2.2.22
> Any clue?
>
>

-- 
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: File Downloads corrupted with CRLF at beginning

2012-07-19 Thread Ernesto
i forgot to say that the generated file in method B doesn't have the 
starting CRLF

Il giorno giovedì 19 luglio 2012 17:10:08 UTC+2, Ernesto ha scritto:
>
> Hi all
>
> i have an action wich generates a CSV list that the user can download.
> This CSV gets corrupted by a CRLF placed at the beginning of the file.
>
> i tried these 2 ways:
>
> *A - using CakeResponse and passing the fileContent directly, without 
> creating any file*
> $this->autoRender = false;
> $this->response->type("application/csv");
> $this->response->download("list.csv");
> $this->response->body($fileContent);
>
> *B - writing a file on server's hdd and then download it using MediaView*
> App::uses("File", "Utility");
> $file = new File ($filePath . $fileName, true);
> $file->write($listaTaglio);
> $file->close();
> $this->viewClass = "Media";
>
> $this->set(array(
> "id"=> $fileName,
> "download"  => true,
> "path"  => $filePath
> ));
> *
> *
> In both cases i get the same issue.
> My server runs on W7Pro, PHP 5.3.13, Apache 2.2.22
> Any clue?
>
>

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


File Downloads corrupted with CRLF at beginning

2012-07-19 Thread Ernesto
Hi all

i have an action wich generates a CSV list that the user can download.
This CSV gets corrupted by a CRLF placed at the beginning of the file.

i tried these 2 ways:

*A - using CakeResponse and passing the fileContent directly, without 
creating any file*
$this->autoRender = false;
$this->response->type("application/csv");
$this->response->download("list.csv");
$this->response->body($fileContent);

*B - writing a file on server's hdd and then download it using MediaView*
App::uses("File", "Utility");
$file = new File ($filePath . $fileName, true);
$file->write($listaTaglio);
$file->close();
$this->viewClass = "Media";

$this->set(array(
"id"=> $fileName,
"download"  => true,
"path"  => $filePath
));
*
*
In both cases i get the same issue.
My server runs on W7Pro, PHP 5.3.13, Apache 2.2.22
Any clue?

-- 
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: LESS CSS

2012-07-19 Thread Jeremy Burns | Class Outfit
Why?

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 19 Jul 2012, at 13:41:39, André Luis wrote:

> The problem is: I need to add the less css inside a view using 
> $this->Html->css('file.less',false,array('inline'=>false));
> 
> In my opinion it would be nice if CakePHP checks for the extension, if there 
> is no extension it adds .css, but if exists, it doesnt.
> 
> Em quinta-feira, 19 de julho de 2012 09h25min59s UTC-3, André Luis escreveu:
> Hi people, i dont know if here is the right place to ask for this, but it 
> would be nice if the HTML helper detects if the desired css file is a .css or 
> .less, them it doesnt put a .css in front of the file, i always need to 
> change my core files to accept the less files. And the less script doesnt 
> accepts .css files =(
> 
> The site for lesscss is http://www.lesscss.org if anyone want to see more 
> about what i am talking about
> 
> -- 
> 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: LESS CSS

2012-07-19 Thread André Luis
The problem is: I need to add the less css inside a view using 
$this->Html->css('file.less',false,array('inline'=>false));

In my opinion it would be nice if CakePHP checks for the extension, if 
there is no extension it adds .css, but if exists, it doesnt.

Em quinta-feira, 19 de julho de 2012 09h25min59s UTC-3, André Luis escreveu:
>
> Hi people, i dont know if here is the right place to ask for this, but it 
> would be nice if the HTML helper detects if the desired css file is a .css 
> or .less, them it doesnt put a .css in front of the file, i always need to 
> change my core files to accept the less files. And the less script doesnt 
> accepts .css files =(
>
> The site for lesscss is http://www.lesscss.org if anyone want to see more 
> about what i am talking about
>

-- 
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: LESS CSS

2012-07-19 Thread Jeremy Burns | Class Outfit
Or compile the .less file into a .css file in your dev environment and use the 
.css file as normal. Lookup CodeKit - it's great.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 19 Jul 2012, at 13:30:17, Andy Gale wrote:

> On Thu, Jul 19, 2012 at 1:25 PM, André Luis  wrote:
> 
>> Hi people, i dont know if here is the right place to ask for this, but it
>> would be nice if the HTML helper detects if the desired css file is a .css
>> or .less, them it doesnt put a .css in front of the file, i always need to
>> change my core files to accept the less files. And the less script doesnt
>> accepts .css files =(
> 
> You're not serving .less files to the browser though are you? If you
> are you won't be too popular with Internet Explorer users.
> 
> This is how to do it anyway:
> 
> http://www.syahzul.com/cakephp/how-to-use-less-css-in-cakephp-application/
> 
> -- 
> Andy Gale
> http://andy-gale.com
> http://twitter.com/andygale
> 
> -- 
> 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: LESS CSS

2012-07-19 Thread Andy Gale
On Thu, Jul 19, 2012 at 1:25 PM, André Luis  wrote:

> Hi people, i dont know if here is the right place to ask for this, but it
> would be nice if the HTML helper detects if the desired css file is a .css
> or .less, them it doesnt put a .css in front of the file, i always need to
> change my core files to accept the less files. And the less script doesnt
> accepts .css files =(

You're not serving .less files to the browser though are you? If you
are you won't be too popular with Internet Explorer users.

This is how to do it anyway:

http://www.syahzul.com/cakephp/how-to-use-less-css-in-cakephp-application/

-- 
Andy Gale
http://andy-gale.com
http://twitter.com/andygale

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


LESS CSS

2012-07-19 Thread André Luis
Hi people, i dont know if here is the right place to ask for this, but it 
would be nice if the HTML helper detects if the desired css file is a .css 
or .less, them it doesnt put a .css in front of the file, i always need to 
change my core files to accept the less files. And the less script doesnt 
accepts .css files =(

The site for lesscss is http://www.lesscss.org if anyone want to see more 
about what i am talking about

-- 
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: Charts - Anyone knows a good valid one?

2012-07-19 Thread Albert 'Tigr'
You got me curious so I had a look at the jqPlot. A fantastic tool, thank 
you for the tip, I am definitely going to use it for my sites.

What is the problem with it? I just downloaded, unpacked and went to the 
'examples' directory. All examples work like a swiss made clock and I think 
there is ample documentation to make it easy to adapt to your wishes.

I tried my own with a simple file like this and it works just fine:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en">  
jqplot test




 


$.jqplot('chartdiv',  [[[1, 
2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]],
{ title:'Exponential Line',
  axes:{yaxis:{min:-10, max:240}},
  series:[{color:'#5FAB78'}]
});


 


On Tuesday, July 17, 2012 11:00:10 PM UTC+2, Marcelo Santana wrote:
>
> Hello, all, i'm needing display some charts i tried: 
>
> http://bakery.cakephp.org/articles/ixu38/2010/04/30/googlechart-api-helper
>
> show the charts but i can't configure the way i want, the line chart is 
> terrible 
> (or someone who use it successfully can show how... )
>
> https://github.com/cjsaylor/Google-visualization-api-cakephp
> this one i cound't show no charts at all.
>
> i've tried this one
> http://www.jqplot.com/index.php
> unsuccessfully too
>
> so,i guess this day was too long, and i burn my mind off ...
> but anyway, someone knows a good chart for cake 1.3.x or can show me how 
> the above charts works ?
>
> xxx
>
>
>
>
On Tuesday, July 17, 2012 11:00:10 PM UTC+2, Marcelo Santana wrote:
>
> Hello, all, i'm needing display some charts i tried: 
>
> http://bakery.cakephp.org/articles/ixu38/2010/04/30/googlechart-api-helper
>
> show the charts but i can't configure the way i want, the line chart is 
> terrible 
> (or someone who use it successfully can show how... )
>
> https://github.com/cjsaylor/Google-visualization-api-cakephp
> this one i cound't show no charts at all.
>
> i've tried this one
> http://www.jqplot.com/index.php
> unsuccessfully too
>
> so,i guess this day was too long, and i burn my mind off ...
> but anyway, someone knows a good chart for cake 1.3.x or can show me how 
> the above charts works ?
>
> xxx
>
>
>
>

-- 
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: How to set image,description and titie for like,comment, send in cakephp facebook plugin?

2012-07-19 Thread Milina Udara
Check the techcrunch.com There are many like buttons in same page for each
post. i want to implement that kind of think

On Thu, Jul 19, 2012 at 3:07 PM, Milina Udara  wrote:

> I’m using webtechnick cakephp facebook plugin. I want to set image
> description and title for like send and comments. There are many like and
> send in one page. Current site get same title(what in the title tag in the
> html ) . i want to set different titles and descriptions for each like and
> send.
>
> --
> 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: Problem with adding records

2012-07-19 Thread Mike Griffin
Is there anything relevant in app/tmp/logs/error.log?

Mike.

On Sun, Jul 15, 2012 at 7:51 AM, mohit kumar  wrote:

> Now the problems are still same, I upgraded to the new version of cake
> php. I have deleted and created the database again.
> still i am getting same error.
>
> When i try to execute the same query with mysql, it generates no error.
>
> Here is the output of the sql dump from cake php, if executed on mysql ,
> it generates no error
> NrQueryErrorAffectedNum. rowsTook (ms)  1INSERT INTO `competence`.`users`
> (`username`, `password`, `role`, `experience`, `modified`, `created`)
> VALUES ('mohit', 'mohit', 'Engineer', 1, '2012-07-15 08:48:26', '2012-07-15
> 08:48:26')
> 11151 2SELECT `UsersCertification`.`certification_id` FROM
> `competence`.`users_certifications` AS `UsersCertification` WHERE
> `UsersCertification`.`user_id` = 6
> 001 3BEGIN
> 001
>
>
> *With Best Regards,
> Mohit Kumar *
> *+91-9582894570*
>
>
>
>
> On Fri, Jul 13, 2012 at 8:17 PM, mohit kumar  wrote:
>
>> Cake PHP 2.2.0
>>
>> +---+
>> | version() |
>> +---+
>> | 5.5.16|
>> +---+
>> 1 row in set (0.12 sec)
>>
>>
>> On Fri, Jul 13, 2012 at 8:09 PM, Mike Griffin  wrote:
>>
>>> Where is the error message appearing?
>>>
>>> I've tried creating a database and creating the table and when I run the
>>> INSERT query, it works fine. Can you try running that query from the
>>> command line and see what happens then?
>>>
>>> What version of cakePHP and MySQL are you using?
>>>
>>>
>>> On Fri, Jul 13, 2012 at 3:08 PM, mohit kumar wrote:
>>>
 That was I guess added by bake tool, i did not code the add function.

 the information that i get when i try to add is as follows



 NrQueryErrorAffectedNum. rowsTook (ms)  1INSERT INTO
 `competence`.`users` (`username`, `password`, `role`, `experience`,
 `modified`, `created`) VALUES ('sid',
 '8fee7c4fe462305bdbb0acad830137f0d40af5a2', 'admin', 1, '2012-07-13
 16:01:47', '2012-07-13 16:01:47')
 11169 2SELECT `UsersCertification`.`certification_id` FROM
 `competence`.`users_certifications` AS `UsersCertification` WHERE
 `UsersCertification`.`user_id` = 5
 000 3BEGIN
 The debug information on the page is




- CORE\Cake\Model\Model.php line 
 1884→ 
 DboSource->insertMulti(AppModel,
array, array) 

object(AppModel) {
useDbConfig => 'default'
useTable => 'users_certifications'
id => false
data => array([maximum depth reached])
schemaName => 'competence'
table => 'users_certifications'
primaryKey => 'id'
validate => array([maximum depth reached])
validationErrors => array([maximum depth reached])
validationDomain => null
name => 'UsersCertification'
alias => 'UsersCertification'
tableToModel => array(
[maximum depth reached]
)
cacheQueries => false
belongsTo => array([maximum depth reached])
hasOne => array([maximum depth reached])
hasMany => array([maximum depth reached])
hasAndBelongsToMany => array([maximum depth reached])
actsAs => null
Behaviors => object(BehaviorCollection) {}
whitelist => array([maximum depth reached])
cacheSources => true
findQueryType => null
recursive => (int) 1
order => null
virtualFields => array([maximum depth reached])
__backAssociation => array([maximum depth reached])
__backInnerAssociation => array([maximum depth reached])
__backOriginalAssociation => array([maximum depth reached])
__backContainableAssociation => array([maximum depth reached])
findMethods => array(
[maximum depth reached]
)
tablePrefix => ''
}
array(
(int) 0 => '`user_id`',
(int) 1 => '`certification_id`'
)
array(
(int) 1 => array(
(int) 0 => '5',
(int) 1 => '1'
)
)



 On Fri, Jul 13, 2012 at 7:12 PM, Mike Griffin wrote:

> What is in the $this->request->data array?
>
> Mike
>
> On Fri, Jul 13, 2012 at 2:32 PM, mohit kumar 
> wrote:
> > Thanks for your response,
> >
> > I have already deleted the user table once..
> > The code is mostly used from the bake tool.
> >
> > Here is the snapshot of my UsersController.
> >
> https://github.com/moh

Another ACL issue (nested ACOs)

2012-07-19 Thread senser
Hello,

I'm developing a quite simple projest and want to use ACL on it. I've set 
up authentication process but have problems with authorization against CRUD.
Here is the Auth component settings in my AppController.php:

'Auth' => array(
'loginAction' => array('controller' => 'users', 'action' => 
'login'),
'loginRedirect' => array('controller' => 'pages', 'action'=> 
'display', 'home'),
'loginError' => 'Invalid login',
'authError' => 'Unauthorized access',
'flash' => array('key' => 'flash', 'element' => 'default'),
'userScope' => array('User.active = 1'),
'authenticate' => array(
'Form',
),
'authorize' => array(
'Crud' => array(
'actionPath' => 'Application/')
)
)

And here is my (simplified) ACO tree:

  [18] Application
[64] Comments
[82] ReadOnly
  [52] Statuses

Permissions are as follows
:
_create_read_update_delete
Application111-1
ReadOnly   -1  1-1-1

I expect that Stauses as ReadOnly successor are going to be "readable", but 
when going on "/Statuses/read", ACL error occurs:"Failed ARO/ACO node 
lookup in permissions check". I looked the sql queries that ACL component 
produces and here is a sample:

SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`, `Aco`.`foreign_key`, 
`Aco`.`alias` FROM `Base`.`acos` AS `Aco` LEFT JOIN `Base`.`acos` AS `Aco0` 
ON (`Aco0`.`alias` = 'Application') LEFT JOIN `Base`.`acos` AS `Aco1` ON 
(`Aco1`.`lft` > `Aco0`.`lft` AND `Aco1`.`rght` < `Aco0`.`rght` AND 
`Aco1`.`alias` = 'Statuses' AND `Aco0`.`id` = `Aco1`.`parent_id`)  WHERE 
((`Aco`.`lft` <= `Aco0`.`lft` AND `Aco`.`rght` >= `Aco0`.`rght`) OR 
(`Aco`.`lft` <= `Aco1`.`lft` AND `Aco`.`rght` >= `Aco1`.`rght`))   ORDER BY 
`Aco`.`lft` DESC;

That query returns a single row "Application" not finding "Statuses" 
because they are not "Application" direct successors. 

Cake acl shell works fine though:

cake acl check Employees Statuses read

Welcome to CakePHP v2.1.3 Console
---
App : base
Path: /home/senser/taxundo/base/
---
Employees is allowed.

Sql queries produced from the the shell are quite different:

SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`, `Aco`.`foreign_key`, 
`Aco`.`alias` FROM `Base`.`acos` AS `Aco` LEFT JOIN `Base`.`acos` AS `Aco0` 
ON (`Aco0`.`alias` = 'Statuses')  WHERE `Aco`.`lft` <= `Aco0`.`lft` AND 
`Aco`.`rght` >= `Aco0`.`rght`   ORDER BY `Aco`.`lft` DESC

SELECT `Permission`.`id`, `Permission`.`aro_id`, `Permission`.`aco_id`, 
`Permission`.`_create`, `Permission`.`_read`, `Permission`.`_update`, 
`Permission`.`_delete`, `Aro`.`id`, `Aro`.`parent_id`, `Aro`.`model`, 
`Aro`.`foreign_key`, `Aro`.`alias`, `Aro`.`lft`, `Aro`.`rght`, `Aco`.`id`, 
`Aco`.`parent_id`, `Aco`.`model`, `Aco`.`foreign_key`, `Aco`.`alias`, 
`Aco`.`lft`, `Aco`.`rght` FROM `Base`.`aros_acos` AS `Permission` LEFT JOIN 
`Base`.`aros` AS `Aro` ON (`Permission`.`aro_id` = `Aro`.`id`) LEFT JOIN 
`Base`.`acos` AS `Aco` ON (`Permission`.`aco_id` = `Aco`.`id`)  WHERE 
`Permission`.`aro_id` = 1 AND `Permission`.`aco_id` IN (71, 82, 18)   ORDER 
BY `Aco`.`lft` desc

Can you help please - am I doing something wrong or may be misunderstanding?

Regards,
Nikolay

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


How to set image,description and titie for like,comment, send in cakephp facebook plugin?

2012-07-19 Thread Milina Udara
I’m using webtechnick cakephp facebook plugin. I want to set image 
description and title for like send and comments. There are many like and 
send in one page. Current site get same title(what in the title tag in the 
html ) . i want to set different titles and descriptions for each like and 
send.

-- 
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: Charts - Anyone knows a good valid one?

2012-07-19 Thread nastya
My experience with Highcharts is fantastic. So easy, so powerful, so well 
documented. 

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