Tuesday, August 31, 2010

Pagination Issue

Hello,

I have a website which was created for me using cake.php. There is a
pagination issue that I cannot figure out. When I click the second
page of the search results it links to the default page.

If you think you can help let me know and I will specify the issue
online.

Any help or advise would be much appreciated.

Thank you,

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: ACL and permissions arent working properly

hi,
It won't affect auth permanently.
Show me your AppControler source code and initACL function.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: Router::connect() not behaving as expected in 1.3?

To explain a bit why the extra route is needed. The Router in 1.2 did
a lot of black magic, guessing at what you meant instead of just doing
what you typed. This incurred a ton of overhead as it had to attempt
several different guesses at what might work for each route. Most of
the guesswork was removed in 1.3 giving a big performance boost in the
router. So while its a bit of a pain to have to include two routes,
which I can understand I think the performance benefit and the
additional explicitness the routes now have was worth it.

-Mark

On Aug 25, 6:05 am, SacoDesign <sign...@sacodesign.com> wrote:
> Hello,
>
> I'm upgrading my app from 1.2 to 1.3.  I have several custom routes
> setup like so:
> Router::connect('/blog/:action/*',
> array('controller'=>'news_articles', 'action'=>'index'));
>
> This works fine, except for when the url is only /blog/.  In that case
> I get a "cannot find blog controller" error.  Is this by design, or a
> bug?
>
> I can get it working by adding another route for:
>
> Router::connect('/blog', array('controller'=>'news_articles',
> 'action'=>'index'));
>
> but that seems wrong.
>
> Thanks,
>
> -Kevin Wentworth

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Can't see the view after create model and controller from console...

Hi guys
I am a cakephp newbie and I had trouble to view the files under the
view folder through browser.

I used cakephp console to bake model, controller and views. (ex:
Invoices_controller.php for controller, invoice.php for model and a
invoices folders under views folder). According to the tutorial I
read, I can access the invoice view by typing http://localhost/myProject/invoices

However, the browser showed the file is not found......I have no idea
how to solve this problem...Any help would be greatly appreciated.
Thanks

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

RE: Get Most Viewed Question

Thanks…not sure what I was thinking on this one J

 

Got it!

 

Thanks

Re: email component and special chars

like
$this->Email->to = $username .'<' . $email .'>';

works with outlook smtp etc
but the email component aborts with any non a-z chars...
maybe a bug?

