User Management Plugin Cakephp 2

2012-05-05 Thread Steven Scaffidi
Hi I'm using a user management plugin for cakephp. The one I'm using can be found here: http://usermgmt.ektasoftwares.com/ Has anyone ever used this plugin? For some reason I can't get the permissions to work. For example, I create another user (as a user not admin) and I gave users permission

Re: CakePHP Containable on Associated Model

2012-05-05 Thread bs28723
Are you looking for a find where  "Log.user_id=2 OR Book.log_id = null"? On 5/3/2012 11:00 PM, Rob-3 [via CakePHP] wrote: I have a setup where there are Books Users and Logs. Each Log has a Book and a User and I am trying to retrieve a list o

Authorize component ordering

2012-05-05 Thread bs28723
I am trying to set the order for my Authorize components. I have a App/Controller/Component/Auth/OrgAuthorize.php I have tried starting with in AppController public $components = array( 'Auth' => array( 'authorize' => array('Controller') ) ); Then in m

Re: CakePHP Containable on Associated Model

2012-05-05 Thread Rob
Hi Michael, I tried to get it working, but I still only get the same results as above. What I want is a list of every book, and then in that same query I want only logs of the specified user, instead I am getting only books with logs of the specified user...not all books. Any ideas? On May 5, 9

Re: Instantiating and Saving a Model from another Model

2012-05-05 Thread Michael Stelly
if(!isset($this->ModelName){ $this->ModelName->loadModel(); } This only works in the controller, but it should get you what you want if I understood the question correctly. Sincerely, Michael Stelly mobile: +1.918.978.2000 skype: mjstelly LinkedIn On Sat,

Instantiating and Saving a Model from another Model

2012-05-05 Thread CakeNino
I am new to CakePHP and am building an application to help learn the framework. I am having a problem trying to instiate one model from another model. Here is the basic premise... Assume a simple application - I have Feeds (as in RSS Feeds) and Content. I want to create a page that grabs an RSS

Re: Model Associations and Inserting through Associations

2012-05-05 Thread stork
If user is not logged in, then in Event form: echo $this->Form->input('Event.user_id', array('type' => 'hidden', 'value' => $user['User']['id'])); and in controller: $this->Event->create($this->request->data); if ($this->Event->save()) { ... Do not forget to use SecurityComponent in AppControl

Display unescaped html elements

2012-05-05 Thread Matteo Landi
On May/05, Matteo Landi wrote: > Hi everybody, > > Could you tell me what is the right way to display html formatted content > extracted from the database? Taking the blog tutorial as example, how is > possible to let users create posts containing html tags such as `strong`, > `em`, > `ul` and s

Re: Model Associations and Inserting through Associations

2012-05-05 Thread Nate
I should have specified - the user doesn't necessarily have to be the logged in user. It could be any user, in which case $this->Auth->user('id') doesn't fit my needs. This is closer, I just need to figure out how to grab the user id from the users/view page. On Saturday, May 5, 2012 10:33:09 A

Re: Model Associations and Inserting through Associations

2012-05-05 Thread Nate
Trying to learn it through straight code before I dive into any console commands. One of the biggest reasons that I've put off using MVC is because I like to feel like I'm in control. Yes, probably dumb, but it makes more sense to my fragile brain. On Saturday, May 5, 2012 7:57:13 AM UTC-6, Mic

Re: Model Associations and Inserting through Associations

2012-05-05 Thread stork
$this->Event->create($this->request->data); $this->Event->set('user_id', $this->Auth->user('id')); if ($this->Event->save()) { ... -- 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

Table 'cakehr.cake_errors' doesn't exists

2012-05-05 Thread Florin Trifu
Did anyone encountered this error: [PDOException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cakehr.cake_errors' doesn't exist ? I have no idea why this is happening. The problem is that I can't see the errors because they are nested inside a div having the id="search-form-contai

i

2012-05-05 Thread Matteo Landi
Hi everybody, Could you tell me what is the right way to display html formatted content extracted from the database? Taking the blog tutorial as example, how is possible to let users create posts containing html tags such as `strong`, `em`, `ul` and so forth? Thanks, Matteo -- http://www.matt

Re: Model Associations and Inserting through Associations

2012-05-05 Thread Michael Gaiser
You should take some time to learn how to use bake. It will setup the basics for you based on your database and will serve as a great example of how to do things. http://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html There are many tutorials out there about setting it u

Re: CakePHP Containable on Associated Model

2012-05-05 Thread Michael Stelly
Yes, I'd work it using Containable . Sincerely, Michael Stelly On Thu, May 3, 2012 at 9:59 PM, Rob wrote: > I have a setup where there are Books Users and Logs. Each Log has a > Book and a User and I am trying to retri

Re: [Cake 2.1.1] AJAX POST with jQuery cross Controller - Bad Request

2012-05-05 Thread jmail
After search and making lot of tests I have decided to do this by other way. 1. I have removed Security component from AppController 2. I have added Security component to every Controller 3. I have added AjaxController to my app without Security component 4. No I am creating functions controller

Model Associations and Inserting through Associations

2012-05-05 Thread Nate
MVC Beginner here - I have created a database with a USER table which hasMany EVENTS, and conversely have set the EVENTS belongsTo USER Here's my question: When I want to add an event from a user page (users/view), how do I automatically associate that event(event/add) with the user in the data

Call another controller paginate

2012-05-05 Thread nikunj kansara
Hello all, I have tow controller, with name of asycontroller, and askcontroller. class saycontroller extends AppController { var $name = 'Asks'; var $helpers = array('Html', 'Form', 'Session', 'Time', 'Paginator'); var $components = array('Session', 'Auth', 'RequestHandler'); var $paginat

Re: Fatal Error: Class 'String' not found in Model

2012-05-05 Thread WyriHaximus
Hey I've encountered the same bug on a different place tho. Are you by any change running with E_STRICT error logging on? Cause going from E_ALL | E_STRICT to just E_ALL 'solved' the problem. (Had this on both windows and linux.) On Thursday, May 3, 2012 2:21:16 AM UTC+2, Conor Manning wrote: >

Re: Wrong request method (2.1.2)

2012-05-05 Thread euromark
thats why I don't care about PUT or POST: https://github.com/dereuromark/tools/blob/2.0/Controller/Component/CommonComponent.php#L143 for me: posted = put or post get otherwise at least in a practical sense anyway (since the one is only a more specific version of the other). Am Samstag, 5. M

Re: Problem with Miles J. Uploader plugin and image name

2012-05-05 Thread Xoubaman
3.5 El sábado, 5 de mayo de 2012 06:10:32 UTC+2, Miles J escribió: > > What version are you using? > > On Thursday, May 3, 2012 9:49:21 AM UTC-7, Xoubaman wrote: >> >> This is my behavior setup: >> >> public $actsAs = array( >> 'Uploader.Attachment' => array( >> 'image_upload'