Re: Simple Ajax issue

2008-04-23 Thread Axel Ariel Arroyo Braconi
if you need use a view of the same controller try with:

$this->render('name_of_view');

but remember only if you need use a view of the controller if you want
render a element or a view in of other controller try this

$this->viewPath = 'route_of_view_folder';
$this->render('name_of_view');

ex:
$this->viewPath = 'elements'.DS.'header';
$this->render('navigation);

or

$this->viewPath = 'posts';
$this->render('comment');


On 4/23/08, Neveldo <[EMAIL PROTECTED]> wrote:
>
>
> ... but I've now another problem :p
>
> Is it possible to load a view which is not the default view of the
> action ?
>
> I try by using $this->view or $this->load->view,  but it seems to
> doesn't work :(
>
> thank !
>
> >
>


-- 
Axel

--~--~-~--~~~---~--~~
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: Changing the controller in the $ajax->form helper.

2008-04-22 Thread Axel Ariel Arroyo Braconi
try with this

form('Name_of_controller', array('action' => 'name_of_action'));
?>

On Tue, Apr 22, 2008 at 3:26 AM, dizz <[EMAIL PROTECTED]> wrote:

>
> Hey, I've been trying to figure this out for a few hours now. I am
> either missing something or you cannot change the controller in the
> helper and that it will always default to the controller of the parent
> page.
>
> For instance I am trying to add comments on a user profile, the parent
> profile is "Users" and no matter what I try putting in the helper
> (array like a normal form helper, url for ajax helpers) it keeps on
> defaulting to the Users controller.
>
> Any help would be greatly appreciated thanks.
> >
>


-- 
Axel

--~--~-~--~~~---~--~~
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: Ajax request loads my default layout !

2008-04-22 Thread Axel Ariel Arroyo Braconi
Try adding the follow code in your controller

var $components = array('RequestHandler');
function beforeFilter(){
 if($this->RequestHandler->isAjax()){
Configure::write('debug', 0);// and forget debug messages
$this->layout = 'ajax'; //or try with $this->layout = '';
 }
}

with this code you can forget setup the debug messages and layout in your
ajax responses, try an tell if work



On 4/22/08, Neveldo <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
>
> I've an issue with Ajax requests. I'm trying to add Ajax pagination
> for some data by following this tutorial :
> http://bakery.cakephp.org/articles/view/advanced-pagination-1-2.
>
> The pagination works fine but cake loads my entire default layout
> everytime I request a new page !
>
> To resolve it, I add the code bellow in my controller action :
>
>if($this->RequestHandler->isAjax()) {
>$this->render('admin_index', 'ajax');
>}
>
> and now It load the correct ajax layout but I think I've something
> wront, no ?
>
> thank !
>
> Cordially,
> Neveldo : http://www.neveldo.fr
> >
>


-- 
Axel

--~--~-~--~~~---~--~~
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: PHP Speedy

2008-04-07 Thread Axel Ariel Arroyo Braconi
can you post the modified files?

On Mon, Apr 7, 2008 at 1:48 PM, Renan Gonçalves <[EMAIL PROTECTED]>
wrote:

> No .. doest work!
>
> You only can compress the all data to send to browser...
> So, you must modify the index.php at app/webroot.
>
> Like this:
> require_once APP . DS . 'vendors' . DS . 'php_speedy' . DS .
> 'php_speedy.php';
> $compressor->start();
>
> if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
> return;
> } else {
> $Dispatcher = new Dispatcher();
> $Dispatcher->dispatch($url);
> }
> if (Configure::read() > 0) {
> echo "";
> }
>
> $compressor->finish();
>
> But, to work I modified many files of php speedy!
>
> On Mon, Apr 7, 2008 at 1:12 PM, John David Anderson <
> [EMAIL PROTECTED]> wrote:
>
> >
> >
> > On Apr 7, 2008, at 8:10 AM, Caio Vitor wrote:
> >
> > >
> > > Does anyone know PHP Speedy? How to implement it on cakephp? More
> > > information:
> > >
> > >
> > http://aciddrop.com/2008/01/21/boost-your-website-load-time-with-3-lines-of-code/
> >
> > Might work by sticking his stuff in your vendors folder, including it,
> > and making the finish() call in a callback (afterRender, maybe?).
> >
> > -- John
> >
> >
> >
>
>
> --
> Renan Gonçalves - Software Engineer
> Cell Phone: +55 11 8633 6018
> MSN: [EMAIL PROTECTED]
> São Paulo - SP/Brazil
>
> >
>


