Re: auth component issue

2011-01-18 Thread Amit Badkas
Hi, You need to use $this->redirect($this->Auth->logout()); instead of $this->redirect(array('action'=>'login')); in users controller's logout action. Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Jan 19, 2011 at 11:57 AM, andy_the ultimate bake

Re: Keep associations after they're deleted / Track associations over time

2011-01-18 Thread Ryan Schmidt
Am I thinking about this the wrong way? How would you manage a system with a table for users and tables for various resources and the need to track which users used which resources for how long (so that they can be billed for it)? On Jan 16, 2011, at 06:20, Ryan Schmidt wrote: > Consider a sy

Allow empty selection for relationship id (NULL)

2011-01-18 Thread Ryan Schmidt
In my MySQL database, I have a table foo that has a field bar_id that is defined as allowing NULL. CakePHP 1.3.6 baked some nice views for me, including foo/edit.ctp which contains "echo $this->Form->input('bar_id');" but the select menu this produces does not give me the option of not selectin

Re: Remove spam in issue tracker

2011-01-18 Thread Ryan Schmidt
Right, I was referring to that issue for historical reference purposes. And in my research, I did not desire to see spam, which is why I requested someone remove it. On Jan 19, 2011, at 00:52, Graham Weldon wrote: > This is no longer the tracker for issues for CakePHP. > Please use http://cak

Re: retrieve data from find result array

2011-01-18 Thread Amit Badkas
Hi, As per the $status array structure, you should use $status[0][0]['time'] Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Jan 19, 2011 at 12:24 PM, ojonam wrote: > Hi, > > I have a model Status with fields 'name', 'time', of which 'time' is a > t

retrieve data from find result array

