View this page "Cake Apps/Sites In The Wild"

2007-04-16 Thread Digital Spaghetti

Honda are using CakePHP on their new F1 concept car site (see
http://labs.blitzagency.com/?p=214 for details).

Click on http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild
- or copy & paste it into your browser's address bar if that doesn't
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?hl=en
-~--~~~~--~~--~--~---



Re: Jquery ,Ajax

2007-04-16 Thread digital spaghetti

Hi Marco,

Here is what I do:

link('Cancel', '/admin/home', array('class'=>'button',
'onclick'=>'javascript:$("#admin-area").load("/admin/home");return
false;')));?>

You need to make sure you have the RequestHandler component loaded,
otherwise when you update your div, it will load the whole site with
view, not just the view.

Tane

On 4/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi
> I'm using Cakephp with jquery.
>
> I would use the Jquery Ajax function inside my general view named
> "index.thtml".
>
> I would use the load function exactly for change the content of a div
> when I click on a image .In this div I would load a particular  view
> named "view_part.thtml".
>
> How can i do this?
> I've used this code in my general view "index.thtml"
>
> echo $javascript->codeBlock('
>
> function load_view (div_id,parameter)
> {
>$("#div"+div_id).load("view_part/parameter");
> }
> ');
>
>
> 
>
> link($html-
> >image(,array('onClick'=>'load_view(1,parameter)','javascript:void(0);',null,false,false);
> >  ?
> >
>
> But it doesn't work.
> What's wrong
> Can me do an right example?
> Thank a lot
>
>
> >
>

--~--~-~--~~~---~--~~
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: Announcing: Webrocket

2007-04-15 Thread digital spaghetti

Yea, the UI considerations have been second to the backend stuff, and
validation is still to be put in.

The project is now open on the cakeforge, so if anyone finds the app
useful, please feel free to jump on board and help.  I'll be putting
up the milestone list on the wiki tommorow so you see what still needs
to be done.

Tane

On 4/15/07, sumanpaul <[EMAIL PROTECTED]> wrote:
>
> ok my suggestions:(not exhaustive , just what I felt in a short ture)
>
> 1. the password will be "rocket" not "Rocket" as mentioned in the
> website. now when i gave wrong password, it din't gave me any hint why
> its not logging in. SHould say pass/user incorrect.
>
> 2. as mentioned by savage, the edit , delete buttons styles are not
> correct. what browser u r using for testing. its not correct for both
> FF & IE6
>
> 3. styles seems to be FF dependent. the mouse hover effect is not
> working on IE6.
>
> 4.need lot more work on styles. too many overlapping things.
>
> lot more to come. nice start, as it looks pretty.
>
> regards
> suman
>
>
> On Apr 15, 6:22 am, "savagekabbage" <[EMAIL PROTECTED]> wrote:
> > Looks pretty cool so far... but it definitely needs a lot of work.
> > First fix the layout up some and I'll give you more suggestions.
> > Several of the buttons overlap and are unsightly in firefox.  I'm not
> > quite sure what that big box to the right is either, something about a
> > media player.  Good job so far, it will probably need a lot more work
> > to be a usable CMS however.
> >
> > On Apr 14, 9:13 pm, "digital spaghetti"
> >
> > <[EMAIL PROTECTED]> wrote:
> > > Just to quickly mention, the project is now hosted at the cakeforge:
> >
> > >http://cakeforge.org/projects/webrocket/
> >
> > > I've also updated the demo a thttp://66.160.135.85.  The demo
> > > username is WebrocketAdmin and password rocket.
> >
> > > Tane
> >
> > > On 4/14/07, digital spaghetti <[EMAIL PROTECTED]> wrote:
> >
> > > > I'm pleased to announce the first official alpha of Webrocket - a CMS
> > > > built on CakePHP.
> >
> > > > This release is *very* alpha.  It runs fine on my local install, but
> > > > even I had problems setting up on the test server, and it's still not
> > > > complete.
> >
> > > > You can check out the demo athttp://66.160.135.85.  The server seems
> > > > to forward tohttp://66.160.135.85/xampp-and I can't seem to find
> > > > the alias to switch it off (so if anyone can help).
> >
> > > > It's SVN is hosted on Google Code -http://code.google.com/p/webrocket/
> > > > Please feel free to download and prod and poke at it.  If anyone would
> > > > like to see features, please submit them at the google page under
> > > > issues, please also raise any bug reports.
> >
> > > > The CMS is built on CakePHP, and uses jQuery for it's AJAX.
> > > > Currently, not all functions are using AJAX, and some don't seem to
> > > > work on the test server yet, but this is due to the /xampp issue.
> > > > Once thats fixed, it would be working.
> >
> > > > There is no documentation yet, but i'll try update the Wiki soon.
> >
> > > > Tane Piper
> > > >http://webrocket.wordpress.com
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
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: Announcing: Webrocket

2007-04-14 Thread digital spaghetti

Just to quickly mention, the project is now hosted at the cakeforge:

http://cakeforge.org/projects/webrocket/

I've also updated the demo a thttp://66.160.135.85.  The demo
username is WebrocketAdmin and password rocket.

Tane

On 4/14/07, digital spaghetti <[EMAIL PROTECTED]> wrote:
> I'm pleased to announce the first official alpha of Webrocket - a CMS
> built on CakePHP.
>
> This release is *very* alpha.  It runs fine on my local install, but
> even I had problems setting up on the test server, and it's still not
> complete.
>
> You can check out the demo at http://66.160.135.85.  The server seems
> to forward to http://66.160.135.85/xampp - and I can't seem to find
> the alias to switch it off (so if anyone can help).
>
> It's SVN is hosted on Google Code - http://code.google.com/p/webrocket/
> Please feel free to download and prod and poke at it.  If anyone would
> like to see features, please submit them at the google page under
> issues, please also raise any bug reports.
>
> The CMS is built on CakePHP, and uses jQuery for it's AJAX.
> Currently, not all functions are using AJAX, and some don't seem to
> work on the test server yet, but this is due to the /xampp issue.
> Once thats fixed, it would be working.
>
> There is no documentation yet, but i'll try update the Wiki soon.
>
> Tane Piper
> http://webrocket.wordpress.com
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
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
-~--~~~~--~~--~--~---



Announcing: Webrocket

2007-04-14 Thread digital spaghetti

I'm pleased to announce the first official alpha of Webrocket - a CMS
built on CakePHP.

This release is *very* alpha.  It runs fine on my local install, but
even I had problems setting up on the test server, and it's still not
complete.

You can check out the demo at http://66.160.135.85.  The server seems
to forward to http://66.160.135.85/xampp - and I can't seem to find
the alias to switch it off (so if anyone can help).

It's SVN is hosted on Google Code - http://code.google.com/p/webrocket/
Please feel free to download and prod and poke at it.  If anyone would
like to see features, please submit them at the google page under
issues, please also raise any bug reports.

The CMS is built on CakePHP, and uses jQuery for it's AJAX.
Currently, not all functions are using AJAX, and some don't seem to
work on the test server yet, but this is due to the /xampp issue.
Once thats fixed, it would be working.

There is no documentation yet, but i'll try update the Wiki soon.

Tane Piper
http://webrocket.wordpress.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
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: Creating a support wiki for CakePHP, any interest?

2007-04-12 Thread digital spaghetti

One of your points is that information is quickly out of date - I
totally agree, and I think with that in mind on the bakery there
should be some element of editorial control and natural churn on
articles.

For example, how many recent articles are still using $html->input?
Maybe when 1.2 is more advanced, say beta, start taking these articles
out.  I'm not saying destroy them, but maybe a process of updating the
methods used to show 1.2 functionality.

Either that, or maybe a simpler way would be to check is version < 1.2
and put a "This article has been depricated" in bright red at the top.
Either way, it let's noobs know the article is no longer valid.

Tane

On 4/12/07, John David Anderson <[EMAIL PROTECTED]> wrote:
>
>
> On Apr 12, 2007, at 3:04 PM, savagekabbage wrote:
>
> >
> > Yes, that's exactly why it was taken down. However, while CakePHP has
> > a lot of documentation on the web, the API, and the forums... Most of
> > it is too hard to grasp or too steep for newbies to handle.  There are
> > countless newbies who have/have had trouble learning the framework
> > (including myself) and I believe this will be a good resource for
> > future CakePHP prospects.
> >
> > I don't see how a wiki can be any less organized or correct than a
> > Google group, so I'm going to move forward with this.
>
> savagekabbage,
>
> I've had the most first-hand experience with this, so let me chime in.
>
> First, I want to stress one thing - any non-official documentation
> effort only makes it harder for newbs to get up and running. The very
> best thing you can do, is come talk to me to see how we can beef up
> the current, official docs. We love bloggers. We love forum posters.
> We love any good press, but if you want your work to have the most
> positive impact, get your words in the official docs. That's where
> people are going to look first. That's where we'll want them to look
> first.
>
> Secondly, the Bakery is already filling the role of the old and
> (thankfully) dead CakePHP Wiki. There were a number of problems that
> we realized after using a wiki:
>
> 1. Information becomes outdated quickly, and becomes a source of
> misinformation quickly
> 2. Well meaning folks writing incorrect information was happening too
> much
> 3. There was no way to consistently tell what version of Cake a given
> piece of content was for.
> 4. Wikis grow organically and are not often well organized unless
> vigilantly moderated and pruned
>
> I won't disagree that there were some great articles. But those
> articles can now be housed in the Bakery. We can approve and maintain
> an extremely high level of quality there. Its a win for everyone -
> the community can contribute, and we can forestall and possible
> misinformation.
>
> I should also add that this google group is not a documentation
> effort, it is a support effort, which has a different aim.
>
> Thirdly, we'd ask that you do not use the CakePHP logo on your site
> like you have it now - it makes it appear that the site is official,
> which will cause confusion.
>
> I think we're all after the same thing here - is there a reason you'd
> rather not help to work and strengthen the official documentation
> instead?
>
> Regards,
>
> John
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
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: What is the best source for CakePHP v1.2 documentation?

2007-04-12 Thread digital spaghetti

Or another way is *The Source* is the best source for CakePHP v1.2
documentation.

http://api.cakephp.org/1.2 is your friend, read all the internal
documentation, 95% of the time it will answer your question.  If it
can't, then turn to IRC and the group.

Tane


On 4/12/07, Dr. Tarique Sani <[EMAIL PROTECTED]> wrote:
>
> On 4/12/07, Aaron Thies <[EMAIL PROTECTED]> wrote:
> > What is the best place to go for  documentation on v1.2?
>
> 
> Use the source Luke!
> 
>
> T
>
> --
> =
> PHP for E-Biz: http://sanisoft.com
> Cheesecake-Photoblog needs you!: 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 [EMAIL PROTECTED]
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: Building an admininstration area

2007-04-12 Thread digital spaghetti

You may be trying to over-complicate it.

My solution was to create a HomeController, with method admin_index,
then in the routes file I added a route for admin/ that pointed to the
controller home and method admin_index.

At the moment, mine is still pretty Web1.0 but I intend to use a Ajax
interface that has links or tabs at the top of the view and when you
click on them, it loads in each view you need to the update div area.

I haven't implemented it, its still on paper but some experiments with
similar stuff showed some promise.

Tane

On 4/12/07, RLR <[EMAIL PROTECTED]> wrote:
>
> I would like to create an administration area in my application where
> an admin user can edit the preferences, administrate users and groups,
> edit access controls and so forth.
>
> The settings are stored in the database and I have baked controllers
> and models for each of the db tables.
>
> Due to the fact that there are many tables required I can see that I
> will have problems providing a menu with all the controller names and
> functions I need.
>
> Currently I do not know how to go forth at creating a unified
> solution. Should I create one giant admin controller which "uses" the
> models and has functions like
>
> users_list
> users_edit
> users_delete
> groups_list
> groups_edit
> groups_delete
> etc.
>
>
> Any insight on how to accomplish this kind of task would be great.
>
> Thanks
> Ronald
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
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: Behavior of JavascriptHelper::object

2007-04-11 Thread digital spaghetti

And thanks for bringing this up.  I've asked a couple of times in IRC
if anyone was using JSON in cake as I want to use YUI-EXT but never
got an answer.  Now I know its there, it should speed up development
:)

Tane

On 4/11/07, nate <[EMAIL PROTECTED]> wrote:
>
> Great, thanks Joshua.  It's fine if you're asking if something *is* a
> bug, but once you find out it is, it's always good to follow it up
> with a ticket to make sure it gets fixes.  Thanks again.
>
> On Apr 11, 2:38 pm, "Joshua Benner" <[EMAIL PROTECTED]> wrote:
> > I've applied nate's fix with success.
> >
> > Sorry for the reporting -- I'll report bugs more politely in the
> > future. :)
> >
> > On Apr 11, 2:12 pm, "nate" <[EMAIL PROTECTED]> wrote:
> >
> > > He firespade,
> >
> > > I actually came up with another method that is more efficient, as it
> > > does not require a loop to check for numeric keys.  You can see the
> > > change here, as well as the test case that proves
> it:https://trac.cakephp.org/changeset/4838
> >
> > > Also, in the future, if you'd like to submit patches (or bug reports
> > > [Josh ;-)]), please readhttps://trac.cakephp.org/wiki/bugreport
> > > and this:https://trac.cakephp.org/wiki/Developement/CodingStandards
> >
> > > Generally speaking, we don't respond to patches or bug reports on the
> > > mailing list, as this isn't the place for it.  Thanks guys.
> >
> > > On Apr 11, 1:05 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> >
> > > > Place this over the original Object method in the javascript.php
> > > > located in "\cake\libs\view\helpers\".
> > > > Enjoy.
> >
> > > > function object($data, $block = false, $prefix = '', $postfix = '',
> > > > $stringKeys = array(), $quoteKeys = true, $q = "\"")
> > > > {
> > > > $parts = array();
> > > > $is_list = false;
> >
> > > > $keys = array_keys($data);
> > > > $max_length = count($data)-1;
> >
> > > > if(($keys[0] == 0) and ($keys[$max_length] ==
> $max_length)) {
> > > > $is_list = true;
> >
> > > > for($i=0; $i > > > if($i != $keys[$i]) {
> > > > $is_list = false;
> > > > break;
> > > > }
> > > > }
> >
> > > > }
> >
> > > > foreach($data as $key=>$value) {
> > > > if(is_array($value)) {
> > > > if($is_list) $parts[] = $this->object($value,
> false, '',
> > > > '', $stringKeys, $quoteKeys, $q);
> > > > else $parts[] = $q . $this->escapeString($key) .
> $q .
> > > > ':' . $this->object($value, false, '', '', $stringKeys, $quoteKeys,
> > > > $q);
> > > > } else {
> > > > $str = '';
> > > > if(!$is_list) $str = $q .
> $this->escapeString($key) .
> > > > $q .':';
> >
> > > > if(is_numeric($value)) $str .= $value;
> > > > elseif($value === false) $str .= 'false';
> > > > elseif($value === true) $str .= 'true';
> > > > else $str .= $q . $this->escapeString($value) .
> $q;
> >
> > > > $parts[] = $str;
> > > > }
> > > > }
> > > > $json = implode(',',$parts);
> >
> > > > if($is_list) return '[' . $json . ']';
> > > > else $rt = '{' . $json . '}';
> >
> > > > $rt = $prefix . $rt . $postfix;
> >
> > > > if($block)
> > > > {
> > > > $rt = $this->codeBlock($rt);
> > > > }
> >
> > > > return $rt;
> > > > }
>
>
> >
>

--~--~-~--~~~---~--~~
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 function for application

2007-04-11 Thread digital spaghetti

In your controller

If (isset($this->data['User']['username']))
{
   $user = $this->User->findByUsername($this->data['User']['username']);
}

If its a search controller, rather than in the users controller you
need to make sure you delare $uses at the top of the contoller

$uses = array('User');

As long as your table fields follow cake conventions you can do any
findByField(), check out the API docs for more info on it

Tane

On 4/11/07, szeta <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am using CakePHP in a project and would like to integrate a 'search'
> function.
>
> I'm not talking about a full index for the site (like htdig), but
> mainly a search function for specific fields.
>
> e.g. search for a person by name etc..
>
> I'm not sure what's the best way to do this.
>
> 1. Create a model 'search' with no table and execute something like
> "SELECT FROM table WHERE value LIKE '%searchvalue%'" for each field
> I'd like to search.
>
> 2. integrate a 'search' function into each controller of the existing
> models.
>
> Has somebody done something like this before and would like to share
> his experience or link to some example code?
>
> In the archive and bakery I can hardly find anything about this
> topic..
>
> Best regards
> Ralph
>
>
> >
>

--~--~-~--~~~---~--~~
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: Making REST Requests to a web-server like yahoo

2007-04-10 Thread digital spaghetti

That's cool, but you do realise your breaking Yahoo's TOS (and
probably google's too) by saving the geocode data to the db?

Your better to make the call, and then cache the view, since that
complies with their TOS.  Plus at the moment, the granulaity of yahoo
can sometimes be off - only giving you zip or city level view - if you
cache you have a better chance of the data being more accurate in the
future as the service improves.

Also I'd be happy to provide any code to the mashup project. I'll be
working on my upcomming.org code sometime this week.

Tane


On 4/11/07, nate <[EMAIL PROTECTED]> wrote:
>
> Hey Tane,
>
> Sorry man, I beat you to the punch!
> http://bakery.cakephp.org/articles/view/332
>
> We're actually starting a Mashup API project on CakeForge, so if
> you've got other stuff that integrates with Yahoo!'s web services, we
> might be interested in adding it if you want to join.
>
> On Apr 10, 2:20 pm, "digital spaghetti"
> <[EMAIL PROTECTED]> wrote:
> > Just on a wee side note, tonight or tommorow (whenever I get a chance)
> > I'll be releasing the first in a set of small components that deal
> > with Yahoo REST services.
> >
> > The first one isYahooGeo, which takes an address you pass to the
> > component, and returns a simple array with the latitude and longitude
> > data, handy for geocoding data and any microformats you may have on
> > your site.  I'll probably release 0.1, which will be without the
> > mapping methods, but I intend to have a method that you can pass this
> > data in to and it will generate a yahoo map.
> >
> > I'll be releasing an Yahoo Upcomming.org REST component later in the
> > month, and I'll be looking at other useful services.
> >
> > All of them *should* be PHP4 compatable, as they mainly use SimpleXML
> > for returned data, but Yahoo can also provide serialised PHP (which I
> > haven't looked at yet, so I'm not to sure on that yet).
> >
> > Keep an eye out on the bakery for it!
> >
> > Tanehttp://webrocket.wordpress.com
> >
> > On 4/10/07, Tonyz <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Chris I will be confused as a newbie not you :-)
> >
> > > I no need cookie so I will use file_get_contents but I read that curl
> > > is more performant so I need to find a host who supports it.
> >
> > > Ciao
> > > Tonyz
> >
> > > On 8 Apr, 19:36, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> > > > I'm confused now, what do cookies and sessions have to do with
> > > > connecting to a REST service?
> >
> > > > I also use another web client library called HttpClient (don't have
> > > > the URL handy) for things like this, but sometimes file_get_contents
> > > > because it's simpler.
> >
> > > > On 4/8/07, Tonyz <[EMAIL PROTECTED]> wrote:
> >
> > > > > Hi Chris
> > > > > I need to handle session and cookie this is why I will use the pear
> > > > > class.
> >
> > > > > I found also this classhttp://sourceforge.net/projects/snoopy/
> >
> > > > > Tonyz
> >
> > > > > On 7 Apr, 19:24, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> > > > > > On 4/7/07, Tonyz <[EMAIL PROTECTED]> wrote:
> >
> > > > > > > I have no need to parse xml as the response is in php
> serialized. My
> > > > > > > only concern is doing in php the http request and after some
> > > searches
> > > > > > > I think will use the pear package html client as my host has no
> > > curl.
> >
> > > > > > Why can't you use file_get_contents?
> >
> > > > > > --
> > > > > > Chris Hartjes
> >
> > > > > > My motto for 2007:  "Just build it, damnit!"
> >
> > > > > > rallyhat.com - digital photo scavenger hunt
> > > > > > @TheBallpark -http://www.littlehart.net/attheballpark
> > > > > > @TheKeyboard -http://www.littlehart.net/atthekeyboard
> >
> > > > --
> > > > Chris Hartjes
> >
> > > > My motto for 2007:  "Just build it, damnit!"
> >
> > > > rallyhat.com - digital photo scavenger hunt
> > > > @TheBallpark -http://www.littlehart.net/attheballpark
> > > > @TheKeyboard -http://www.littlehart.net/atthekeyboard
>
>
> >
>

--~--~-~--~~~---~--~~
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: Making REST Requests to a web-server like yahoo

2007-04-10 Thread digital spaghetti

Just on a wee side note, tonight or tommorow (whenever I get a chance)
I'll be releasing the first in a set of small components that deal
with Yahoo REST services.

The first one is YahooGeo, which takes an address you pass to the
component, and returns a simple array with the latitude and longitude
data, handy for geocoding data and any microformats you may have on
your site.  I'll probably release 0.1, which will be without the
mapping methods, but I intend to have a method that you can pass this
data in to and it will generate a yahoo map.

I'll be releasing an Yahoo Upcomming.org REST component later in the
month, and I'll be looking at other useful services.

All of them *should* be PHP4 compatable, as they mainly use SimpleXML
for returned data, but Yahoo can also provide serialised PHP (which I
haven't looked at yet, so I'm not to sure on that yet).

Keep an eye out on the bakery for it!

Tane
http://webrocket.wordpress.com


On 4/10/07, Tonyz <[EMAIL PROTECTED]> wrote:
>
> Chris I will be confused as a newbie not you :-)
>
> I no need cookie so I will use file_get_contents but I read that curl
> is more performant so I need to find a host who supports it.
>
> Ciao
> Tonyz
>
> On 8 Apr, 19:36, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> > I'm confused now, what do cookies and sessions have to do with
> > connecting to a REST service?
> >
> > I also use another web client library called HttpClient (don't have
> > the URL handy) for things like this, but sometimes file_get_contents
> > because it's simpler.
> >
> > On 4/8/07, Tonyz <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> > > Hi Chris
> > > I need to handle session and cookie this is why I will use the pear
> > > class.
> >
> > > I found also this classhttp://sourceforge.net/projects/snoopy/
> >
> > > Tonyz
> >
> > > On 7 Apr, 19:24, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> > > > On 4/7/07, Tonyz <[EMAIL PROTECTED]> wrote:
> >
> > > > > I have no need to parse xml as the response is in php serialized. My
> > > > > only concern is doing in php the http request and after some
> searches
> > > > > I think will use the pear package html client as my host has no
> curl.
> >
> > > > Why can't you use file_get_contents?
> >
> > > > --
> > > > Chris Hartjes
> >
> > > > My motto for 2007:  "Just build it, damnit!"
> >
> > > > rallyhat.com - digital photo scavenger hunt
> > > > @TheBallpark -http://www.littlehart.net/attheballpark
> > > > @TheKeyboard -http://www.littlehart.net/atthekeyboard
> >
> > --
> > Chris Hartjes
> >
> > My motto for 2007:  "Just build it, damnit!"
> >
> > rallyhat.com - digital photo scavenger hunt
> > @TheBallpark -http://www.littlehart.net/attheballpark
> > @TheKeyboard -http://www.littlehart.net/atthekeyboard
>
>
> >
>

--~--~-~--~~~---~--~~
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: Using a method in a different controller?

2007-04-10 Thread digital spaghetti

Actually, url works a treat. So now I have:

create('EventType', array('url'=>'/admin/events/addtype')));?>