-- 
Axel

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Search problem

2008-02-11 Thread Axel Ariel Arroyo Braconi

You can use CONCAT function in conditions array like this.

$query = $this->data['Customer']['query_field']; //Or wherever you want
$conditions = array(CONCAT(Customer.first_name,' ',Customer.last_name)
like '%"$query"%');

You can use $conditiones to filter the search in paginate or other
method like findAll.
Try this and tell me if work.

Good Luck

Axel

On 2/11/08, Tuncinss <[EMAIL PROTECTED]> wrote:
>
> Hello Everybody,
>
> I am new to cakePHP and I have a little problem. I have 'first name'
> and 'last name'  fields in my customer database but while searching,
> I'd like to type customer's name in one field. In other words  for
> example, when I enter "john brown" in the search field, i want to see
> his profile although his full name was entered in two seperate fields.
> I wish I could explain my problem clear enough.
>
> >
>


-- 
Axel

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: Make a Fotolog (URL Routing effect)

2008-02-10 Thread Axel Ariel Arroyo Braconi
Maybe this can help you
http://bakery.cakephp.org/articles/view/subdomaining-with-cake

If you need more help just ask.


On 2/10/08, Shadows_Cl <[EMAIL PROTECTED]> wrote:
>
>
> Hi...
>
> I need do the same effect of "fotolog" with the URL Ex.
>
> www.miurl.com/user  and charge user to the controller
> "profiles" and the action "view".
> A shortcut of   www.miurl.com/profiles/view/user
>
> i think: first add a model to the pages controller, make a sql query
> in display method and comparate the value with the database. But how i
> can render the method view of profiles controller without redirect?
>
> (sorry of my poor english)
>
> >
>


-- 
Axel

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: User Management\Login\Auth Framework

2008-02-06 Thread Axel Ariel Arroyo Braconi

Jake i create an account and i send an email with datas access for
you, is active, just change the email, and password.

On 2/6/08, jakecake <[EMAIL PROTECTED]> wrote:
>
> > Jake , bakery is working i create an account recently, and i can write
> > a post. Whats your problem?
>
> My problem is that I never received the confirmation mail. If I try to
> register again, I get a weird message in the form so that this
> username is already registred (and I'm supposed to reset it). If I try
> to reset the password, I get 'You should receive an email with further
> instruction shortly' but not mail...
>
> Someone on the IRC channel told me the bakery is a bit broken, and
> that I have to wait (and see:)
>
>
>
> >
>


-- 
Axel

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: User Management\Login\Auth Framework

2008-02-06 Thread Axel Ariel Arroyo Braconi

If you want, i can create an account for you? but quick post that!
look like a cool plugin!

On 2/6/08, Axel Ariel Arroyo Braconi <[EMAIL PROTECTED]> wrote:
> Jake , bakery is working i create an account recently, and i can write
> a post. Whats your problem?
>
> On 2/6/08, jakecake <[EMAIL PROTECTED]> wrote:
> >
> > > @jakebaker: Look exactly what I've been looking for! Quick, someone
> > > sort this man out with a bakery account! :-)
> >
> > Thanks Richard!
> >
> > I thinks it's a pitty that the cake is down since so long time, and
> > during the cake fest!!
> >
> > Jakecake
> > > >
> >
>
>
> --
> Axel
>


-- 
Axel

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Re: User Management\Login\Auth Framework

2008-02-06 Thread Axel Ariel Arroyo Braconi

Jake , bakery is working i create an account recently, and i can write
a post. Whats your problem?

On 2/6/08, jakecake <[EMAIL PROTECTED]> wrote:
>
> > @jakebaker: Look exactly what I've been looking for! Quick, someone
> > sort this man out with a bakery account! :-)
>
> Thanks Richard!
>
> I thinks it's a pitty that the cake is down since so long time, and
> during the cake fest!!
>
> Jakecake
> >
>


-- 
Axel

--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---