phpgacl for CakePHP problem in Cake 1.2

2007-07-01 Thread Jonathon Davis

Hey,

I'm using Cake 1.2 with phpgacl for CakePHP 1.0.2b and I've been
having a problem adding permissions. I have fixed a lot of the 1.1 to
1.2 conversion errors, but it's obviously not liking something in
either the plugin or the vendor lib itself and is failing to update
the database, so it throws a flash error.

Has anyone successfully gotten phpgacl for CakePHP to work for Cake
1.2?

Is there another plugin that you would recommend for ACL that would
give me an actual user interface to assign permissions to groups and
users with? Every ACL tutorial I've read has only repeated the same
things, in a way that I still don't understand much of it. I know it
sounds rash, but I don't have the time to commit to trying to
understand ACL the old fashioned way and writing a lib to control it
for me.

If you think you can help me on either fronts, please let me know. I
can send you whatever files you need.


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



Re: Paginate and action parameters in 1.2.x.x

2007-02-01 Thread Jonathon Davis

Yes it did thanks for your help

On Feb 1, 6:57 pm, "dkarlson" <[EMAIL PROTECTED]> wrote:
> Did that solve your problem, Jonathon?
>
> D
>
> On Feb 1, 5:02 pm, "Jonathon Davis" <[EMAIL PROTECTED]> wrote:
>
> > Ok thanks guys
>
> > On Feb 1, 3:36 pm, "dkarlson" <[EMAIL PROTECTED]> wrote:
>
> > > Nate, I remember you saying that in an earlier post. I even changed my
> > > code to reflect it, but failed to do so here.
>
> > > Is that what you mean?
>
> > > $paginator->prev('Previous', array('url' => array($config['Config']
> > > ['id'])), null, array('class' => 'disabled'));
>
> > > D
> > > On Feb 1, 2:23 pm, "nate" <[EMAIL PROTECTED]> wrote:
>
> > > > K, here's a hint:  if you're going to pass URL parameters to
> > > > Paginator, do it as an array.
>
> > > > On Feb 1, 3:03 pm, "dkarlson" <[EMAIL PROTECTED]> wrote:
>
> > > > > OK -- I don't know if this is going to help or not, but I'll give it a
> > > > > shot.
>
> > > > > I needed an id passed with each pagination link, and this is how I did
> > > > > it.
>
> > > > > prev('Previous', array('url' =>
> > > > > $config['Config']['id']), null, array('class' => 'disabled')); ?>
>
> > > > > So I get URLs like this:http://localhost/site/projects/add/
> > > > > e28b591a-7858-bca4-1d27-839b9370b31a/page:3
>
> > > > > my function add($id = null) can now parse the id no matter what page
> > > > > I'm on.
>
> > > > > You can see between the "add" and the "page:3", I have an id.
> > > > > On Feb 1, 1:11 pm, "Jonathon Davis" <[EMAIL PROTECTED]> wrote:> Help?


--~--~-~--~~~---~--~~
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: Paginate and action parameters in 1.2.x.x

2007-02-01 Thread Jonathon Davis

Ok thanks guys

On Feb 1, 3:36 pm, "dkarlson" <[EMAIL PROTECTED]> wrote:
> Nate, I remember you saying that in an earlier post. I even changed my
> code to reflect it, but failed to do so here.
>
> Is that what you mean?
>
> $paginator->prev('Previous', array('url' => array($config['Config']
> ['id'])), null, array('class' => 'disabled'));
>
> D
> On Feb 1, 2:23 pm, "nate" <[EMAIL PROTECTED]> wrote:
>
> > K, here's a hint:  if you're going to pass URL parameters to
> > Paginator, do it as an array.
>
> > On Feb 1, 3:03 pm, "dkarlson" <[EMAIL PROTECTED]> wrote:
>
> > > OK -- I don't know if this is going to help or not, but I'll give it a
> > > shot.
>
> > > I needed an id passed with each pagination link, and this is how I did
> > > it.
>
> > > prev('Previous', array('url' =>
> > > $config['Config']['id']), null, array('class' => 'disabled')); ?>
>
> > > So I get URLs like this:http://localhost/site/projects/add/
> > > e28b591a-7858-bca4-1d27-839b9370b31a/page:3
>
> > > my function add($id = null) can now parse the id no matter what page
> > > I'm on.
>
> > > You can see between the "add" and the "page:3", I have an id.
> > > On Feb 1, 1:11 pm, "Jonathon Davis" <[EMAIL PROTECTED]> wrote:> Help?


--~--~-~--~~~---~--~~
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: Paginate and action parameters in 1.2.x.x

2007-02-01 Thread Jonathon Davis

Help?


--~--~-~--~~~---~--~~
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: Paginate and action parameters in 1.2.x.x

2007-01-30 Thread Jonathon Davis

Ok. Here's my graphics_controller.php section for the category action:

