CakeDC Tag Plugin

2011-12-15 Thread #2Will
Hi I'm using the Tags plugin. Its working ok generally. But when trying to paginate a list filtered by tag, I'm not getting any related table data at all. No related tags (a relationship the plugin deals with) and nothing from simple has one relationships i have defined in the post model eithe

Altering Relationships on the Fly

2011-12-15 Thread Geoff Douglas
I just learned something and thought I would share. So I came across the need to apply a condition to a hasMany query. I was like how in the world do I do that? // Get all Checkpoints with Appropriate Spec $this->VehicleDailyLog->VehicleDailyLogCheckpoint->VehicleCheckpoint ->hasMany['Vehicle

Re: Strange Errors in Error Log - SimpleAuthWebServiceController could not be found?

2011-12-15 Thread jonathan
Hey Andy, Very interesting. It's a customer's Windows 2003 server that's allegedly behind a secure firewall so I will do just what you suggested and see if I can figure out who's knocking on my door. I don't have access to any of the Server logs (it's IIS fwiw) so I'll try to figure it out from

Re: Trouble upgrading from 1.3.4 to 2.0.4

2011-12-15 Thread euromark
just do it step by step and and fix the last occuring erros manually. there will always be sth that will not work out of the box. but it is manageable. it helps to have version control and have everything committed before starting this way you know what changed. what exactly wasnt working? any spe

Re: img src not working for me

2011-12-15 Thread Thiago Belem
A web page is not your file system.. you should use something like relative path, or http://localhost/. Are you using the HtmlHelper? Regards, -- ***Thiago Belem* Desenvolvedor Rio de Janeiro - RJ - Brasil +55 (21) 8865.9250 thiagobelem.net cont...@thiagobelem.net *Skype / gTalk **»* thiago.bel

img src not working for me

2011-12-15 Thread Daniel
img src is not working for me. No image shows up in the view. Here is the relevant HTML source of the page: ... ... 6 I can open this image file directly in my browser no problem. I am using the default css in cake. W

Re: Multi-level Authorization?

2011-12-15 Thread Wendall
Continuing to look into this, I'm examining my login method in my controller. public function login() { if ($this -> request -> is('post')) { // IF THE REQUEST IS A POST THAT MEANS A FORM WAS SUBMITTED if ($this-> Auth-> login($this -> request -> data)) { $this->Session->setFlas

Re: How to get all children of a parent if parent_id field is null

2011-12-15 Thread ahmed fakher
or you hust help me ,,how to show the menu to all controllers i use this helper http://bakery.cakephp.org/articles/MrRio/2006/09/24/threaded-lists&usg=AFQjCNH9f4L4HHCmsZ4kzVPVvmIIVfLF3A ..how to use find in app_controller file to fetch data from section table to all controllers,, i try to use find

Re: CakePHP 2.0 and SqlServer

2011-12-15 Thread Justin Edwards
I don't have any issues using the windows way, but I host the majority of my sites on linux, and don't want to host on windows. I'm relatively new to php, and really had to give up on figuring it out myself. I may take a look at it later and report the errors I had. There is a lighthouse ticket

Re: CakePHP 2.0 and SqlServer

2011-12-15 Thread Geoff Douglas
Take a look at the connect() method in the dbo_sqlsrv.php file. Make sure that it is using the appropriate formatting for the connection string. If you can use it from straight PHP, then it's probably a formatting issue. And you'll be able to see that from the connect() method. -- Our newest s

Re: CakePHP 2.0 and SqlServer

2011-12-15 Thread Geoff Douglas
After looking at my own sql connector, I remembered that I had to alter the connection string, slightly... When you connect to windows, and then to sql server, the authentication process is very finicky. I had to test what user I was coming in as, and give the proper access rights to that user

Re: Multi-level Authorization?

2011-12-15 Thread Wendall
$this->Auth->user() returns the same array as $user. This array doesn't have anything in it other than the passcode, and I need to access the other properties of my User object. How can I get these other properties? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakeph

Re: Joining on Multiple MySql Databases

2011-12-15 Thread Geoff Douglas
The "making a view" is my current work around... but views are not friendly when migrating and editing. So I am trying to move away from that. Hijacking the table name is something that I could do... Thanks AD! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.o

Re: CakePHP 2.0 and SqlServer

2011-12-15 Thread Justin Edwards
I have attempted to use this under linux, even made a lot of modifications, but nothing works. I spent a whole day in frustration. I was able to connect to sqlserver using basic php using freetds and another driver, but couldn't make them work with cakephp's system. On Thu, Dec 15, 2011 at