I didn't really know how to word it, but basicly I didn't want to
create a seperate controller and set of views for such a simple model,
I'd rather have the event controller handle both Event and EventType.

Thanks for that though.
Tane

On 4/10/07, AD7six <[EMAIL PROTECTED]> wrote:
>
>
>
> On 10 abr, 11:47, "digital spaghetti"
> <[EMAIL PROTECTED]> wrote:
> 
> > create('EventType',
> array('action'=>'/admin/event/addtype')));?>
>
> 'action' doesn't mean url (although a couple of months ago or so it
> acted as such).
>
> If you say 'action' = "really long string with some /s in it" cake is
> going to make the url
> /($admin/)($plugin/)$currentController/really long string with some /s
> in it
>
> You probably want 'action'=>'addtype" or (if the previous doesn't
> work, which it should iirc) 'url'=>'/admin/event/addtype'
>
> hth,
>
> AD
>
>
> >
>

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



Using a method in a different controller?

2007-04-10 Thread digital spaghetti

Hi folks,

I have 2 models in my database, Event and EventType.  EventType is
very simple, it's just an id and a name - so I don't want to write a
whole controller for it.  In my Event controller, I have this method:

set('exiting_types', $this->EventType->findAll());
if(isset($this->data))
{
$this->EventType->create();
if($this->EventType->save($this->data))
{
$this->Session->setFlash('Event Type Added');
}
}
}
}

