You asked, and you've got it ;) I've set up a demo to run Cheesecake
(getting Cheescake "all in one" release on its Cakeforge site, which
includes CakePHP 1.1.11.4064) on Joomla 1.0 and Joomla 1.5 using Jake.

No modification to Cheesecake was needed. I did find a few issues on Jake
(mainly how it was passing through parameters) but they are fixed. I haven't
released a new version yet since I intend to include new features and move
it to Beta stage.

The one thing I did with Cheesecake to show how cool Jake is, is to use a
different theme when being run on Jake. So on
cheesecake/controllers/components/app_init.php I've changed this:

$controller->theme = $this->Session->read('cheeseCake.theme');

to this:

if (isset($_REQUEST['jake']))
{
        $controller->theme = 'Classic';
        $controller->layout = 'jake';
}
else
{
        $controller->theme = $this->Session->read('cheeseCake.theme');
}

Yes, $_REQUEST['jake'] is sent by Jake to tell your application (if you need
the info) that it is being run on Jake. As a matter of fact Jake also offers
callables (stuff you can use to talk to Jake) but I'll leave that for when I
write a proper documentation.

So not only I'm switching the theme but also the layout. It wasn't
necessary, but I figured I could change it a little and also add something
Cheesecake has on its Modern theme but not the Classic theme: the Fullsize
link to view the fullsize version of a photo. You will find it on the grey
box right below the title of the photo (it reads Fullsize, go figure).

Here are the URLs (nevermind server speed):

Cheesecake on its own: http://dev.sypad.com/projects/jake/demo/cheesecake

Cheesecake on Jake (Joomla 1.0):
http://dev.sypad.com/projects/jake/demo/joomla1.0/index.php?option=com_jake

Cheesecake on Jake (Joomla 1.5):
http://dev.sypad.com/projects/jake/demo/joomla1.5/index.php?option=com_jake

The fact that I've put Cheesecake outside of Joomla's path was because of
two reasons:

1. It shows that a CakePHP application can run transparently by its own or
on top of Jake, without code modifications.

2. It lets me test the same application on both versions of Joomla. 

For those of you who ask why would I constantly need to test on both
versions, well let's just say that the developers of Joomla got a little
excited and completely recoded Joomla on 1.5, to the point that almost no
component that runs on 1.0 will run on 1.5 without modifications. I don't
have to say it, but that's not a problem for Jake.

Anyway, I will go ahead and keep on working. From now on let's just start a
thread called Jake or something, because the huge title of this thread is
freaking me out ;)

-MI

---------------------------------------------------------------------------

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-----Mensaje original-----
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Dr. Tarique Sani
Enviado el: Jueves, 15 de Febrero de 2007 05:43 a.m.
Para: cake-php@googlegroups.com
Asunto: Re: Wrapping Cake in a Joomla component, like Cake + Drupal = Drake

Cool! coincidentally I came upon this blog entry yesterday

http://community.nebraska.edu/amyblog/index.php/2007/02/13/cheesecake-would-
be-yummy-in-a-joomla-component/

Lets see how it goes


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

Reply via email to