Re: Multi-level Authorization?

2011-12-15 Thread Geoff Douglas
The auth component has the User Data. So, you do a $this->Auth->user(); to retrieve the current logged in user. -- 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: Not seeing the connection between the Model component and the View

2011-12-15 Thread Yves S. Garret
Ok :-] I wasn't sure whether there was something I was missing in my question or that there in fact was no relationship whatsoever. On Thu, Dec 15, 2011 at 4:59 PM, AD7six wrote: > > > On Dec 15, 10:43 pm, "Yves S. Garret" > wrote: > > Then what role would the controller play when it comes to

Re: Alternative for dropdown with large dataset

2011-12-15 Thread Geoff Douglas
+1 I have used the autocomplete method lots of times... works great! The other convention would be to have a "Create Invoice" from the customer index. Then you can apply some filtering/searching on the customer index, then send the Customer Id when you go to the Invoice create page. Just as a

Re: CakePHP 2.0 and SqlServer

2011-12-15 Thread Geoff Douglas
The driver is the problem. The PHP extension requires the driver to be installed on the windows box. php.net/.../mssql.requirements.php Check the requirements for the linux box at the above link. (Says you need the FreeTDS library built...)

Re: Not seeing the connection between the Model component and the View

2011-12-15 Thread AD7six
On Dec 15, 10:43 pm, "Yves S. Garret" wrote: > Then what role would the controller play when it comes to validation? None. > Would you happen to have a link elaborating more on this? It's hard to elaborate on "none". The controller for saving a new row with a model that uses validation - and

Re: Not seeing the connection between the Model component and the View

2011-12-15 Thread Yves S. Garret
Then what role would the controller play when it comes to validation? Would you happen to have a link elaborating more on this? On Thu, Dec 15, 2011 at 4:38 PM, AD7six wrote: > > > On Dec 15, 8:51 pm, "Yves S. Garret" > wrote: > > As I'm going through the tutorial for making a blog, something v

Re: Not seeing the connection between the Model component and the View

2011-12-15 Thread AD7six
On Dec 15, 8:51 pm, "Yves S. Garret" wrote: > As I'm going through the tutorial for making a blog, something vexed me. > > http://book.cakephp.org/view/1538/Data-Validation > > What role does the controller play in validation, if any? In the blog tutorial: None. AD -- Our newest site for the

Re: How to get all children of a parent if parent_id field is null

2011-12-15 Thread ahmed fakher
> I wrote the tree behavior. there's nothing wrong with having multiple > top level nodes (and it doesn't say or imply that in the docs either). > > Use whatever helper or loop you want. > > e.g. this > onehttp://bakery.cakephp.org/articles/AD7six/2008/01/24/tree-helper-1 > this onehttps://github

Since I can't register on ask.cakephp.org (An internal error occurred: 4B427927FFC21.AB44A44.22F1)....

2011-12-15 Thread Christophe
So here is the situation: I'm trying to add a autocomplete textbox (using the Ajax helper downloaded here: http://www.cakephp.bee.pl/ajax) The autocomplete is on a textbox filtering movie names. function movie_autoComplete() { $movieLocal = $this->Movie->find('all'); // some logic but now

Re: photo gallery

2011-12-15 Thread Christopher Castro
SlideShowPro Directoris the best I know for image galleries, it is written on cakePHP. 2011/12/15 heohni > Hi, has anyone ever used/build a photo gallery management for cake? > Does anyone knows a good source or a script that works well w

Not seeing the connection between the Model component and the View

2011-12-15 Thread Yves S. Garret
As I'm going through the tutorial for making a blog, something vexed me. http://book.cakephp.org/view/1538/Data-Validation What role does the controller play in validation, if any? It seems as if it bypasses it entirely? -- Our newest site for the community: CakePHP Video Tutorials http://tv.

Re: Multi-level Authorization?

2011-12-15 Thread Wendall
Thanks for pointing out the video and tutes, exactly what I need. I do have a question, though. I'm going through the video tutorial for Auth in cakePHP 2.0 and have the Auth component set up as instructed in the video with the "authorized" property of the Auth Component set to "controller" so it

Re: CakePHP 2.0 and SqlServer

2011-12-15 Thread Andras Kende
I think this is what you looking for: https://github.com/cakephp/datasources/blob/2.0/Model/Datasource/Database/Sqlsrv.php Andras Kende On Dec 15, 2011, at 11:28 AM, Skinner wrote: > I am running CakePHP on a linux-based server. I need to connect to > MSSQL server as a datasource. So far I've

