Re: Security Component: blackhole with no, erm, whitehole?

2012-01-04 Thread Jeremy Burns | Class Outfit
Here's how I did this on an app (this is 1.3 but I'd guess it'd be fairly easy to transpose to 2.0 if needed). In app_controller create a function: function __requireSecure() { ... conditions to check ... return true if SSL is needed ... r

Re: CakePHP 1.3, 2.0 and SqlServer views

2012-01-04 Thread José Lorenzo
Probably no, can you submit a patch and a test? -- 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

Re: Accessing a Controller method's CakeRequest object inside custom ExceptionHandler on Cake 2.0.5?

2012-01-04 Thread José Lorenzo
Btw, in CakePHP 2.1 the errors will be rendered using the accept content type from the browser! Just what you are trying to do in 2.0. -- 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 ot

Re: Accessing a Controller method's CakeRequest object inside custom ExceptionHandler on Cake 2.0.5?

2012-01-04 Thread José Lorenzo
You can instantiate a new one: $request = new CakeRequest(); -- 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 gro

Re: validate access to bootstrap-var

2012-01-04 Thread jeremyharris
You'll have to assign the validation rule upon model construction. Use the __construct function on the model to add that specific validation rule and you should be good. -jeremy -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Ques

Accessing a Controller method's CakeRequest object inside custom ExceptionHandler on Cake 2.0.5?

2012-01-04 Thread Neil Goodman
Hello, I am build a REST API using CakePHP 2.0.5 and I have a question about custom ExceptionHandlers. I want to render exceptions differently depending on the content negotiation from the REST call. The only way I can figure out how to do this right now is by checking the CakeRequest object insi

Multiple Databases Model Relationship

2012-01-04 Thread robbie
Hi all, I have two tables: Users Jobs The models are set up as such class Employee extends AppModel { # public $useDbConfig = 'timetrack'; public $primaryKey = 'employee_id'; public $useTable = 'user'; public $belongsTo = array('Job'); } class Job extends AppModel { #public $hasMany = array('

validate access to bootstrap-var

2012-01-04 Thread Ivo Wolgensinger
I want to validate if the entered value in a form is equal to a variable defined in bootstrap.php. This is my code (snippet): 'actualgtb' => array ( 'rule' => array('equalTo', Configure::read('GTB.version')), 'message' => 'You must

Re: CakePHP 2.0 Ldap Datasource and Ldap Authentication

2012-01-04 Thread Rodrigo Evildead
Very interesting! I'll test as soon as I can Thank you for your colaboration! On 3 jan, 22:36, Analog Rithems wrote: > Following the new CakePHP 2.0 release I've update the Ldap Datasource > and created a new Auth Component that follows the new framework.  I've > got a small blog post about it h

Re: MenuBuilder doesn't work with cakephp 2.0 (or 2.1)

2012-01-04 Thread euromark
first of all you are not giving us any links or code etc kinda hard to help you without anything concrete to go on On 4 Jan., 20:19, ton jansen wrote: > I tried almost everything to get this working, but allas. > > It was working before I switched tot 2.0.5. > > Controller class MenuBuilder can

Re: How to add varied content in posts?

2012-01-04 Thread Tilen Majerle
i downloaded nbbc script yesterday and check this file: /test_nbbc.php and it gave me at least 50 errors: Strict standards: Only variables should be passed by reference in mypath\src\nbbc_parse.php on line *899* -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/1/4 euromark > seems like i

Re: How to add varied content in posts?

2012-01-04 Thread euromark
seems like it needs some updating then ;) since I run it in non-strict mode (too many other problems as well) I never saw that On 4 Jan., 20:10, Tilen Majerle wrote: > nbbc code breaks strict standards of php :) > -- > Lep pozdrav, Tilen Majerlehttp://majerle.eu > > 2012/1/4 Daniel > > > > > >

Re: Disappointed with the training.

2012-01-04 Thread Larry E. Masters
On Wed, Jan 4, 2012 at 12:47 PM, Paul Vaughan wrote: > Larry, > > Really glad to see training is now available, but as the OP suggested it > would be good to see a more detailed agenda for the sessions, so I can > better choose which is/are right for me. Also, if there were savings for > doing tw

MenuBuilder doesn't work with cakephp 2.0 (or 2.1)

2012-01-04 Thread ton jansen
I tried almost everything to get this working, but allas. It was working before I switched tot 2.0.5. Controller class MenuBuilder can not be found. I use the loadall function in bootstrap.php What am I doing wrong? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cake