?>

However, in my view, I have this:


create('EventType', 
array('action'=>'/admin/event/addtype')));?>

Add a new event type
input('name'));?>


submit('Submit Event Type'));?> link('Cancel', '/admin/events/index',
array('class'=>'button-link')));?>
end());?>











The problem I am having is that when I try and submit the new event
type, the URL that the form goes to is
/admin/event_types/admin/event/addtype/.

Is there any way to overide this, so it doesn't default to adding the
/admin/event_types on the front of the URL??

--~--~-~--~~~---~--~~
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 auth component in cake 1.2

2007-04-05 Thread Digital Spaghetti

If your looking for a Auth component, consider othAuth (http://
bakery.cakephp.org/articles/view/99).  The documentation is good
(http://bakery.cakephp.org/articles/view/148) and very easy to drop
into your project.

The notes indicate that it will later support CakePHP's own ACL
component, but in the meantime it serves as a very good component to
handle login/logout and user permissions.

Tane

On Apr 5, 9:37 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> how can i find manual, trytourial about new auth coponent+acl  in cake
> 1.2 ?


--~--~-~--~~~---~--~~
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 verify cache is working properly

2007-04-05 Thread digital spaghetti

I only found out this method today, but found it to work perfectly.

Put the code you wish to cache in an element, and when you want to
render the element use this:

element('element', array('cache'=>'1 day'));?>

Now the element will be cached for 24 hours from generation. Beware
though, if you update the data it uses you need to make sure you
unlink the cache file on afterSave

In your model file:

function afterSave()
{
   @unlink(CACHE.'view'.'element__elementname');
}

(Please check this though, I'm writing this from memory on my blackberry!!)

Tane

On 4/5/07, bingo <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I don't have much traffic on my website...but for future, I am
> starting to implement cache.
>
> Its seems to be working...but how do I verify that its properly
> working...
>
> For instance, I set cacheAction only for one action in one controller.
> But when I check my tmp/cahce, I only found cache for model and that
> too for all the tables. There was no cache folder for view.. Am I
> missing something.
>
> Is there any way to check what queries where sent by cakephp before it
> rendered the view. I tried setting debug to 3 and it seems it sending
> all
>
> Regards,
> bingo
>
>
> >
>

--~--~-~--~~~---~--~~
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: images -> prev, next

2007-04-05 Thread digital spaghetti

You should not need to do e($html->image('prev.gif')

Instead, try it like this:

prev($html->image('prev.gif'), null, null)); ?>
next($html->image('next.gif'), null, null)); ?>


On 4/5/07, Copot <[EMAIL PROTECTED]> wrote:
>
> When I do something like this,
>
> prev(e($html->image('prev.gif')), null, null); ?>
> next(e($html->image('next.gif')), null, null); ?>
>
> no links are genereated. It seems to work only with text.
>
> Can someone give me an explaination or a solution?
>
>
> >
>

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



Issue with Date & Time fields

2007-04-03 Thread digital spaghetti

Hey folks,

Before I raise a ticket in the trac I wanted to check out if anyone
knows if this is a bug, or if I should be doing something in
beforeSave?

I have a model, Event.  In it, I have 2 fields event_date and
event_time, obviously being DATE and TIME fields.  In my view, I
render them using the form helper and they show up fine - but when I
save, they don't insert into the table.

I did a print_r($this->data) and got this:

Array (
[Event] => Array (
[venue] => Prime Club
[address] =>
[city] => Cologne
[country] => DE
[event_date_month] => 04
[event_date_day] => 26
[event_date_year] => 2007
[event_time_hour] => 08
[event_time_min] => 0
[event_time_meridian] => pm
[notes] => Part of British Music Week
[published] => 1
[user_id] => 1
 )
)

However, on my inset I have this:

INSERT INTO `events`
(`venue`,`city`,`country`,`notes`,`published`,`user_id`,`created`,`modified`)
VALUES ('Prime Club','Cologne','DE','Part of British Music
Week\r\n',1,1,'2007-04-03 16:35:13','2007-04-03 16:35:13')

Apart from address (which was empty in this example anyway) all the
fields seem to save, EXCEPT for event_date and event_time.  So can
anyone clarify, is this a bug, or should I be doing something in
beforeSave??

Thanks,
Tane

--~--~-~--~~~---~--~~
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: XML output from cake controller/view

2007-04-02 Thread digital spaghetti

Instead of your method, check out this tutorial:

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

Its an old article, but still works perfectly in Cake 1.2

Tane

On 4/2/07, Jeremy Pointer <[EMAIL PROTECTED]> wrote:
>
> I'm trying to output an xml document but I seem to be getting a space
> character just before  receiving the data (not mine) to cough and splutter and die.
>
> In my controller I am setting $this->layout=false; and my view is:
>  header("Content-type:text/xml");
> print ("");
> print("");
> foreach ($rows as $row) print("".$row['table']['field']."");
> print("");
> ?>
>
> DEBUG is 0 I also tried removing all beforeFilter and beforeRender
> settings in app_controller and the controller that calls this with no luck.
>
> Any ideas why I am getting a space, is there a different/better way to
> output XML.
>
> --
> */Jeremy Pointer/*
> [EMAIL PROTECTED] 
>
> >
>

--~--~-~--~~~---~--~~
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: Use off-the-shelf (bloated) open source product, or develop with cake?

2007-04-02 Thread digital spaghetti

I totally agree.  At my company I am lucky to have a lot of creative
freedom with my project.  When I took over, they already had a custom
CMS built on ColdFusion which is buggy as hell, and some sites are
just plain HTML docs that I have to manually update.

At first, I started down the Drupal route, but quickly encountered
issues with modules that I required not being finished, or coded and
documented enough to fix.  I was relying upon other people to finish
their work.

On the other hand, with CakePHP it is going to take me longer to
create our CMS (plus the wasted time on Drupal) however, I can taylor
it to our needs and requirements, as and when needed.  Plus I know the
code like the back of my hand now so I know where to look when there
is a bug.

The good thing is its also similar in some ways to the current CMS so
there is no need to fully retrain other staff in its use, and it can
be used consistantly over all the sites I manage (currently 7) so I
can apply bug fixes and new features easily.

Tane


On 4/2/07, mparic <[EMAIL PROTECTED]> wrote:
>
> It shouldn't be about "bloat" vs. "lean"; it's about your business
> model and what value are you delivering to your clients. If you are
> providing stand-alone applications like a CMS or bulletin board, then
> use Drupal or phpBB; you are not delivering any additional value by
> making a custom application with Cake but are charging much more. On
> the other hand, you can develop a program that includes just the CMS
> functionality they need but also provides other automated tools (auto
> email those documents to an online customer managment system) that
> could not be provided with an off-the-shelf solution. That way your
> client has fewer programs to learn (and you have to train/support) and
> gets a solution that's tailored to them, providing real value and
> justifying the larger cost of a custom solution.
>
>
> >
>

--~--~-~--~~~---~--~~
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: update with save

2007-04-02 Thread digital spaghetti

It's actually very easy.  You can use the exact same form view as your
add method, however you need to make sure that this id of the data is
included.  For example, if its.a post do this:

create('Post'));?>
input('id'));?>

Cakephp will now recognbise this is an edit form and not an add form.

Tane


On 4/2/07, christianandradet <[EMAIL PROTECTED]> wrote:
>
> hi, how do i tell cakephp that i want to make an update not an insert,
> could you explain me the difference please. I do not know how this
> works.
> 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: Proposal for "killer app"

2007-03-30 Thread digital spaghetti

That's a pretty short n' sweet list of what I think we would need, not
anything more. Probably 99% of apps built will use this, or a modified
version, of this functionality.

I'm thinking we could call it our "shake and bake" pakage - all the
ingredients are ready made to be baked into something more whole.

Tane

On 3/30/07, John <[EMAIL PROTECTED]> wrote:
>
> These are great ideas flying around.
>
> I really do think that a simple but complete application would be
> really useful for new bakers - all things considered the manual +
> bakery + this group are a pretty damn good resource - BUT it can be
> hard pulling things together and integrating. Ideally it would be
> something useful (and actually a simple CMS is always useful) but that
> practically demonstrates how to tie it all together AND that also
> demonstrates best practice.
>
> I guess you would might want:
>
> * Users / Groups / Permissions (managed from within the app)
> * File manager for upload images / files
> * Page editor
> * Menu manager / navigation controller
>
> Now you can turn up your noses and say - just another CMS - but almost
> all the stuff I build at work needs these features, sometimes you add
> a shopping cart, sometimes a forum, sometimes a contacts DB etc...
>
> I also like the plugin / module idea - but if you made the demo thing
> above using them it might be too complex / abstracted for somebody
> trying to learn... i don't know. At the end of the day though, I think
> we all know that the best way to learn is just to start building and
> deal with problems one by one. (p.s. I'm currently building 2 apps -
> its not always easy, but it is worth it - I just wish I'd stumbled
> onto cake a year ago...)
>
> Cheers
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: Proposal for "killer app"

2007-03-29 Thread digital spaghetti

Seb, I totally agree with you here, and again I start I never compared
CakePHP *TO* a CMS, I only referenced other CMS's where they have a
model of users contributing addon's to these systems using their API.

I don't really want to bang on at the point, as someone has already
said "Just build it", but I just want to go over it just a little
more.

What I am now proposing, through the thoughts that you have all
expressed here, is to build standard "modules" of code that people can
use in their projects.
For example, a "user module" we could provide pre-built controllers,
models and views that actually consists of say a user MVC, group MVC,
permission MVC and profile MVC tied into one package.  At the main
methods (add, delete, view, edit) plus additional login/logout methods
and session handling would be there.

However, the great thing about CakePHP is that anyone can come along
and either take these and expand upon them, or ignore them totally and
build their own solution - as our one might not fit their uses - but I
think it would fit into 99% of situations.

I'm not talking (at least now) about the whole package, but instead
code that people have to still take and with some knowledge integrate
into their own applications.

Tane

On 3/29/07, Seb <[EMAIL PROTECTED]> wrote:
>
>
>
> On Mar 29, 3:44 pm, "Loren" <[EMAIL PROTECTED]> wrote:
> >
> > I know the people who developed this framework make me look like a
> > bonafide stooge. But all that coding savvy is going to waste if this
> > spiffy framework remains an inscrutable tangle of half-baked
> > documentation and shallow tutorials. Documentation is no fun (I hate
> > writing it, we all hate writing it), but I believe it is KEY to the
> > widespread adoption of CakePHP.
> >
> > Loren
>
> Ok... we're really getting away from the main thread here... but
> somehow I can't help it thinking that in the end... we're pushing that
> "killer app" idea somewhere. All this to say that...
>
> Loren has a good point. I got around CakePHP pretty quick because I
> had a strong IT background helping. Plus I will spend 2 days without
> sleep digging when there's interest. And then I was comfortable with
> the code (or php), comfortable with the pattern (MVC) and comfortable
> with the platform (web). I think my learning curve was pretty flat!
> Then I use to hangout in the IRC channel trying to do my bit and got
> quickly sick of it because of questions like "what if I want to remove
> the cake logo".
>
> As Tane was saying from a different angle, we need to make sure
> documentation is kept and standards are followed religiously. I must
> admit the cake code is awesome! I'm a fair bit of a purist and I
> literally felt in love with it. The code is nice to a point that it
> could even be harmful for the project itself! Contributing back is not
> simple; suggestions are vetoe'ed without any further discussions,
> enhancement are left to die in trac, which btw is filled with users
> who raise a critical bug for the current stable version because some
> function doesn't do what THEY want, not realising they're not calling
> it properly.
> ... my point is, the code is very good, fairly documented, but kept on
> such a tight lead that is sometimes pisses me off like I'm sure it
> pisses others off. But I can live with that. ***
>
> However, beside the tutorial, there is no or very little 'official'
> documentation. I'm thinking about "Once you understand that cake is
> great... what's next!!?", "Building applications using cake...", "Cake
> versus Joomla/Mambo/xoops/phpnuke... what's so different"... "What is
> bake, what isn't it for."... These are obvious to all/most of us...
> but not to everyone trying cake!
>
> This brings us back to the initial thread... the "killer app". With
> all due respect to cake and the author of the thread, wordpress is a
> great blog, joomla a great news/content management, phpBB or vBuletin
> great forums, osCommerce or phpShop great shopping cart, and the list
> goes on and on and on...
>
> To eveyone who call Cake a CMS, I say you just didn't get it!
>
> This is to say (and this may sound a bit different from my previous
> posts in this thread) that Cake is not a cms, it's a framework; an
> advanced development toolkit for a web environment, likely to be used
> for projects. What projects need, what projects don't want to code
> again is;
>
> * Security/authentication (cake is missing docs/have incomplete
> implementations),
> * ORM (bugs raised in regards to that were fixed very quickly,
> congrats Nate!),
> * Caching (haven't looked into that aspect of cake much, but I believe
> caching the model might not be enough),
> * Session management (.NET is still way ahead... cookie or cookie-
> less...),
> * RAD (Cake is a great starting point, but over 60% of admin views are
> pretty much all the same!)
>
> It might even be worth having a big notice on cake's homepage saying
> "Cake will not build a website FOR you, it will help YOU DO IT!".
>

Re: Proposal for "killer app"

2007-03-28 Thread digital spaghetti

Ok, from reading through the emails I get the consensus that most of
you are not against the idea of a community built project, but more
the label of it being a CMS.

Maybe another way to put it is for a community team to work together
on a library of code that provide different pre-baked functionality,
and that can easily be plugged into any existing app, or combined
together to make a fully functioning application.

These could be things from a consistent user system, post and pages, a
nested menu system to web-based email, tasks & other groupware
components, and components that tie in with 3rd party functionality
such as google services, flickr, etc.

Each module in this library would have to go through a consistent
coding and documentation routine before being considered "official",
and could be provided as part of future releases of CakePHP - offering
"lite" version with just the CakePHP framework, or an Application
version that includes the framework + the library.  These would then
be upgraded as and when needed during framework changes.

The problem with the Bakery and Cakeforge, is as much as they are
useful - there is absolutely no consistency in the tutorials and
articles.  Isn't CakePHP all about conventions?  If it's a team
effort, this library could easily keep up with the fast pace.

Tane



On 3/29/07, nate <[EMAIL PROTECTED]> wrote:
>
> > Sorry but I do not share your elitist vision. Cakephp is making its best
> > to reach new markets and to be used by the masses.
> > Also I am rather considering the question of easing the processes in a
> > team work, where we have various peoples with various skills.
>
> Egalitarianism for it's own sake is lame and misguided: if you're
> sitting in a classroom, you don't want to be sitting next to people
> who aren't just as interested in learning as you are, because it
> diminshes the experience.  Everyones' definition of what makes a
> "good" coder is going to be a little different, and everyone's a n00b
> at everything at some point, but what it comes down to is an interest
> in improvement.  Some programmers show up at work, do their thing, and
> go home, never really thinking about their work beyond what's at the
> surface.  Other programmers, however, actively work to improve their
> ability to write code, think about the projects they work on at a
> higher level, and possibly most importantly, seek to better understand
> *why* they code the way they code.  Why is always the most important
> question; it is the key to understanding, and this is the critical
> differentiating factor.  So in that sense, Mariano is correct: we
> don't want to limit ourselves to the "best" coders, but we
> *definitely* want to limit ourselves to those who try to be.  See
> http://en.wikipedia.org/wiki/Kaizen
>
> > Most of our projects are starting small and growing later. We have a lot
> > of legacy apps to manage and what we are producing will be managed by
> > other peoples. We need to make the work easy for them, not require them
> > to be super-geniouses to understand the mess we have produced.
>
> Yet another reason to choose Cake over and overblown CMS; thank you
> for making my point.
>
> > Sorry but I wont convince my managers by using your joda talk. :-)
>
> Then your managers must think very little of you and your work if you
> cannot even be trusted to choose your own tools.
>
>
> >
>

--~--~-~--~~~---~--~~
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: Proposal for "killer app"

2007-03-28 Thread digital spaghetti

Really?  Say tommorow google opens up a new API to their Super-time
widget service, and I want to include it on my site which is powered
by killer app, well I would still write a component for it using
CakePHP, not the application.  Anyone can then use it in their own app
if I release it (which we would encourage)

Tane

On 3/28/07, Erich C. Beyrent <[EMAIL PROTECTED]> wrote:
>
> But in your example, they are developing for Wordpress and Drupal.
> Applied to this project proposal, they'd be developing for the CMS
> itself, not for CakePHP.
>
> -Erich-
>
> digital spaghetti wrote:
> > Fair enough on the Basecamp point, but I was looking at an overall
> > general app that end-users can use, and Basecamp is quite specific to
> > people who need Groupware.
> >
> > However I have to disagree on your other points.  Look at Drupal or
> > Wordpress for example, they are aimed at the end user - but as a
> > consiquence of this, you have many hundreds of developers adding new
> > code and features to them every day.  Why can't this be the same for
> > CakePHP.
> >
> > And I think if we are to persuade people to develop for CakePHP there
> > should be something there other than a few basic tutorials to show
> > them what its capible off.
> >
> > If you bake it, they will come!
> >
> > Tane
> >
> > On 3/28/07, Chris Hartjes <[EMAIL PROTECTED]> wrote:
> >> On 3/28/07, digital spaghetti <[EMAIL PROTECTED]> wrote:
> >>>
> >>> What I believe CakePHP needs is a killer app, a CMS that can rival the
> >>> others out there, and that gives people the chance to actually see
> >>> cakephp in action.  Think of it as a pre-packed Cake you get in the
> >>> supermarket.  RoR has one, Radient CMS - why can't we?  I think by NOT
> >>> having one, that scares a lot of people off.
> >>>
> >> The killer app for Rails is Basecamp, not Radient CMS.  Rails, in
> >> fact, grew out of extractions from the creation of Basecamp.
> >>
> >> Trivial nitpicking aside, I fail to understand how a "killer app" for
> >> CakePHP is going to lead more developers to start using CakePHP
> >> instead of Zend Framework or Symfony.  We are aiming at *developers*
> >> not *users*.
> >>
> >> PHP suffers from being considered "lame" by the latest generation of
> >> web developers, who tout Python and Ruby as the only good scripting
> >> languages for the web.  Never mind that several of the biggest web
> >> applications out there use PHP (Yahoo! ring a bell?).
> >>
> >> To steal a phrase from Microsoft, it's all about "developers,
> >> developers, DEVELOPERS!!!".  We (as in the community using CakePHP)
> >> need to find constructive ways to convince developers to use CakePHP.
> >>
> >> --
> >> Chris Hartjes
> >>
> >> My motto for 2007:  "Just build it, damnit!"
> >>
> >> rallyhat.com - digital photo scavenger hunt
> >> @TheBallpark - http://www.littlehart.net/attheballpark
> >> @TheKeyboard - http://www.littlehart.net/atthekeyboard
> >>
> >
> > >
>
> >
>

--~--~-~--~~~---~--~~
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: Proposal for "killer app"

2007-03-28 Thread digital spaghetti

John, you kind of half hitting the nail on the head.

At no point did I compare CakePHP itself to Wordpress, Drupal, etc -
and CakePHP *should* be aimed at developers, but you said it yourself
- if people know this cool application was built on CakePHP then more
people will look at it, and maybe it will convert some of them to
switch to.

But like it or not, there are people out there who we call end users
who are looking for a drop-in solution, why don't we give them one?
I'm not suggesting it takes away from CakePHP, infact I think it would
add great value.

Tane

On 3/28/07, John David Anderson <[EMAIL PROTECTED]> wrote:
>
>
> On Mar 28, 2007, at 12:49 PM, digital spaghetti wrote:
>
> >
> > Fair enough on the Basecamp point, but I was looking at an overall
> > general app that end-users can use, and Basecamp is quite specific to
> > people who need Groupware.
> >
> > However I have to disagree on your other points.  Look at Drupal or
> > Wordpress for example, they are aimed at the end user - but as a
> > consiquence of this, you have many hundreds of developers adding new
> > code and features to them every day.  Why can't this be the same for
> > CakePHP.
>
> This is my own personal take, but I don't think CakePHP is in the
> same category as Wordpress, Drupal, etc. There is a significant
> difference between a CMS and an Application Framework. CakePHP isn't
> a content mangement system, though it's pretty easy to create one
> using it.
>
> We're not aiming for end users, we're aiming for developers.
>
> > And I think if we are to persuade people to develop for CakePHP there
> > should be something there other than a few basic tutorials to show
> > them what its capible off.
>
> I agree, but if people come to CakePHP expecting a plug and play
> website, I don't really think that's what we're after.
>
> > If you bake it, they will come!
>
> ...to *your* website. Sure, if word gets out that some hot app was
> built with CakePHP it'll make us more popular and accepted, but
> mostly in development circles. I think CakePHP should shine for you
> more than it does for us. If it truly does that, people will come
> wanting the goodness anyway.
>
> 
>
> -- John
>
> >
>

--~--~-~--~~~---~--~~
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: Proposal for "killer app"

2007-03-28 Thread digital spaghetti

Another point I forgot to make is I see a lot of people re-inventing
the wheel.  How many different Auth components are there out there
(not to mention the official one in 1.2) for example.  Why can't we
come up with one consistant approach that can be provided to the
community, again a base one that people can customise to their own
needs.

Tane

On 3/28/07, Chris Hartjes <[EMAIL PROTECTED]> wrote:
>
> On 3/28/07, digital spaghetti <[EMAIL PROTECTED]> wrote:
> >
> >
> > What I believe CakePHP needs is a killer app, a CMS that can rival the
> > others out there, and that gives people the chance to actually see
> > cakephp in action.  Think of it as a pre-packed Cake you get in the
> > supermarket.  RoR has one, Radient CMS - why can't we?  I think by NOT
> > having one, that scares a lot of people off.
> >
>
> The killer app for Rails is Basecamp, not Radient CMS.  Rails, in
> fact, grew out of extractions from the creation of Basecamp.
>
> Trivial nitpicking aside, I fail to understand how a "killer app" for
> CakePHP is going to lead more developers to start using CakePHP
> instead of Zend Framework or Symfony.  We are aiming at *developers*
> not *users*.
>
> PHP suffers from being considered "lame" by the latest generation of
> web developers, who tout Python and Ruby as the only good scripting
> languages for the web.  Never mind that several of the biggest web
> applications out there use PHP (Yahoo! ring a bell?).
>
> To steal a phrase from Microsoft, it's all about "developers,
> developers, DEVELOPERS!!!".  We (as in the community using CakePHP)
> need to find constructive ways to convince developers to use CakePHP.
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> rallyhat.com - digital photo scavenger hunt
> @TheBallpark - http://www.littlehart.net/attheballpark
> @TheKeyboard - http://www.littlehart.net/atthekeyboard
>
> >
>

--~--~-~--~~~---~--~~
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: Proposal for "killer app"

2007-03-28 Thread digital spaghetti

Fair enough on the Basecamp point, but I was looking at an overall
general app that end-users can use, and Basecamp is quite specific to
people who need Groupware.

However I have to disagree on your other points.  Look at Drupal or
Wordpress for example, they are aimed at the end user - but as a
consiquence of this, you have many hundreds of developers adding new
code and features to them every day.  Why can't this be the same for
CakePHP.

And I think if we are to persuade people to develop for CakePHP there
should be something there other than a few basic tutorials to show
them what its capible off.

If you bake it, they will come!

Tane

On 3/28/07, Chris Hartjes <[EMAIL PROTECTED]> wrote:
>
> On 3/28/07, digital spaghetti <[EMAIL PROTECTED]> wrote:
> >
> >
> > What I believe CakePHP needs is a killer app, a CMS that can rival the
> > others out there, and that gives people the chance to actually see
> > cakephp in action.  Think of it as a pre-packed Cake you get in the
> > supermarket.  RoR has one, Radient CMS - why can't we?  I think by NOT
> > having one, that scares a lot of people off.
> >
>
> The killer app for Rails is Basecamp, not Radient CMS.  Rails, in
> fact, grew out of extractions from the creation of Basecamp.
>
> Trivial nitpicking aside, I fail to understand how a "killer app" for
> CakePHP is going to lead more developers to start using CakePHP
> instead of Zend Framework or Symfony.  We are aiming at *developers*
> not *users*.
>
> PHP suffers from being considered "lame" by the latest generation of
> web developers, who tout Python and Ruby as the only good scripting
> languages for the web.  Never mind that several of the biggest web
> applications out there use PHP (Yahoo! ring a bell?).
>
> To steal a phrase from Microsoft, it's all about "developers,
> developers, DEVELOPERS!!!".  We (as in the community using CakePHP)
> need to find constructive ways to convince developers to use CakePHP.
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> rallyhat.com - digital photo scavenger hunt
> @TheBallpark - http://www.littlehart.net/attheballpark
> @TheKeyboard - http://www.littlehart.net/atthekeyboard
>
> >
>

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



Proposal for "killer app"

2007-03-28 Thread digital spaghetti

Hi folks,

Forgive me for being rather forward with my email here, I'll try to
put my case over as level headed and as thoughtfully as possible, and
please feel free to give back any constructive critisism.  Also,
forgive any spelling and grammar - I'm typing this on the way home on
my blackberry, it's the only time I get to write an email this long.

Through being on the IRC channel, and on here - many a time, someone
new has come along and they are looking for a ready-to-roll
application that they can plonk onto their server and have running.
At the moment, there are a few small apps out there currently being
written by small teams (and even just one coder) such as cheesecake,
bakesale to name a couple, and there are plenty of dead projects in
the trove.

I want cake to succeed, it's a great framework - but I have to admit,
it took me three tries of coming back to it over the course of a few
month to get the hang of it.  I could see it's power, but it took me a
while to get the hand of it.  And I'm not the only one.

What I believe CakePHP needs is a killer app, a CMS that can rival the
others out there, and that gives people the chance to actually see
cakephp in action.  Think of it as a pre-packed Cake you get in the
supermarket.  RoR has one, Radient CMS - why can't we?  I think by NOT
having one, that scares a lot of people off.

So my proposal is this - along with the primary cake team who are
developing the framework - we create a secondry team to work on an
application that will be this killer app.

With the creation of this team, we can set about making something that
while it might not suit everyone's needs, it's something that most
people can start off with and build upon (which is something I think
is imporant to note now, think Drupal!).  It would have standard
"modules" such as a user system (registration, authorisation, access
levels, etc), a post & comments system, pages (from the db), a menu
system, file upload - and many more.  I'm thinking around a level akin
to a default install of Wordpress.

As well as creating a base level of these modules for people to work
from, I think it would a) drive more people to download and learn
CakePHP as they can see it in action and also so they can expand upon
this base app and b) drive cakephp itself by defining requirments of
the base application, and also provide more components, plugins and
documentaion that can be included into CakePHP itself.  And of course
it would help in bug fixing by providing code back to the main
project.

Now, please don't me wrong - I think everyone should download the
framework and experiment with their own apps, and this "killer app" is
not going to suit all cases, but I think if some of the more senior
members of the community who already have apps out there were to come
together on this and pool their talents, something great could happen.

If not, then I suppose it's the communitys loss.  Personally, I'm
happy to work on my own app, and although progress is admitidly slow,
I certainly wouldn't loose any sleep over it.

One last thing I would like to say is: convergance, not divergance - I
think that needs to be the motto here

So folks, now is your time to pipe up with your opinion.  If anyone is
interested, then discuss it here and we can start moving forward on
it.  If not, then that's fine too.

Tane

--~--~-~--~~~---~--~~
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 do Multi-Row Edit ?

2007-03-26 Thread digital spaghetti

Absolutly steve, get posting so we can get baking :). I haven't had to
do this yet but I know it'll be coming soon.

Tane

On 3/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Another method that was referenced in this group a while back was to
> use tags like
> ['model0']['Name']
> ['model1']['Name']
>
> Then in your controller, dynamically create a new model for each
> 'modelX' that you have and validate() it and then save() it.
> This way you also get the proper validation messages passed back from
> the model to the view fields.
>
> I created a component to automatically convert the findAll() results
> array to this format for the view, and back to the multiple models and
> did the saves automatically.
>
> All you have to do is a multiModel->get() before your view and then a
> multModel->save() call to do your saves.
>
> I also created a helper to take this model and create the form fields
> needed to make an editable grid in the view.
>
> I tried to create an article in the Bakery for it, but I could not
> submit it because of the bugs in the Bakery.
>
> I may try again - or just post it here if there is interest.
>
>
> Steve Truesdale
>
>
>
> On Mar 26, 8:57 am, "francky06l" <[EMAIL PROTECTED]> wrote:
> > You can use a "hack" to format the tags using an "indice" ... such as
> > ['model'][0]['Name'], ['model'][1]['Name] etc ...
> >
> > You can use :  'Model/'.$indice.'][fieldname' into the tag name to
> > produce the above format ..
> >
> > On Mar 26, 5:37 am, "cc96ai" <[EMAIL PROTECTED]> wrote:
> >
> > > I know how to do in PHP,
> > > but I have no idea how to work it on cakePHP
> >
> > > e.g.
> > > I have a table of products,
> > > and I will list all the products in one form , one page,
> >
> > > -Name, Desc, Qty, Price, Total
> > > -Name, Desc, Qty, Price, Total
> > > -Name, Desc, Qty, Price, Total
> > > -Name, Desc, Qty, Price, Total
> >
> > > user will input the Qty in the form, and once he submitted into
> > > server
> > > it will save into invoice database
> >
> > > BUt how can cake handle the name in Multi-Row
> > > and direction will help .
> >
> > > 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: Admin Routing Techniques

2007-03-25 Thread digital spaghetti

I had a similar quandry and came up with a simple solution - not to
use Cake's admin routing.  Instead, I've written an admin controller
that gives me a backend admin screen.  Whenever I call to a method in
another controller, I just use /path/method.

In each method, I call a session check method to see if the user has access.

Some may disagree with this method, but I feel it gives me more
control and I don't have to repeat methods with a normal and admin
version.

What I haven't done yet is a finer level of control per user group, that next.

Tane

On 3/23/07, Sonic Baker <[EMAIL PROTECTED]> wrote:
> Hi,
>
> In my current app, I've enables admin routing. There are certain actions I
> want to appear in the /admin path. Rather than repeat the logic of the
> existing actions in the admin_() actions, I thought it'd be best to just
> call these actions from the admin_() actions required.
> So, I was wondering if I would be best to simply call either requestAction()
> on the required actions, or call the action directly?
>
> e.g.
> Regular Action:
>
> function add() {
> 
> 
> // some logic
> }
>
>
> Admin Action:
>
> function admin_add() {
> $this->requestAction($this->viewPath . '/add);
> $this->render('admin_add');
> }
>
> or
>
> function add() {
> return $this->add();
> $this->render('admin_add');
> }
>
> Alternatively, has anyone come up with anything better?
> What do you think?
>
> Cheers,
>
> Sonic
>
> >
>

--~--~-~--~~~---~--~~
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: ACL problem, need help!

2007-03-21 Thread digital spaghetti

What version of Cake are you using?  ACL in 1.2 is currently not
working, as it's in development.

If it's 1.1, I know there is something in the trac about ACL, check if
your problem is related.

Tane

On 3/21/07, cc96ai <[EMAIL PROTECTED]> wrote:
>
> I just did a simple test on ACL , but i m not sure which part that I
> did wrong,
> it always points to "access denied" for me once,  (i m testing on
> single action, instead of do beforeFilter() )
>
> ARO tree
> group.all
> |-group.0
>   |-user.root
>
> I login as root user
>  function edit($id = null) {
> $this->Acl->allow('group.all', '/users'); //Make sure they have
> permission
> $this->Acl->allow('group.0', '/users');
> $this->Acl->allow('user.root', '/users');
>
> $access = $this->Acl->check($this->Session->read('User'), '/
> users');
>
> if ($access === false)
> {
> echo "access denied";
>
> }
>
> else
> {
> echo "access allowed";
>
> }
> ...
> }
>
>
> >
>

--~--~-~--~~~---~--~~
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: Navigation element

2007-03-20 Thread digital spaghetti

Ok, well in my controller, before I pass anything I print_r my
variable, and the output looks like this:

Array (
[0] => Array (
[Section] => Array (
[id] => 1 [name] => topnav )
[Menu] => Array (
[0] => Array (
[id] => 1 [name] => Home [path] => / )
[1] => Array (
[id] => 1 [name] => Home [path] => / )
 )
)
)

It does look rather skew-wiff to me.  Here is my model:

class Section extends AppModel {

var $name = 'Section';

var $hasAndBelongsToMany = array(
'Menu' => array('className' => 'Menu',
'joinTable' => 'menus_sections',
'foreignKey' => 'section_id',
'associationForeignKey' => 
'section_id',
),
);

}

So my Section model has a id and a name.  Menu model has a id, name
and path, and the join table (menus_sections) has a menu_id and
section_id.


On 3/20/07, f. <[EMAIL PROTECTED]> wrote:
>
> >foreach($menus['Section']['Menu'] as $menu) {
>
> Hi,
>
> it' hard to read code in the google layout... especially pr()
> output...;)
> looks like the array is numeric...
> try:
> foreach($menus as $menu) {
> echo $menu['Section']['id'];
> pr($menu['Menu']);
> ...
> }
>
> greets,
>
> f.
>
>
>
> Array (
> [0] => Array (
> [Section] => Array (
> [id] => 1
> [name] => topnav
> )
> [Menu] => Array (
> [0] => Array (
> [id] => 1
> [name] => Home
> [path] => /
> )
> [1] => Array (
> [id] => 2
> [name] => News
> [path] => /posts/
> )
> )
> )
> )
>
>
> >
>

--~--~-~--~~~---~--~~
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: Navigation element

2007-03-20 Thread digital spaghetti

Following the same example, I've come up with something more dynamic -
but unfortunatly I cannot seem to get it to work, can anyone help me?

First of all, I call the element:

renderElement('topmenu'); ?

Then in the element, I call my menu section manager and request all
menu's (through a hABTM association) to an array:


requestAction('sections/rendermenu/topnav');
   print_r("output: " . $menus);
   foreach($menus['Section']['Menu'] as $menu) {
print "";
if ($menu['path'] == $this->here){
   echo
$html->link($menu['name'],$menu['path'],'class="active"');
}else{
   echo $html->link($menu['name'],$menu['path']);
}
   print "";
   }
?>


The last param calls the search in the controller:

Section->findAll(array('name'=>$id));

if(isset($this->params['requested'])) {
return $menus;
}

$this->set('menus', $menus);

//print_r($menus);
}

}
?>

Now, I get an array back, but I get a foreach error:

Array ( [0] => Array ( [Section] => Array ( [id] => 1 [name] => topnav
) [Menu] => Array ( [0] => Array ( [id] => 1 [name] => Home [path] =>
/ ) [1] => Array ( [id] => 2 [name] => News [path] => /posts/ ) ) ) )

Warning (2): Invalid argument supplied for foreach()
[CORE/app/views/elements/topmenu.ctp, line 5

Anyone?

Thanks very much,
Tane



On 3/20/07, stevenoone <[EMAIL PROTECTED]> wrote:
>
> I tried this solution and whaddya know: if worked! here's my code.
> //invoke menu element
> renderElement('menu'); ?>
>
> //menu.thtml
> 
>  $controls = $this->requestAction('controls/navindex');
> foreach($controls as $control) {
> print "";
> if ($control['Control']['path'] == $this->here){
> echo 
> $html->link($control['Control']['name'],$control['Control']
> ['path'],'class="active"');
> }else{
> echo 
> $html->link($control['Control']['name'],$control['Control']
> ['path']);
> }
> print "";
> }
> ?>
> 
>
> On Mar 19, 5:19 pm, "gwoo" <[EMAIL PROTECTED]> wrote:
> > This has come up a lot lately for some reason. I guess because there
> > are not enough examples.
> >
> > Personally, I would setup and element. Lets calll it /app/views/
> > elements/menu.thtml
> > add to this:
> >
> > $controls = $this->requestAction('controls/index');
> > foreach($controls as $control) {
> > //do whatever}
> >
> > very simply this asks the controls controller to return the index
> > method so you can display the data however you want
> >
> >  > class ContolsController extends AppController {
> >
> > function index() {
> >
> > $contols = $this->Control->findAll();
> >
> > //here is where the requesAction is handled so only the data is
> > returned
> > if(isset($this->params['requested'])) {
> > return $controls;
> > }
> >
> > $this->set('controls', $controls);
> >
> > }
> > }
> >
> > ?>
>
>
> >
>

--~--~-~--~~~---~--~~
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: CakePHP Planet

2007-03-19 Thread digital spaghetti

That is good, but certinly all the "big" projects like Drupal or
Ubuntu have their own planet subdomain - which people now more
commonly expect.  Maybe pointing planet.cakephp.org to that site would
do it rather than develop another one?

Tane

On 3/19/07, djiize <[EMAIL PROTECTED]> wrote:
>
> I think that:
> http://thinkingphp.org/cakenews/
> Thanks Felix ;)
>
> On 19 mar, 10:05, "Javier Ramirez Molina" <[EMAIL PROTECTED]> wrote:
> > Hello, I don't know if this topic has been already discussed but I
> > think it could be a great idea to create a "CakePHP Planet".
> >
> > As you can read from wikipedia[1]: "A planet is a web site that
> > aggregates posts from a set of related blogs. Such sites are commonly
> > associated with free and open-source software projects, where they are
> > used to collect posts from the various developers involved in the
> > project."
> >
> > What do you think?
> >
> > [1]http://en.wikipedia.org/wiki/Planet_%28blog%29
>
>
> >
>

--~--~-~--~~~---~--~~
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: Thank You for CakePHP

2007-03-19 Thread digital spaghetti

Definetly, I've been learning with CakePHP to just try things and see
if they work (using the MVC principal) and been surprised to find that
sometimes to do, with simplicity.

I also have learned to just drive right into the code if I am looking
for something - the details are all there how to use it and the API
docs are very handy.

Plus the guys in IRC are friendly and helpful, which is great for a
community like this.

On 3/18/07, junal <[EMAIL PROTECTED]> wrote:
>
> yes! Thank you all CakePHP developers.
>
> On Mar 18, 9:34 pm, "tracyfloyd" <[EMAIL PROTECTED]> wrote:
> > Ditto.
> > The Cake team is creating some amazing software here.
> >
> > On Mar 18, 9:49 am, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
> >
> > > There's so much love put into the development of Cake, that anyone who
> > > uses it, cannot but love it! Thanks so much, Cake has been an eye-
> > > opener and is such a pleasure to work  with!
> >
> > > Gerben.
> >
> > > On 18 mrt, 04:45, "phirschybar" <[EMAIL PROTECTED]> wrote:
> >
> > > > true that.
> >
> > > > On Mar 17, 2:38 pm, "yolabingo" <[EMAIL PROTECTED]> wrote:
> >
> > > > > Ditto all 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?hl=en
-~--~~~~--~~--~--~---



Re: Problems with Auth & Security hash's, all gone weird.....

2007-03-15 Thread digital spaghetti
FOUND IT!

In typical Cake fashion - Cake does it all for you.  It appears that
in my add method, I don't need to do $this->data['User']['passwd'] =
Security::hash(CAKE_SESSION_STRING.$this->data['User']['passwd']); as
Cake automatically hashes the password for you!!!

I removed this line, checked the database and the hash
020f720ed252827bac15fdf5944d701ee8d436a1 is already in there the
passwd field, and it matches the hash generated by $this->Auth->login.

So a tip for you all - If you use the field name 'passwd', and
possibly 'password' cake will auto hash the password for you!

Tane

On 3/15/07, digital spaghetti <[EMAIL PROTECTED]> wrote:
> Felix - After I submitted a trac, i had a play about and I think your
> right.  It's now looking less like a bug in cake and more in my code,
> but I can't figure it out
>
> $this->data['User']['passwd'] =
> > Security::hash(CAKE_SESSION_STRING.$this->data['User']['passwd']); still 
> > gives a different hash to:
>
> $controller->data[$this->userModel][$this->fields['password']] =
> Security::hash(CAKE_SESSION_STRING .
> $controller->data[$this->userModel][$this->fields['password']]);
>
> I removed CAKE_SESSION_STRING from both functions, and now when I try
> log in, the Auth component is giving the correct sha1, my function is
> not.  Not sure why, must be a whitespace getting in there somehow.
>
> Here is my full function:
>
> function add()
> {
> if (!empty($this->data))
> {
> if ( 
> !$this->User->findByUsername($this->data['User']['username']) )
> {
> // Taken out as affecting add with hashing
> if ( /*$this->data['User']['passwd_conf'] ==*/
> $this->data['User']['passwd'])
> {
> if ( 
> $this->data['User']['email_conf'] == $this->data['User']['email'])
> {
> $this->data['User']['passwd'] 
> =
> Security::hash(CAKE_SESSION_STRING . $this->data['User']['passwd']);
>
> if 
> ($this->User->save($this->data))
> {
> 
> $this->Session->setFlash('Your registation has been successful.');
> 
> $this->redirect('/users/login');
> }
> } else {
> 
> $this->Session->setFlash('Emails do not match.');
> }
> } else {
> $this->Session->setFlash('Passwords 
> do not match.');
> }
> } else {
> $this->Session->setFlash('User already 
> exists.');
>     }
> }
> }
>
> Tane
>
> On 3/15/07, Felix Geisend�rfer <[EMAIL PROTECTED]> wrote:
> >
> >  I believe the problems are related to a change to the AuthComponent that
> > was made a while ago. You basically have to prepend the CAKE_SESSION_STRING
> > to your pw to allow for bigger randomization:
> >
> >  Try this:
> >  $this->data['User']['passwd'] =
> > Security::hash(CAKE_SESSION_STRING.$this->data['User']['passwd']);
> >
> >  -- Felix Geisend�rfer aka the_undefined
> >
> > --
> >  http://www.thinkingphp.org
> >  http://www.fg-webdesign.de
> >
> >
> >  Digital Spaghetti wrote:
> >  I've submitted a trac for this here:
> > https://trac.cakephp.org/ticket/2252
> > as a possible bug.
> >
> > Tane
> >
> > On Mar 15, 4:21 pm, "digital spaghetti"
> > <[EMAIL PROTECTED]> wrote:
> >
> >
> >  Hey folks,
> >
> > My saga continues with trying to get Auth working in my Cake 1.2
> > application. Either I am doing something silly now, or there is a
&