On 1 Sep., 00:05, euromark <dereurom...@googlemail.com> wrote:
> i just stumpled on that after checking the error logs
> seems it only happens occasionally
>
> if a username contains some char like < @ [ etc
> the email will not be send to $username <$email>
> it aborts without any error at all
>
> is this from smtp protocol?
> or does the component do that?
> what chars are expicitly not allowed in the name part?
>
> i though about using Inflector::slug() on the username prior to
> passing in to the email component
> but that would change all äöüé etc (which are valid) as well
>
> any ideas?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: Get Most Viewed Question

Explanation: Sort your posts table by views column in descendent order and take only first ten.

2010/9/1 Hellbot <g.hellbot@gmail.com>
In controller
$this->set('most_viewed', $this->Post->find('all', array('limit' => 10, 'order' => array('Post.views' => 'DESC')));

In view
$most_view - your top 10

And don't forget add index to "posts.views" column in db

2010/9/1 Dave Maharaj <me@davemaharaj.com>

I am stumped on how to get top 10 Posts based on the "views" count in the database?

Every time a Post is viewed I auto add 1 to the view count. But to get the top 10?

Any ideas how to do this?

 

Thanks

 

Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en


Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Re: email component and special chars

like
$this->Email->to = $username . '<' . $email '>';

i thought i can put whatever i want in $username here
and it works in outlook etc. the email gets through
only the email component aborts...
maybe a bug?


On 1 Sep., 00:05, euromark <dereurom...@googlemail.com> wrote:
> i just stumpled on that after checking the error logs
> seems it only happens occasionally
>
> if a username contains some char like < @ [ etc
> the email will not be send to $username <$email>
> it aborts without any error at all
>
> is this from smtp protocol?
> or does the component do that?
> what chars are expicitly not allowed in the name part?
>
> i though about using Inflector::slug() on the username prior to
> passing in to the email component
> but that would change all äöüé etc (which are valid) as well
>
> any ideas?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: Get Most Viewed Question

In controller
$this->set('most_viewed', $this->Post->find('all', array('limit' => 10, 'order' => array('Post.views' => 'DESC')));

In view
$most_view - your top 10

And don't forget add index to "posts.views" column in db

2010/9/1 Dave Maharaj <me@davemaharaj.com>

I am stumped on how to get top 10 Posts based on the "views" count in the database?

Every time a Post is viewed I auto add 1 to the view count. But to get the top 10?

Any ideas how to do this?

 

Thanks

 

Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Get Most Viewed Question

I am stumped on how to get top 10 Posts based on the “views” count in the database?

Every time a Post is viewed I auto add 1 to the view count. But to get the top 10?

Any ideas how to do this?

 

Thanks

 

Dave

email component and special chars

i just stumpled on that after checking the error logs
seems it only happens occasionally

if a username contains some char like < @ [ etc
the email will not be send to $username <$email>
it aborts without any error at all

is this from smtp protocol?
or does the component do that?
what chars are expicitly not allowed in the name part?

i though about using Inflector::slug() on the username prior to
passing in to the email component
but that would change all äöüé etc (which are valid) as well

any ideas?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: Password field in 'Edit User' when using Auth

Thank you! That's really helpful... seems to be working now.

On 24 Aug, 17:58, cricket <zijn.digi...@gmail.com> wrote:
> On Tue, Aug 24, 2010 at 12:18 PM, WhyNotSmile <sharongilmor...@gmail.com> wrote:
> > I'm using the Auth component for my site, but having problems when it
> > comes to editing a user.  I want it so that the user can go to the
> > page 'Edit My Account', and see their current information, change
> > whatever they want, and save it.
>
> > The problem is with the password field.  If it is shown (with *s),
> > it's the hashed version which is shown, so it's really long.  When the
> > user saves the password, it gets hashed again. The same happens if
> > it's a hidden field.
>
> Auth does all this automatically. Have a look at the source.
>
> > If it's not shown, and there's just a blank field, firstly the user
> > may wonder why the field is blank, and type something in there, but
> > more importantly, they will then save a blank password.
>
> I would just leave it out altogether. You don't need to submit a value
> for password when editing any other fields.
>
> > Is there any way around this, or do I just have to have 'Change
> > Password' on a different page, and on the Edit page use an update
> > instead of a save (so that the password field can be left out
> > altogether)?
>
> That's what I do. Name your form elements "password_1" and
> "password_2" so Auth will leave them alone. Check that they're
> identical upon submission, then use savefield() to edit just the
> password column (after hashing, of course).

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: Router::connect() not behaving as expected in 1.3?

Thanks for the example, DragonFlyEye and thanks for the feedback
Nikhil. I have finally come to terms with needing 2 statements. In
1.2 (even if it was incomplete) it worked with one statement. The
features of 1.3 are well worth specifying 2 routes.

Thanks again!

On Aug 31, 2:17 pm, DragonFlyEye <dragonflyey...@gmail.com> wrote:
> It's not so much wrong as incomplete. Any URL *beginning* with '/
> cooks/' will be handled in the above-quoted fashion. But if it begins
> *and ends* with '/cooks', without another routing statement, you'll
> get the error you're talking about. Have a look at the pre-defined
> routing for pages that's already in your routes.php file:
>
>         Router::connect('/pages', array('controller' => 'pages', 'action' =>
> 'index'));
>         Router::connect('/pages/*', array('controller' => 'pages', 'action'
> => 'display'));
>
> There are two statements - not one - that define how that set of
> subdirectories will be handled.
>
> On Aug 30, 6:20 pm, Nikhil <nikhilvijay...@gmail.com> wrote:
>
> > SacoDesign is right. its not working as expected (or the cook book is
> > wrong)
>
> > - - Here is the same from cookbook (http://book.cakephp.org/view/46/Routes-Configuration
> > )
>
> > "Another common use for the Router is to define an "alias" for a
> > controller. Let's say that instead of accessing our regular URL at /
> > users/someAction/5, we'd like to be able to access it by /cooks/
> > someAction/5. The following route easily takes care of that:
> > Plain Text View
>
> > Router::connect(
> >     '/cooks/:action/*', array('controller' => 'users', 'action' =>
> > 'index')
> > );
>
> > This is telling the Router that any url beginning with /cooks/ should
> > be sent to the users controller. "
>
> > It works fine except if there is no action specified that is the
> > situation in which cake should default to index() function
>
> > /cooks/action1 maps to users->action1()
> > /cooks/action2 maps to users->action2()
> > /cooks/index maps to users->index()
>
> > *BUT*
>
> > /cooks shows a CooksController missing error message
>
> > On Aug 25, 6:05 pm, SacoDesign <sign...@sacodesign.com> wrote:
>
> > > Hello,
>
> > > I'm upgrading my app from 1.2 to 1.3.  I have several custom routes
> > > setup like so:
> > > Router::connect('/blog/:action/*',
> > > array('controller'=>'news_articles', 'action'=>'index'));
>
> > > This works fine, except for when the url is only /blog/.  In that case
> > > I get a "cannot find blog controller" error.  Is this by design, or a
> > > bug?
>
> > > I can get it working by adding another route for:
>
> > > Router::connect('/blog', array('controller'=>'news_articles',
> > > 'action'=>'index'));
>
> > > but that seems wrong.
>
> > > Thanks,
>
> > > -Kevin Wentworth
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: login generates malformed sql query

Did you ever resolve this? I am experiencing the same issue.

On Jul 23, 7:36 pm, markatto <marka...@gmail.com> wrote:
> On Jul 22, 1:03 pm, cricket <zijn.digi...@gmail.com> wrote:
>
> > This is in UsersController or AppController? I would put allow() (pass
> > it an array, not a string, btw) in the former and the other two in the
> > latter. And it should be loginRedirect, not redirectLogin.
>
> I made these changes, but I am still having the same problem.
>
> > Which DB are you using? Which version of Cake?
>
> > Try deleting everything in tmp/cache/[models|persistent] directories.
>
> I am on cake 1.3.0 and mysql. I have already tried deleting the cache
> stuff.
> Where are the columns for the query supposed to be set? I am not too
> familiar with cake internals.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Auto form fill problem

Today I encountered a strange problem with forms in cake. For a
certain app I use a back-end system in which the user has to log in.
No I made firefox remember my details and the following happens. When
I want to add a new user, because only a logged in user can do that,
FF fills in the Username and password field. I don't want that to
happen, so I tried setting empty to true but it didn't work. Changing
de labels and fieldnames also didn't work.
How can I solve this problem?

regards, Jacob

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Cake Can't Load Models?

I'm at my wits end with this problem, so I sincerely hope someone can
think of a solution...

First a little background: This is my first Cake app. I've been
working on it exclusively on my local machine. As of right now
everything looks fine there. Finally, I tried deploying it to the
development server yesterday, with little success. First I had to
change some apache configurations to allow Cake's .htaccess files to
work. Then I had to change the PHP configuration to get a SOAP
component I'm using to work properly. Finally the problem I'm having
now, the one I can't seem to resolve, is that Cake presumably cannot
find any of the model files; for example:
" Database table networks for model Network was not found."

So, one might think, I have my file named wrong, or my useTable
directive is wrong, but no; remember, it works fine on my local
machine. This only happens when I deploy on the dev server.

Next one might think my database configuration is wrong. Again, I
really don't think so. If I actually go and create the default table
that Cake would look for, it find that table, so it appears to be
connecting to the database properly.

This makes me thing that for whatever reason, some environmental
factor is preventing Cake from actually loading the models. I tried
adding the full path to the model directory, in bootstrap.php, and
that didn't work either. I've set every file in the cake project to
777 for the sake of overcoming this -- no luck.

Has anyone encountered something like this before? Is it something
with my Apache setup? My MySQL setup? I'm really grasping at straws at
this point. Also FYI: my local system is Windows, the dev server is
running Ubuntu.

Thanks!

Lee

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Misterious Array to string conversion on session_start()

Hi a have this misterious notice. I try to found a solution on google,
cakeqs but... nothing.

This notice appears on all pages of application:

Notice (8): Array to string conversion [CORE/cake/libs/
cake_session.php, line 587]

Controlling that piece of code I see that is the function
session_start () that generates this noitice.

I have no idea how to solve this problem. The strange thing is that I
think that involves cookies.
In this application using session management standards.
This problem causes me problems with all other components that use
cookies and sessions such as Auth.
Thanks for your help

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

CORE.PHP - Configure::write('Routing.prefixes', array('admin'));

Hi everybody,

This e-mail might look a little longer but I'm just trying to explain
my doubt clearly... Hope I can get to the end of it...

I've been using CakePHP for one week and since then I've been working
hard to get how things work. Definitely cake makes it easier as you
comprehend it's conventions, components, helpers, methods, etc.

The issue I'm sturggling at the moment has something to do with
Configure::write('Routing.prefixes', array('admin'));. In my app I
have a restricted area and since we start learning cake from the
database and models I've decided to start developing from that so the
data could be inserted in the db as the development flows.

My source of knowledge is cake cookbook, wich is very helpful, but
there's a lot of questions that it is unable to answer.

I figured out (and there's a good chance I might be wrong - hope you
guys are going to correct me if that happens)
that when we enable Configure::write('Routing.prefixes',
array('admin')) and use a
redirect(array('controller'=>'administrators','action'=>'admin_index','admin'=>true))
cake makes the URLs more friendly for a restricted area and it gives
no access for the methods from outside by putting a admin/ prefix.

In this case I'm must use a admin_ prefix in the methods so it could
work. Since cake don't give access to the methods from URL I thought
should have a index() method that checks the administrators login and
redirects the page.

Up to now I think everything is okay. The issue that I'm facing is
when trying to pass a params tho another method I have an error
because the other method get the params as a empty array.

Here we go:

I have a link on the page like this: administrators/edit/1

The functions with access is as follow and gets the params as 1. It is
responsible for checking the login and redirect to the accessible
method. The cookbook says that I can pass the action as an array with
the params.

function edit($id) {
// if user is logged in
if( $this->Session->check('Administrator') ) {
// redirect to restricted area
$this->redirect(array('controller'=>'administrators',array('action'
=> 'admin_edit', $id),'admin'=>true));
}
// or redirect to login page
else $this-
>redirect(array('controller'=>'administrators','action'=>'admin_login','admin'=>true));
}

The method bellow is the one that gets the empty array.
function admin_edit($id) {
// retrive data from the db
$result = $this->Administrator->retrieve_administrator_data($id);
// if it finds the user sets the data for the view
if ($result !== FALSE) {
$this->set('administrador_data', $result);
}
}

Can somebody help me out? I'm really not sure if this is the best
aproach for dealing with Configure::write('Routing.prefixes',
array('admin')); and I can't find wy the method is getting an empty
array.

Hope I'm not bothering with such an stupid question.

Thanks!

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: SimpleTest: "You need a new test.php. Try this one: cake\console\libs\templates\skel\webroot\test.php"

Hi
El 31/08/2010, a las 14:41, Joshua Muheim escribió:

> Still the same error. Even when there is *no* test.php file in the
> webroot I get this error. Very frustrating. Any other help?

I remember having the very same error, and the solution was to update cake 1.2 to final.
---
Fran Iglesias <cakephpilia@gmail.com>
http://cakephpilia.blogspot.com

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: Fixing form ID

I have a login form in my default layout (as opposed to its own
template file, and will probably be moving it to an element soon) but
here is the code in my default layout. I didn't have to make any
changes to any of the login code.

Also, it sounds like you made a login model and then baked that into a
controller and views (I'm guessing this is why you have forms with ids
of loginedit, loginadd, loginview etc... the login should generally be
actions in the users controller/model/classes (not sure on the term
I'm really looking for here). I recommend not using any baked code
when setting up the login using the auth components.

Anyway the form ID really doesn't matter, the name is the important
part and should match the model that has your usernames and passwords.

if ($this->here != "/users/login") {
echo $form->create('User', array('url' => array('controller' =>
'users', 'action' =>'login')));
echo $form->input('User.name', array('label'=>""));
echo $form->input('User.password', array('label'=>""));
echo $form->end('Login');
}

This is the identical form I used in login.ctp only encased in an if
so that it doesn't show up if we're on the stand alone login page.

I'd suggest going back over this section and follow it step for step.
http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application


On Aug 30, 4:16 pm, Alexis Laporte <alexis.lapo...@gmail.com> wrote:
> Hello people,
>
> I'm new at this cake thing ; facing difficulties with FormHelper.
>
> Problem is : I use the helper in the layout, to output a login form
> (mail + password). Its html id changes all the time (depending upon
> the URL : its id is wheter LoginAddForm or LoginIndexForm or
> LoginEditForm, etc.). Thus, I can't get the POSTed inputs in my
> controller (since I don't know which id to use : $this-
>
> >data>['loginID????']['password'])
>
> What to do ? Any way of fixing the ID ? (the API did not help :().
>
> Thanks,
> Alexis.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: ACL and permissions arent working properly

On 31 Sie, 00:01, Rob <bizarro...@gmail.com> wrote:
> I'm having a problem right now with my application.  I have acl set up
> and I am using groups for all my users following this tutorialhttp://book.cakephp.org/view/1543/Simple-Acl-controlled-Application
>
> One user group I have set up as denied from /controllers using
>
> $this->Acl->deny($group, 'controllers');
>
> and using allow I allowed them to do a few things like add content and
> view their user account, but they still have access to everypage on
> the site.
>

Hi Rob,

Make sure you have commented out $this->Auth->allow(array('*')); in
beforeFilter function
like :

function beforeFilter() {
parent::beforeFilter();
// $this->Auth->allow(array('*'));
}

regards
g0m3$

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: ACL and permissions arent working properly

On 31 Sie, 00:01, Rob <bizarro...@gmail.com> wrote:
> I'm having a problem right now with my application.  I have acl set up
> and I am using groups for all my users following this tutorialhttp://book.cakephp.org/view/1543/Simple-Acl-controlled-Application
>
> One user group I have set up as denied from /controllers using
>
> $this->Acl->deny($group, 'controllers');
>
> and using allow I allowed them to do a few things like add content and
> view their user account, but they still have access to everypage on
> the site.
>

Hi Rob,

Make sure you have commented out $this->Auth->allow(array('*')); in
beforeFilter function
like :

function beforeFilter() {
parent::beforeFilter();
// $this->Auth->allow(array('*'));
}

regards
g0m3$

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: SimpleTest: "You need a new test.php. Try this one: cake\console\libs\templates\skel\webroot\test.php"

Still the same error. Even when there is *no* test.php file in the
webroot I get this error. Very frustrating. Any other help?

On Tue, Aug 31, 2010 at 12:01 PM, Mike Karthauser
<mikek@brightstorm.co.uk> wrote:
>
> On Tue, August 31, 2010 10:20 am, psybear83 wrote:
>> Hi everybody
>>
>> I'm working with CakePHP 1.2.0.7296 RC2 and want to use SimpleTest to
>> test my application. I copied it to my vendors folder, but when
>> opening myapp/test.php, I get the following error:
>>
>> "You need a new test.php. Try this one: cake\console\libs\templates
>> \skel\webroot\test.php"
>
> copy the file above into your webroot to replace 'myapp/test.php'
>
>
>>
>> I have no idea what to do with that... Thank you *very much* for help.
>> Joshua
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help others
>> with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscribe@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php?hl=en
>>
>>
>
>
> --
> Mike Karthauser
> Managing Director - Brightstorm Ltd
>
> Email: mikek@brightstorm.co.uk
> Web: http://www.brightstorm.co.uk
> Tel:  07939 252144 (mobile)
> Fax: 0870 1320560
>
> Address: 1 Brewery Court, North Street, Bristol, BS3 1JS
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: counting specific files in foldeR?

so i made it work litke this

$dir = opendir ("../images");
while (false !== ($file = readdir($dir))) {
if (strpos($file, '.gif',1)||strpos($file, '.jpg',1) )
{
echo "$file <br />";
}
}

guess i was too untalented to make your solution work, jeremy...but
thx anyway :)

On 31 Aug., 10:59, Jeremy Burns | Class Outfit
<jeremybu...@classoutfit.com> wrote:
> OK - I haven't tested this so it's a bit guessy and you might need to trim/debug...
>
> $directory = "../images/team/harry/";
>
> $fileTypes = array('jpg', 'pdf', 'xls', 'doc', 'ppt');
> $fileCount = 0;
>
> foreach $fileTypes as $fileType:
>         $fileCount += count(glob("" . $directory . "*." . $fileType));      
> endforeach;
>
> die(debug($fileCount));
>
> Someone else might know a way of placing all filetypes into a single count.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 31 Aug 2010, at 09:50, Tomfox Wiranata wrote:
>
> > you mean i should fill the array with all the filetypes i want to
> > count...?? or do you mean sth else?
>
> > i have no idea how to code this... :(
>
> > On 31 Aug., 10:39, Jeremy Burns | Class Outfit
> > <jeremybu...@classoutfit.com> wrote:
> >> Have you tried looping through an array and incrementing a running total?
>
> >> Jeremy Burns
> >> Class Outfit
>
> >> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >> On 31 Aug 2010, at 09:33, Tomfox Wiranata wrote:
>
> >>> yes...but then all the jpgs and png get counted too.....
>
> >>> On 31 Aug., 10:28, Jeremy Burns | Class Outfit
> >>> <jeremybu...@classoutfit.com> wrote:
> >>>> So have you tried *.*?
>
> >>>> Jeremy Burns
> >>>> Class Outfit
>
> >>>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >>>> On 31 Aug 2010, at 09:18, Tomfox Wiranata wrote:
>
> >>>>> hi jeremy,
>
> >>>>> yes i wannt a count of all files with the filetypes i mentioned.....
>
> >>>>> On 31 Aug., 10:05, Jeremy Burns | Class Outfit
> >>>>> <jeremybu...@classoutfit.com> wrote:
> >>>>>> Do you want a count of all files - would $filecount = count(glob("" . $directory . "*.*")); work? If you want a count of each file type then you could set up an array with the extensions and do a loop.
>
> >>>>>> Jeremy Burns
> >>>>>> Class Outfit
>
> >>>>>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >>>>>> On 31 Aug 2010, at 08:49, Tomfox Wiranata wrote:
>
> >>>>>>> hi,
>
> >>>>>>> i want to count specific files in a folder and i found some code on
> >>>>>>> the web:
>
> >>>>>>> $directory = "../images/team/harry/";
> >>>>>>> $filecount = count(glob("" . $directory . "*.jpg"));
> >>>>>>> $filecount = THE TOTAL COUNT
>
> >>>>>>> this is only counting jpgs. but how can i extend this code to several
> >>>>>>> filetypes? i need to count pdf, xls, doc, and ppt
>
> >>>>>>> big thx :)
>
> >>>>>>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpotherswith their CakePHP related questions.
>
> >>>>>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>>>>>> To post to this group, send email to cake-php@googlegroups.com
> >>>>>>> To unsubscribe from this group, send email to
> >>>>>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> >>>>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers with their CakePHP related questions.
>
> >>>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>>>> To post to this group, send email to cake-php@googlegroups.com
> >>>>> To unsubscribe from this group, send email to
> >>>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions.
>
> >>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>> To post to this group, send email to cake-php@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: tree behaviour and big table

> I need to make a table (tree structured) that will contain more then
> 1000000 records. I wonder if tree behaviour can handle working with
> such big table without messing lft and right parameters. Anyone
> espirienced in this?

It _should_ be fine, but once it gets in a mess it's a right pain to
fix. Make sure you add some indexes to your tables.

>
> thanks
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
>

--
jon bennett - www.jben.net - blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

tree behaviour and big table

I need to make a table (tree structured) that will contain more then
1000000 records. I wonder if tree behaviour can handle working with
such big table without messing lft and right parameters. Anyone
espirienced in this?

thanks

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: SimpleTest: "You need a new test.php. Try this one: cake\console\libs\templates\skel\webroot\test.php"

On Tue, August 31, 2010 10:20 am, psybear83 wrote:
> Hi everybody
>
> I'm working with CakePHP 1.2.0.7296 RC2 and want to use SimpleTest to
> test my application. I copied it to my vendors folder, but when
> opening myapp/test.php, I get the following error:
>
> "You need a new test.php. Try this one: cake\console\libs\templates
> \skel\webroot\test.php"

copy the file above into your webroot to replace 'myapp/test.php'


>
> I have no idea what to do with that... Thank you *very much* for help.
> Joshua
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php?hl=en
>
>


--
Mike Karthauser
Managing Director - Brightstorm Ltd

Email: mikek@brightstorm.co.uk
Web: http://www.brightstorm.co.uk
Tel: 07939 252144 (mobile)
Fax: 0870 1320560

Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

how to make folder stacture 4 multiple website

Hello Expert,

I am new on cakephp. I want to develop our website to cakephp.  I want to use same application for multiple website different layout and css. and I want to use our existing table structure so its not follow the rules on cakphp table name Conventions. I dont know this way it will be work or not? and how I make folder structure?



Advance thanks
Harun
 

--
Kazi Harun Or Roshid
Mob# +357-96351387

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Re: counting specific files in foldeR?

i can work with that and will give feedback. thx jeremy. i appreciate
it :)

On 31 Aug., 10:59, Jeremy Burns | Class Outfit
<jeremybu...@classoutfit.com> wrote:
> OK - I haven't tested this so it's a bit guessy and you might need to trim/debug...
>
> $directory = "../images/team/harry/";
>
> $fileTypes = array('jpg', 'pdf', 'xls', 'doc', 'ppt');
> $fileCount = 0;
>
> foreach $fileTypes as $fileType:
>         $fileCount += count(glob("" . $directory . "*." . $fileType));      
> endforeach;
>
> die(debug($fileCount));
>
> Someone else might know a way of placing all filetypes into a single count.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 31 Aug 2010, at 09:50, Tomfox Wiranata wrote:
>
> > you mean i should fill the array with all the filetypes i want to
> > count...?? or do you mean sth else?
>
> > i have no idea how to code this... :(
>
> > On 31 Aug., 10:39, Jeremy Burns | Class Outfit
> > <jeremybu...@classoutfit.com> wrote:
> >> Have you tried looping through an array and incrementing a running total?
>
> >> Jeremy Burns
> >> Class Outfit
>
> >> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >> On 31 Aug 2010, at 09:33, Tomfox Wiranata wrote:
>
> >>> yes...but then all the jpgs and png get counted too.....
>
> >>> On 31 Aug., 10:28, Jeremy Burns | Class Outfit
> >>> <jeremybu...@classoutfit.com> wrote:
> >>>> So have you tried *.*?
>
> >>>> Jeremy Burns
> >>>> Class Outfit
>
> >>>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >>>> On 31 Aug 2010, at 09:18, Tomfox Wiranata wrote:
>
> >>>>> hi jeremy,
>
> >>>>> yes i wannt a count of all files with the filetypes i mentioned.....
>
> >>>>> On 31 Aug., 10:05, Jeremy Burns | Class Outfit
> >>>>> <jeremybu...@classoutfit.com> wrote:
> >>>>>> Do you want a count of all files - would $filecount = count(glob("" . $directory . "*.*")); work? If you want a count of each file type then you could set up an array with the extensions and do a loop.
>
> >>>>>> Jeremy Burns
> >>>>>> Class Outfit
>
> >>>>>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >>>>>> On 31 Aug 2010, at 08:49, Tomfox Wiranata wrote:
>
> >>>>>>> hi,
>
> >>>>>>> i want to count specific files in a folder and i found some code on
> >>>>>>> the web:
>
> >>>>>>> $directory = "../images/team/harry/";
> >>>>>>> $filecount = count(glob("" . $directory . "*.jpg"));
> >>>>>>> $filecount = THE TOTAL COUNT
>
> >>>>>>> this is only counting jpgs. but how can i extend this code to several
> >>>>>>> filetypes? i need to count pdf, xls, doc, and ppt
>
> >>>>>>> big thx :)
>
> >>>>>>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpotherswith their CakePHP related questions.
>
> >>>>>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>>>>>> To post to this group, send email to cake-php@googlegroups.com
> >>>>>>> To unsubscribe from this group, send email to
> >>>>>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> >>>>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers with their CakePHP related questions.
>
> >>>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>>>> To post to this group, send email to cake-php@googlegroups.com
> >>>>> To unsubscribe from this group, send email to
> >>>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions.
>
> >>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>> To post to this group, send email to cake-php@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

SimpleTest: "You need a new test.php. Try this one: cake\console\libs\templates\skel\webroot\test.php"

Hi everybody

I'm working with CakePHP 1.2.0.7296 RC2 and want to use SimpleTest to
test my application. I copied it to my vendors folder, but when
opening myapp/test.php, I get the following error:

"You need a new test.php. Try this one: cake\console\libs\templates
\skel\webroot\test.php"

I have no idea what to do with that... Thank you *very much* for help.
Joshua

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: counting specific files in foldeR?

i appreciate that jeremy. thank you. i can surely work with this and
will give feedback :)

On 31 Aug., 10:59, Jeremy Burns | Class Outfit
<jeremybu...@classoutfit.com> wrote:
> OK - I haven't tested this so it's a bit guessy and you might need to trim/debug...
>
> $directory = "../images/team/harry/";
>
> $fileTypes = array('jpg', 'pdf', 'xls', 'doc', 'ppt');
> $fileCount = 0;
>
> foreach $fileTypes as $fileType:
>         $fileCount += count(glob("" . $directory . "*." . $fileType));      
> endforeach;
>
> die(debug($fileCount));
>
> Someone else might know a way of placing all filetypes into a single count.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 31 Aug 2010, at 09:50, Tomfox Wiranata wrote:
>
> > you mean i should fill the array with all the filetypes i want to
> > count...?? or do you mean sth else?
>
> > i have no idea how to code this... :(
>
> > On 31 Aug., 10:39, Jeremy Burns | Class Outfit
> > <jeremybu...@classoutfit.com> wrote:
> >> Have you tried looping through an array and incrementing a running total?
>
> >> Jeremy Burns
> >> Class Outfit
>
> >> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >> On 31 Aug 2010, at 09:33, Tomfox Wiranata wrote:
>
> >>> yes...but then all the jpgs and png get counted too.....
>
> >>> On 31 Aug., 10:28, Jeremy Burns | Class Outfit
> >>> <jeremybu...@classoutfit.com> wrote:
> >>>> So have you tried *.*?
>
> >>>> Jeremy Burns
> >>>> Class Outfit
>
> >>>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >>>> On 31 Aug 2010, at 09:18, Tomfox Wiranata wrote:
>
> >>>>> hi jeremy,
>
> >>>>> yes i wannt a count of all files with the filetypes i mentioned.....
>
> >>>>> On 31 Aug., 10:05, Jeremy Burns | Class Outfit
> >>>>> <jeremybu...@classoutfit.com> wrote:
> >>>>>> Do you want a count of all files - would $filecount = count(glob("" . $directory . "*.*")); work? If you want a count of each file type then you could set up an array with the extensions and do a loop.
>
> >>>>>> Jeremy Burns
> >>>>>> Class Outfit
>
> >>>>>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >>>>>> On 31 Aug 2010, at 08:49, Tomfox Wiranata wrote:
>
> >>>>>>> hi,
>
> >>>>>>> i want to count specific files in a folder and i found some code on
> >>>>>>> the web:
>
> >>>>>>> $directory = "../images/team/harry/";
> >>>>>>> $filecount = count(glob("" . $directory . "*.jpg"));
> >>>>>>> $filecount = THE TOTAL COUNT
>
> >>>>>>> this is only counting jpgs. but how can i extend this code to several
> >>>>>>> filetypes? i need to count pdf, xls, doc, and ppt
>
> >>>>>>> big thx :)
>
> >>>>>>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpotherswith their CakePHP related questions.
>
> >>>>>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>>>>>> To post to this group, send email to cake-php@googlegroups.com
> >>>>>>> To unsubscribe from this group, send email to
> >>>>>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> >>>>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers with their CakePHP related questions.
>
> >>>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>>>> To post to this group, send email to cake-php@googlegroups.com
> >>>>> To unsubscribe from this group, send email to
> >>>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions.
>
> >>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>> To post to this group, send email to cake-php@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: counting specific files in foldeR?

OK - I haven't tested this so it's a bit guessy and you might need to trim/debug...

$directory = "../images/team/harry/";

$fileTypes = array('jpg', 'pdf', 'xls', 'doc', 'ppt');
$fileCount = 0;

foreach $fileTypes as $fileType:
$fileCount += count(glob("" . $directory . "*." . $fileType));
endforeach;

die(debug($fileCount));

Someone else might know a way of placing all filetypes into a single count.

Jeremy Burns
Class Outfit

jeremyburns@classoutfit.com
http://www.classoutfit.com

On 31 Aug 2010, at 09:50, Tomfox Wiranata wrote:

> you mean i should fill the array with all the filetypes i want to
> count...?? or do you mean sth else?
>
> i have no idea how to code this... :(
>
> On 31 Aug., 10:39, Jeremy Burns | Class Outfit
> <jeremybu...@classoutfit.com> wrote:
>> Have you tried looping through an array and incrementing a running total?
>>
>> Jeremy Burns
>> Class Outfit
>>
>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>>
>> On 31 Aug 2010, at 09:33, Tomfox Wiranata wrote:
>>
>>> yes...but then all the jpgs and png get counted too.....
>>
>>> On 31 Aug., 10:28, Jeremy Burns | Class Outfit
>>> <jeremybu...@classoutfit.com> wrote:
>>>> So have you tried *.*?
>>
>>>> Jeremy Burns
>>>> Class Outfit
>>
>>>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>>
>>>> On 31 Aug 2010, at 09:18, Tomfox Wiranata wrote:
>>
>>>>> hi jeremy,
>>
>>>>> yes i wannt a count of all files with the filetypes i mentioned.....
>>
>>>>> On 31 Aug., 10:05, Jeremy Burns | Class Outfit
>>>>> <jeremybu...@classoutfit.com> wrote:
>>>>>> Do you want a count of all files - would $filecount = count(glob("" . $directory . "*.*")); work? If you want a count of each file type then you could set up an array with the extensions and do a loop.
>>
>>>>>> Jeremy Burns
>>>>>> Class Outfit
>>
>>>>>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>>
>>>>>> On 31 Aug 2010, at 08:49, Tomfox Wiranata wrote:
>>
>>>>>>> hi,
>>
>>>>>>> i want to count specific files in a folder and i found some code on
>>>>>>> the web:
>>
>>>>>>> $directory = "../images/team/harry/";
>>>>>>> $filecount = count(glob("" . $directory . "*.jpg"));
>>>>>>> $filecount = THE TOTAL COUNT
>>
>>>>>>> this is only counting jpgs. but how can i extend this code to several
>>>>>>> filetypes? i need to count pdf, xls, doc, and ppt
>>
>>>>>>> big thx :)
>>
>>>>>>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers with their CakePHP related questions.
>>
>>>>>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
>>>>>>> To post to this group, send email to cake-php@googlegroups.com
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>>
>>>>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions.
>>
>>>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
>>>>> To post to this group, send email to cake-php@googlegroups.com
>>>>> To unsubscribe from this group, send email to
>>>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>>
>>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions.
>>
>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Why cakephp forms doesn't work with jquery (mb)menu ?

Hi

In my menu (jquery plugin named (mb)Menu) i wrote a simple login form:


<div id="login" class="mbmenu">
<a rel="title" >Login panel</a>
<a rel="separator"> </a>
<a rel="text" class="rel_text">
<?php echo $form->create('User', array('action' => 'login')); ?>
<span class="text_form">login:</span><br />
<?php echo $form->input('username', array('label' => '')); ?>
<span class="text_form">password:</span><br />
<?php echo $form->input('password', array('type' => 'password',
'label' => '')); ?>
<?php echo $form->end('Log in!'); ?>
</a>
</div>

Aftet pressing on submit button nothing is happening.

This form works well outside this menu.

Can somebody tell me why it isnt working ?

Thanks for your help.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: counting specific files in foldeR?

you mean i should fill the array with all the filetypes i want to
count...?? or do you mean sth else?

i have no idea how to code this... :(

On 31 Aug., 10:39, Jeremy Burns | Class Outfit
<jeremybu...@classoutfit.com> wrote:
> Have you tried looping through an array and incrementing a running total?
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 31 Aug 2010, at 09:33, Tomfox Wiranata wrote:
>
> > yes...but then all the jpgs and png get counted too.....
>
> > On 31 Aug., 10:28, Jeremy Burns | Class Outfit
> > <jeremybu...@classoutfit.com> wrote:
> >> So have you tried *.*?
>
> >> Jeremy Burns
> >> Class Outfit
>
> >> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >> On 31 Aug 2010, at 09:18, Tomfox Wiranata wrote:
>
> >>> hi jeremy,
>
> >>> yes i wannt a count of all files with the filetypes i mentioned.....
>
> >>> On 31 Aug., 10:05, Jeremy Burns | Class Outfit
> >>> <jeremybu...@classoutfit.com> wrote:
> >>>> Do you want a count of all files - would $filecount = count(glob("" . $directory . "*.*")); work? If you want a count of each file type then you could set up an array with the extensions and do a loop.
>
> >>>> Jeremy Burns
> >>>> Class Outfit
>
> >>>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >>>> On 31 Aug 2010, at 08:49, Tomfox Wiranata wrote:
>
> >>>>> hi,
>
> >>>>> i want to count specific files in a folder and i found some code on
> >>>>> the web:
>
> >>>>> $directory = "../images/team/harry/";
> >>>>> $filecount = count(glob("" . $directory . "*.jpg"));
> >>>>> $filecount = THE TOTAL COUNT
>
> >>>>> this is only counting jpgs. but how can i extend this code to several
> >>>>> filetypes? i need to count pdf, xls, doc, and ppt
>
> >>>>> big thx :)
>
> >>>>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers with their CakePHP related questions.
>
> >>>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>>>> To post to this group, send email to cake-php@googlegroups.com
> >>>>> To unsubscribe from this group, send email to
> >>>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions.
>
> >>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>> To post to this group, send email to cake-php@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: Question about I18n and relation

> $this->Category->recursive = -1:
> $category = $this->Category->read(null, $id)
> $items = $this->Category->Item->find('all', array('conditions' =>  
> array('category_id' => $id)));

Thank you for this tips, it runs very well (even if it is a few more
slow and weighty)

Best regards.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: counting specific files in foldeR?

Have you tried looping through an array and incrementing a running total?

Jeremy Burns
Class Outfit

jeremyburns@classoutfit.com
http://www.classoutfit.com

On 31 Aug 2010, at 09:33, Tomfox Wiranata wrote:

> yes...but then all the jpgs and png get counted too.....
>
> On 31 Aug., 10:28, Jeremy Burns | Class Outfit
> <jeremybu...@classoutfit.com> wrote:
>> So have you tried *.*?
>>
>> Jeremy Burns
>> Class Outfit
>>
>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>>
>> On 31 Aug 2010, at 09:18, Tomfox Wiranata wrote:
>>
>>> hi jeremy,
>>
>>> yes i wannt a count of all files with the filetypes i mentioned.....
>>
>>> On 31 Aug., 10:05, Jeremy Burns | Class Outfit
>>> <jeremybu...@classoutfit.com> wrote:
>>>> Do you want a count of all files - would $filecount = count(glob("" . $directory . "*.*")); work? If you want a count of each file type then you could set up an array with the extensions and do a loop.
>>
>>>> Jeremy Burns
>>>> Class Outfit
>>
>>>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>>
>>>> On 31 Aug 2010, at 08:49, Tomfox Wiranata wrote:
>>
>>>>> hi,
>>
>>>>> i want to count specific files in a folder and i found some code on
>>>>> the web:
>>
>>>>> $directory = "../images/team/harry/";
>>>>> $filecount = count(glob("" . $directory . "*.jpg"));
>>>>> $filecount = THE TOTAL COUNT
>>
>>>>> this is only counting jpgs. but how can i extend this code to several
>>>>> filetypes? i need to count pdf, xls, doc, and ppt
>>
>>>>> big thx :)
>>
>>>>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions.
>>
>>>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
>>>>> To post to this group, send email to cake-php@googlegroups.com
>>>>> To unsubscribe from this group, send email to
>>>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>>
>>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions.
>>
>>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

Re: counting specific files in foldeR?

yes...but then all the jpgs and png get counted too.....

On 31 Aug., 10:28, Jeremy Burns | Class Outfit
<jeremybu...@classoutfit.com> wrote:
> So have you tried *.*?
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 31 Aug 2010, at 09:18, Tomfox Wiranata wrote:
>
> > hi jeremy,
>
> > yes i wannt a count of all files with the filetypes i mentioned.....
>
> > On 31 Aug., 10:05, Jeremy Burns | Class Outfit
> > <jeremybu...@classoutfit.com> wrote:
> >> Do you want a count of all files - would $filecount = count(glob("" . $directory . "*.*")); work? If you want a count of each file type then you could set up an array with the extensions and do a loop.
>
> >> Jeremy Burns
> >> Class Outfit
>
> >> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >> On 31 Aug 2010, at 08:49, Tomfox Wiranata wrote:
>
> >>> hi,
>
> >>> i want to count specific files in a folder and i found some code on
> >>> the web:
>
> >>> $directory = "../images/team/harry/";
> >>> $filecount = count(glob("" . $directory . "*.jpg"));
> >>> $filecount = THE TOTAL COUNT
>
> >>> this is only counting jpgs. but how can i extend this code to several
> >>> filetypes? i need to count pdf, xls, doc, and ppt
>
> >>> big thx :)
>
> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions.
>
> >>> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> >>> To post to this group, send email to cake-php@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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