Job opening; Experienced CakePHP developer

2010-11-06 Thread Primeminister
The last Dutch CakePHP borrel was at the office of Affiliate4You and
now we are looking for an experienced CakePHP developer in Utrecht,
NL. Are you living in The Netherlands check the Cake-Toppings.com blog
for more information: http://is.gd/gM3ka (dutch only)

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: CakeFest IV - America - Help us pick a location!

2010-01-04 Thread Primeminister
New York!

On Nov 14 2009, 5:19 am, BrendonKoz brendon...@hotmail.com wrote:
 Although I live east coast, I'd be more apt to go if it was some place
 warm/tropical.  Once you're in DC, it's not bad, but getting there if
 you don't fly is a pain.  Chicago's airport's pretty cool, but I've
 never been outside of it.  How is Texas's night life?  Safe?

 Anyway, nice of the Cake team to ask!  Thanks!

 On Nov 13, 11:02 pm, Miles J mileswjohn...@gmail.com wrote:



  Chicago seems cheap and cold, also one of the worse major cities in
  the US, why there?

  I vote for New York, or Seattle, or Boston, or something.

  On Nov 13, 7:36 pm, Renan Gonçalves renan.sad...@gmail.com wrote:

   Looks like Chicago is a nice place to host.

   On Fri, Nov 13, 2009 at 1:43 AM, Graham Weldon 
   gra...@grahamweldon.comwrote:

Hi all,

The CakePHP team has been considering the location for the next upcoming
CakeFest.
We've decided to bring it back home to the United Sates of America.
Thus far we haven't chosen a location for the event, but to ensure we 
reach
as many people as possible, we'd like your opinion on where we should 
host
the event.

Essentially, our choices are:
- USA East Coast
- USA West Coast
- USA Central

If I have missed another location that you feel might be more popular or
accessible to interested attendees, feel free to suggest it.
We're keen to hear peoples thoughts on it.

Cheers,

Graham Weldon (AKA: Predominant)

e. gra...@grahamweldon.com
w.http://grahamweldon.com

 --
You received this message because you are subscribed to the Google 
Groups
CakePHP group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.c­om
.
For more options, visit this group at
   http://groups.google.com/group/cake-php?hl=.

   --
   Renan Gonçalves aka renan.saddam
   CakeDC Software Engineer
   CakePHP Core Developer
   Website: renangoncalves dot com
   Extrema, MG, Brazil- Hide quoted text -

  - Show quoted text -

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


Dutch CakePHP meetup

2010-01-02 Thread Primeminister
Finally! The dutch CakePHP meetup number 1 also know as Dutch Borrel.
It will be on Tuesday Jan 12th. 2010 in Amsterdam. To get to know
eachother we’re not only talk and drink. We are gonna really meet
eachother… through code.
Dutch Borrel #1:   Show-your-Code Meetup Amsterdam

For more information goto 
http://www.cake-toppings.com/2009/12/30/dutch-borrel-show-your-code-meetup/

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


Dutch CakePHP get together

2009-07-27 Thread Primeminister

Message for dutch bakers:
http://www.cake-toppings.com/2009/07/23/koffie-met-cake/
Please leave a reply so that we now with how many we are...

Dates will be provided next week.
Cheers!
- Charlie
--~--~-~--~~~---~--~~
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: undefined property 'respondAs' of RequestHandler

2009-04-07 Thread primeminister

Anybody has an idea how to solve this?