Re: Different localization phrase

2012-01-04 Thread Miles J
Believe its not possible to show them all on one page. Someone correct me if I am wrong. On Jan 4, 6:57 am, "Constantin.FF" wrote: > I need to translate several phrases into different from the current > language. > If I write __('Title') I get it in the current language set in the > session. How

Re: Disappointed with the training.

2012-01-04 Thread Larry E. Masters
On Wed, Jan 4, 2012 at 12:19 PM, Nate wrote: > Thanks Larry. > > I understand that not every time zone and every language can be > covered. > > I think the live training lessons are a pretty great idea, but I just > wonder about those that are unable to attend the lesson when it's > scheduled. >

Re: Extending Cake Shell Classes

2012-01-04 Thread Geoff Douglas
I know this is a super old Discussion but... I was just extending a Shell and was google-ing to see if anyone had issues doing it, and thought I would share. If you want to extend a shell you need to import it first. So assuming we have created a class called MyShell that extends Shell (like n

Re: How to add varied content in posts?

2012-01-04 Thread Tilen Majerle
nbbc code breaks strict standards of php :) -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/1/4 Daniel > On Jan 3, 7:42 pm, euromark wrote: > ... > > i usehttp://nbbc.sourceforge.net/ > > Thanks, it looks good. > > -- > Our newest site for the community: CakePHP Video Tutorials > http://

Re: session.gc_maxlifetime

2012-01-04 Thread majna
No, Cake does not set gc_maxlifetime. btw, I've looked in few php frameworks and none of them change this setting, but none of them either sets other timeouts (Cake changes cookie_lifetime and has custom session timeout implementation) Welcome to PHP session nightmare :) -- Our newest site for

Re: Disappointed with the training.

2012-01-04 Thread Paul Vaughan
Larry, Really glad to see training is now available, but as the OP suggested it would be good to see a more detailed agenda for the sessions, so I can better choose which is/are right for me. Also, if there were savings for doing two or all three sessions, that would help me pitch the training to

Re: Disappointed with the training.

2012-01-04 Thread Nate
Thanks Larry. I understand that not every time zone and every language can be covered. I think the live training lessons are a pretty great idea, but I just wonder about those that are unable to attend the lesson when it's scheduled. "no cost" is not what I'm talking about, either. There are qui

Re: Security Component: blackhole with no, erm, whitehole?

2012-01-04 Thread DragonFlyEye
Can anyone help me out, here? -- 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+unsub

CakePHP 1.3, 2.0 and SqlServer views

2012-01-04 Thread Mark Tom Sawyer
Hi, Is there any conceptual reason for this change between versions of CakePHP 1.3 and 2 I need to list views in SQLServer with CakePHP 2. Is there another way? *CakePHP 1.3 - *\cake\libs\model\datasources\dbo\dbo_mssql.php line 209 *$result = $this->fetchAll('SELECT TABLE_NAME FROM INFORMATIO

Re: Having PHP generate a PDF

2012-01-04 Thread Tonu Tusk
Ok - so (off topic I know) I'm pretty ashamed at what I had to see trawling through my code for my first cake app / learning experience from years ago. However, in answer to your question, as far as I can see (and remember) I have not really done anything special with the page settings of the docu

Re: Having PHP generate a PDF

2012-01-04 Thread Tonu Tusk
TCPDF can do this - I have it do it on pdfs I am generating. I'll try and post more details shortly. On Jan 4, 3:25 pm, "Yves S. Garret" wrote: > It does do the header and footers for me.  The problem that I am running > into is that I do not see the title per column being set to show again on >

Re: Disappointed with the training.

2012-01-04 Thread Larry E. Masters
-- Larry E. Masters On Wed, Jan 4, 2012 at 10:33 AM, Nate wrote: > Right John. > > But I'm not needing a "how to program" tutorial. If you're using > CakePHP, chances are you're already familiar with the concepts of > programming with PHP - you're just looking for a way to speed up your > pro

Re: Disappointed with the training.

2012-01-04 Thread Nate
Right John. But I'm not needing a "how to program" tutorial. If you're using CakePHP, chances are you're already familiar with the concepts of programming with PHP - you're just looking for a way to speed up your programming process. Exactly what CakePHP is made for. I'm still not sure what I'm g

Re: Having PHP generate a PDF

2012-01-04 Thread Yves S. Garret
Anyone heard of BIRT? http://eclipse.org/birt/phoenix Any good? On Wed, Jan 4, 2012 at 10:26 AM, Yves S. Garret wrote: > Interesting. I will look into that when I have a free moment. > > > On Tue, Jan 3, 2012 at 3:29 PM, Laerte M. Rodrigues < > laertemat...@gmail.com> wrote: > >> use jaspter r

Re: Function isOwnedBy

2012-01-04 Thread José Lorenzo
Try to debug the params that the isOwnedBy() function got, and see if they are what you expect them to be -- 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 rela

Re: Function isOwnedBy

2012-01-04 Thread euromark
take a second look and think about it you might figure out why it is not doing what you expect but its a logic error of yours not of cake hint: returning true before actually checking something doesnt end well :) On 4 Jan., 16:49, heohni wrote: > HI, > > I found this function within the 2.0 boo

