Re: New Cake FAQ

2007-03-11 Thread Daniel Hofstetter

@haj: You can open doc tickets on https://trac.cakephp.org

--
Daniel Hofstetter
http://cakebaker.42dh.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?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-11 Thread Jon Bennett

 Q. How do I create navigation / links based on the entries in a
 database?
 In the cats controller:
 function navigation()
 {
 $this-Cats-recursive = 0;
 $this-set('navdata', $this-Cats-findAll(null, array('name',
 'id')));
 $this-render();
 }

 In the navigation.thtml:
 ul
 ?php foreach($navdata as $nav): ?
 li?php echo $html-link($nav['Cat']['name'], /Cats/view/.
 $nav['Cat']['id']); ?/li
 ?php
 endforeach;
 ?
 /ul

 In the default.thtml:
 $this-requestAction('/cats/navigation/');

I'm not 100% sure that would be considered the best approach, for 2 reasons:

1. you're using Cat-findAll() with restricted fields when really you
want Cat-generateList();
2. using requestAction is another page request, which incurs more of a
hit to the server as it's effectively the same as visting a page on
the site.

I think a better approach would be http://bin.cakephp.org/view/255041463 :

?php

// AppController
var $uses = array('Cat');

function beforeFilter()
{
$cats = $this-Cat-generateList();
$this-set('navdata', $cats);
}

// default.thtml
ul
?php foreach($navdata as $nav): ?
li?php echo $html-link($nav['Cat']['name'],
/Cats/view/.$nav['Cat']['id']); ?/li
?php endforeach; ?
/ul

?

this could be extended to use cachAction as well, helping to
demonstrate realworld cake caching. It could also be fleshed out into
a Component/Helper combination, to help demonstrate code re-use.

hth

jon



-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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: New Cake FAQ

2007-03-11 Thread jitka

Don't use $this-ModelName in AppController::beforeFilter() as this
method is called also when cake is rendering error page (404 in
production and +various other in development) an in this case models
aren't attached.

function beforeFilter() {
loadModel('Cat');
$Cat = new Cat();
$this-set('navdata', $Cat-generateList());
}


--~--~-~--~~~---~--~~
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: Bad Request

2007-03-11 Thread Mech7

I got the frontpage working sort of with this..

http://bakery.cakephp.org/articles/view/132