Re: Trouble upgrading from 1.3.4 to 2.0.4

2011-12-15 Thread McScreech
Damn, I was wrong - it's not actually working. I'm going to have to start over again since I'm beginning to lose myself in the tangle I've created. I'll post back again after I make a fresh install and step through the process again. -- Our newest site for the community: CakePHP Video Tutorials

Re: Alternative for dropdown with large dataset

2011-12-15 Thread AD7six
On Dec 15, 8:16 pm, willeja wrote: > Hi, > > I'm creating an application for invoicing. When I want to create an > invoice, I have to select a customer. I don't want to use a dropdown > list because the number of customers could be very large. > What is a good alternative? I was thinking about a

Alternative for dropdown with large dataset

2011-12-15 Thread willeja
Hi, I'm creating an application for invoicing. When I want to create an invoice, I have to select a customer. I don't want to use a dropdown list because the number of customers could be very large. What is a good alternative? I was thinking about a modal window that returns name and id. I didn't

Re: cakephp find all with several tables

2011-12-15 Thread jholcomb
my next question has to do with how do I apply pagination to this query? -- View this message in context: http://cakephp.1045679.n5.nabble.com/cakephp-find-all-with-several-tables-tp5077723p5078473.html Sent from the CakePHP mailing list archive at Nabble.com. -- Our newest site for the communi

Re: How to get all children of a parent if parent_id field is null

2011-12-15 Thread AD7six
On Dec 15, 7:43 pm, ahmed fakher wrote: > > > i user tree behavior,,but i build it like this table >> all parent > > > must be null field not the top parent only..i know that is wrong > > > why is that wrong? > > --- it is wrong because it must  the first parent to be null -not all > parents- se

Re: using requestHandler to return jpg blob reuest headers

2011-12-15 Thread paulinthought
Well, I finally got a result. I gave up on the requestHandler and instead set the headers output in the controller using Controller::header('Content-type:'.$contentType); and sending the data content to the view in the normal way. Hope it helps someone else. On Dec 13, 11:47 pm, paulinthought wro

photo gallery

2011-12-15 Thread heohni
Hi, has anyone ever used/build a photo gallery management for cake? Does anyone knows a good source or a script that works well with cake? -- 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

MySQL-problem with bake and XAMPP

2011-12-15 Thread Marco K
Hello, I am trying to do the "Simple Acl controlled Application" tutorial. Everything works fine so far (cake bake opens the menu), but when I choose an option or want to execute the "cake bake all" command, i get the following error: --

Re: How to get all children of a parent if parent_id field is null

2011-12-15 Thread ahmed fakher
> > i user tree behavior,,but i build it like this table >> all parent > > must be null field not the top parent only..i know that is wrong > > why is that wrong? --- it is wrong because it must the first parent to be null -not all parents- see this link>>> http://book.cakephp.org/view/1340/Requ

CakePHP 2.0 and SqlServer

2011-12-15 Thread Skinner
I am running CakePHP on a linux-based server. I need to connect to MSSQL server as a datasource. So far I've only found how to do that when running PHP on windows. Can someone point me in the right direction? Thanks. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp

Re: cakephp find all with several tables