Function isOwnedBy

2012-01-04 Thread heohni
HI, I found this function within the 2.0 book and thought that this is quite nice so I implemented it. I my Post Controller I have public function isAuthorized($user) { if (parent::isAuthorized($user)) { return true; } if (in_array($this->action, array('edit',

Re: Disappointed with the training.

2012-01-04 Thread John Hardy
I'm not trying to flame. However learning to program is not like learning pottery… There are certain fundamentals that need to be in place first. http://en.wikipedia.org/wiki/Computer_science On Jan 4, 2012, at 7:34 AM, Nate wrote: > Well it looks like the CakePHP training came available for >

Re: Basic question about Auth and blog tutorial

2012-01-04 Thread heohni
OK I found it: I had to remove the beforeFilter from my post controller and needed to change my isAuthorized function within the post controllere to this: public function isAuthorized($user) { if (parent::isAuthorized($user)) { return true; } if (in_array($thi

Disappointed with the training.

2012-01-04 Thread Nate
Well it looks like the CakePHP training came available for registration, and I am rather disappointed in how the training actually is. The beginner, intermediate, and advanced courses are all scheduled courses - each an hour long, from 4pm to 5pm, at $89 a pop. 3 courses, 3 hours, $267 dollars.

Re: Having PHP generate a PDF

2012-01-04 Thread Yves S. Garret
Interesting. I will look into that when I have a free moment. On Tue, Jan 3, 2012 at 3:29 PM, Laerte M. Rodrigues wrote: > use jaspter reports with PHP to generate document files > > > 2012/1/3 euromark > >> @roundrightfarm >> I dont think such a helper is part of the core, though :) >> >> >> O

Re: Having PHP generate a PDF

2012-01-04 Thread Yves S. Garret
It does do the header and footers for me. The problem that I am running into is that I do not see the title per column being set to show again on every page. I am assuming that this is caused TCPDF is taking HTML code and turning it into PDF, which is an inherent limitation in HTML in the first p

Re: Cutom Routes

2012-01-04 Thread Waterschaats
Thanks, In case of using: Router::connect('/*', array('controller' => 'pages', 'action' => 'display')); I have to specifie all the controller I use. I don't want that. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site ht

Re: Cutom Routes

2012-01-04 Thread DragonFlyEye
Ah, well, then I'm out of my element, Donnie. (Sorry for the Big Lebowski reference). -- 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

Re: Cutom Routes

2012-01-04 Thread DragonFlyEye
Considering that this is the way CakePHP handles errors, yes, it is certainly the most efficient option on its face. Others may dispute that. I wouldn't really consider using Routes, because the routes are determined *before* the existence of any Controllers or Actions is confirmed. I do, howev

Re: Cutom Routes

2012-01-04 Thread Waterschaats
by the way. I'm using cakephp 2.0 (The error handling implementation has dramatically changed in 2.0) -- 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 q

Different localization phrase

2012-01-04 Thread Constantin.FF
I need to translate several phrases into different from the current language. If I write __('Title') I get it in the current language set in the session. How to get it in the other languages? For example I need to get 'Title' translated into French, Italian, German ... on one page -- Our newest s

Re: Cutom Routes

2012-01-04 Thread Waterschaats
Thanks this is usefull. Although I was thinking of accomplishing this with Routes. It feels a bit wrong to handle this with an error function. And is this performance wise the best option? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new Cake

Re: Cutom Routes

2012-01-04 Thread DragonFlyEye
Waterschaats, Have a look at the Error Controller: http://book.cakephp.org/1.3/view/1188/Error-Handling For more information on the types of pre-existing errors - including the missingController error, have a look at the API: http://api.cakephp.org/class/error-handler#method-ErrorHandlermissingC

Security Component: blackhole with no, erm, whitehole?

2012-01-04 Thread DragonFlyEye
Here's what I don't get about the Security Component: if there's an option to use the blackholeCallback for requireSecure, why is there no option to provide a callback for anything else? I'm using this system as outlined in the book to force SSL on certain actions. But I'd like to force people

Cutom Routes

2012-01-04 Thread Waterschaats
When a Controller of Plugin isn't found. I want it to end at a specific controller that examines the ulr, and checks if there'r a page related to it in my cms. So, after the default cakephp routing I don't want the missing controller error but I want to route to a controller. How can I Accomplish t

Re: Basic question about Auth and blog tutorial

2012-01-04 Thread heohni
Sorry, this is not changing anything :-( I am still at the same point. I really wonder why, haveing AUTH and a controller with no allowed functions can't be anything special? On 4 Jan., 12:45, Clint wrote: > Hi, > > i believe because you have the authorize variable set to controller, you need >

Re: google webmastertools

2012-01-04 Thread heohni
Sorry, but this is not changing anything. I still see the login form without any chance to login... On 4 Jan., 11:55, AD7six wrote: > On Jan 4, 7:19 am, baretong wrote: > > > last week some one said that, that couse of my debug > 0 so errorcode > > populate keywords in my web page, so last week

created modified function (default) is not working in Cakephp 1.2 version

2012-01-04 Thread Jpsworld
Hi all, I created an application and all the db tables have 'created,modified' fields that filled automatically by Cakephp's Default Functionality. And i put the Field Type is created datetime NULL, modified datetime NULL, like. But it doesn't work. The data where shows -00-00 00:00:00 Form

created modified function (default) is not working in Cakephp 1.2 version

2012-01-04 Thread Jpsworld
Hi all, I created an application and all the db tables have 'created,modified' fields that filled automatically by Cakephp's Default Functionality. And i put the Field Type is created datetime NULL, modified datetime NULL, like. But it doesn't work. The data where shows -00-00 00:00:00 Forma

created modified function (default) is not working in Cakephp 1.2 version

2012-01-04 Thread Jpsworld
Hi all, I created an application and all the db tables have 'created,modified' fields that filled automatically by Cakephp's Default Functionality. And i put the Field Type is created datetime NULL, modified datetime NULL, like. But it doesn't work. The data where shows -00-00 00:00:00 Forma

admin routing

2012-01-04 Thread K3
Hi, i have developed a site and enabled admin routing, so many methods names have prefix admin_ Now the client wants to change this and wants to access the admin part of the site using different url (site.com/something_else) and wants to forward site.com/admin to site.com. Is it possible to achieve

Re: Basic question about Auth and blog tutorial

2012-01-04 Thread Clint
Hi, i believe because you have the authorize variable set to controller, you need to include an isAuthorized method in each of your controllers. Try putting the following (and removing the beforeFilter) in your Posts controller: function isAuthorized() { return parent::isAuthorized('some

Re: Having PHP generate a PDF

2012-01-04 Thread euromark
i think tcpdf is capable of doing sth like that because there you can set a custom header and footer. http://www.tcpdf.org/examples.php you could give it a try On 4 Jan., 05:34, "Yves S. Garret" wrote: > Not sure if that will cut the mustard.  I looked at the list of features and > it did not i

Getting fatal error in spark plug

2012-01-04 Thread Narola
Hey Friends, I was using tumblr api in cakephp and i got the following error after getting access to the tumblr and redirected to my site. Fatal error: Uncaught exception 'Exception' with message 'User::authsomeLogin() is not implemented!' in /var/www/vhosts/ narolainfotech.com/subdomains/demo/htt

Re: google webmastertools

2012-01-04 Thread AD7six
On Jan 4, 7:19 am, baretong wrote: > last week some one said that, that couse of my debug > 0 so errorcode > populate keywords in my web page, so last week i change my debug in > core.php to 0 > but until today nothing change > array null empty still populate my page > > i need other suggestion

Basic question about Auth and blog tutorial

2012-01-04 Thread heohni
Hi, I asked this just some days ago, but I am still stuck with this: I have a web project where I want to give the admin a "admin area" where he can login and add/edit/delete news. The basic code for this I took from the cake book given with the blog tutorial. I having now a problem with the AUT