Only i have no css / images and links does not work anymore :(


--~--~-~--~~~---~--~~
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: New Cake FAQ

2007-03-11 Thread Jon Bennett

 Don't use $this-ModelName in AppController::beforeFilter() as this
 method is called also when cake is rendering error page (404 in
 production and +various other in development) an in this case models
 aren't attached.

good point.

an alternative would be to place this inside beforeRender()...

j


 function beforeFilter() {
 loadModel('Cat');
 $Cat = new Cat();
 $this-set('navdata', $Cat-generateList());
 }


 



-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~-~--~~~---~--~~
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: Details about Cake PHP

2007-03-11 Thread Mariano Iglesias

Juna you need to understand this:

The same way you may consider rude that someone answers you like that, some
people (myself included) consider very rude when someone comes in and seems
to demand help without giving a minimum sign that at least he looked at an
answer for himself.

-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 jitka
Enviado el: Domingo, 11 de Marzo de 2007 12:34 a.m.
Para: Cake PHP
Asunto: Re: Details about Cake PHP

okay thats finethen there should have another group for new
programmer...where no body gets rude !..


--~--~-~--~~~---~--~~
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: Bad Request

2007-03-11 Thread Mariano Iglesias

What is this supposed to be??

Cashmakerclicks?

I say it once again:

LET ALL SPAMMERS BURN IN HELL

-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 xjpeer
Enviado el: Domingo, 11 de Marzo de 2007 03:15 a.m.
Para: Cake PHP
Asunto: Re: Bad Request

good!
http://fy4.net/03.htm


--~--~-~--~~~---~--~~
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: Bad Request

2007-03-11 Thread Mech7

http://www.mech7.net/tmp/portfolio/

Here you can see the site btw.. it's actually 2 subdir's


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



How to hide preceding divs when $ajax-link button is clicked

2007-03-11 Thread skyblueink

//index.thtml

div id=faq/div
?php echo $ajax-link('FAQ/HELP', '/books/faq', array('update' =
'faq')); ?

?php
for ($i = 0; $i  10; $i++){
$view = 'view' . $i;
echo div id=$view/div;
options = array(
'update'   = $view,
'url'  = /books/lister/?id=$i,
'type' = 'asynchronous',
'loading'  = Element.hide($view);,
'complete' = Effect.Appear($view);
);
echo $javascript-event('window','load',$ajax-
remoteFunction($options),false);
}
?

The index.thtml will show you 50 divs when loaded, that is
div id=view0 ./div
div id=view1 ./div
div id=view2 ./div
.
div id=view49 ./div.

When the 'FAQ/HELP' button is clicked, div id=faq ./div will
be displayed on the top, so that we can see
div id=faq ./div
div id=view0 ./div
div id=view1 ./div
div id=view2 ./div
.
div id=view49 ./div.

But what I want to do is to hide all divs except for div id=faq
when 'FAQ/HELP' button is clicked so that we can see only
div id=faq ./div.

I guess adding something like 'loading'  =
Element.hide($view0);Element.hide($view0);;Element.hide($view49);
into the option array could do it. But there are too many divs to
hide, and there could be easier way of doing this.


--~--~-~--~~~---~--~~
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: Lightbox + Cake

2007-03-11 Thread Mech7

When i try this i get an error like this?

http://img88.imageshack.us/img88/5099/77614616od5.png

I don't know any javascript so don't exactly know how to fix this :(

On Mar 4, 1:42 am, Sam Sherlock [EMAIL PROTECTED] wrote:
   I have managed to get lightbox working in cake but had to set these
  lines in
   a scriptblock in a layout .thtml /.ctp

 yep .  In a scriptblock in a layout view such as default.thtml for example

 On 04/03/07, Mech7 [EMAIL PROTECTED] wrote:



  Yes that would be possible but no php acces in javascript files :( do
  you move this to the head of your document instead ?

  On Mar 3, 10:43 pm, Sam Sherlock [EMAIL PROTECTED] wrote:
   are the troublesome lines these:

   var webRoot = ?php e($this-webroot); ?;

   var fileLoadingImage = webRoot . /img/loading.gif;

   var fileBottomNavCloseImage = webRoot . /img/closelabel.gif;

   I have managed to get lightbox working in cake but had to set these
  lines in
   a scriptblock in a layout .thtml /.ctp

   On 03/03/07, phirschybar [EMAIL PROTECTED] wrote:

hmm. not sure I understand what you mean. Can you give an example?

On Mar 3, 1:32 pm, Mech7 [EMAIL PROTECTED] wrote:
 Well the problem is when it is in a subdir then this does not work,
 since you need the subdir in front of it, but when it changed you
  need
 to edit them manual again :(

 On Mar 3, 6:21 pm, phirschybar [EMAIL PROTECTED] wrote:

  if you prepend the image path with a '/' like '/img/...' it will
  trace
  back to the web document root and hit the right directory every
  time.

  So wherever you see images/ in the .js file, change it to /img or
  whatever you want.

  On Mar 3, 12:11 pm, Mech7 [EMAIL PROTECTED] wrote:

   The problem is it does not work like css where it links relative
from
   the file, but instead it writes html via dom in the document
  when
   needed.. so the path will link from a different directory
  depeding
on
   which controller or page i am on :(

   On Mar 3, 6:06 pm, Grant Cox [EMAIL PROTECTED] wrote:

If you put the lightbox images in the js folder (where your
lightbox.js is) then they should work.  A bit messy perhaps,
  but
otherwise just edit the javascript file yourself to point to
  the
correct location (ie ../img/ )


--~--~-~--~~~---~--~~
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: Cake Recipes cancelled

2007-03-11 Thread Darian Anthony Patrick

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sonic Baker wrote:
 How much of the book was actually written? History of cake and all that
 stuff aside, of the technical content that was written, would it be of
 use to the community or in educating new potential bakers. It seems to
 me from reading this thread that all parties put a great deal of work
 into this and it seems a shame that this work may go to waste. So the
 publishing deal went sour! I have no knowledge on publishing commercial
 books etc but rather than waste the efforts involved, would there be
 anything to say for releasing at least the approved content and allow
 the community to benefit from it. The subversion book comes to mind,
 with a 'Donate' link on each page. They may not amount to millions but
 at least if donations could be shared between all parties wouldn't
 everyone benefit?

+1 on this idea.  Fabio has put in the effort, and many of us have been
waiting with baited breath to read it.

- --
Darian Anthony Patrick
Principal, Application Development
Criticode LLC
(215) 240-6566 Office
(866) 789-2992 Facsimile
Web:   http://criticode.com
Email: [EMAIL PROTECTED]
JID:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF9BHwKpzEXPWA4IcRAgQ2AKCLRaX65xTVZsauvgV/0ScsR1E24ACfTdaC
bYaQIaJOU+eha91bUc+5tNc=
=tfsv
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
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: dAuth: Login form on all pages

2007-03-11 Thread [EMAIL PROTECTED]

So the problem lies in $this-controller, inside the component.  This
object should be set in the components startup function, which is
called at the initialization of the component.  Did you change
something related to that function?

Also, $salt is not known inside your controller, it's a variable from
inside the component.  That might explain why $this-
set('special_sauce', $salt);  doesn't work.

On Mar 10, 11:33 pm, Hubbo [EMAIL PROTECTED] wrote:
 What do you mean? I didn't fix that error because I haven't figured
 out how to fix it. That error shows up if I use the solution you
 posted in the bakery (and yes, with the dauth component loaded in
 appcontroller). I have managed to get around that error if I use this
 solution:

 function newSalt()
 {
 $salt = crc32(time());
 //$this-controller-set('special_sauce',$salt);
 $this-Session-write('salt', $salt);

 return $salt;
 }

 function beforeFilter()
 {
 $error = '';
 $salt = $this-DAuth-newSalt();
 $this-set('special_sauce', $salt);
 $this-set('error', $error);
 $this-set('allowcleartext', $this-DAuth-allowClearText);

 }

 That is; return the salt value instead of assigning it directly to
 'special_sauce' in newSalt() and then assigning it in beforeFilter()
 in appcontroller. But by using this method I get a credentials
 mismatch.

 Look, dauth works fine as long as I use a separate login page and
 controller, as the /users/login you posted as an example. But it's
 when I'm trying to use it application wide things goes wrong.

 On Mar 10, 8:27 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

  Fatal error: Call to a member function set() on a non-object in /
  DEVELOPMENT/app/controllers/components/d_auth.php on line 350

  So you fixed the above error emwithout/em hacking my code?

  On Mar 10, 3:43 pm, Hubbo [EMAIL PROTECTED] wrote:

   I'm sorry but I didn't mean it like that. I can't get it to work with
   the solution you posted and I have followed your advice very
   carefully. Now, I think the solution where you return the salt value
   in newSalt() instead is better (for me anyways) but I can't understand
   why there is a credentials mismatch. How is it any difference setting
   the 'special_sauce' in AppController's beforeFilter than in newSalt()?
   I've been trying this for days now with no luck and that's why I'm
   posting here.

   On Mar 10, 3:23 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

so it doesn't work huh?
well...

the best advice i can give you with this information is: make it work

On Mar 10, 3:04 pm, Hubbo [EMAIL PROTECTED] wrote:

 (whoops, did a reply to author. I'll post again here)

 The DAuth component is loaded in my appcontroller and doesn't work.

 On Mar 10, 2:47 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

  you need the dAuth component in your appcontroller to do that.  
  (like
  i said in that comment)
  if you include the component, and change the code back to what i
  posted, it should work.

  On Mar 10, 2:24 pm, Hubbo [EMAIL PROTECTED] wrote:

   I'm using dAuth and want a login form that is accessible on all 
   pages
   on the site. Following Dieter's advice in comment 53 
   onhttp://bakery.cakephp.org/articles/view/147mybeforeFilter() in
   AppController now looks like this:

   function beforeFilter()
   {
   $error = '';
   $this-DAuth-newSalt();
   $this-set('error', $error);
   $this-set('allowcleartext', 
   $this-DAuth-allowClearText);
   }

   By using this solution I get this error message:
   Fatal error: Call to a member function set() on a non-object in /
   DEVELOPMENT/app/controllers/components/d_auth.php on line 350

   So I changed newSalt() in the dAuthComponent to return the salt 
   value
   instead:

   function newSalt()
   {
   $salt = crc32(time());
   //$this-controller-set('special_sauce',$salt);
   $this-Session-write('salt', $salt);

   return $salt;
   }

   and beforeFilter() now looks like this:

   function beforeFilter()
   {
   $error = '';
   $salt = $this-DAuth-newSalt();
   $this-set('special_sauce', $salt);
   $this-set('error', $error);
   $this-set('allowcleartext', 
   $this-DAuth-allowClearText);
   }

   But by using this method I end up with a credentials mismatch 
   error. I
   can't figure out what the problem is. Any advice would be great!

   //Miche



Re: Lightbox + Cake

2007-03-11 Thread Dr. Tarique Sani

On 3/11/07, Mech7 [EMAIL PROTECTED] wrote:

 When i try this i get an error like this?

 http://img88.imageshack.us/img88/5099/77614616od5.png

 I don't know any javascript so don't exactly know how to fix this :(

Somehow this got missed - I have used Lightbox PLus in Cheesecake -
feel free to take a look how it was done...

HTH
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.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?hl=en
-~--~~~~--~~--~--~---



Re: Bad Request

2007-03-11 Thread Mech7

Ok it looks like it is finally working, how do i reroute the cakephp
messages to a 404 page btw when something is not found like:

http://www.mech7.net/tmp/portfolio/test

I get a cakephp error is there a way to disable those and show a 404
page ?


On Mar 11, 12:04 pm, Mech7 [EMAIL PROTECTED] wrote:
 http://www.mech7.net/tmp/portfolio/

 Here you can see the site btw.. it's actually 2 subdir's


--~--~-~--~~~---~--~~
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: How to hide preceding divs when $ajax-link button is clicked

2007-03-11 Thread Kjell Bublitz

Give the view divs a class... lets say view
div id=view## class=view

Then you can go like this:
$$('.view').invoke('hide');

thats it :)

On 3/11/07, skyblueink [EMAIL PROTECTED] wrote:

 //index.thtml

 div id=faq/div
 ?php echo $ajax-link('FAQ/HELP', '/books/faq', array('update' =
 'faq')); ?

 ?php
 for ($i = 0; $i  10; $i++){
 $view = 'view' . $i;
 echo div id=$view/div;
 options = array(
 'update'   = $view,
 'url'  = /books/lister/?id=$i,
 'type' = 'asynchronous',
 'loading'  = Element.hide($view);,
 'complete' = Effect.Appear($view);
 );
 echo $javascript-event('window','load',$ajax-
 remoteFunction($options),false);
 }
 ?

 The index.thtml will show you 50 divs when loaded, that is
 div id=view0 ./div
 div id=view1 ./div
 div id=view2 ./div
 .
 div id=view49 ./div.

 When the 'FAQ/HELP' button is clicked, div id=faq ./div will
 be displayed on the top, so that we can see
 div id=faq ./div
 div id=view0 ./div
 div id=view1 ./div
 div id=view2 ./div
 .
 div id=view49 ./div.

 But what I want to do is to hide all divs except for div id=faq
 when 'FAQ/HELP' button is clicked so that we can see only
 div id=faq ./div.

 I guess adding something like 'loading'  =
 Element.hide($view0);Element.hide($view0);;Element.hide($view49);
 into the option array could do it. But there are too many divs to
 hide, and there could be easier way of doing this.


 



-- 
Regards, Kjell
www.m3nt0r.de

--~--~-~--~~~---~--~~
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: Bad Request

2007-03-11 Thread Mariano Iglesias

Set DEBUG to 0 on app/config/core.php

-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 Mech7
Enviado el: Domingo, 11 de Marzo de 2007 12:13 p.m.
Para: Cake PHP
Asunto: Re: Bad Request

I get a cakephp error is there a way to disable those and show a 404
page ?


--~--~-~--~~~---~--~~
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: include another model's view

2007-03-11 Thread gerbenzomp

Hey AD7six,

I've been working hard to try and get your example code to work
(http://www.noswad.me.uk/MiBlog/MiniControllers), but being fairly new
to cake, I guess I got stuck because I've jumped from the basics to
something more advanced. I thought if I would get your archive example
to work, I would understand the concept, and could go on creating my
own widgets (or blobs, as you called them). But I gues I need some
more guidance as to the structure of the plugins your example code
expects.

To my understanding I need to create a plugin called blogs (with its
own blogs_app_controller.php and blogs_app_model.php and its own
controller, model and views), but I guess I am wrong.  I wasn't sure
either how I should include the widget in another controller's view.

Can you explain a bit more about how to implement your solution?

Thanks a lot in advance!

On 1 mrt, 12:52, gerbenzomp [EMAIL PROTECTED] wrote:
 Hi AD7six!

 Thanks a lot for your comprehensive article! It seems we're both
 aiming for the same thing: a while ago I wrote such a system as the
 Google personalised homepage, in php and with the help of
 scriptaculous, to create an online WYSIWYG website builder and CMS.
 Now I'm trying to partly re-create this in Cake.

 Bit of a turndown to read that Cake doesn't have built-in support for
 suchmodulardesign, especially since scriptaculous has such flexible
 drag-and-drop features. I'll try out your mini-modules solution, and
 see if I can get it to work! I'll keep you posted!

  PS Model's don't have views, but perhpas that was a slip of the keys.

 Yep, I meant another controller's view :)

 On 1 mrt, 08:47, AD7six [EMAIL PROTECTED] wrote:

  On Mar 1, 8:45 am, AD7six [EMAIL PROTECTED] wrote:

   On Mar 1, 12:08 am, gerbenzomp [EMAIL PROTECTED] wrote:

I've been programming in php for years, but I'm relatively new to
cake. I must say I am amazed at the ease of use and intuïtivity of the
framework! Mostly things just work the way you expect them to, which
makes it very easy to work with, and a great pleasure too!

There's also a lot of good documentation, so most questions I had,
were easily answered. Now i want to do something a little more
complex, and ran into a problem:

I want to use Cake's plugin-structure to allow for an extendible set
of, well let's call them menu-widgets for the navigation-bar of my
blog system.

So each widget resides in its own folder within the plugins-folder,
and has its own add/edit/delete methods and views.

But now I want to include the main view (view.thtml) of each widget in
the sidebar of my blog. Any ideas on how to do that?

   The immediate answer would be to use reqesutAction, the (not really
   slow) answer is to make use of elements. I wrote about a solution to
   this sort ofmodulardesign problem on my blog about this only
   yesterday (how ironic).http://www.noswad.me.uk/MiBlog/MiniControllers

   HTH,

   AD

  PS Model's don't have views, but perhpas that was a slip of the keys.


--~--~-~--~~~---~--~~
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: Cake Recipes cancelled

2007-03-11 Thread The Mullet

 @Mullet
 Trademark and Copyright are two seperate issues. The MIT license
 covers the copyright on the code.

gwoo, I would like to cite your very words from another thread:

But you cannot use the CakePHP logo or name to promote your web
development company or your services, unless you are a certified
CakePHP Engineer.

This basically means, that you intended to keep me from using the term
CakePHP, thus violating fair use rules on trademarks. Now, how can I
offer a download for CakePHP, if you forbid me the use of the word
CakePHP (remeber that the sources themself carry the word CakrPHP
all over)? Obviously, your legal position is wrong, and it did violate
the MIT license by restricting my right to redistribute the sources.

Fortunately, you decided to set up a fair use policy. I am glad this
issue can finally be closed after that.


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



Account Parameter

2007-03-11 Thread [EMAIL PROTECTED]

Applications like Basecamp and Backpack use the account name in the
url - specifically a subdomain like account.backpackit.com or
account.projectpath.com.  Does Cake let you capture this subdomain in
your app?  I'm sure it involves some httpd.conf settings, but is it
ultimately available in Cake to use?

Another option would be to use it before the controller name, like how
plugins or admin routes work, like 
www.whatever.com/account/controller/action/params.
Is there any way to have a parameter before the controller name?
Maybe using the new routing capabiliites in 1.2 as described in
http://cake.insertdesignhere.com/posts/view/10?

I know it could just be used as a normal parameter after controller/
action, but for the app I'm looking at that parameter is needed in
every url and looks nicer before the 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?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-11 Thread nate

The Mullet,

I'll ask gwoo to expand on this at his leisure, but you seem to have a
fundamental misunderstanding of the difference between trademark and
copyright.

On Mar 11, 12:02 pm, The Mullet [EMAIL PROTECTED] wrote:
  @Mullet
  Trademark and Copyright are two seperate issues. The MIT license
  covers the copyright on the code.

 gwoo, I would like to cite your very words from another thread:

 But you cannot use the CakePHP logo or name to promote your web
 development company or your services, unless you are a certified
 CakePHP Engineer.

 This basically means, that you intended to keep me from using the term
 CakePHP, thus violating fair use rules on trademarks. Now, how can I
 offer a download for CakePHP, if you forbid me the use of the word
 CakePHP (remeber that the sources themself carry the word CakrPHP
 all over)? Obviously, your legal position is wrong, and it did violate
 the MIT license by restricting my right to redistribute the sources.

 Fortunately, you decided to set up a fair use policy. I am glad this
 issue can finally be closed after that.


--~--~-~--~~~---~--~~
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: Cake Recipes cancelled

2007-03-11 Thread Mech7

No book :( i hope there still will come one as the manual is pretty
skinny on information :(


--~--~-~--~~~---~--~~
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: Account Parameter

2007-03-11 Thread Walker Hamilton

Yeah, you can capture the subdomain, someone else asked the same
question recently here: 
http://groups.google.com/group/cake-php/browse_thread/thread/aa65e794df4e064a?hl=en

Search the group before asking questions!

On Mar 11, 12:52 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Applications like Basecamp and Backpack use the account name in the
 url - specifically a subdomain like account.backpackit.com or
 account.projectpath.com.  Does Cake let you capture this subdomain in
 your app?  I'm sure it involves some httpd.conf settings, but is it
 ultimately available in Cake to use?

 Another option would be to use it before the controller name, like how
 plugins or admin routes work, 
 likewww.whatever.com/account/controller/action/params.
 Is there any way to have a parameter before the controller name?
 Maybe using the new routing capabiliites in 1.2 as described 
 inhttp://cake.insertdesignhere.com/posts/view/10?

 I know it could just be used as a normal parameter after controller/
 action, but for the app I'm looking at that parameter is needed in
 every url and looks nicer before the 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?hl=en
-~--~~~~--~~--~--~---



Re: Cake Recipes cancelled

2007-03-11 Thread Jon M.

Mullet I believe what he meant was you can not advertise that you will
develop a CakePHP app for money or your company will develop a cakephp
for commercial use and sell it. Please correct me if I am wrong. I
have dealt with some trademark issues lately with a company I am
working with for my employer and they told me it's okay to mention the
companies trademark as long as it mentions who owns the trademark and
has the trademark symbol by it. Again this might be different for
CakePHP but from what I have dealt with I have only had to put the
symbol and mention who owns it.

Now the Source Code for CakePHP is different it's name CakePHP that is
trademarked not the source code. You can distribute the cakephp source
with your apps as long as you don't alter the header information in
the source of what was written by the CSF. The source is under the MIT
license ... you should check it out so you have more of an
understanding of it. http://www.opensource.org/licenses/mit-license.php

If any of these is wrong please correct me anyone.

I am sorry to hear that the book has been canceled and there was
problems amoung the community but we are better then that we can get
past the problems and be more concerned about the community then our
personal means.

- Jon

On Mar 11, 9:02 am, The Mullet [EMAIL PROTECTED] wrote:
  @Mullet
  Trademark and Copyright are two seperate issues. The MIT license
  covers the copyright on the code.

 gwoo, I would like to cite your very words from another thread:

 But you cannot use the CakePHP logo or name to promote your web
 development company or your services, unless you are a certified
 CakePHP Engineer.

 This basically means, that you intended to keep me from using the term
 CakePHP, thus violating fair use rules on trademarks. Now, how can I
 offer a download for CakePHP, if you forbid me the use of the word
 CakePHP (remeber that the sources themself carry the word CakrPHP
 all over)? Obviously, your legal position is wrong, and it did violate
 the MIT license by restricting my right to redistribute the sources.

 Fortunately, you decided to set up a fair use policy. I am glad this
 issue can finally be closed after that.


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



Problem Redirecting to Servlet

2007-03-11 Thread g

Hi. I have a problem with cake's redirect formatting the url. The
problem is I uploaded an excel file. I have a servlet to process the
excel file. Now after uploading the file I redirect my app to the
servlet using:

$this-redirect(http://localhost:8080/SMSUploadServlet;);

Unfortunately it redirects to this URL:

http://localhost/sms/contacts/:8080/SMSBroadcast/SMSUploadServlet

How do I do it so it doesn't automatically append the base URL of the
cake app?

Thanks.


--~--~-~--~~~---~--~~
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: Problem Redirecting to Servlet

2007-03-11 Thread Chris Lamb
g [EMAIL PROTECTED] wrote:

 How do I do it so it doesn't automatically append the base URL of the
 cake app?

I don't believe it is possible - Controller:redirect will always
prefix the URL with the FULL_BASE_URL constant.

Try:

  if (function_exists('session_write_close'))
  {
session_write_close();
  }
  header(Location: http://localhost:8080/SMSUploadServlet;);
  exit();


Regards,

-- 
 Chris Lamb, Leamington Spa, UKGPG: 0x634F9A20


signature.asc
Description: PGP signature


Re: Page not refreshed after $this-redirect

2007-03-11 Thread Chris Lamb
Adrian Maier [EMAIL PROTECTED] wrote:

 The problem is that the page is not refreshed, and the deleted record
 is still visible until i  click the browser's Refresh button.

This[0] is probably what you want.

Regards,

-- 
 Chris Lamb, Leamington Spa, UKGPG: 0x634F9A20

[0] http://preview.tinyurl.com/2ppndx


signature.asc
Description: PGP signature


Re: How to hide preceding divs when $ajax-link button is clicked

2007-03-11 Thread skyblueink

Thanks, Kjell!

On 3월12일, 오전12시23분, Kjell Bublitz [EMAIL PROTECTED] wrote:
 Give the view divs a class... lets say view
 div id=view## class=view

 Then you can go like this:
 $$('.view').invoke('hide');

 thats it :)

 On 3/11/07, skyblueink [EMAIL PROTECTED] wrote:







  //index.thtml

  div id=faq/div
  ?php echo $ajax-link('FAQ/HELP', '/books/faq', array('update' =
  'faq')); ?

  ?php
  for ($i = 0; $i  10; $i++){
  $view = 'view' . $i;
  echo div id=$view/div;
  options = array(
  'update'   = $view,
  'url'  = /books/lister/?id=$i,
  'type' = 'asynchronous',
  'loading'  = Element.hide($view);,
  'complete' = Effect.Appear($view);
  );
  echo $javascript-event('window','load',$ajax-
  remoteFunction($options),false);
  }
  ?

  The index.thtml will show you 50 divs when loaded, that is
  div id=view0 ./div
  div id=view1 ./div
  div id=view2 ./div
  .
  div id=view49 ./div.

  When the 'FAQ/HELP' button is clicked, div id=faq ./div will
  be displayed on the top, so that we can see
  div id=faq ./div
  div id=view0 ./div
  div id=view1 ./div
  div id=view2 ./div
  .
  div id=view49 ./div.

  But what I want to do is to hide all divs except for div id=faq
  when 'FAQ/HELP' button is clicked so that we can see only
  div id=faq ./div.

  I guess adding something like 'loading'  =
  Element.hide($view0);Element.hide($view0);;Element.hide($view49);
  into the option array could do it. But there are too many divs to
  hide, and there could be easier way of doing this.

 --
 Regards, Kjellwww.m3nt0r.de- 따온 텍스트 숨기기 -

 - 따온 텍스트 보기 -


--~--~-~--~~~---~--~~
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: CMS: How to set pages to have 'parents'?

2007-03-11 Thread double07

Hi all,

I just wanted to re-visit this again. I've come back after a couple of
weeks break to attempt to finish this project, in particular the
'parent' select list which needs to be indented (for ease of use). Now
I found what I thought was the perfect bit of code by 'Othy' here:
http://othy.wordpress.com/2006/06/03/generatenestedlist/

It's supposed to generate nested lists for use with select/drop downs.
It's a bit light on the documentation and I'm having trouble getting
it to work.

As per the instructions, in my app_controller.php file I put the
following code:

function generateNestedList($indent = ' ',$sort = null)
{
$this-recursive = '-1';
$cats = $this-findAllThreaded(null, 
array($this-name.'.id',$this-
name.'.name',$this-name.'.parent_id'), $sort);
$glist = $this-_generateNestedList($cats,$indent); return 
$glist;
}
function _generateNestedList($cats,$indent,$level = 0)
{
static $list = array();
for($i = 0, $c = count($cats); $i  $c; $i++)
{
$list[$cats[$i][$this-name]['id']] = 
str_repeat($indent,$level).
$cats[$i][$this-name]['name']; if(isset($cats[$i]['children'])  !
empty($cats[$i]['children']))
{
$this-_generateNestedList($cats[$i]['children'],$indent,$level 
+
1);
}
}
return $list;
}

Now in my controller (called Nodes) I've got:

$this-set('category_tree', $this-Node-generateNestedList('--',
null));

This seems correct and doesn't produce any errors, however when I try
to use the category_tree in a selectTag in my view, I get nothing:

?php echo $html-selectTag('Node/parent_id', $category_tree, $html-
tagValue('Node/parent_id'), array(), array(), true);?

If I just print_r $category tree, it's also empty.

Has anybody got experience with this snippet of code by Othy (I'd ask
him directly but there doesn't seem to be any contact info on his
page)? Or could somebody please give me some pointers??? Alternatively
another method would be appreciated.

Thanks again,

Brett.


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