Re: Authentication Application Tutorial help. Login just reloads login page.

2012-01-14 Thread jeremyharris
You may not be getting auth flash messages if you don't have the following bit in your layout: echo $this->Session->flash('auth'); That will give you a hint as to what's going on. Or, check your session vars (use DebugKit - it's a massive time save). -- Our newest site for the community: Cake

Re: Main diference between INT and CHAR (uniqid) primary keys

2012-01-14 Thread euromark
UUIDs need way more "disk space". one might add that speed can also be an issue. having tables with a lot of foreign keys can be slowed down quite a bit, even with indexing. we have a project with uuids and tables with 1 records get really really slow. on the other hand UUIDs are very handy if

Re: Does anyone have a captcha component that works in Cake 2?

2012-01-14 Thread euromark
it depends on what you are looking for. I have a basic passive as well as active math captcha working: https://github.com/dereuromark/tools/blob/2.0/Model/Behavior/CaptchaBehavior.php https://github.com/dereuromark/tools/blob/2.0/View/Helper/CaptchaHelper.php http://www.dereuromark.de/2010/08/09/

Authentication Application Tutorial help. Login just reloads login page.

2012-01-14 Thread Ella Källman
Hey guys! I'm new to CakePHP, I've just tried it out for a few weeks. I have encountered a problem going through the Authentication tutorial (http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth- example/auth.html). I have done the blog tutorial and then continued with this. Creating us

Re: how to get file size from meioupload behavior to print it

2012-01-14 Thread jeremyharris
Have you tried including the filesize input as instructed in the readme? It looks like the behavior does that automatically. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others wit

how to get file size from meioupload behavior to print it

2012-01-14 Thread ahmed fakher
0 down vote favorite share [fb] share [tw] i use meioupload to upload files..but i want to save size for everyfile i uploaded..so how to use meioupload to get uploaded file size..and if it not support this option..are there anyway to do that.. models/download.php array( 'file_name' => array( '

Does anyone have a captcha component that works in Cake 2?

2012-01-14 Thread Daniel
Does anyone have a captcha component that works in Cake 2 that they can share (along with implementation code) ? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePH

Re: Users can only edit or delete themselves

2012-01-14 Thread Salines
I think you have answer in one of this videos http://www.youtube.com/results?search_query=cakephp+auth -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related

Re: Users can only edit or delete themselves

2012-01-14 Thread 清水紘己
You may need to see: http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html I hope Controller::isAuthorized() and Post::isOwnedBy() in the article is your purpose. 2012/1/15 J. : > But I want admins to be able to edit/delete any user too, is that > possible ? > > On 14 j

Re: Users can only edit or delete themselves

2012-01-14 Thread J.
But I want admins to be able to edit/delete any user too, is that possible ? On 14 jan, 19:34, jeremyharris wrote: > If you only want users to delete themselves, why not just handle that in > your delete method? > > public function delete() { > $id = $this->Auth->user('id'); > // etc > > > > > >

Re: Users can only edit or delete themselves

2012-01-14 Thread jeremyharris
If you only want users to delete themselves, why not just handle that in your delete method? public function delete() { $id = $this->Auth->user('id'); // etc } -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://a

Re: Problem with ajax code in cake 2

2012-01-14 Thread jeremyharris
The link takes the same parameters as the HtmlHelper::link() method. So, the second parameter is the url it's going to fetch. It will fetch that URL and update it with the selector you defined in the 'update' key in the options parameter. -- Our newest site for the community: CakePHP Video Tut

Re: Main diference between INT and CHAR (uniqid) primary keys

2012-01-14 Thread jeremyharris
UUIDs are entirely unique while autoincrement ids are unique just for that table. The benefit of UUIDs would be for things like merging tables, merging other data, migrating the data elsewhere, etc. With UUIDs you guarantee there won't be conflicts. It's a matter of preference and depends on y

Captcha image won't display

2012-01-14 Thread Daniel
The captcha image won't display (it just shows a red cross). In my view file I use the following: Html->image($this->Html- >url(array('controller'=>'users', 'action'=>'captcha'), true), array('style'=>'','vspace'=>2)); ?> in my controller I have the following function / action: function cap

Users can only edit or delete themselves

2012-01-14 Thread J.
I was following the blog tutorial that showed how to protect posts, but in my app, any user can edit any other user... So I wanted to protect the edit and delete functions of my UsersController. This is what I'm trying right now : public function isLoggedUser() { if ($user['Us

Re: Problem with ajax code in cake 2

2012-01-14 Thread Daniel
On Jan 14, 4:14 pm, 100rk wrote: > AjaxHelper was removed. > > http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelpe... OK, I changed it to: Js->link('Can not read this code? Reload.', 'reload_captcha', array('update'=>'captchaID')); ?> What should reload_captcha be is it a file

Need cakePHP project

2012-01-14 Thread Hung
Hi everyone ! I am Hung in Viet Nam, I have strong experience with cakePHP and now i am looking for some project for my team to work on, if you guys have project pls contact me. Thanks -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakeP

URL rewriting is not properly configured on your server

2012-01-14 Thread Dave D
I'm setting up cake for the first time, and trying to follow the blog tutorial, but I can't get URL rewriting to work. I had just finished the part where I created index.ctp in the Posts directory under app/View when I figured out that it's not correctly set up. System info: OS: Centos 6.2 x86_6

Main diference between INT and CHAR (uniqid) primary keys

2012-01-14 Thread Thiago Belem
As you can see on the documentation: Rather than using an auto-increment key as the primary key, you may also > use char(36). Cake will then use a unique 36 character uuid (String::uuid) > whenever you save a new record using the Model::save method. So, what's the main diference between INT and

Re: Problem with ajax code in cake 2

2012-01-14 Thread 100rk
AjaxHelper was removed. http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::link -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related q

Problem with ajax code in cake 2

2012-01-14 Thread Daniel
In Cake 2 I am using the following code in a add.ctp view file: link('Can not read this code? Reload.','regenerate code',array('url'=>'reload_captcha', 'update'=>'captchaID')); ?> ... gives the error: Notice (8): Undefined variable: ajax [APP\View\Users\add.ctp, line 16] I then tried: Ajax->link(

Re: TinyMCE issue - CakePHP 2.0.4

2012-01-14 Thread Ishan Talathi
Yes, I tried adding all files, but it still didn't work. Finally this worked - http://ask.cakephp.org/questions/view/how_to_use_tinymce_plugin The plugin isn't really needed, I created an Element for it. On Jan 14, 3:26 pm, daf182 wrote: > Hi Ishan, > > As I saw, the problem withhttp://gprotoco

Re: TinyMCE issue - CakePHP 2.0.4

2012-01-14 Thread daf182
Hi Ishan, As I saw, the problem with http://gprotocol.com/sai/ is that TinyMCE can not load further component. It tries to download them but the response is 404. (check it in firebug or chrome developer tool and check the console tab): GET http://gprotocol.com/sai/js/langs/en.js 404 (Not Found) ti