Re: Problems with Auth & Security hash's, all gone weird.....

2007-03-15 Thread digital spaghetti
Felix - After I submitted a trac, i had a play about and I think your
right.  It's now looking less like a bug in cake and more in my code,
but I can't figure it out

$this->data['User']['passwd'] =
> Security::hash(CAKE_SESSION_STRING.$this->data['User']['passwd']); still 
> gives a different hash to:

$controller->data[$this->userModel][$this->fields['password']] =
Security::hash(CAKE_SESSION_STRING .
$controller->data[$this->userModel][$this->fields['password']]);

I removed CAKE_SESSION_STRING from both functions, and now when I try
log in, the Auth component is giving the correct sha1, my function is
not.  Not sure why, must be a whitespace getting in there somehow.

Here is my full function:

function add()
{   
if (!empty($this->data))
{
if ( 
!$this->User->findByUsername($this->data['User']['username']) )
{
// Taken out as affecting add with hashing
if ( /*$this->data['User']['passwd_conf'] ==*/
$this->data['User']['passwd'])
{
if ( $this->data['User']['email_conf'] 
== $this->data['User']['email'])
{
$this->data['User']['passwd'] =
Security::hash(CAKE_SESSION_STRING . $this->data['User']['passwd']);

if 
($this->User->save($this->data))
{

$this->Session->setFlash('Your registation has been successful.');

$this->redirect('/users/login');
}
} else {

$this->Session->setFlash('Emails do not match.');
}
} else {
$this->Session->setFlash('Passwords do 
not match.');
}
} else {
$this->Session->setFlash('User already 
exists.');
}
}
}

Tane

On 3/15/07, Felix Geisend�rfer <[EMAIL PROTECTED]> wrote:
>
>  I believe the problems are related to a change to the AuthComponent that
> was made a while ago. You basically have to prepend the CAKE_SESSION_STRING
> to your pw to allow for bigger randomization:
>
>  Try this:
>  $this->data['User']['passwd'] =
> Security::hash(CAKE_SESSION_STRING.$this->data['User']['passwd']);
>
>  -- Felix Geisend�rfer aka the_undefined
>
> --
>  http://www.thinkingphp.org
>  http://www.fg-webdesign.de
>
>
>  Digital Spaghetti wrote:
>  I've submitted a trac for this here:
> https://trac.cakephp.org/ticket/2252
> as a possible bug.
>
> Tane
>
> On Mar 15, 4:21 pm, "digital spaghetti"
> <[EMAIL PROTECTED]> wrote:
>
>
>  Hey folks,
>
> My saga continues with trying to get Auth working in my Cake 1.2
> application. Either I am doing something silly now, or there is a
> bug.
>
> First of all, I am using the default hash set in Security (which from
> what I can see is sha1). Now, in my user add function I hash the
> password like this:
>
> $this->data['User']['passwd'] =
> Security::hash($this->data['User']['passwd']);
>
> This is done just before my $this->User->save, and using the password
> 'test' the hash of ef10104117f96aaa0cae48595b299fa798506d86
> is
> generated and saved in the database
>
> Now, when I try to log in I have $this->Auth->login() in my login
> function, i use the password 'test' and in the debug below in the SQL,
> the passwd hash is
> 020f720ed252827bac15fdf5944d701ee8d436a1, also the
> login form is returned with an empty username field, and passwd filled
> with the hash (in password * form).
>
> I've taken both these keys, and run them through this hash
> checked:http://www.securitystats.com/tools/hashcrack.php
> but both say SHA1
> Hash Not Found.
>
> Just as an extra test, in phpmyadmin I put the password 'test' in and
> used MySQL's sha1 function - it gave me this:
> a94a8fe5ccb19ba61c4c0873d391e987982fbbd3. Another
> completely
> different hash.
>
> This is driving me mad, please someone help
>
> Tane
>
>
>
>
>
>
>  >
>

--~--~-~--~~~---~--~~
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: Problems with Auth & Security hash's, all gone weird.....

2007-03-15 Thread Digital Spaghetti

I've submitted a trac for this here:  https://trac.cakephp.org/ticket/2252
as a possible bug.

Tane

On Mar 15, 4:21 pm, "digital spaghetti"
<[EMAIL PROTECTED]> wrote:
> Hey folks,
>
> My saga continues with trying to get Auth working in my Cake 1.2
> application.  Either I am doing something silly now, or there is a
> bug.
>
> First of all, I am using the default hash set in Security (which from
> what I can see is sha1).  Now, in my user add function I hash the
> password like this:
>
> $this->data['User']['passwd'] = Security::hash($this->data['User']['passwd']);
>
> This is done just before my $this->User->save, and using the password
> 'test' the hash of ef10104117f96aaa0cae48595b299fa798506d86 is
> generated and saved in the database
>
> Now, when I try to log in I have $this->Auth->login() in my login
> function, i use the password 'test' and in the debug below in the SQL,
> the passwd hash is 020f720ed252827bac15fdf5944d701ee8d436a1, also the
> login form is returned with an empty username field, and passwd filled
> with the hash (in password * form).
>
> I've taken both these keys, and run them through this hash 
> checked:http://www.securitystats.com/tools/hashcrack.php but both say SHA1
> Hash Not Found.
>
> Just as an extra test, in phpmyadmin I put the password 'test' in and
> used MySQL's sha1 function - it gave me this:
> a94a8fe5ccb19ba61c4c0873d391e987982fbbd3.  Another completely
> different hash.
>
> This is driving me mad, please someone help
>
> Tane


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



Problems with Auth & Security hash's, all gone weird.....

2007-03-15 Thread digital spaghetti

Hey folks,

My saga continues with trying to get Auth working in my Cake 1.2
application.  Either I am doing something silly now, or there is a
bug.

First of all, I am using the default hash set in Security (which from
what I can see is sha1).  Now, in my user add function I hash the
password like this:

$this->data['User']['passwd'] = Security::hash($this->data['User']['passwd']);

This is done just before my $this->User->save, and using the password
'test' the hash of ef10104117f96aaa0cae48595b299fa798506d86 is
generated and saved in the database

Now, when I try to log in I have $this->Auth->login() in my login
function, i use the password 'test' and in the debug below in the SQL,
the passwd hash is 020f720ed252827bac15fdf5944d701ee8d436a1, also the
login form is returned with an empty username field, and passwd filled
with the hash (in password * form).

I've taken both these keys, and run them through this hash checked:
http://www.securitystats.com/tools/hashcrack.php  but both say SHA1
Hash Not Found.

Just as an extra test, in phpmyadmin I put the password 'test' in and
used MySQL's sha1 function - it gave me this:
a94a8fe5ccb19ba61c4c0873d391e987982fbbd3.  Another completely
different hash.

This is driving me mad, please someone help

Tane

--~--~-~--~~~---~--~~
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 Auth component asking for login on every page :(

2007-03-15 Thread digital spaghetti

Hi Nate,

Ok - I discovered what I was doing.  I was setting
$this->Auth->fields['password'] = 'passwd'; in my app_controller.  I
needed to define it in my users_controller.

Now that's working I'm still getting the MD5 problem - Auth seems to
be using plain text passwords, as it doesn't recognise the password.

Tane

On 3/14/07, nate <[EMAIL PROTECTED]> wrote:
>
> It's cool y'all, just chill for a bit.  Help is on the way... yeah
> baby, help is on the way.
>
> digital spaghetti:
> If you $this->Auth->fields = array('password' => 'passwd'), that
> leaves it without a user name.  You need to either do:
>
> $this->Auth->fields['password'] = 'passwd';
> - or -
> $this->Auth->fields = array('username' => 'username', 'password' =>
> 'passwd');
>
> On Mar 14, 3:06 pm, "digital spaghetti"
> <[EMAIL PROTECTED]> wrote:
> > Yea, unfortunatly I got that today as well (a piss off)
> >
> > I managed to get it implemented, but still hit a few snags:
> >
> > Defining $this->Auth->fields = array('password' = 'passwd'); doesn't
> > seem to work.
> >
> > Just for testing, I changed the var directly in the component and it
> > worked, but it seems at the moment $this->Auth->login() only supports
> > plain text password.  I'm going to assume that support for which has
> > to use (I.e md5, sha1,etc) will come later.
> >
> > Also, another problem for me seems to be all the auth components out
> > there seem to be the username/password route - but I'm implementing
> > cakebakers OpenID component in my site, and authorisation takes place
> > off-site through the OpenID provider, who then passes back a message
> > to say "this user is valid".  Although I create a user record for
> > this, the user has no need for a password on my site.
> >
> > If anyone has any ideas on how to implement this, that would be great!
> >
> > Tane
> >
> > On 3/14/07, BlenderStyle <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > I got the new AuthComponent going by doing this in UsersController:
> >
> > > function beforeFilter() {
> > > $this->Auth->allow('index', 'register', 'login', 'logout');
> > > }
> >
> > > I'm reading cake/libs/controller/components/auth.php as I go along. My
> > > next step is to figure out how to use $this->Auth->login(). I'm sure I
> > > can figure it out, but I'm always concerned about best practices. Any
> > > ideas? I understand that Cake 1.2 is still an alpha release, but the
> > > new features are just awesome sounding. If I get a, "piss off and
> > > wait" response from one of the developers, I'll understand and still
> > > be happy with Cake 1.2.
> >
> > > On Feb 28, 2:54 pm, "joradom" <[EMAIL PROTECTED]> wrote:
> > > > you have to set up the Auth object with the allowed actions in your
> > > > controller:
> >
> > > > i.e. in my users_controller
> >
> > > > function beforeFilter() {
> > > >     $this->Auth->userModel = 'User';
> > > > $this->Auth->sessionKey = 'My';
> > > > $this->Auth->loginRedirect = '/users/index';
> > > > $this->Auth->allowedActions = array('index', 'register',
> > > > 'logout','login');
> > > > }
> >
> > > > there is a set function wich takes an array as argument, surely a
> > > > better way to setup your object.
> >
> > > > I'm not sure if it is better to have a call to Auth in each controller
> > > > or put it in the app_controller, may depend on your application i
> > > > guess.
> >
> > > > Hope this helps, because I'm struggling too with this component and
> > > > these are just experiments, not good code :)
> >
> > > > On 27 feb, 17:08, "Digital Spaghetti"
> >
> > > > <[EMAIL PROTECTED]> wrote:
> > > > > Hey guys,
> >
> > > > > I'm reasonably new to CakePHP, really only had a play about with it so
> > > > > far but I am ready to take it to the next level.
> >
> > > > > The first thing I am building i

Re: Things I need help on

2007-03-14 Thread digital spaghetti

I've just added a helper to the bakery for a country drop down list.
You could easily create your own method using the same code to also do
one for states.

Or if you want to have the list in your db, go with the generateList option.

Tane

On 3/13/07, rtconner <[EMAIL PROTECTED]> wrote:
>
> Hello, I have been using Cake for a week now. I have learned a lot,
> but still have a long way to go. I have a few questions still. Mostly
> I am trying to learn "the cake way" to do things so that I am flowing
> with the framework and not fighting against it.
>
> 1. I have a few global functions I use in some sites I make. Basically
> extending the PHP library (in concept). I would not think it is a wise
> thing to add to basics.php. Instead I am hoping there is some way to
> add to this within the application folder. Is this possible at all?
>
> 2. What is the best way to handle state and country dropdowns. I did
> find GeographyHelper. Is this how everyone does it? I would ideally
> want to create these dropdowns from a list in my database.
>
> 2a. Is there a way to cache data selected from my database, such as a
> list of State, which I know will never be changing (or at least it is
> a rare occurance).
>
> 3. (FormHelper) I have been using Cake 1.2 and FormHelper. I find
> myself doing things like this all of the time--
>foreach($clients as $client) $c[$client['Client']['id']] =
> $client['Client']['name'];
>   echo $form->select('client_select', $c);
> ?>
> Is there a way to avoid that step of creating that array? Maybe just
> pass a Model and a the strings 'id' and 'name' to FormHelper. What
> would be the standard way to handle this?
>
> Thank you,
> Rob
>
>
> >
>

--~--~-~--~~~---~--~~
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 Auth component asking for login on every page :(

2007-03-14 Thread digital spaghetti

Yea, unfortunatly I got that today as well (a piss off)

I managed to get it implemented, but still hit a few snags:

Defining $this->Auth->fields = array('password' = 'passwd'); doesn't
seem to work.

Just for testing, I changed the var directly in the component and it
worked, but it seems at the moment $this->Auth->login() only supports
plain text password.  I'm going to assume that support for which has
to use (I.e md5, sha1,etc) will come later.

Also, another problem for me seems to be all the auth components out
there seem to be the username/password route - but I'm implementing
cakebakers OpenID component in my site, and authorisation takes place
off-site through the OpenID provider, who then passes back a message
to say "this user is valid".  Although I create a user record for
this, the user has no need for a password on my site.

If anyone has any ideas on how to implement this, that would be great!

Tane

On 3/14/07, BlenderStyle <[EMAIL PROTECTED]> wrote:
>
> I got the new AuthComponent going by doing this in UsersController:
>
> function beforeFilter() {
> $this->Auth->allow('index', 'register', 'login', 'logout');
> }
>
> I'm reading cake/libs/controller/components/auth.php as I go along. My
> next step is to figure out how to use $this->Auth->login(). I'm sure I
> can figure it out, but I'm always concerned about best practices. Any
> ideas? I understand that Cake 1.2 is still an alpha release, but the
> new features are just awesome sounding. If I get a, "piss off and
> wait" response from one of the developers, I'll understand and still
> be happy with Cake 1.2.
>
> On Feb 28, 2:54 pm, "joradom" <[EMAIL PROTECTED]> wrote:
> > you have to set up the Auth object with the allowed actions in your
> > controller:
> >
> > i.e. in my users_controller
> >
> > function beforeFilter() {
> > $this->Auth->userModel = 'User';
> > $this->Auth->sessionKey = 'My';
> > $this->Auth->loginRedirect = '/users/index';
> > $this->Auth->allowedActions = array('index', 'register',
> > 'logout','login');
> > }
> >
> > there is a set function wich takes an array as argument, surely a
> > better way to setup your object.
> >
> > I'm not sure if it is better to have a call to Auth in each controller
> > or put it in the app_controller, may depend on your application i
> > guess.
> >
> > Hope this helps, because I'm struggling too with this component and
> > these are just experiments, not good code :)
> >
> > On 27 feb, 17:08, "Digital Spaghetti"
> >
> > <[EMAIL PROTECTED]> wrote:
> > > Hey guys,
> >
> > > I'm reasonably new to CakePHP, really only had a play about with it so
> > > far but I am ready to take it to the next level.
> >
> > > The first thing I am building into my app is the user system, so users
> > > can log in and get access to specific areas.  I've decided to go with
> > > 1.2.x.x branch since it has the newAuth componentbut I've come
> > > across problems already.
> >
> > > In my AppController class, I have added theAuth component, but now
> > > every page I look at, it's asking me to log in as a user (via /users/
> > > login as the default in Auth), but of course I don't want this on
> > > every page, only pages that are under admin.
> >
> > > Can anyone direct me the proper usage of this component, as it's not
> > > well documented yet (at least to a level I can read) and how to only
> > > have it ask for login on certain controller functions (like /admin/
> > > posts/add for example).
> >
> > > Tane
>
>
> >
>

--~--~-~--~~~---~--~~
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: Render view in new window?

2007-03-14 Thread digital spaghetti

You could also use some AJAX!

You could implement a javascript library like thickbox for jQuery, and
using the Request
Handler component, when you click on a link you can send the view to
the thickbox.

You need to check out the thickbox documentation on how to implement
it - or if you prefer Prototype, I'm sure there is something similar
(then you can use the Ajax helper).

Tane

On 3/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> Does anyone know how I would render a view in a new window?
>
> 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: jQuery question!

2007-03-13 Thread digital spaghetti

For graceful degradation, you should really do:



Then in your javascript, at the end do return false;  That way, if the
user does not have JavaScript, they can still access the page!

Tane


On 3/13/07, Kjell Bublitz <[EMAIL PROTECTED]> wrote:
>
> Whoops.. of course it should read:
> Guestbook
>
> On 3/13/07, Kjell Bublitz <[EMAIL PROTECTED]> wrote:
> > From my perspective, the whole Ajax Helper (may it be for Prototype or
> > jQuery) is not an option for an application that seeks a serious
> > implementation. I know that this helper aims at people who don't know
> > javascript, but such people should ask themselves why they try to use
> > something they do not understand. On the other hand.. if they do know
> > javascript and even better the libraries behind this helper, they
> > would rather choose to make up their own external js-file and start
> > from the scratch in a way that is unobstrusive. I think the whole idea
> > or functionality of this helper needs to be reconsidered. The attempt
> > to control an entire library and in fact the complete javascript via
> > array-keys is madness. But that's another story.
> >
> > Going from this point you should not ask yourself how you can
> > implement jQuery using a helper. You should ask yourself how to get
> > your scriptfile into your view and how to tell jQuery to interact with
> > your interface. If the helper does not work for you, leave it alone
> > and go for a jQuery tutorial. It is not that hard.
> >
> > Guestbook
> >
> > Then in some Javascript File:
> >
> > $(function() {
> >$('#guestbook').click(function() {
> >   $('#spinning_image').ajaxStart(function() {
> >  $(this).show();
> >  $('#content').hide();
> >}).ajaxStop(function() {
> >  $(this).hide();
> >  $('#content').hide();
> >});
> >$('#content').load('/ajaxpages/guestbook/');
> >   }
> > });
> >
> > This code is untested, but should do the trick. I must add that i am
> > not a jQuery guy. I abondend it for some reasons that relate to their
> > Ajax implementation. I myself love prototype and it's readability.
> >
> > My lead is to avoid those crazy javascript helpers. You are better off
> > by learning the basics of each library, add their functions the way it
> > is ment to be and then choose the one that works best for you. It is
> > fun and worth it. I would not choose a javascript library based on
> > helpers that are available
> >
> > I hope this helps.
> >
> > On 3/13/07, Sam Sherlock <[EMAIL PROTECTED]> wrote:
> > > I have amended the todo list to use jquery instead of prototype
> > >
> > > http://grahambird.co.uk/cake/tutorials/ajax.php
> > >
> > > as  abba bryant mentions I just took out the onclicks etc and wrote 
> > > jquery routines to unobtrusively  bind the events to the elements.  Was 
> > > really simple  too!
> > >
> > > I plan on extending it a little soon.
> > >
> > > - S
> > >
> > >
> > >
> > > On 12/03/07,  [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > > 2. When will CakePHP have a jQuery helper?
> > > >  yeh its good sugestion !
> > > >
> > > >
> > > >
> > >
> > >
> > >  > >
> > >
> >
> >
> >
> > --
> > Regards, Kjell
> > www.m3nt0r.de
> >
>
>
> --
> 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: User Authentication

2007-02-28 Thread Digital Spaghetti

In Cake 1.2.x.x there is a new Auth component, however it may still be 
buggy and I've had issues with it already, but keep an eye on it as it 
should integrate with ACL (or so I have been told).



-- 
Tane Piper
Personal: http://digitalspaghetti.me.uk
Work: http://nohalfmeasures.com

This email is: [ ] blogable [ x ] ask first [ ] private



xhenxhe wrote:
> I'm completely new to this so please excuse my ignorance. I want to
> create a new site and start with user accounts, authentication, login
> form, logout, etc - all that you would expect from a user class. I
> would assume there are so many sites that have this that there is some
> sort of package I could plug in and work from there rather than
> reinventing the wheel for every site that requires authentication.
> Does this exist, or are there any good tutorials that can get me up
> and running?
>
> Thanks,
> Dustin
>
>
> >
>
>   


--~--~-~--~~~---~--~~
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: Integrating phpGACL with CakePHP

2007-02-28 Thread Digital Spaghetti

Hi Mariano,

Absolutly - I've been looking for an ACL solution similar to this.  I've 
had issues with CakePHP's own ACL system, and feel I do need more levels 
of control.  Please keep me informed on your work and I'd be happy to do 
some testing.

-- 
Tane Piper
Personal: http://digitalspaghetti.me.uk
Work: http://nohalfmeasures.com

This email is: [ ] blogable [ x ] ask first [ ] private



Mariano Iglesias wrote:
> My fellow bakers,
>
> As I found myself in the need of having a highly customizable ACL system for
> a CakePHP application I'm developing, I'm going ahead with something some
> people asked in the past if it could be available.
>
> The issues with this application that prevented me from using CakePHP's
> builtin ACL, which is very strong BTW, were among others:
>
> 1. I needed a fine grained set of permissions.
> 2. I needed AROs to belong to more than one group.
> 3. I needed collision handling.
>
> So I'm now working on a component that provides a wrapper for phpGACL (using
> its latest version, 3.3.7), so that it hides the inner complexities of
> phpGACL from CakePHP applications.
>
> I'm setting it up to use the 3D layer system (AROs, ACOs, and AXOs) to allow
> greater flexibility (so I can do stuff like: this action can be accessed via
> Web, but can't be accessed via RSS for this particular user, interesting
> when using CakePHP 1.2 automatic content type management)
>
> I'm expecting to finish the component tomorrow. The component, as I said,
> will be a programmatic wrapper. I'm also planning to build a plugin that'll
> offer the manipulation of these permissions, but have yet not established
> when I'll start with that.
>
> Anyway, I've just wanted to drop a note if anyone was looking for the same.
>
> -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
>
>
> >
>
>   



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



New Auth component asking for login on every page :(

2007-02-27 Thread Digital Spaghetti

Hey guys,

I'm reasonably new to CakePHP, really only had a play about with it so
far but I am ready to take it to the next level.

The first thing I am building into my app is the user system, so users
can log in and get access to specific areas.  I've decided to go with
1.2.x.x branch since it has the new Auth component but I've come
across problems already.

In my AppController class, I have added the Auth component, but now
every page I look at, it's asking me to log in as a user (via /users/
login as the default in Auth), but of course I don't want this on
every page, only pages that are under admin.

Can anyone direct me the proper usage of this component, as it's not
well documented yet (at least to a level I can read) and how to only
have it ask for login on certain controller functions (like /admin/
posts/add for example).

Tane


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