function category($cat = null) {
$this->Graphic->recursive = 1;
$this->GraphicCategory->recursive = 0;
if($cat)
{
// Gets the GraphicCategory ID based on the name passed 
through the 
URL
$this->Graphic->catId = $this->GraphicCategory-
>findAll(array('name' => $cat));
// Sets it in a nice little variable, $catId
$this->Graphic->catId = 
$this->Graphic->catId[0]['GraphicCategory']
['id'];
// Paginate starts here
$data = $this->paginate(array('graphic_categories_id' 
=> $this-
>Graphic->catId));
$this->set('graphics', $data);
}
else
{
// If $cat is not passed thru the URL, 
redirect to graphics index.
$this->redirect('/graphics/');
}

}


and here's the code I'm using in my view to generate the links:

prev('<< Previous', null, null, 
array('class' => 'disabled')); ?> |
 Page counter(); ?> |
next('Next >>', null, null, array('class' => 
'disabled')); ?>

Thanks

On Jan 30, 4:37 pm, "nate" <[EMAIL PROTECTED]> wrote:
> Can you paste the code you're using to generate the link?  If you just
> pass it in the URL parameters, it should get picked up.  However, if
> you need it to appear in a certain place in the URL, you have to set
> up a route for it.
>
> Seehttp://cake.insertdesignhere.com/posts/view/10
>
> On Jan 30, 4:58 pm, "Jonathon Davis" <[EMAIL PROTECTED]> wrote:
>
> > Does anyone know how to make sure it gets the parameter? I'm at the
> > end of my rope now and the deadline for this project is quickly
> > approaching.


--~--~-~--~~~---~--~~
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: Paginate and action parameters in 1.2.x.x

2007-01-30 Thread Jonathon Davis

Does anyone know how to make sure it gets the parameter? I'm at the 
end of my rope now and the deadline for this project is quickly 
approaching.


--~--~-~--~~~---~--~~
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: Paginate and action parameters in 1.2.x.x

2007-01-29 Thread Jonathon Davis

The pagination helper isn't parsing the category name into the Next 
and Previous links.

On Jan 29, 3:46 pm, "dkarlson" <[EMAIL PROTECTED]> wrote:
> So is the pagination helper not displaying the URLs correctly, or not
> parsing the category name?
>
> On Jan 29, 1:56 pm, "Jonathon Davis" <[EMAIL PROTECTED]> wrote:
>
> > Yes, it's me with another paginate question. I just upgraded to the
> > latest nightly and it didn't seem to fix it.
>
> > I know there is probably a way to do this, and it's probably obvious
> > too, but I just don't know how.  I have paginate working inside an
> > action that needs to receive a parameter from the URL.  /graphics/
> > category/(categoryname) but when pagination does its magic in the
> > Category action and view, it omits the (categoryname) part of the url.
> > In other words, it's giving a url similar to the following: /graphics/
> > category/page:2 instead of /graphics/category/(categoryname)/page:2
>
> > Thanks in advance!


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



Paginate and action parameters in 1.2.x.x

2007-01-29 Thread Jonathon Davis

Yes, it's me with another paginate question. I just upgraded to the 
latest nightly and it didn't seem to fix it.

I know there is probably a way to do this, and it's probably obvious 
too, but I just don't know how.  I have paginate working inside an 
action that needs to receive a parameter from the URL.  /graphics/
category/(categoryname) but when pagination does its magic in the 
Category action and view, it omits the (categoryname) part of the url. 
In other words, it's giving a url similar to the following: /graphics/
category/page:2 instead of /graphics/category/(categoryname)/page:2

Thanks in advance!


--~--~-~--~~~---~--~~
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: Style switcher / font resizer

2007-01-25 Thread Jonathon Davis

You should be able to do this with just prototype.js unless you want it
to have an effect on it while it is resizing the font.

http://www.prototypejs.org/api/element/methods/

getStyle and setStyle are the ones you should concern yourself with.


$('element').setStyle({
'font-size': getStyle('font-size') + 4
});


Or something to that effect.


--~--~-~--~~~---~--~~
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: Paginate() question for 1.2.x.x

2007-01-25 Thread Jonathon Davis

Sweet. Thanks for explaining that for me. I don't know what I would do
without the Cake Google Group. The API and documentation don't give all
the information you would need.

Thanks nate

On Jan 25, 3:40 pm, "nate" <[EMAIL PROTECTED]> wrote:
> // First way:
>
> var $paginate = array('conditions' => array('active' => 1));
>
> // Second way:
> $data = $this->paginate(array('active' => 1));
>
> On Jan 25, 3:02 pm, "Jonathon Davis" <[EMAIL PROTECTED]> wrote:
>
> > I have a question about paginate()... Is there any way to add
> > conditions to fetching and displaying results? Let's say I had a posts
> > MVC and I wanted to paginate only posts that have a certain category
> > assigned to them.  How would I do this?  Can I achieve this with the
> > built-in function or would I have to create my own pagination for this?
> 
> > 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
-~--~~~~--~~--~--~---



Paginate() question for 1.2.x.x

2007-01-25 Thread Jonathon Davis

