Re: RssHelper in 2.1.1

2012-03-27 Thread 100rk
Write failing test case, please. Mr. Jenkins is not a liar.

http://ci.cakephp.org/

-- 
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: regarding url rewriting

2012-03-27 Thread 100rk
s/heard/hear

-- 
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: regarding url rewriting

2012-03-27 Thread 100rk
You wouldn't heard me. Instead, learn how to read 
http://book.cakephp.org/2.0/en/development/routing.html

-- 
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: Configuracion CakePhp

2012-03-27 Thread 100rk
Welcome!
Please, don't ask questions, answered here http://book.cakephp.org/2.0/en/

-- 
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: paginator with user defined page sizes...

2012-03-26 Thread 100rk
Form using GET method, dropdown named 'limit' or 'show' with onchange = '*
this.form*.submit();' - see pagination settings 'paramType' and 'maxLimit'.

http://book.cakephp.org/2.0/en/core-libraries/components/pagination.html#pagination-with-get-parameters

-- 
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: Preventing serialized AJAX requests due to session locks

2012-03-22 Thread 100rk


> this is being caused by each request needing an exclusive lock on the 
> session
>

Lock on the session file(s). Solution is simple - do not use filesystem 
based session storage in production.
http://book.cakephp.org/2.0/en/development/sessions.html#built-in-session-handlers-configuration

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


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


Re: Accessing function from view

2012-03-21 Thread 100rk
http://book.cakephp.org/2.0/en/models/virtual-fields.html

class Poster extends AppModel {
public $virtualFields = array(
'duration' => 'DATEDIFF(Poster.end_date, Poster.start_date)'
);
}

-- 
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: PaaS recommendations

2012-03-21 Thread 100rk
Give http://pagodabox.com/ a try - and run Schema migrations from deploy 
hook.

-- 
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: Are Custom find types limited for my use case?

2012-03-20 Thread 100rk
plug and play solution:
https://github.com/ndejong/CakephpAutocachePlugin

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


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


Re: Cakephp 2.1, creating custom helper to extend TimeHelper???

2012-02-24 Thread 100rk
App::uses('TimeHelper', 'View/Helper');
final class AppTimeHelper extends TimeHelper {

}