2011-12-15 Thread jholcomb
Got it here is the final version of the code for those who may want to know. [code] $this->recursive = -1; return $this->find('all', array( 'contain'=>array( 'Loan' => array( 'fields' =>

Re: cakephp find all with several tables

2011-12-15 Thread jholcomb
Tried it I think, here is my new code. [code] $this->recursive = -1; return $this->find('all', array( 'contain'=>array( 'Loan' => array( 'fields' => array('id', 'loan_description', 'acc

Re: Trouble upgrading from 1.3.4 to 2.0.4

2011-12-15 Thread euromark
PS: running cake "Upgrade.Correct all" should run the ones NOT specific to my app at one blow. On 15 Dez., 18:16, McScreech wrote: > Yaahooo!!! I appear to have upgraded successfully. Thanx VERY MUCH > Mark! > > I had only two hitches after upgrading that prevented my app from > loading (and onl

Re: Trouble upgrading from 1.3.4 to 2.0.4

2011-12-15 Thread euromark
1) no, its only partially specific some of the methods are really useful for you (see the comment in the class itself) some are not interesting for you 2) you may delete "Helpers" (probably didnt get deleted) On 15 Dez., 18:16, McScreech wrote: > Yaahooo!!! I appear to have upgraded successfull

Re: Trouble upgrading from 1.3.4 to 2.0.4

2011-12-15 Thread McScreech
Yaahooo!!! I appear to have upgraded successfully. Thanx VERY MUCH Mark! I had only two hitches after upgrading that prevented my app from loading (and only about an hour of effort): 1) I had to remove a closing php tag from the end of app\config \routes.php (which subsequently preceded the upgrad

cakephp find all with several tables

2011-12-15 Thread jholcomb
My problem is I am trying to get data from 5 different tables all the tables are related and I can create a sql query to get what I want. Here it is. [code] SELECT accounts.account_number, trailers.id, members.first_name, balances.balance, loans.loan_description, delinquent_loans.days_delinquent,

Re: cakephp find all with several tables

2011-12-15 Thread Jeremy Burns | Class Outfit
Try adding the 'child' key into the fields array; e.g 'Balance' => array('fields' => array('Balance.accounts_trailer_id', etc... Jeremy Burns Class Outfit http://www.classoutfit.com On 15 Dec 2011, at 15:01:59, jholcomb wrote: > My problem is I am trying to get data from 5 different tables all

Re: MongoDB $or + $regex

2011-12-15 Thread Dave Lancea
Hmm, I guess I misunderstood my original read of the original code. Our array formats look the same. Maybe the real problem is that using MongoRegex objects isn't necessarily, it worked for me to just use strings. However, I didn't test this using sub-items in a field, but on a field itself. Al

Re: How to add a "read" button to a view.ctp?

2011-12-15 Thread Paul Vaughan
(I don't know how to do it, but) Couldn't you achieve this with toggleable behaviour? Paul. On 15 December 2011 16:13, Yves S. Garret wrote: > I'm curious. Why did you go that route? What was your design decision? > Advantages/disadvantages? > > I'm learning about Cake every day and like to kn

Re: How to add a "read" button to a view.ctp?

2011-12-15 Thread Yves S. Garret
I'm curious. Why did you go that route? What was your design decision? Advantages/disadvantages? I'm learning about Cake every day and like to know more about why people do the things that they do. On Thu, Dec 8, 2011 at 6:28 PM, Daniel wrote: > I used an action: > > Html->link(__('Mark as re

Re: validation issue with model

2011-12-15 Thread AD7six
On Dec 15, 4:51 pm, Davor Ilic wrote: > yes im not a question ^^ . i do not register what you are talking about. > you said to me that i solved the question and i told you that i didn´t > solved it and then you ask me if i were a question xD sry but i can´t > understand what you want. > > next t

Re: validation issue with model

2011-12-15 Thread Davor Ilic
yes im not a question ^^ . i do not register what you are talking about. you said to me that i solved the question and i told you that i didn´t solved it and then you ask me if i were a question xD sry but i can´t understand what you want. next the question you will find when you follow the stacko

Re: cakephp 2.0 prefix of language in url ?

2011-12-15 Thread AD7six
On Dec 15, 3:46 pm, "progra...@gmail.com" wrote: > I used till 1.3 this code in boostrap... > > if(isset($_GET['url'])) > { > >   if ( strlen( substr( $_GET['url'], 0, strpos( $_GET['url'], '/' ) ) ) == > 2 ) { >     if(!defined('__RQL__')) >       define('__RQL__', substr( $_GET['url'], 0, strp

Re: validation issue with model

2011-12-15 Thread AD7six
On Dec 15, 4:20 pm, Davor Ilic wrote: > no i´m ot you're not a question? neither is the text you stuck on SO AD -- 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 Ca

Re: validation issue with model

2011-12-15 Thread Davor Ilic
no i´m ot 2011/12/15 AD7six > > > On Dec 15, 4:07 pm, Davor Ilic wrote: > > my question is in stackoverflow follow the link please > > I'm glad you solved your problem. > > AD > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new Cak

Re: validation issue with model

2011-12-15 Thread AD7six
On Dec 15, 4:07 pm, Davor Ilic wrote: > my question is in stackoverflow follow the link please I'm glad you solved your problem. AD -- 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 he

Re: validation issue with model

2011-12-15 Thread Davor Ilic
my question is in stackoverflow follow the link please 2011/12/15 AD7six > > > On Dec 15, 3:53 pm, Davor Ilic wrote: > > here i have descripe my problem could some help please. > > > > http://stackoverflow.com/q/8521936/1029693 > > strpos($yourquestion, '?') === false. > > What's the questi

Re: validation issue with model

2011-12-15 Thread AD7six
On Dec 15, 3:53 pm, Davor Ilic wrote: > here i have descripe my problem could some help please. > > http://stackoverflow.com/q/8521936/1029693 strpos($yourquestion, '?') === false. What's the question. AD -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org

validation issue with model

2011-12-15 Thread Davor Ilic
here i have descripe my problem could some help please. http://stackoverflow.com/q/8521936/1029693 thx -- 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 relate

cakephp 2.0 prefix of language in url ?

2011-12-15 Thread progra...@gmail.com
I used till 1.3 this code in boostrap... if(isset($_GET['url'])) { if ( strlen( substr( $_GET['url'], 0, strpos( $_GET['url'], '/' ) ) ) == 2 ) { if(!defined('__RQL__')) define('__RQL__', substr( $_GET['url'], 0, strpos( $_GET['url'], '/' ) ) ); $_GET['url'] = substr( $_GET['u

Re: Trouble upgrading from 1.3.4 to 2.0.4

2011-12-15 Thread McScreech
Thanx Mark. I shall try it out today. McS -- 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 questions. To unsubscribe from this group, send email to ca

How to turn off php safe mode in .htaccess

2011-12-15 Thread mthabisi mlunjwa
I get this error message when uploading images: Warning (2): copy() [function.copy]: SAFE MODE Restriction in effect. The script whose uid is 10214 is not allowed to access /usr/local/psa/ home/vhosts/testsite.com/httpdocs/app/webroot/img/Practitioner/338 owned by uid 80 [APP/models/behaviors/imag

Re: Black hole 404 error with radio buttons

2011-12-15 Thread eugenefphillips
Thank you, I got it to work. I like this way better, than bypassing the security for the complete action. -- 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 rela

Expectations for Model::commit() does not seem to work while testing in CakePHP 2.0

2011-12-15 Thread elitalon
Hi, I have a test case for a controller action that uses transactions. I have configure expectations for Model::commit() like this: $this->Users->User->expects($this->once())->method('commit')- >will($this->returnValue(true)); But the test fails because saying that commit was expected to exe

Re: form autopopulation

2011-12-15 Thread Tilen Majerle
If uou populate data array in your controller than form helper will look for this data and populate field with the same name as data key Dne ponedeljek, 12. december 2011 je pošiljatelj Anton Shevchenko < 2tamt...@gmail.com> napisal: > Hello, I'm new to CakePhp and don't understand the next thing

Re: hasAndBelongsToMany Question

2011-12-15 Thread AD7six
On Dec 13, 9:04 pm, Leon wrote: > Hello, > > So in my app I have Patients and I have Groups and each Patient can be > in many Groups and each group can have many patients. That's fine. > > I've got the multi-select setup on the View and that works fine too. > > However, I need to make some API c

Re: Joining on Multiple MySql Databases

2011-12-15 Thread AD7six
On Dec 14, 7:52 pm, Geoff Douglas wrote: > So, I have noticed on Cake 1.3 at least, when you have models that use > different dbConfigs, it doesn't join them if they have a belongsTo or > hasOne relationship. It instead queries each individual and then combines > the results. > > I understand th

Re: MongoDB $or + $regex

2011-12-15 Thread AD7six
On Dec 14, 10:18 pm, Dave Lancea wrote: > You can use the $or or $and operator to test multiple conditions of the > same name: > > $conditions = array( > '$or' => array( > array( > 'date' => array( > '$regex' => '/^arug/i', > ), > ), > array( > 'date' => array( > '$regex' => '/^bro/i', > ), > ),

Re: hasAndBelongsToMany Question

2011-12-15 Thread Toby G
Don't think that there's an easy way to do this, but if you have another unique value field in the table, you could use the solution mentioned here... http://cakephp.1045679.n5.nabble.com/saveall-and-getLastInsertId-or-return-all-last-inserted-ids-td1294886.html Perhaps create a field just to sto

Re: Strange Errors in Error Log - SimpleAuthWebServiceController could not be found?

2011-12-15 Thread AD7six
On Dec 15, 7:42 am, jonathan wrote: > Hi All, > > I am getting these strange errors in my error log file.  I am running > CakePHP 2.0.4 on a Windows 2003 Server (not by choice ;).  I searched every > file in my app and Cake folders and SimpleAuth does not appear in a single > file.  Any clues wh

Re: Missing View Error: The view for UsersControllerController::login() was not found.

2011-12-15 Thread AD7six
On Dec 14, 8:07 pm, Parthasarathy Ramanujam wrote: > Isn't the default routing mapping forRL say /users/login = > UsersController->login(); Why then does my app get an additional Controller > suffix appended? Look at the error message - it's saying it can't find a view file, it found your contr