I have a question about paginate()... Is there any way to add
conditions to fetching and displaying results? Let's say I had a posts
MVC and I wanted to paginate only posts that have a certain category
assigned to them.  How would I do this?  Can I achieve this with the
built-in function or would I have to create my own pagination for this?

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: paginate() problem in 1.2.0.4206

2007-01-23 Thread Jonathon Davis

Gotcha thanks.

I have a question about pagination though. Is there a way to filter
paginated results? For example, if I only wanted to fetch and paginate
a certain category of posts, can I do that with the built-in function
or will I have to rely on the findAll function?


--~--~-~--~~~---~--~~
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: paginate() problem in 1.2.0.4206

2007-01-23 Thread Jonathon Davis

Problem resolved. Although I wanted to be sure that I was using the
most stable development release out there, I decided to try the nightly
build and it fixed the issue. Upgraded from version 1.2.0.4206 to
1.2.x.x_22.01.2007


--~--~-~--~~~---~--~~
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: paginate() problem in 1.2.0.4206

2007-01-23 Thread Jonathon Davis

Yea... I read that it gets called automatically. I only put it in after
it started giving me problems. It still gives me a URL with something
like page:2page:2 at the end, which is forcing it to the first page of
the results every time. The blog post didn't help much. I'm trying to
get it working sans Ajax before I start making it more complicated.

Has anyone else experienced this problem? What may be causing this?
What am I doing wrong? I'm (supposedly) doing it the way that the Cake
API says it should be done. Help!


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



paginate() problem in 1.2.0.4206

2007-01-23 Thread Jonathon Davis

I am having problems getting pagination working correctly for me in
1.2.0.4206

I have $helpers = array('Paginator') in my controller.

I set the value for the view with $this->set('graphics',
$this->paginate());

In the view I have this to display the Prev and Next controls for the
user: prev().' '.$this->next(); ?>

It correctly displays the default page, and page 2 when the Next link
is clicked, but after you've clicked one link, the Next and Prev links
are messed up. They show up like this:
http://localhost/cake/admin/graphics/index/page:3page:3 which is
obviously not correct, and it always just shows the 1st page if a link
like that (with the page in there twice). Any way to fix this? Should I
grab a nightly build to see if it's fixed there? or what?


--~--~-~--~~~---~--~~
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: Pages Controller problem

2007-01-21 Thread Jonathon Davis

So No one has an answer to this?


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



Re: Unoffical API / Beta RFC [new]

2007-01-19 Thread Jonathon Davis

Looks like a great work in progress. I would definitely go there as a
resource to find out how to unleash more power of CakePHP.

I can see a few places where you might be able to Web 2.0 it up a
little bit with Sciptaculous or Mootools ( I prefer Scripta because of
the ample documentation. I won't even comment on Moo. )


--~--~-~--~~~---~--~~
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: Pages Controller problem

2007-01-18 Thread Jonathon Davis


Well, if that was the case, then it should have recognized $uses =
array('Setting', 'Link') in my app_controller.php file even before I
started modifying other things.


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



Re: Pages Controller problem

2007-01-18 Thread Jonathon Davis


I have some insight. I realized this when I created another item in my
website... I think it may have to do with the Pages Controller not
having its own model. Anyone following me on this? I tried to create a
controller/view without a model (because I really don't need one in
this case) and it gave me the same error as the Pages Controller does.
I commented out the stuff for the settings and it displayed the Cake
warning of having no model. I created a model for it, uncommented the
stuff for the settings, and bada-bing. No error message.

Any way to combat this?


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



Re: Pages Controller problem

2007-01-18 Thread Jonathon Davis


Well, I'm not sure what file the problem is in, so I zipped up the only
files it could really be a problem with and uploaded it on to this
group's files page.

http://groups-beta.google.com/group/cake-php/web/pages_controller_problem.zip

If someone could open it up and tell me what you think the problem is,
I would greatly appreciate it. Don't worry, I cut out everything except
for a few files. Zip file is under 100k I believe.

And yes, I've used bake for almost every model/view/controller that I
have, but the Pages Controller is a built-in controller, not one that I
created.


--~--~-~--~~~---~--~~
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: Pages Controller problem

2007-01-17 Thread Jonathon Davis


One other note, I am running version 1.1.10.3825. I wouldn't mind
upgrading as long as nothing changes in my app file structure/naming.


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



Pages Controller problem

2007-01-17 Thread Jonathon Davis


I have a model/view/controller for site-wide settings called... well...
Settings.

The problem is, no matter what I do, it never seems to get into the
pages controller properly.

I have $uses = array('Setting') in /app/app_controller.php and I even
tracked down the pages controller in /cake/libs/controller/ and put it
in there too. I've also tried putting it into controller.php but I
still can't get it to work.

It gives me this error:

Notice: Undefined property: AppController::$Setting in
/var/www/cake/app/app_controller.php on line 24

Fatal error: Call to a member function find() on a non-object in
/var/www/cake/app/app_controller.php on line 24

All other (non-default) controllers handle it ok. I am only having
problems with this in the pages controller.

Help would be greatly appreciated.  Thanks in advance.


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