class AppController extends Controller {
public $helpers = array(
'Time' => array('className' => 'AppTime'),

}

# in view
$this->Time->...

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

2012-02-14 Thread 100rk
CakePHP 2.1 is the answer - view blocks and extended views are better
then elements in viewPath

-- 
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: Question about caching with Cakephp

2012-02-09 Thread 100rk
Use different cache configurations per model - and then
Cache::clear(false, 'model2');

-- 
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: Question about caching with Cakephp

2012-02-07 Thread 100rk
There is also Model::_clearCache() method, called after save/delete.

class AppModel extends Model {

protected function _clearCache($type = null) {
if ($this->Behaviors->enabled('Autocache.Autocache')) {
//  Cache::delete('xxx', 'yyy');
}
return parent::_clearCache($type);
}
}

-- 
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: Question about caching with Cakephp

2012-02-07 Thread 100rk
Cool approach is this one

https://github.com/ndejong/CakephpAutocachePlugin

-- 
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: authentication with 2 tables

2012-01-28 Thread 100rk
You need to enhance core authentication adapter - add support for
arrays in userModel configuration option, for usage in controller like
this:

public $components = array(
'Auth' => array(
'authenticate' => array(
'App' => array('userModel' => array('Tutor', 'Student'))
)
)
);

So, implement your own logic in following 2 methods and that's it
(piece of cake).

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: AuthComponent using Cookies

2012-01-17 Thread 100rk
Generally, cookies are not designed to be overused (many cookies or
large datasets stored in them), they are being sent to the server
along with every request.

If you _really_ want to substitute SessionComponent in whole
application with CookieComponent, try to remap used class:

class AppController extends Controller {
public $components = array(
'Session' => array('className' => 'Cookie'),
'Auth' => array(
...

- their read/write/delete api is the same, so it _could_ work, as a
workaround, maybe (IDK for sure).

-- 
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: AuthComponent using Cookies

2012-01-17 Thread 100rk
All you need is this documentation page

http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#creating-custom-authentication-objects

Simple/straightforward way how to do what you want is this code in
place:

http://bin.cakephp.org/view/1497928407#modify

configured for usage in AppController like this:

public $components = array(
'Cookie' => array(
'name' => 'common',
'time' => '+14 days'),
'Auth' => array(
'authenticate' => array(
'Cookie',
'Form'),
...

and these 3 lines in your login() method, when user is successfully
authenticated by FormAuthenticate adapter:

$username = $this->request->data['User']['username'];
$password = $this->request->data['User']['password'];
$this->Cookie->write('remember', compact('username', 'password'),
true, '+2 weeks');

-- 
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 extract filesize from meioupload with understable format ?

2012-01-15 Thread 100rk
http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::toReadableSize

-- 
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 ajax code in cake 2

2012-01-14 Thread 100rk
AjaxHelper was removed.

http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::link

-- 
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: Any best easy to understan documentation or book

2012-01-13 Thread 100rk
Yes. http://book.cakephp.org/ + code + test cases.

-- 
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: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2012-01-12 Thread 100rk
> - the $this->fetch('content') line is in the 2.0 
> docs?http://book.cakephp.org/2.0/en/views.html#view-layouts

Probably some mistake (book.cakephp.org updated too soon, or missing
node for 2.1.x docs, I don't know) - View::fetch() is 2.1 feature.

-- 
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: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2012-01-12 Thread 100rk
> To do so, make sure your layout includes a place
> for $this->fetch('content')".

Don't use CakePHP 2.1-alpha (codebase and/or documentation) yet -
learn latest stable.

-- 
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: Can I automagically add an ID to the div generated by form->input

2012-01-06 Thread 100rk
class AppController extends Controller {
public $helpers = array(
'Form' => array('className' => 'AppForm')
);
}

# app/View/Helper/AppFormHelper.php
App::uses('FormHelper', 'View/Helper');
final class AppFormHelper extends FormHelper {
public function input($fieldName, $options = array()) {
# do what you want here
return parent::input($fieldName, $options);
}
}

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

2011-12-05 Thread 100rk
> Database looks like this:
>
> id
> user_id
> transaction_id
> order_id
> update
> created
> modified

Make it like this:

id
user_id
model varchar(255) # for model->name
foreign_key int(10) # for model.id
update
created # no need for 'modified' field

and then read this behavior (for CakePHP 2.x):

http://bin.cakephp.org/view/263142758

If you're using session and Auth component, you can initialize user_id
field this way:

http://bin.cakephp.org/view/720769503

-- 
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: Fixtures or anything outside the database

2011-11-10 Thread 100rk
Beauty of ArraySource is - conventional usage of model (although
limited a bit) - fields, order, limit, associations...

https://github.com/cakephp/datasources/blob/2.0/Test/Case/Model/Datasource/ArraySourceTest.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: Fixtures or anything outside the database

2011-11-10 Thread 100rk
One solution would be ArraySource from plugin 
https://github.com/cakephp/datasources

- app/Config/bootstrap.php:
CakePlugin::load('Datasources');

- app/Config/database.php:
class DATABASE_CONFIG {
public $array = array('datasource' => 'Datasources.ArraySource');
...
}

- app/Model/Testimonial.php
class Testimonial extends AppModel {
public $useDbConfig = 'array';
public $records = array(
array(
'id' => 1,
'title' => 'Title #1',
),
);
}

- create TestimonialsController, or in any controller:
$this->loadModel('Testimonial');
$this->set('testimonials', $this->Testimonial->find('all');

If you'll want to move testimonials data out of model source, overload
constructor of Testimonial model and use Configure::load/read() for
initialization of $this->records property.

-- 
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: bigint datatype in Fixtures

2011-11-09 Thread 100rk
I had similar problem with 'double' type and CakeSchema (therefore
with CDC plugin "migrations" as well) - DboSource maps it as "float".
Straightforward solution (not DBO-independent, though) was raw sql
"ALTER TABLE ... MODIFY COLUMN ..." statement in after() callback.
Take it just as possible direction, I'm not sure if it is possible to
change descendant of CakeTestFixture to run raw sql after table is
created and before test data are inserted.

-- 
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: Class 'File' not Found / Class 'Folder' not found in Version 2.0 (worked OK in version 1.3)

2011-11-07 Thread 100rk
https://github.com/CakeDC/utils/blob/2.0/Model/Behavior/CsvImportBehavior.php

or

App::uses('File', 'Utility');
App::uses('Folder', 'Utility');

-- 
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: Help: how to use cakephp for subdomains

2011-11-07 Thread 100rk
> If he's getting that error it's highly unlikely that apache config is a 
> factor.

That's correct, he would get 500 instead. Next time, I'll read the
question first (maybe).

-- 
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: Help: how to use cakephp for subdomains

2011-11-07 Thread 100rk
> Have (any of) you read the question?

No, why? :-)

Presence of file in proper location doesn't have to be guarantee that
apache is able to serve it. I've seen several hosting providers, where
CakePHP doesn't work without RewriteBase directive - for example,
recent one is pagodabox.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: Help: how to use cakephp for subdomains

2011-11-07 Thread 100rk
Some apache setups needs line (in .htaccess, httpd.conf, or virthost
config)

RewriteBase /

-- 
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: admin_add() cannot be accessed directly

2011-11-05 Thread 100rk
> is exactly -> /users/admin_add

Touché.

1. Read http://book.cakephp.org/2.0/en/development/routing.html#prefix-routing
2. Use arrays for urls in views, you'll get correct url /admin/users/
add

-- 
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: admin_add() cannot be accessed directly

2011-11-05 Thread 100rk
Sounds like wrong url - not /users/admin_add but /admin/users/add

-- 
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 echo in the controllers with CakePHP 2.0.1 and 2.0.2 on NGINX

2011-11-03 Thread 100rk
$this->response->body(json_encode($data));

-- 
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 about using real HTML templates for Form input fields?

2011-11-03 Thread 100rk
> Those templates could be "theme" specific (like Twitter Bootstrap) and

IMHO only not-so-easy solvable problem with Twitter Bootstrap and cake
forms is - label wrapped around checkboxes, for both single-ones and
'multiple' (wrapped in unordered lists). Rest of it is easy, thanks to
'className' key in $helpers and custom aliased YourFormHelper (and
probably also YourHtmlHelper with either customized $_tags property or
using 'configFile' configuration setting and proper config file with
customized and/or added tags in it) where you can inject/set classes/
divs etc before call of parent class (FormHelper) methods.

-- 
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: Seeking clarification

2011-10-27 Thread 100rk
On Oct 27, 3:40 am, euromark  wrote:
> I added the removal of those names in my UpgradeShell script with
> these patterns:

Nice!

-- 
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: Seeking clarification

2011-10-26 Thread 100rk
Talking about $name property, it is not just case of PagesController
and CakeErrorController (descendant requires to set either $name or
$viewPath) - it is used in most of CDC plugins - I know it saves some
processor ticks, but it also forces developers using classes like
model Users.User as parent class to overwrite $name property manually
in all descendants, if some of behaviors etc depends on it.

-- 
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: $this->data OR $this->request->data?

2011-10-26 Thread 100rk
See answers above. And note method CakeRequest::data() for
manipulating (get/set).

-- 
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: Seeking clarification

2011-10-26 Thread 100rk
IMO, only reason to add $name property could be - extending class
(controller/model) where it is defined as well.

For example, core PagesController contains line -

public $name = 'Pages';

- therefore your controller

class MyPagesController extendsPagesController { ... }

will need $name property correctly defined also, because of viewPath
used in rendering process.

-- 
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: Se Ya Cake..bake a dick cake frosting on your face...............

2011-09-11 Thread 100rk
So? Somebody told you that your CakePHP application sucks or what?

-- 
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: Same code in controller, model and view

2011-02-16 Thread 100rk
> Just create a static class, include it, and use it statically anywhere
> in your application.

Or that, right. Going back to my cave.

-- 
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: Same code in controller, model and view

2011-02-16 Thread 100rk
And another correction (it was written right here, sorry):

>     public function prettyDate($Model, $timestamp) {
>                 $alias = $this->_getAlias($Model);
>         return date($this->settings[$alias], $timestamp);
>     }

return date($this->settings[$alias]['format], $timestamp);

-- 
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: Same code in controller, model and view

2011-02-16 Thread 100rk
> //in controller
> public $components = array('DateFormat' => array('format' => 'r'));
> public $helpers = array('DateFormat' => array('format' => 'r'));
>
> $this->prettyDate(null, time());

Correction (for controller and view):

$this->DateFormat->prettyDate(null, time());

-- 
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: Same code in controller, model and view

2011-02-16 Thread 100rk
Take it just as an example:

class DateFormatBehavior extends ModelBehavior {

public function setup($Model, $config = array()) {
$defaults = array('format' => 'c');
$alias = $this->_getAlias($Model);
$this->settings[$alias] = array_merge($defaults, $config);
}

public function prettyDate($Model, $timestamp) {
$alias = $this->_getAlias($Model);
return date($this->settings[$alias], $timestamp);
}

protected function _getAlias($Model) {
return isset($Model->alias) ? $Model->alias : 'Dummy';
}
}

App::import('Behavior', 'DateFormat');
class DateFormatComponent extends DateFormatBehavior {

public function initialize($Controller, $settings = array()) {
$this->setup(null, $settings);
}
}

App::import('Behavior', 'DateFormat');
class DateFormatHelper extends DateFormatBehavior {

public function __construct($settings = array()) {
parent::__construct();
$this->setup(null, $settings);
}
}


// in model
public $actsAs = array('DateFormat' => array('format' => 'r'));

$this->prettyDate(time());


//in controller
public $components = array('DateFormat' => array('format' => 'r'));
public $helpers = array('DateFormat' => array('format' => 'r'));

$this->prettyDate(null, time());

Technically, you do not need above component - use behavior method
through model.

-- 
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: Does the CakePHP ready for 'Large Scale' web applications?

2011-02-02 Thread 100rk
Thank you for the link to google results. No, I'll not read all of
them just to realize where you think you find something to be scared
of. I'm not scared, and I've done large cake apps with many concurrent
users. No worries. If Mozilla Foundation didn't switched to another
programming language, their addons site would still run on CakePHP.

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


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


Re: Does the CakePHP ready for 'Large Scale' web applications?

2011-02-02 Thread 100rk
> In several places I read that CakePHP is not suitable for these
> purposes.

Links, please. Do not expect speed of light in first working attempts/
apps of cake newbies.

RAD allows you to have your app done quickly - "make it work" is 1st
step. Then "make it work better" - developer with good knowledge of
framework is required if you want large/complicated app perform well
too, regardless which framework was used.

-- 
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: deployment, git hooks, migrations ... updating your app with command line

2011-01-18 Thread 100rk
https://github.com/CakeDC/migrations
https://github.com/ceeram/clear_cache

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: ODBC + Cake 1.3

2010-12-17 Thread 100rk
https://github.com/cakephp/datasources

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: CakePHP 2.0 status

2010-12-15 Thread 100rk
I asked the same question in IRC channel 2 weeks ago, and Mark Story
told me:

"I wouldn't use 2.0 for anything other than toy projects for now."

My situation is the same - I can live with 'unstable' codebase for
long term project, I'm capable to fix bugs on my own, and if I was
told "yes, dev release - the one's before pre-alpha - is coming in 6
months or so", I would have good excuse (for myself) to start using
2.0 for one or two projects and therefore help with its development/
bugfixes/etc. I don't complain about that, because cake's development
strategy and habit about pre-announcing release dates ;) was proven
right/useful/smart in past. So, for now, I'm waiting to hear few
people saying "I am using 2.0 in production" - just like people were
using 1.2 (and were proud/brave enough to say aloud), when it was
'stable enough' - and it was long time before pre-alpha Christmas
release 4 years ago.

Joshua Muheim: right side of this page 
http://cakephp.lighthouseapp.com/projects/42648-cakephp

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


Messages from application in IRC channel or private chat

2010-12-10 Thread 100rk
If you are

- using IRC
- able to install anything on your server
- curious what goes on in your live app or its logs

then you're just one click away from simple plugin which may help you:

https://github.com/100rk/cii

Enjoy!

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: Internacionalization NOT working?

2010-12-06 Thread 100rk
> I have in locale/esp/LC_MESSAGES/default.po:

locale/spa/LC_MESSAGES/default.po

> $this->Session->write('Config.language', 'esp');
> Configure::write('Config.language', 'esp');

$this->Session->write('Config.language', 'es');
Configure::write('Config.language', 'es');

https://github.com/cakephp/cakephp/blob/master/cake/libs/l10n.php#L231

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: Are there performance overheads to RequestAction?

2006-06-30 Thread 100rk


> if ($this->isCalledByRequestAction) {

if (!empty($this->params['bare']))

But be careful, 'bare' parameter is 1 in case of ajax call also


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



Re: Are there performance overheads to RequestAction?

2006-06-29 Thread 100rk

It depends on way how You're using requestAction().

If You're using it like:
$this->requestAction('/some/url');
or
$somedata = $this->requestAction('/some/url');
then it is supposed to be quite fast, as target controller's action is
not rendered. Off course there is new dispatch process for every such a
call, but it is cool, because You can use routed-url's and passing
parameters like requestAction('/url',
array('myParamName'=>'myParamValue')) with requestAction() also.

BUT: if You're using it like
$renderedView = $this->requestAction('/some/url', array('return'));
(so You will obtain rendered view content), then targetted controller's
action is rendered, so extra instance of View class is created for it,
there is used output buffer and if You're using rendering by
requestAction() often in during of one request, Your page generation
time will slow down a little bit - 'how big bit' depends on many
factors.

I was talking about same thing some time ago at IRC with one of core
devs and his propose to me was: use requestAction() for obtaining data
and pass them to renderElement() method - so all render-actions will be
maked in lifetime of one View instance.

I hope it makes sense, I speak English like Tarzan.


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



xajax in CakePHP - CakeX package moves to CakeX project

2006-06-29 Thread 100rk

Hi all!

just some notes for those who tried CakeX package in past:

- CakeX project was approved at CakeForge
http://cakeforge.org/projects/cakex/
- package and it's snippets no longer exists at CakeForge (too many
dirty hacks in it's code)
- current code is muchmuch better integrated to CakePHP (similar use as
Ajax helper)
- CakeX has built-in support for debug, form validation, auto-update
divs
- CakeX contains trunk xajax code (0.5 alpha), so it has implemented
support for xajax plugins (example plugins for form enabling/disabling
and moo.fx and moo.fx.pack effects are included)

And best one:
- I will pusblish first alpha release soon - just after I will have
done demo with examples for it

Stay tuned, countdown is near zero point.


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



Re: component function not found

2006-06-22 Thread 100rk

Could You please investigate which file caused this, please? In case
You had some old cake release in time You run this app for first time,
try compare Your app/config/* and app/webroot/index.php files with
original ones.

Have a nice day!


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



Re: component function not found

2006-06-22 Thread 100rk

If You will again fail with 'Undefined property' and this will be in
clean CakePHP install, You will have to put somewhere output of
function phpinfo(). I assume CakePHP upgrade was only change You did -
so no PHP/webserver configuration changes, no other application changes
etc.


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



Re: component function not found

2006-06-22 Thread 100rk

Take a look here:
http://cakephp.org/pastes/show/e1c47242205de33b22cedaa740922063

and try this code (best will be in clean cake install).

How looks output?


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



Re: component function not found

2006-06-22 Thread 100rk

What about output before change of component's name? Both arrays
contains it?


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



Re: component function not found

2006-06-22 Thread 100rk

Run this controller, please (http://example.com/problem/):

Email);
}
}
?>


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



Re: component function not found

2006-06-22 Thread 100rk

Your own pages controller is not matter in this case, as we're running
action from other controller. I assume You're trying hunt this error in
empty controller and layout, so we can be sure You're not calling other
things in during lifetime of script for example by requestAction() etc.

BTW: from what version of CakePHP did You upgrade to 3148?


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



Re: component function not found

2006-06-22 Thread 100rk

:-((

Then: put this method into Your ApplicationsController:

function __construct() {
e('Components before parent constructor: ');
pr($this->components);
parent::__construct();
e('Components after parent constructor: ');
pr($this->components);
}

For explanation of I'm trying to resolve take a look into
Controller::__construct()  method last 5 lines.

If I was You I will also try temporarily change line 63 of
cake/libs/controller/component.php from

$loaded = $this->_loadComponents($loaded,
$this->controller->components);

to $loaded =& $this->_loadComponents($loaded,
$this->controller->components);

I'm not sure right now this line is what bites You Another thing:
try rename this component from Email to something else - It should not
interfere with PHP.INI settings (restricted functions), but who knows...


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



Re: component function not found

2006-06-22 Thread 100rk

apply first question to Your own AppController also, if You have
one :)


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



Re: component function not found

2006-06-22 Thread 100rk

Answer those questions, pls:

- do You have implemented constructor in Your ApplicationsController -
if yes, do You call parent::__construct() in it?

- do You have Your own AppController - if yes, is it extending class
Controller?


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



Re: component function not found

2006-06-22 Thread 100rk

Well, if You're using $this->controller-> in Email::message()
method, You surely have to implement startup(&$controller) method in
this component as ros-soft proposed.

My advice is: until You will be looking for reason for this error,
better will be create empty controller with only necessary code and use
cake's default layout, or some basic one, so You can be absolutely sure
there is no conflict between Your and cake's core code. And other
thing: if Your controller doesn't use any model, IMHO You can want to
put var $uses = null; to controller's definition.

Then try temporary put code

pr($loaded);
pr($components);

to method Component::_loadComponents() (file
cake/libs/controller/component.php)

- just to start of this method
- and just before return $loaded; line

..so we can start investigate somewhere.


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



Re: component function not found

2006-06-22 Thread 100rk

Let me to apologize to You, I was thinking of few different things and
in attempt to help You I mixed them together.


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



Re: component function not found

2006-06-22 Thread 100rk

Hi,

from what version of CakePHP You did upgrade to 3148?

Few weeks ago was in cake's code changed one thing, which affects all
helpers - they have to extend Helper class so they can work well. So if
Your Email helpers is extending other class which is not decendent of
Helper (or Helper itself), this is reason.

Otherwise You will have to show us somewhere Your Email helper code -
http://cakephp.org/pastes/add is best place.


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



Re: real friendly urls

2006-06-21 Thread 100rk

Hi Felix!

> ...it's also not possible to do language url's like:
> /{lang}/controller/action with the normal routing class

it is surely not perfect solution, but it works:

$Route->connect('/en_US/:controller/:action/*', array('locale' =>
'en_US'));
// $controller->params['locale'] == 'en_US'

:)


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



Re: Cakebased bot ?

2006-06-16 Thread 100rk

Just some links for You (if You didn't see them before):
- bot for cake IRC log : http://irc.cakephp.org/pages/source
- Http Client Class from ros-soft:
http://rossoft.wordpress.com/2006/06/09/http-client-class/


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



Re: Moving /pages/ to /

2006-06-14 Thread 100rk

>> If I find time...

Hi!

Before You'll start read pls this ticket:
https://trac.cakephp.org/ticket/142

and search roadmap for 'Router':
https://trac.cakephp.org/roadmap

Just for sure, You know - it is allways better to know what direction
has main stream, You will not write high quality code which will be not
approved to core just because of strategy/roadmap/worksform.

I'm curious what we'll see from You - notice Router will be singleton
in 2.0, so dynamic routes will be easy to implement.

Nice day!


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



Re: Web host doesn't use AllowOverride

2006-06-09 Thread 100rk

> They said they have mod_rewrite but there's no AllowOverride

Try ask support of Your provider for mod_rewrite rules - they can put
them into Your vhost configuration, if they are afraid to AllowOverride
for You.


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



Re: Don't load all models at startup

2006-06-08 Thread 100rk

Way I'm using already in environment with many db tables is through
plugins - their models are loaded only when some controller of this
plugin is dispatched.

>Perhaps only the models used by the requested controller
...and all models in their associations...


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



Re: OpenID implementation in CakePHP

2006-06-07 Thread 100rk

Thank You :)

I chosed 2nd option from videntity.org, as both libs are dependend on
some PHP extensions (curl, gmp/bcmath...), but library from
openidenabled is dependent on PEAR packages also (and I don't like this
fact).

But question was about CakePHP component, You know. Before I started
write my own CakePHP OpenID solution (with help of library from
videntity.org) I just tried to ask here.


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



OpenID implementation in CakePHP

2006-06-06 Thread 100rk

- someone has some functional component?
- someone is working on it?
- someone want to use it if I will implement it?

I'm just on start line with this protocol, so I do not want to try
someone's mistakes by myself, You know ;-)

Links:
http://www.openidenabled.com/
http://videntity.org/


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



Re: fundamental dispatcher strategy flawed?

2006-05-27 Thread 100rk

> ...how many people have trouble and then comeback saying...

I think it is caused by MVC rules, which not everyone is prepared to
follow. There is many people in this fast-living world who try to ommit
time with printed manual and/or study foreign code.

@Kace: I really don't think 'mailing list is full of people complaining
how difficult cake is to understand' ;-) Show me those threads which
aren't finished by solution. I think routes could satisfy Your needs.
If not, be more detailed, pleace - there is surely possible way (or
You're trying to use CakePHP by way it is not supposed to).


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



Re: CakePHP 1.1.2.2955 Release

2006-05-26 Thread 100rk

Thanks nate, but this wasn't my problem - it was issue of 2 people on
IRC today - they has helpers which aren't extend Helper class and after
upgrade to latest release they ends with above errr message.


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



Re: CakePHP 1.1.2.2955 Release

2006-05-26 Thread 100rk

One thing in this release is: all of Your helpers has to extend class
'Helper' (or some child of it), or You will fight error messages like:

Fatal error: Call to undefined method TestHelper::afterRender() in
//cake/libs/view/view.php on line 586


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



Re: fundamental dispatcher strategy flawed?

2006-05-26 Thread 100rk

Try to read more about routes:

http://manual.cakephp.org/chapter/4


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



Re: Google Maps + CakePHP Recipe

2006-05-26 Thread 100rk

Hi tom!
It looks just great - only bad thing on this tutorial is it's location
- wiki is IMO better place for it, as people are looking for user
tutorials && experiences there ;-)

Anyway: good work.


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



Re: Global variables?

2006-05-24 Thread 100rk

Little enhancement for this component for those who are using multiple
places for M/V/C files:

function &getModelPaths()
{
$config =& Configure::getInstance();
return $config->modelPaths;
}
function &getViewPaths()
{
$config =& Configure::getInstance();
return $config->viewPaths;
}
function &getControllerPaths()
{
$config =& Configure::getInstance();
return $config->controllerPaths;
}


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



Re: AppController not registering Helpers

2006-05-24 Thread 100rk

It doesn't show IF Your AppController is in proper directory with
proper filename


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




Re: AppController not registering Helpers

2006-05-24 Thread 100rk

Are You sure You did call parent methods in methods which are
redefining methods of parent class?


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



Re: Nice URLs and webservers other then apache

2006-05-24 Thread 100rk

http://wiki.cakephp.org/tutorials:url_rewrite_without_apache is the
answer, just give me a day, people.


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



Re: Nice URLs and webservers other then apache

2006-05-24 Thread 100rk

Thanks, Olivier. Problem is: it allways takes a long time to me
(explain something in English) if I cannot see person I'm talking with
;-), but You're surely right, so I will make some wiki page about it. I
will let You know here.


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



Re: Global variables?

2006-05-24 Thread 100rk

>I can't find the original anymore.
I saw it also and I also cannot find it :)

When I'm in need for such as global configuration options, I'm using my
'Config' component, which API simply follows SessionComponent API. NOTE
FOR ALL: it is licensed under one term: If You will use it, check if
there is a page about it on cake wiki - if it doesn't exist yet and
You're able describe what is important in correct English, make page
about it on wiki and maintain it in future.

app/controllers/components/config.php:
custom)) {
$config->custom = array();
}
}
function write($name, $value)
{
$config =& Configure::getInstance();
$config->custom[$name] = $value;
}
function read($name = null)
{
if (!is_null($name)) {
if (ConfigComponent::check($name)) {
$config =& Configure::getInstance();
return $config->custom[$name];
}
else {
return null;
}
}
else {
$config =& Configure::getInstance();
return $config->custom;
}
}
function del($name)
{
if (ConfigComponent::check($name)) {
$config =& Configure::getInstance();
$unset($config->custom[$name]);
}
}
function delete($name)
{
ConfigComponent::delete($name);
}
function check($name)
{
$config =& Configure::getInstance();
return isset($config->custom[$name]);
}
}
?>

Usage in controller:
var $uses = array('Config', ...);
and then
$this->set('menuArray', $this->Config->read('menuArray'));

OR anywhere outside of this controller (if dispatcher is processid it's
method) - in view, element, even in model:

$menu = ConfigComponent::read('menuArray');

So in this particular case I will have to put in bootstrap.php code:
$_conf =& Configure::getInstance();
$_conf->custom = array('xyz' => 123);
unset($_conf);

and then access it as is described above.


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



Re: Nice URLs and webservers other then apache

2006-05-24 Thread 100rk

> why don't you do a new wiki page  for that ?

Because of my poor English - I hope there is someone in this group who
will do it instead of me. If anyone is involved, I can co-operate with
him, but I definitely cannot write some text and hope English-speaking
people will not laugh on CakePHP programmers just because of me ;-)


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



Nice URLs and webservers other then apache

2006-05-24 Thread 100rk

Hi all!

>From CakePHP manual and wiki it looks we have no other choice then
apache webserver, if we want to have nice URLs. Don't worry, it is not
true. There are couple of options and I want to share with You
configuration snippets for 'nice URLs' with production install of
CakePHP at 2 nice webservers. I will assume You have Cherokee webserver
or lighttpd installed on Your system and it works with php (both of
them are able run php as cgi or fastcgi).


Let's prepare:

Sample directory structure:
# Here is CakePHP distro (dirs 'app', 'cake', 'vendors').
# Files .htaccess and index.php arent' needed.
/usr/local/lib/cakephp

# Here are copied subdirectories of 'app' directory for example virtual
host.
# Files app/.htaccess, app/index.php and app/webroot/.htaccess arent'
needed.
# HERE Your app will live (controllers, models...), if You don't
touched bootstrap.php ;)
/usr/local/www/servers/www.example.com/app

Change constant CAKE_CORE_INCLUDE_PATH in file
/www/servers/www.example.com/app/webroot/index.php to
define('CAKE_CORE_INCLUDE_PATH', '/usr/local/lib/cakephp');



===>>> Cherokee Web Server from http://www.0x50.org/

Snippet from file /usr/local/etc/cherokee/www.example.com :
#-
Server www.example.com {
DocumentRoot /www/servers/www.example.com/app/webroot
...
Directory /css, /files, /img, /js {
Handler common
...
}
Directory / {
Handler redir {
Rewrite "/(.*)$" "/index.php?url=$1"
}

}
...
}
#-


===>>> lighttpd from http://www.lighttpd.net/

Snippet from file /usr/local/etc/lighttpd.conf :
#-
server.modules = (
"mod_rewrite",
"mod_simple_vhost"
...
)
...
simple-vhost.server-root   = "/usr/local/www/servers/"
simple-vhost.default-host  = "www.example.com"
simple-vhost.document-root = "/app/webroot/"
...
url.rewrite-once = (
"/(.*)\.(.*)" => "$0",
"/(css|files|img|js)/" => "$0",
"^/([^.]+)$" => "/index.php?url=$1"
)
...
#-

Enjoy! :)

P.S.
- if You have CakePHP worked on other web server with some rewrite
trick, let us know, please
- if You speak English better then me, write some nice wiki article
about it, please


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



Nice URLs and webservers other then apache

2006-05-24 Thread 100rk

Hi all!

>From CakePHP manual and wiki it looks we have no other choice then
apache webserver, if we want to have nice URLs. Don't worry, it is not
true. There are couple of options and I want to share with You
configuration snippets for 'nice URLs' with production install of
CakePHP at 2 nice webservers. I will assume You have Cherokee webserver
or lighttpd installed on Your system and it works with php (both of
them are able run php as cgi or fastcgi).


Let's prepare:

Sample directory structure:
# Here is CakePHP distro (dirs 'app', 'cake', 'vendors').
# Files .htaccess and index.php arent' needed.
/usr/local/lib/cakephp

# Here are copied subdirectories of 'app' directory for example virtual
host.
# Files app/.htaccess, app/index.php and app/webroot/.htaccess arent'
needed.
# HERE Your app will live (controllers, models...), if You don't
touched bootstrap.php ;)
/usr/local/www/servers/www.example.com/app

Change constant CAKE_CORE_INCLUDE_PATH in file
/www/servers/www.example.com/app/webroot/index.php to
define('CAKE_CORE_INCLUDE_PATH', '/usr/local/lib/cakephp');



===>>> Cherokee Web Server from http://www.0x50.org/

Snippet from file /usr/local/etc/cherokee/www.example.com :
#-
Server www.example.com {
DocumentRoot /www/servers/www.example.com/app/webroot
...
Directory /css, /files, /img, /js {
Handler common
...
}
Directory / {
Handler redir {
Rewrite "/(.*)$" "/index.php?url=$1"
}

}
...
}
#-


===>>> lighttpd from http://www.lighttpd.net/

Snippet from file /usr/local/etc/lighttpd.conf :
#-
server.modules = (
"mod_rewrite",
"mod_simple_vhost"
...
)
...
simple-vhost.server-root   = "/usr/local/www/servers/"
simple-vhost.default-host  = "www.example.com"
simple-vhost.document-root = "/app/webroot/"
...
url.rewrite-once = (
"/(.*)\.(.*)" => "$0",
"/(css|files|img|js)/" => "$0",
"^/([^.]+)$" => "/index.php?url=$1"
)
...
#-

Enjoy! :)

P.S.
- if You have CakePHP worked on other web server with some rewrite
trick, let us know, please
- if You speak English better then me, write some nice wiki article
about it, please


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



Re: Nice URLs and webservers other then apache

2006-05-24 Thread 100rk

Another typo (I hope last one):

Snippet from file /usr/local/etc/cherokee/www.example.com :

has to be

Snippet from file
/usr/local/etc/cherokee/sites-available/www.example.com :


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



Re: Nice URLs and webservers other then apache

2006-05-24 Thread 100rk

I'm sorry for typo:

/www/servers/www.example.com/app/webroot

has to be

/usr/local/www/servers/www.example.com/app/webroot

(changes in webroot/index.php and DocumentRoot for Cherokee)


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



Re: Variables in routes

2006-05-24 Thread 100rk

Hi Ryan!

Just take a look into Dispatcher::parseParams() implementation.

In Your app/config/routes.php You can access instance of Router as
$route, url as $from_url and (by dispatcher) not-touched superglobals
$_GET and $_POST.

So: if You're able apply to string some regexp matches, You can access
above mentioned variables in Your routes.php file and change everything
You want - in Your case You have to change content of variable
$from_url from '/conf-1/presentations/view/1' to
'/presentations/view/conf-1/1' in Your app/config/routes.php file. Then
You don't have to specify any route for Your controller, as then will
be dispatched correct automatically.


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



Re: Global variables?

2006-05-23 Thread 100rk

File bootstrap is included in method Configure::__loadBootstrap() so
You have to mark Your global variables by keyword 'global' as global -
otherwise they are valid only in scope inside of above mentioned
method.

About global variables: if this solution is good enough for You, then
it is perfect and do not listen to me, it is only question of personal
taste, You know ;-) Truth is: file bootstrap.php is mentioned for such
a things.


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



Re: Model subclass

2006-05-23 Thread 100rk

how looks output of code

pr($agent);

in view?


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



Re: Global variables?

2006-05-23 Thread 100rk

if You defined those vars in bootstrap.php by code

global $abc, $def;
$abc = true;
$def = 'XXX';

then You can acces them in Controller::beforeFilter() method by

global $def;
$this->set('def', $def);

But You IMO have to consider, if You really need global variable. I'm
trying to say there will be probably 'more clean' way how to achieve
this, if You aren't just include some foreign code.


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



Re: Model subclass

2006-05-23 Thread 100rk

This should work fine, if You will load file with Customer definition,
so put

require_once dirname(__FILE__) . DS . 'customer.php';

before class Agent definition.


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



Re: How to avoid the 'EDIT' action 'ADD' a new record when you changed PK.

2006-05-23 Thread 100rk

And what about SecurityComponent::requireAuth() method?

- if You will not use any ajax calls (where will be controller with
Security component) in Your page (where protected form is)
- and if visitor will not open any link (where will be controller with
Security component) from Your protected page in other browser tab
- and if visitor will not visit other page (where will be controller
with Security component) from another browser window with same session
id
- and if session will not expire until form is sended back

it could IMHO fill this security need.


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



Re: How to avoid the 'EDIT' action 'ADD' a new record when you changed PK.

2006-05-23 Thread 100rk

Off course, but it is not possible do this by locally saved html page
with modified form


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



Re: How to avoid the 'EDIT' action 'ADD' a new record when you changed PK.

2006-05-23 Thread 100rk

>> I´m still thinking about generic solutions
RequestHandler::getReferrer()


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



Re: Usability of component 'Security'

2006-05-22 Thread 100rk

Thanks for answer, nate.

Decision is on You, You're man here ;-)

But from my point of view:

- if purpose of Security component is (beside of auth. tokens for
'one-touch html forms') block external requests which aren't send by
POST (by 'requirePost' functionality)
- then I am not able to find better place I have to put 'requireBare'
functionality into, as it is designed to block requests which can
invoke user from browser adressbar to some actions.

It is maybe question of personal taste, but I am not able find out name
for such as component, if I will somewhere use Security component with
'requirePost'. You know, this 'requirePost' thing is also manageable in
beforeFilter() if we replace
$this->params['bare']
by
$this->RequestHandler->isPost()

I just thought
- there is no better place then Security component for such restriction
rule, if there is already 'requirePost' solved
- I am not alone programmer who uses Object::requestAction() and who
doesn't want web visitor could (by accident or for any reason) display
some fragment of site (means output of controller action) in layout to
which it doesn't belongs (or: in consequences it is not purposed to)
just because I don't (or can't) set some 'killer' route with '/*' as
pattern.

So, excuse me for this annoying thread and have a nice day!


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



Re: Usability of component 'Security'

2006-05-22 Thread 100rk

Hi nate, I noticed You closed my ticket 836 with reason about ajax
calls. But this enhancement wasn't only for ajax calls (it is not
primary purpose), but for all 'bare' calls. I want to say: in this time
there is no CakePHP 'core' feature, which allows restrict rendering for
'bare' calls only.

Example: developer renders in pages/home.thtml by
Object::requestAction() action PostsController::lastRecords() and he
want this action can not be rendered if web user guesses right default
route 'www.example.com/posts/lastRecords/' - he want's this action can
be rendered only by requestAction. What he have to do? I think if
Security component can redirect to blackhole requests which developer
want's to be by POST, it could manage restrictions about bare calls
also.

I am off course able solve this by other way, but I think it *is* work
of Security component.

I want to say: this enhancement (ticket 836) allows this by easy way
and fact it also handles ajax calls (because those are in CakePHP
considered as 'bare' calls) have nothing to do with needs restrict some
actions to 'internal' rendering.

Excuse my English, please.


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



Re: Usability of component 'Security'

2006-05-20 Thread 100rk

> However, I'm working on...
Hi, if anyone watching this thread: I was thinking about this and as I
need this multiple token functionality for XmlHttp with Cake without
prototype.js, I decided solve this by my own way.
But I did open enhancement ticket for Security component (No 836), so
it will be able check controller actions if they are called by 'bare'
call (by 'bare/controller/action' request, by Object::requestAction()
or by ajax call) - so if it will be approved by deleopment team, we
will able to use SecurityComponent::requireBare() also. It means: You
don't have to worry Your views for 'bare' calls will be rendered if
user calls proper /:controller/:action url directly by browser.


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



  1   2   >