2011-01-18 Thread ojonam
Hi, I have a model Status with fields 'name', 'time', of which 'time' is a timestamp. I perform a find query and try to cast timestamp as date: $status = $this->Status->find('all', array('fields' => array('CAST (Status.time AS DATE) time'))); debug($status) gives me : Array ( [0] => Array

Re: Remove spam in issue tracker

2011-01-18 Thread Graham Weldon
This is no longer the tracker for issues for CakePHP. Please use http://cakephp.lighthouseapp.com Trac is only online for historical purposes Sent from my iPad On 19/01/2011, at 5:08 PM, Ryan Schmidt wrote: > Can an admin please remove the spam comments from tickets like this one in > the is

auth component issue

2011-01-18 Thread andy_the ultimate baker
hi, i m working on auth component in cake. the login is working but log out is not secured. when user logged out he should not move forward without login but still he can can any one tel me hoe to restrict user form moving forward without login. this is my app controller Auth->allow('admin_add

Remove spam in issue tracker

2011-01-18 Thread Ryan Schmidt
Can an admin please remove the spam comments from tickets like this one in the issue tracker: https://trac.cakephp.org/ticket/4415 Thank you. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.or

Re: How to display a BLOB object in VIEW

2011-01-18 Thread Ryan Schmidt
On Jan 18, 2011, at 23:04, pinastro wrote: > exactly , I am reading about Downloading the image .. > > and somehow I am able to display the image too...but it's RAW image > CONTROLLER ::: > > function download($id) { > Configure::write('debug', 0); > $file = $this->M

Re: How to display a BLOB object in VIEW

2011-01-18 Thread pinastro
exactly , I am reading about Downloading the image .. and somehow I am able to display the image too...but it's RAW image CONTROLLER ::: function download($id) { Configure::write('debug', 0); $file = $this->MyFile->findById($id); $type= $file['MyFil

Re: How to display a BLOB object in VIEW

2011-01-18 Thread Ryan Schmidt
On Jan 18, 2011, at 22:35, pinastro wrote: > I know there is already lot of text on this but most of them are like > DOWNLOADING content from the BLOB object which is working perfectly > but I want to display inside an image box in the VIEW I would imagine your controller will need a separate ac

How to display a BLOB object in VIEW

2011-01-18 Thread pinastro
I know there is already lot of text on this but most of them are like DOWNLOADING content from the BLOB object which is working perfectly but I want to display inside an image box in the VIEW How ? Thanks Karthik -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp

Re: Changing /webroot and /views directories

2011-01-18 Thread Dr. Loboto
Original is hidden deep in structure. 1.2 doc: http://book.cakephp.org/view/36/Additional-Class-Paths 1.3 doc: http://book.cakephp.org/view/916/Additional-Class-Paths On Jan 18, 7:03 pm, DragonFlyEye wrote: > Ah! Thank you, Mr. Loboto! > > Hmm... Really seems like that information should belong

Re: Session tracking

2011-01-18 Thread Tran Cao Thai
I found the way to go around the problem by setting auto return from paypal site. But this session tracking problem still gets my curiosity so far. @criket: yes, i know the session id of the user returned from the paypal. However, what i need to do next is searching the user from the server based

Re: Session tracking

2011-01-18 Thread cricket
On Tue, Jan 18, 2011 at 12:36 AM, Tran Cao Thai wrote: > Hi cakers, > > I have been developed a Paypal payment system recently. When user > finish the payment, paypal will return the ipn to the system (which > include the session id of the user). My question is how can i find out > the user from t

Re: Newbies Problem please help

2011-01-18 Thread cricket
On Mon, Jan 17, 2011 at 9:01 AM, Pash wrote: > $book = $this->Book->findByIsbn('1847192564'); > $this->set('books', $books); The variable is singular on the first line, but plural on the next. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the n

CakePHP TV Updates

2011-01-18 Thread Larry E. Masters
Since the launch of the CakePHP TV contest ( http://tv.cakephp.org/launch-competition) we have had 6 community member video submissions and more request for the types of tutorials the CakePHP community would like to see http://tv.cakephp.org/ideas/popular If you have an idea for a tutorial you can

Re: Permission by row

2011-01-18 Thread cricket
On Tue, Jan 18, 2011 at 5:16 PM, Yaron wrote: > Hi, > Is there a way to allow edit / delete only to certain rows and not > all, via the Acl ? > For example, let there be a blog with many users. I'd like users to be > able to edit only the posts they have created, and not posts other > users create

Re: need urgent help

2011-01-18 Thread Ryan Schmidt
On Jan 18, 2011, at 01:40, andy_the ultimate baker wrote: > i m trying to redirect the action on a controller but it is > redirecting to another controller action. > //users_controller.php > function admin_add(){ > if(!empty($this->data)){ > if($this->save($thi

Re: CakePHP 1.3 and Firebird

2011-01-18 Thread Ryan Schmidt
On Jan 18, 2011, at 08:57, Joker wrote: > I will start using CakePHP and I'm having problems to make the > connection to the Firebird database. My development environment is > already fully configured but can not connect to the database, whenever > I get the message: "Fatal error: Call to undefin

Run asynchronous actions with live result within Ajax Div

2011-01-18 Thread Kh3ops
Hi everyone, I got a tricky thing to set-up. Once one of my users validates a form, I need to execute a couple of actions through a plugin which might take some time (up to minutes). What I'd like to do, is to open up a div overlay and get the live output from module actions within this div (div

Re: need urgent help

2011-01-18 Thread Tran Cao Thai
from where do you call to the users controller ? On Tue, Jan 18, 2011 at 6:40 PM, andy_the ultimate baker < anandghaywankar...@gmail.com> wrote: > hi, > i m trying to redirect the action on a controller but it is > redirecting to another controller action. > //users_controller.php > function admi

CakePHP 1.3 and Firebird

2011-01-18 Thread Joker
First, Happy 2011 to everyone and that peopl please forgive my english is bad. I will start using CakePHP and I'm having problems to make the connection to the Firebird database. My development environment is already fully configured but can not connect to the database, whenever I get the message:

need urgent help

2011-01-18 Thread andy_the ultimate baker
hi, i m trying to redirect the action on a controller but it is redirecting to another controller action. //users_controller.php function admin_add(){ if(!empty($this->data)){ if($this->save($this->data)){ $this->Session->setFl

Session tracking

2011-01-18 Thread Tran Cao Thai
Hi cakers, I have been developed a Paypal payment system recently. When user finish the payment, paypal will return the ipn to the system (which include the session id of the user). My question is how can i find out the user from the server based on his session id in order to empty his shopping ca

CakeDC's oauth_lib

2011-01-18 Thread Điển vũ
https://github.com/CakeDC/oauth_lib I use Cakedc's oauth_lib, but i stuck at this code: $RequestToken = $this->Session->read('request_token'); $AccessToken = $RequestToken->getAccessToken(array('oauth_verifier' => $options['oauth_verifier'])); $response = $AccessToken->request('GET', 'http://api.

Newbies Problem please help

2011-01-18 Thread Pash
Hi Friends am newbies to cakephp please help me. I was reading the e-boook Cakephp applicaiton Development on page no 89 there is an example of Magic Find Functions. I dont know why it is not showing me the result. can anybody help me i am just stuck in between? // book_co

Re: Form Validation does not work on Cake 1.3.6

2011-01-18 Thread Kh3ops
Actually, I baked my application and form validation is working fine now. As far as $this is concerned. I would love to use it but it doesn't work : "call to a member of a non-object"... Gaëtan On 11 jan, 05:03, Amit Badkas wrote: > Hi, > > Your description of the validation problem is too less

Re: redirect loop has me stumped

2011-01-18 Thread john lyles
I found my problem. It was two problems really. The first problem was that $post was not set in the controller. The second problem was a misplaced parentheses in the redirect function. The third problem was I was creating urls that were hyphenated but forgot to add the second parameter to the Infl

Permission by row

2011-01-18 Thread Yaron
Hi, Is there a way to allow edit / delete only to certain rows and not all, via the Acl ? For example, let there be a blog with many users. I'd like users to be able to edit only the posts they have created, and not posts other users created. Of course the Post model has a user_id field to know whi

Re: New Project: Politi

2011-01-18 Thread john lyles
It's also a question of citizen participation. If a community that has this application has enough citizen participation it would be foolish for a politician to ignore it especially if you live in a town/city with low voter turnout so that a relatively small number of voters can decide the election

Re: Passing url ("prefix") parameters from Router to Session

2011-01-18 Thread Matthias
Ok, I read about this in the book, but I didn't know what this "slug" thing should mean... > This way, there's no ambiguity about which controller is involved The problem is that it's not just 1 or 2 controllers/actions, but the whole system is supposed to work this way. So I don't want to pass th

Re: New Project: Politi

2011-01-18 Thread DragonFlyEye
Initially, my thought was to have a central website, and much like WordPress.com and .org, I suppose there will certainly be a central demonstration of how it works. But as OSS goes, of course, it should be downloadable to be implemented anywhere that fits. Someone wants to run a local show for

Re: New Project: Politi

2011-01-18 Thread DragonFlyEye
Initially, my thought was to have a central website, and much like WordPress.com and .org, I suppose there will certainly be a central demonstration of how it works. But as OSS goes, of course, it should be downloadable to be implemented anywhere that fits. Someone wants to run a local show for

Re: New Project: Politi

2011-01-18 Thread DragonFlyEye
Fair question. But my thinking is: build the tool and let the politicians decide. I actually don't think this is a question of politicians: it's a question of the administrators and the managers that actually run the government and free the politicians to bloviate! Check out the new CakePHP Que

Re: New Project: Politi

2011-01-18 Thread euromark
oh - and my question would be: who cares? i mean, will those politicians do something? or is it wasted time to contribute to this project or report any "problems"? sounds like this is going to be a "civil/private website". but thats already off topic :) On 18 Jan., 20:37, john lyles wrote: > We

CakePHP AJAX Session

2011-01-18 Thread heratech
Hi, I am having a problem with cakephp (running latest 1.3) When my users leave their browser idle for an hour or two if they return and click any links or refreshes the page the cookie/session/ auth is handled fine. they are taken to that page automatically (no need to login). However if they do

Model as aro and aco

2011-01-18 Thread João Rodrigues
Is it possible to use a model as a request object and a controlled object at the same time? For example, if I have a table of users, can I use ACL so each user can only read and update their own user? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP r

Re: New Project: Politi

2011-01-18 Thread john lyles
Well it is a CakePHP project so to me its apropos to discuss it in the CakePHP community, but I don't make the rules here either. I check it out and wondering, will this be an application that people can download and do for their own communities or will this be centralized, say like a Craigslist?

Re: redirect loop has me stumped

2011-01-18 Thread john lyles
Ok sorry. Here's a more full explanation: In my index.ctp I have links that look like this: Html->link($post['Post']['title'], array('controller' => 'posts', 'action' => 'view', $post['Post']['id'],Inflector::slug($post['Post'] ['title'], '-'))); ?> Then in the PostsController view() method, this

New Project: Politi

2011-01-18 Thread DragonFlyEye
Hey! Don't want to pollute the group with extraneous crap, but I thought maybe some of you CakePHPers would take an interest in a new OSS project I'm trying to get off the ground, based on CakePHP: http://code.google.com/p/cakephp-politi/ Check out the new CakePHP Questions site http://cakeqs.o

Re: redirect loop has me stumped

2011-01-18 Thread DragonFlyEye
I'm guessing there is more to the problem than the code you're presenting. Like, where is $id coming from? 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

redirect loop has me stumped

2011-01-18 Thread john lyles
Hi Everyone, I need some help with a redirect loop... Consider the following code (from Super Advanced CakePHP tips page 43-44 http://www.scribd.com/doc/19344870/Super-Awesome-Advanced-CakePHP-Tips) if(Inflector::slug($post['Post']['title']) != $this->params['pass'] [1] || count($this->params['p

CakePHP; Exceptions and Errors

2011-01-18 Thread euromark
Right now I would be happy if Cake used Exceptions I would like this snippet to work try { $result = Validation::custom($this->params['form']['value'], $this- >params['form']['validation']); } catch (Exception $e) { $message = $e->getmessage

Controller/Model Inheritance between two plugins

2011-01-18 Thread keymaster
Say you have two plugins, A and B. It is fairly simple for a component/behavior/helper in plugin B to inherit from a component/behavior/helper in A by doing an App::import(), then extending. But, it is more complicated for controllers/models in plugin B to inherit from their peers in plugin A, si

Re: ACL Question

2011-01-18 Thread John Maxim
Hi Ed, Are you trying to say managing the actions only and sometimes it affects your CRUD ? I'm not en expert in this area, but giving my shot is: Use routing? That area is strange for me. Are you trying to hide some of the CRUD buttons for some users and not all? I think you can do that, I re

Re: deployment, git hooks, migrations ... updating your app with command line

2011-01-18 Thread huoxito
wwoww! thanks for those links! it might be exactly what I was looking for 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

Re: ApiGenerator plugin: Exclude plugins directory... and some other questions. --psybear

2011-01-18 Thread mark_story
Indented code blocks don't work. You need to use fenced code blocks. {{{ This should be code }}} -Mark On Jan 13, 4:22 am, Joshua Muheim wrote: > And another question: > > I'd like to have code examples in my method descriptions. I know that > I can put them into back ticks for inline code, bu

Re: ApiGenerator plugin: Exclude plugins directory... and some other questions. --psybear

2011-01-18 Thread Joshua Muheim
OK, the problem why the generator didn't seem to find all the needed files, was that I didn't use the correct folder structure convention. class A // needs to be in e.g. libs/a.php class B extends A // needs to be in libs/a/b.php If you do that, all the App::import() calls still seem to work, whi

Extending the datasource interface / How to avoid dispatchMethod in datasource.

2011-01-18 Thread safl
Hello, I am implementing a datasource and I want to be able to invoke a method on a model which uses the datasource such as: $this->AModelUsingMyDatasource->my_method(); However it seems that all invocations on models are routed through the query method. I have implemented the following workarou

Re: deployment, git hooks, migrations ... updating your app with command line

2011-01-18 Thread 100rk
https://github.com/CakeDC/migrations https://github.com/ceeram/clear_cache 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

Re: Changing /webroot and /views directories

2011-01-18 Thread DragonFlyEye
Ah! Thank you, Mr. Loboto! Hmm... Really seems like that information should belong somewhere else besides the "Migrating from 1.2 to 1.3" section, doesn't it? No wonder I never found it. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related quest

Re: Problem with saveAll() not saving related modelg any

2011-01-18 Thread huoxito
Maybe your data input array is not properly set up. Array ( [Article] => Array ( [title] => My first article ) [Comment] => Array ( [0] => Array ( [comment] => Comment 1 [user_id] => 1

UUID or INT and association problems

2011-01-18 Thread Pehmolelu
Im defining a completely new database. I have now faced a problem which I would describe as "usual" but still could not find good information from web. So here's the problem: I have many guide tables in database such as: Skills Places Activities and so on... Now to all these guide types I'd like

Rename Select (drop down list)

2011-01-18 Thread Antar
I have a view and I want to create a list of of "things" by selecting the first "thing" and the last "thing" and getting the lowest id and the highest id to use in a sql query. I would like the selects to be called "Thing From" & "Thing To" and they should both contain the same list of "Thing

Re: Auth flash errors appearing in IE when not expected

2011-01-18 Thread chris
Sorry to bump this, but really stuck for any ideas on why this is happening. If anyone has any ideas at all on this then please let me know. Thanks. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message becaus