On Apr 4, 4:56 pm, Primeminister cvdkerk...@gmail.com wrote:
 I try to make a custom error message and output it as a xml view.
 I call in the controller cakeError() :

 {{{
 function beforeRender()
 {
     $this-cakeError('myError', $this-viewVars);

 }
 }}}

 and in my app_error.php I created a myError() method

 {{{
 public function myError($params)
     {
                 if (!isset($params['name'])) {
                     $params['name'] = $this-codes[$params['code']];
             }
             if (empty($params['request'])) {
                         $params['request'] = $this-controller-here;
                 }
                 if (empty($params['title'])) {
                     $params['title'] = $params['code'] . ' ' . 
 $params['name'];
             }
         extract($params, EXTR_OVERWRITE);
         $this-controller-set(array(
             'code' = isset($code) ? $code : 404,
             'request' = isset($request) ? $request : null,
             'name' = isset($name) ? $name : null,
             'title' = isset($title) ? $title : null,
             'errcode' = isset($errcode) ? $errcode : 0,
             'message' = isset($message) ? $message : null,
             'invalidFields' = isset($invalidFields) ?
 $invalidFields : null,
         ));
                 $this-controller-RequestHandler-renderAs($this-controller,
 'xml');
                 // set header
             header(HTTP/1.x $params[code] $params[name]);
                 $this-_outputMessage('myError');
     }

 }}}

 Now I get this Notice:
 Notice (8): Undefined property: Controller::$RequestHandler [APP/
 app_error.php, line 88
 Where line 88 is the line where I want the view to respondAs XML:
 $this-controller-RequestHandler-renderAs($this-controller, 'xml');

 But when I leave out the errocode var then everything is alright and
 the view is generated as a valid xml message.

 Does anybody knows how this is possible?
 thnx!
 - primeminister
--~--~-~--~~~---~--~~
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: undefined property 'respondAs' of RequestHandler

2009-04-07 Thread primeminister

Hi John,

AppError inherits from ErrorHandler:
class AppError extends ErrorHandler{}

And the RequestHandler is a component that can be called only from the
controller IMO but not sure.
But it only happens when I add a viewvar 'errcode'. When I remove this
one it is working correctly.

That is the strangest part.

thnx
- primeminister

On Apr 7, 1:34 pm, John Andersen j.andersen...@gmail.com wrote:
 Which class does your app_error inherit from?

 I wonder why you have $this-controller-requestHandler- ... instead
 of $this-requestHandler- ...
 Enjoy,
    John

 On Apr 7, 11:32 am, primeminister cvdkerk...@gmail.com wrote:



  Anybody has an idea how to solve this?

  On Apr 4, 4:56 pm, Primeminister cvdkerk...@gmail.com wrote:

   I try to make a custom error message and output it as a xml view.
   I call in the controller cakeError() :

   {{{
   function beforeRender()
   {
       $this-cakeError('myError', $this-viewVars);

   }
   }}}

   and in my app_error.php I created a myError() method

   {{{
   public function myError($params)
       {
                   if (!isset($params['name'])) {
                       $params['name'] = $this-codes[$params['code']];
               }
               if (empty($params['request'])) {
                           $params['request'] = $this-controller-here;
                   }
                   if (empty($params['title'])) {
                       $params['title'] = $params['code'] . ' ' . 
   $params['name'];
               }
           extract($params, EXTR_OVERWRITE);
           $this-controller-set(array(
               'code' = isset($code) ? $code : 404,
               'request' = isset($request) ? $request : null,
               'name' = isset($name) ? $name : null,
               'title' = isset($title) ? $title : null,
               'errcode' = isset($errcode) ? $errcode : 0,
               'message' = isset($message) ? $message : null,
               'invalidFields' = isset($invalidFields) ?
   $invalidFields : null,
           ));
                   
   $this-controller-RequestHandler-renderAs($this-controller,
   'xml');
                   // set header
               header(HTTP/1.x $params[code] $params[name]);
                   $this-_outputMessage('myError');
       }

   }}}

   Now I get this Notice:
   Notice (8): Undefined property: Controller::$RequestHandler [APP/
   app_error.php, line 88
   Where line 88 is the line where I want the view to respondAs XML:
   $this-controller-RequestHandler-renderAs($this-controller, 'xml');

   But when I leave out the errocode var then everything is alright and
   the view is generated as a valid xml message.

   Does anybody knows how this is possible?
   thnx!
   - primeminister
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



undefined property 'respondAs' of RequestHandler

2009-04-04 Thread Primeminister

I try to make a custom error message and output it as a xml view.
I call in the controller cakeError() :

{{{
function beforeRender()
{
$this-cakeError('myError', $this-viewVars);
}
}}}

and in my app_error.php I created a myError() method

{{{
public function myError($params)
{
if (!isset($params['name'])) {
$params['name'] = $this-codes[$params['code']];
}
if (empty($params['request'])) {
$params['request'] = $this-controller-here;
}
if (empty($params['title'])) {
$params['title'] = $params['code'] . ' ' . $params['name'];
}
extract($params, EXTR_OVERWRITE);
$this-controller-set(array(
'code' = isset($code) ? $code : 404,
'request' = isset($request) ? $request : null,
'name' = isset($name) ? $name : null,
'title' = isset($title) ? $title : null,
'errcode' = isset($errcode) ? $errcode : 0,
'message' = isset($message) ? $message : null,
'invalidFields' = isset($invalidFields) ?
$invalidFields : null,
));
$this-controller-RequestHandler-renderAs($this-controller,
'xml');
// set header
header(HTTP/1.x $params[code] $params[name]);
$this-_outputMessage('myError');
}
}}}

Now I get this Notice:
Notice (8): Undefined property: Controller::$RequestHandler [APP/
app_error.php, line 88
Where line 88 is the line where I want the view to respondAs XML:
$this-controller-RequestHandler-renderAs($this-controller, 'xml');

But when I leave out the errocode var then everything is alright and
the view is generated as a valid xml message.

Does anybody knows how this is possible?
thnx!
- primeminister
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Output started always in cake/libs/file.php and headers already sent

2008-11-06 Thread Primeminister

Hi,

In my app I got a lot of PHP warnings that the headers were already
sent when settin a cookie or before redirecting.
And always it is in the cake/libs/file.php folder on line 146 or 279
This is the file handling lib of cake. So deletig or opening a file.

I investigated it more and I use FIle caching. So when writing or
deleting cache data it opens and delete files.
When the file doesn't exits when deleting it returns false but also
throws a warning.

My question is how can I suppress that  cake way? I know the PHP way
to modify the cake/libs/file.php and add a '@' sign before the calls
(@unlink()) but that is not what I want to do, because I'm changing
the cake libs.

Anyone suggestions so I don't get these errors anymore when debug is
off? (On production server)

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



Discussion on listed-websites-on-custom-google-search-engine-for-cakephp

2008-10-07 Thread Primeminister

Only search in the CakePHP.org domain (api, tests,book,trac)
http://www.google.com/coop/cse?cx=010821733709469541955:xmlzkbwlgaq
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Discussion on listed-websites-on-custom-google-search-engine-for-cakephp

2008-10-07 Thread Primeminister

Would be nice to have some refinements so that the links to sites as
API, Book, tests, etc are easily accessable. Look at refinements in
the CSE control panel.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Setting domain and path for the session cookie

2008-10-04 Thread Primeminister

Hi,

I have a website with multiple subdomains and I want the session
cookie to be valid for the main domain like .example.com instead of
computer.example.com or books.example.com
I'm trying to set a domain and path to be used for the session
cookie.
But I don't see a method/setter in CakeSessions or the Session
component.

Do I miss something? Anybody some ideas?

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



New cake blog but needs your contribution

2008-10-04 Thread Primeminister

Hi all,
I've setup yet another blog about cakePHP. Their can never be enough I
thought. But I don't want it to be a one man show, because I don't
blog very often.
I've set it it up so you can register and write too and add your tips,
trick, articles, code snippets, etc. Because maybe you are like me.
Sometimes you have something to share and other times you don't feel
like writing. So don't setup your own blog but just register. I've you
have wishes about the design, just drop me an email message.

http://www.cake-toppings.com/

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



Solved: Setting domain and path for the session cookie

2008-10-04 Thread Primeminister

Found it out thanks to Jurian, ADmad adn kabturek on IRC:
Set the session.cookie_domain in APP/config/bootstrap.php

ini_set('session.cookie_domain', 'example.com');

thnx!

On Oct 4, 1:13 pm, Primeminister [EMAIL PROTECTED] wrote:
 Hi,

 I have a website with multiple subdomains and I want the session
 cookie to be valid for the main domain like .example.com instead of
 computer.example.com or books.example.com
 I'm trying to set a domain and path to be used for the session
 cookie.
 But I don't see a method/setter in CakeSessions or the Session
 component.

 Do I miss something? Anybody some ideas?

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



Re: Set the associated model id in beforeSave method?

2008-08-18 Thread Primeminister

He Brendon,

I always forget that 'on' thing ;) I tried:
'Duplicate' = array(
'rule'  = array('isUnique'),
'on'= 'create',
'message'   = 'This nick is already taken. Choose
another or sign in'
)

But still is given me this validation message when I try to do $this-
items-saveAll($this-data, array('validate'='first')));
Maybe the saveAll thinks that it is always a create.
It does do a SELECT on the authors table, but still comes back with
the 'Duplicate' validation error message.

Do I something wrong?

On Aug 15, 10:33 pm, BrendonKoz [EMAIL PROTECTED] wrote:
 In your rule that you set isUnique, just make it so that the on
 key within that rule is set to create for the nickname field.
 Problem solved.

 On Aug 15, 3:58 am, Primeminister [EMAIL PROTECTED] wrote:

  He Teknoid, thnx for your reply!
  This works great, but I want an update if the nickname already exists
  and an insert if not.
  I thought in beforeSave() getting the ID of that nickname would be
  sufficient.

  Is there another way to do this with saveAll()? Or do I just have to
  do save() twice (Items and Author)?

  On Aug 14, 6:31 pm, teknoid [EMAIL PROTECTED] wrote:

   saveAll() will validate both of your models, and only save if both
   models pass validation.
   (Ensure that your DB supports transactions and use 'validate'='first'
   for options).
   This way you don't need any beforeSave() trickery, and you can rely on
   something like 'isUnique'

   saveAll() handles the rest...

   On Aug 14, 10:14 am, Primeminister [EMAIL PROTECTED] wrote:

Hi!

I use save all on Items which is associated with Authors (Item
belongsTo Author) and I have a beforeSave() in model Author which
checks if the nickname already exists and add the Author id to 
this-data when it does exists.

When I do $this-Item-saveAll() I print the $this-data in
Author.beforeSave()
Array
(
    [Author] = Array
        (
            [nick] = primeminister
            [modified] = 2008-08-14 14:09:08
            [created] = 2008-08-14 14:09:08
        )

)

I check if the author already exists. If yes then add it to $this-

data :

Array
(
    [Author] = Array
        (
            [nick] = primeminister
            [modified] = 2008-08-14 14:09:08
            [created] = 2008-08-14 14:09:08
            [id] = 1
        )
)

But this ID is not used when saving the model Author record. It is
used but the with an INSERT statement.
Query: INSERT INTO `authors` (`nick`,`modified`,`created`,`id`) VALUES
('primeminister','2008-08-14 14:09:08','2008-08-14 14:09:08',1)

How can I set this ID when using saveAll in items controller?

thnx!- Hide quoted text -

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



Advanced routing with prefix

2008-07-16 Thread Primeminister

Hi,
I have my routing setup and want to use the prefix (http://
book.cakephp.org/view/46/routes-configuration) for a couple of routes.
But I also want to use other urls with the same controllers.
So I did this in /config/routes.php

// account stuff (login, register, reset_password, etc)
// http://www.pages.local/nl/accounts/logout
Router::connect('/:lang/accounts/:action/*', array('controller' =
'accounts'),array('lang'='[a-zA-Z]{2}'));

// when loggedin the urls to personal pages
Router::connect('/my/:controller/:action/*', array('prefix'='my'));

And then I use withing views:
$html-link('My pages',
array('admin'=false,'prefix'='my','controller'='accounts','action'='my_edit',
$item['id']));
Which results in:
http://www.pages.local/accounts/my_edit/77123
which I want to be:
http://www.pages.local/my/accounts/edit/77123

Anyone a suggestion to prevent the collision here?

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



Re: Advanced routing with prefix

2008-07-16 Thread Primeminister

Tried that to but gives me:
http://www.pages.local/accounts/edit/77123
So still no prefix 'my' like in http://www.pages.local/my/accounts/edit/77123

But in the manual it says in the section prefix:
Router::connect('/profiles/:controller/:action', array('prefix' =
'profiles'));
Any calls to the profiles section would look for the profiles_ prefix
on the method calls

And that is what I did in the accounts_controller:
function my_edit() {}

Maybe the order of those two routes of mine must be different?

On 16 jul, 11:53, Dr. Tarique Sani [EMAIL PROTECTED] wrote:
 On Wed, Jul 16, 2008 at 3:19 PM, Primeminister [EMAIL PROTECTED] wrote:

  And then I use withing views:
  $html-link('My pages',

  array('admin'=false,'prefix'='my','controller'='accounts','action'='my_edit',
  $item['id']));

 'action'='edit'

 Try with the above

 Tarique

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



Re: Advanced routing with prefix

2008-07-16 Thread Primeminister

That worked!
The route changed also to:
Router::connect('/:lang/my/:controller/:action/*',
array('prefix'='my'), array('lang'='[a-zA-Z]{2}'));

But now it collides with the normal account routes:
Router::connect('/:lang/accounts/:action/*', array('controller' =
'accounts'), array('lang'='[a-zA-Z]{2}'));

Which I use for register, login, etc actions
The HTML link is here:
$html-link('Register',
array('controller'='accounts','action'='register','admin'=false),
array('class'='signin'));
and gives me the url:
http://www.pages.local/nl/my/accounts/register
And it must be without the 'my'


On 16 jul, 12:14, Dr. Tarique Sani [EMAIL PROTECTED] wrote:
 On Wed, Jul 16, 2008 at 3:28 PM, Primeminister [EMAIL PROTECTED] wrote:

  Tried that to but gives me:
 http://www.pages.local/accounts/edit/77123
  So still no prefix 'my' like in
 http://www.pages.local/my/accounts/edit/77123

 Try moving the Router::connect('/my/:controller/:action',
 array('prefix'='my')); to be the first route and in the link you need not
 give prefix= just give controller, action and params

 Tarique

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



Re: Solved: Advanced routing with prefix

2008-07-16 Thread Primeminister

Solved but not very satisfied. I allow a couple of actions in the
normal routing and the rest in the my prefix routing:
// account stuff (login, register, reset_password, etc)
Router::connect('/:lang/accounts/:action/*', array('controller' =
'accounts'), array('lang'='[a-zA-Z]{2}','action'='(register|login|
logout|reset_password|confirm)'));

// when loggedin
Router::connect('/:lang/my/:controller/:action/*',
array('prefix'='my'), array('lang'='[a-zA-Z]{2}'));

But whenever an action is changed or added I have to add this in my
routes.php.

Thanks anyway Tarique!
- primeminister


On 16 jul, 12:22, Primeminister [EMAIL PROTECTED] wrote:
 That worked!
 The route changed also to:
 Router::connect('/:lang/my/:controller/:action/*',
 array('prefix'='my'), array('lang'='[a-zA-Z]{2}'));

 But now it collides with the normal account routes:
 Router::connect('/:lang/accounts/:action/*', array('controller' =
 'accounts'), array('lang'='[a-zA-Z]{2}'));

 Which I use for register, login, etc actions
 The HTML link is here:
 $html-link('Register',
 array('controller'='accounts','action'='register','admin'=false),
 array('class'='signin'));
 and gives me the url:http://www.pages.local/nl/my/accounts/register
 And it must be without the 'my'

 On 16 jul, 12:14, Dr. Tarique Sani [EMAIL PROTECTED] wrote:

  On Wed, Jul 16, 2008 at 3:28 PM, Primeminister [EMAIL PROTECTED] wrote:

   Tried that to but gives me:
  http://www.pages.local/accounts/edit/77123
   So still no prefix 'my' like in
  http://www.pages.local/my/accounts/edit/77123

  Try moving the Router::connect('/my/:controller/:action',
  array('prefix'='my')); to be the first route and in the link you need not
  give prefix= just give controller, action and params

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



Re: adding a comment after each SQL query

2008-05-30 Thread Primeminister

Hi Abhimanyu,

The thing is that I want to know it on the live environment.
The quantity of content in the database is slightly different then on
my development environment.

Anyway. Can you advise in a good debugger that has this tool?


On May 29, 7:13 pm, Abhimanyu Grover [EMAIL PROTECTED] wrote:
 I figured out best way is to use a debugger to do this debugging...
 I'll be monitoring this thread if someone has suggestions about this.

 On May 29, 8:02 pm, Primeminister [EMAIL PROTECTED] wrote:

  Hi,

  I want to add a comment after each query that is build by cakePHP.
  So when I do $this-findAll($conditions) I want it to automagicly be
  added with a comment that will show up in my log. Example:
  SELECT * FROM posts AS Post WHERE id=12; /* getPost -
  posts_controller.php */
  The comment is then the function and filename where this query is
  called/executed.
  The later I can do with parsing the backtrace, but the first I don't
  know.

  Is there some beforeFind magic I can do? Or another thing?

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



Re: adding a comment after each SQL query

2008-05-30 Thread Primeminister

That is just great! Of course you have to overwrite. Didn't think of
that. Thanx GriGri

On May 30, 2:17 pm, grigri [EMAIL PROTECTED] wrote:
 Remeber that debug_backtrace() is a very expensive function to call!
 It might have a significant slowdown on your app's performance, even
 if it is just in debug mode.

 Anyways, you just need to implement a custom datasource and override
 the logQuery() method.

 [assuming you're using MySQL - if you're not then it should be easy to
 adapt]

 * In /app/config/database.php, set the 'driver' key to 'mysql_ex'

 * Create the following file: /app/models/datasources/dbo/
 dbo_mysql_ex.php

 [ code here:http://bin.cakephp.org/saved/32872]

 Then you're done!

 (as a side note, I also use geshi to syntax-hilight the sql log, also
 by overriding the datasource file. The two can be combined quite
 nicely)

 hth
 grigri

 On May 30, 12:31 pm, Primeminister [EMAIL PROTECTED] wrote:

  Hi Abhimanyu,

  The thing is that I want to know it on the live environment.
  The quantity of content in the database is slightly different then on
  my development environment.

  Anyway. Can you advise in a good debugger that has this tool?

  On May 29, 7:13 pm, Abhimanyu Grover [EMAIL PROTECTED] wrote:

   I figured out best way is to use a debugger to do this debugging...
   I'll be monitoring this thread if someone has suggestions about this.

   On May 29, 8:02 pm, Primeminister [EMAIL PROTECTED] wrote:

Hi,

I want to add a comment after each query that is build by cakePHP.
So when I do $this-findAll($conditions) I want it to automagicly be
added with a comment that will show up in my log. Example:
SELECT * FROM posts AS Post WHERE id=12; /* getPost -
posts_controller.php */
The comment is then the function and filename where this query is
called/executed.
The later I can do with parsing the backtrace, but the first I don't
know.

Is there some beforeFind magic I can do? Or another thing?

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



adding a comment after each SQL query

2008-05-29 Thread Primeminister

Hi,

I want to add a comment after each query that is build by cakePHP.
So when I do $this-findAll($conditions) I want it to automagicly be
added with a comment that will show up in my log. Example:
SELECT * FROM posts AS Post WHERE id=12; /* getPost -
posts_controller.php */
The comment is then the function and filename where this query is
called/executed.
The later I can do with parsing the backtrace, but the first I don't
know.

Is there some beforeFind magic I can do? Or another thing?

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