Re: the function findby have no any change for the param 'recursive'

2010-05-27 Thread Dr. Loboto
Cake documentation about findBy and findAllBy is incomplete. Actually it should be: findBy(string $value, $fields=null, $order=null, $recursive=null) findAlldBy(string $value, $fields=null, $order=null, $limit=null, $page=null, $recursive=null) On May 27, 3:37 pm, Rimoe wrote: > hi, > > I have

Re: case sensitivity on certain hosting

2010-05-27 Thread Dr. Loboto
Keep all your files and folders lowercased. On May 27, 10:37 pm, leo wrote: > I'm having a problem on one of our hostings with case sensitivity. > Strangely, it is only on the 'users' controller. > > If I do '..users/login' it doesn't work. If I do '..Users/login' it > does. > If I move the appli

Method :: Address does not exist

2010-05-27 Thread Ed Propsner
Anyone have an ideas where I should start looking for the cause of this warning: Method OnlineUsersHelper::address does not exist It's not set up any differently from the rest of my helpers. The function executes okay and returns the correct output, I just get the warning. - Ed Check out the n

Re: Prefix routing problem

2010-05-27 Thread cronet
hm... i solved my problem with the following route configuration: Router::connect('/aktivieren/*', array('controller' => 'users', 'action' => 'activate', 'admin'=>null)); I don't know why cake behave this way, because in the manual there's a note to user admin=>false, not admin=>null in the h

Re: Prefix routing problem

2010-05-27 Thread cronet
that does not solve the problem... Router::connect('/aktivieren', array('controller' => 'users', 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); Router::connect('/aktivieren/', array('controller' => 'users', 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); Router::connect('/

Re: How to add ck finder functionality in cakephp 1.3

2010-05-27 Thread #2Will
There are a couple of articles on this out there. Ckeditor dosn't come with a filebrowser by default you have to set it up your self. check these out: http://www.google.com.au/search?q=cakephp+ckeditor&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a The fourth link down is

Re: Scaffolding with model causes class not found error

2010-05-27 Thread Jamie
In CakePHP, model class names don't end with "Model". So your model class should just be "Category", not "CategoryModel". - Jamie On May 27, 12:36 pm, mwaterous wrote: > I'm a recent convert from CodeIgniter to CakePHP, and up until now I > haven't used Cake's scaffolding. This morning I found m

Re: Prefix routing problem

2010-05-27 Thread Bogdan Bursuc
You need to define the master route, also: Router::connect('/aktivieren/', ...); That's the router you access when you enter /aktivieren. On Fri, May 28, 2010 at 2:05 AM, cronet wrote: > Hey, > > i defined the following route: > >Router::connect('/aktivieren/*', array('controller' => 'u

Re: 1.3 prefix routing.

2010-05-27 Thread Sam Sherlock
Configure::read('Routing.admin'); in 1.3 => Configure::read('Routing.prefixes.0'); you can get an array of prefixes for building routes in routes.php Configure::read('Routing.prefixes'); - S On 27 May 2010 23:45, aleph1 wrote: > I can't see how to retrieve the current prefix that is being us

Re: Two application same path

2010-05-27 Thread julian.aba...@gmail.com
I'll try thanks On 27 mayo, 13:40, John Andersen wrote: > In each of your applications, there is an index.php file, in which the > paths to cake are defined. > Just change each according to your need :) > Enjoy, >    John > > On May 26, 11:07 pm, Jose Julian Abarca > wrote: > > > hi how to can h

generate po files

2010-05-27 Thread Igurpi
I have generated my .po file using the "cake i18n extract" command in the shell. But in my cakephp app, I have some translations with the "__d" function: For example: "__d('admin', 'value')" where 'admin' is the domain name. I expected to get an admin.po file automatically with the shell function (

1.3 prefix routing.

2010-05-27 Thread aleph1
I can't see how to retrieve the current prefix that is being used for routing purposes. For example, if I configure Routing.prefixes as follows: Configure::write('Routing.prefixes', array('admin','moderator')); How do I retrieve the current prefix when a page is viewed? In 1.2 this was Configur

Scaffolding with model causes class not found error

2010-05-27 Thread mwaterous
I'm a recent convert from CodeIgniter to CakePHP, and up until now I haven't used Cake's scaffolding. This morning I found myself with a need to build some data quick and decided to give it a go. Literally all I did was build a skeleton Categories controller, ie class CategoriesController extends

Prefix routing problem

2010-05-27 Thread cronet
Hey, i defined the following route: Router::connect('/aktivieren/*', array('controller' => 'users', 'action' => 'activate', 'admin'=>false)); But everytime when I try to access /aktivieren cake routes me to admin_activatie... Here ar some vars from pr($this) [action] => admin_activ

Re: Problem with database cascade relationships.

2010-05-27 Thread 朝の木
Here is full statement *generated by cake*. It raises sql-error: SELECT `TestProduct`.`title`, `TestType`.`description`, `TestProductItem`.`size`, COUNT(*) FROM `test_product_items` AS `TestProductItem` LEFT JOIN `test_products` AS `TestProduct` ON (`TestProductItem`.`test_product_id` = `TestProdu

Re: Auth Error

2010-05-27 Thread Ed Propsner
I'm relatively sure that by default $this->Auth uses a combination of your security salt and sha1 for the hash but you can change it to whatever you want if you feel the need. http://api13.cakephp.org/class/security - Ed On Thu, May 27, 2010 at 6:18 PM, D

Re: Auth Error

2010-05-27 Thread Davor Ilic
o no it was my mistake xD i have forgot to declare the php tags xD that happens first time since i had learnd about php oh man thats sucking i have lost time for this bu..s..t sorry man for losing your time . but where can i find how the password will be saved how it will be ecoded? thanks 2

Re: Auth Error

2010-05-27 Thread Ed Propsner
First and foremost make sure that you actually have a controller named users_controller.php in your app/controllers dir On Thu, May 27, 2010 at 5:59 PM, Davor Ilic wrote: > The Security i had cahange it from begin, do not know why it wanna from me > to do it again. > and in the appcontroller i´v

Re: Auth Error

2010-05-27 Thread Davor Ilic
The Security i had cahange it from begin, do not know why it wanna from me to do it again. and in the appcontroller i´ve also write the same which you said but this gives me the error when i delete this line from appcontroller it works fine only if i change it in appcontroller to auth it doesn´t wo

Re: Auth Error

2010-05-27 Thread Ed Propsner
Just to be sure make sure your config for the Auth component in the AppController looks something like this: class AppController extends Controller { var $components = array('Auth'); } By the looks of it you may also want to change your security salt and cipherSeed in App/Config/Core.php I'm no

Re: Ajax problem ???

2010-05-27 Thread Ed Propsner
@Jeremy: >> I found the problem with the display of validation errors (as well as my ajax issue) to be a result of the security component. Odds are that I had something set incorrectly in beforeFilter() but in any case that's where the problem originated. - Ed On Tue, May 25, 2010 at 1:33 PM, Ed

Re: change action to render on beforeRender()

2010-05-27 Thread calvin
Yea, if you could keep the view files in subdirectories instead of giving them different filenames, that would be optimal. On May 27, 3:26 am, "Dr. Loboto" wrote: > Just add var like hasRendered, set and check it in beforeRender. > > Or keep customized views inside subfolders and just alter $this

Re: Facebook fan pages and application

2010-05-27 Thread calvin
That is beyond the scope of this group. I would suggest reading up on the API docs of Facebook/MySpace/Twitter/etc. and consulting their respective development communities. If you have specific questions pertaining to Cake, then you can come here to ask them. On May 27, 4:32 am, mirfan wrote: > H

Re: Database representation of meta data tables

2010-05-27 Thread calvin
Aside from join tables, Cake doesn't have specific conventions for particular table relationships. Just follow the underscore/plural convention and name it whatever makes the most sense. On May 27, 7:47 am, Jeremy Burns wrote: > Before answering can I clarify. Do you mean (for example): > > table

Re: what's the return value of this code?

2010-05-27 Thread John Andersen
According to the MySQL manual, the ALTER TABLE command does not give back a return code, unless it fails. And looking at the query method for the Model and the DboSource files the return code may be undefined for the ALTER TABLE command or false upon error. Enjoy, John On May 27, 11:35 am, Wang

Re: HABTM Containable find('all') question

2010-05-27 Thread bradmaxs
Hi Paul, In a nutshell, YES!! To be honest - I have spent the morning trying to understand DISTINCT having never worked with it before. I am going to start experimenting and see if I can come up with anything. I do agree, the cake community is expansive, knowledgeable and for the most part extr

Re: Two application same path

2010-05-27 Thread John Andersen
In each of your applications, there is an index.php file, in which the paths to cake are defined. Just change each according to your need :) Enjoy, John On May 26, 11:07 pm, Jose Julian Abarca wrote: > hi how to can have a application into / y other /proyectos the first with > cakephp1.3 y the

Re: How to override the scaffold mainlayout

2010-05-27 Thread John Andersen
In your action, just try to set the controlles layout and see if it doesn't also change the scaffolds layout :) Enjoy, John On May 27, 12:59 pm, welja wrote: > Hi there, > > Just a quick question. > Is there way of changing the layout of the scaffold (which is set in > libs/controller/scaffold

Re: can anyone send me the sql file of world country and city list

2010-05-27 Thread cricket
On May 27, 12:17 am, Shahjahan Russell wrote: > can anyone please help me on this issue > > i need the world country and city list.. Here's some SQL for countries: http://pastebin.com/2DrNuiyC Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP rela

Re: can anyone send me the sql file of world country and city list

2010-05-27 Thread cricket
On May 27, 1:05 pm, Miles J wrote: > Country list is easy. City list would be in the millions, thats never > going to happen. The Heaven's Above site[1] (astronomy info) has a lookup tool for lat/ lon position of cities around the world. I use it regularly because I make maps (for print) and need

Re: XMLHttpRequest bypassing Auth component

2010-05-27 Thread Miles J
Ive ran into the complete opposite. My ajax requests would always be redirected to the login page. Can we see your code? Are you allowing the actions on accident? On May 26, 4:43 pm, heratech wrote: > this has been posted before by someone else but there was no > answerhttp://groups.google.com/

Re: can anyone send me the sql file of world country and city list

2010-05-27 Thread Miles J
Country list is easy. City list would be in the millions, thats never going to happen. On May 26, 9:38 pm, Blackbit wrote: > That's a lot... Maybe you can ask google for their database^^ > > On 27 Mai, 06:17, Shahjahan Russell wrote: > > > can anyone please help me on this issue > > > i need

Re: css @import

2010-05-27 Thread Miles J
http://api13.cakephp.org/class/html-helper#method-HtmlHelpercss You can pass "import" as the second argument. On May 27, 4:35 am, Bart Vangeneugden wrote: > Hello Lorenzo, > > the @import url(..) line is CSS only. PHP has nothing to do with it. > The best answer I can give is checking in Firebug

Re: case sensitivity on certain hosting

2010-05-27 Thread Andy Dirnberger
Does that host have a "users" folder at ..users? On May 27, 11:37 am, leo wrote: > I'm having a problem on one of our hostings with case sensitivity. > Strangely, it is only on the 'users' controller. > > If I do '..users/login' it doesn't work. If I do '..Users/login' it > does. > If I move the

CakePHP and WordPress

2010-05-27 Thread Jeremy Burns
I know this has been touched on a few times, but I have an issue I can't resolve or find a working answer to. I have installed WordPress in /app/webroot/blog Following various bits of advice I have added these lines to the .htaccess file in Cake's root: RedirectMatch temp ^/blog/wp-admin

Re: cakephp and db2

2010-05-27 Thread leon
Thanks a lot for your help, I try this code $this->Post->id = $id; $this->set('post', $this->Post->read()); and $this->set('posts', $this->Post->findById(1)); but they both generate this SQL string SELECT Post.id, Post.title, Post.body, Post.created, Post.modified FROM posts AS Post WHERE Post.i

case sensitivity on certain hosting

2010-05-27 Thread leo
I'm having a problem on one of our hostings with case sensitivity. Strangely, it is only on the 'users' controller. If I do '..users/login' it doesn't work. If I do '..Users/login' it does. If I move the application to a subfolder, it works for both upper and lower cases. No other controllers are

Re: Database representation of meta data tables

2010-05-27 Thread Jeremy Burns
Before answering can I clarify. Do you mean (for example): table: users table: user_profiles ...where each user has a row in the user_profiles table? Jeremy Burns jeremybu...@me.com On 27 May 2010, at 14:11, Radyon wrote: > Hey, > > I've just started using cake and was wondering how I would

Database representation of meta data tables

2010-05-27 Thread Radyon
Hey, I've just started using cake and was wondering how I would implement tables which contain meta data based on other tables. Example: User (table) - UserMeta (table2), with a 1-1 relationship. How would I name the user meta table in the database? How would I name the model/controllers? Any t

How to add ck finder functionality in cakephp 1.3

2010-05-27 Thread us
Hi, I have tried adding ckfinder functionality in cakephp using following code but it does not show browse server button, any ideas? $ckfinderPath="js/ckfinder/"; var editor = CKEDITOR.replace('NewsFeature.content'); CKFinder.SetupCKEditor(editor,'') ;

what's the return value of this code?

2010-05-27 Thread Wang Suyun
$alter_sql = "ALTER TABLE `users` ADD `approved` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `image` "; if($this->ModelName->query($alter_sql)){ $message .= "The column 'approved' has been added to 'users' table"; } it seems that the return value o

Cannot get the Bake to run in Console

2010-05-27 Thread awsmori
I placed alias cake="php ~/home3/websitek/public_html/blog/cake/ cake.php" on the .profile and once i type "cake" it gives me the 404 Not Found error. Please Help Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this me

Re: Cakephp session is not setting in pages controller

2010-05-27 Thread John Andersen
How does your pages controller look like, the code? Enjoy, John On May 27, 10:11 am, Binu wrote: > Hi, > > I am using cakephp1.2 . I have override the pages controller. While > login from my application, Im setting the session and redirecting to > pages controller, but there I could not able t

Re: the function findby have no any change for the param 'recursive'

2010-05-27 Thread Rimoe
Thank you! you are very nice! Rimoe 2010/5/27 John Andersen > As specified in the CakePHP book at: > http://book.cakephp.org/view/73/Retrieving-Your-Data#findBy-451 > > the findBy does not take a second parameter. > So in order to set the recursive to 0, do this before your > findBy call. > >

Re: the function findby have no any change for the param 'recursive'

2010-05-27 Thread John Andersen
As specified in the CakePHP book at: http://book.cakephp.org/view/73/Retrieving-Your-Data#findBy-451 the findBy does not take a second parameter. So in order to set the recursive to 0, do this before your findBy call. [code] $this->YourModelName->recursive = 0; $data = $this->YourModelName->findB

Re: css @import

2010-05-27 Thread Bart Vangeneugden
Hello Lorenzo, the @import url(..) line is CSS only. PHP has nothing to do with it. The best answer I can give is checking in Firebug (http://getfirebug.com/) if the file gets loaded, or gets a 404. Perhaps you did get the path wrong, is your address llike the following: http://www.example.com/ o

Facebook fan pages and application

2010-05-27 Thread mirfan
Hi, I am new to cakephp and also to facebook apps but i have no option: I have to retrieve fan fage and application users (fans) when the user provide application ID see the following case I have to register an application which ID is 1234567890 Now when the user provide this ID its statistics

Re: themes not working?

2010-05-27 Thread Lorenzo Bettini
On 05/27/2010 11:58 AM, Lorenzo Bettini wrote: Hi I'm trying to add themes to my cakephp application but they don't seem to work at all... in my AppController I put class AppController extends Controller { var $view = 'Theme'; var $theme = 'example'; and in my app/views directory I created

Re: cakephp and db2

2010-05-27 Thread Dr. Loboto
I think it's because you pass string '1', not integer 1 to find. Add ticket at http://cakephp.lighthouseapp.com/projects/42648-cakephp On May 26, 3:22 pm, leon wrote: > CakePHP will add two single quotes for integer in SQL string, but > execute this kind of sql will cause error in db2. > > Wrong

Re: change action to render on beforeRender()

2010-05-27 Thread Dr. Loboto
Just add var like hasRendered, set and check it in beforeRender. Or keep customized views inside subfolders and just alter $this- >viewPath in beforeRender. I think it's much better. On May 26, 8:19 pm, TuteC wrote: > Hi all. I'd like to change the default action to render so as to check > if a

Re: Avoiding $uses but binding not giving a result?

2010-05-27 Thread Shaz
Just went back and set recursive to 2 (I was under the impresson I can set it to -1,0,1; didn't realise there was a 3rd ('2') tier!) Although I'm getting far too much information in my article array but it is finally showing the CommentRank! =D Will try and use find() with contain() later but it w

themes not working?

2010-05-27 Thread Lorenzo Bettini
Hi I'm trying to add themes to my cakephp application but they don't seem to work at all... in my AppController I put class AppController extends Controller { var $view = 'Theme'; var $theme = 'example'; and in my app/views directory I created themed/example/views

How to override the scaffold mainlayout

2010-05-27 Thread welja
Hi there, Just a quick question. Is there way of changing the layout of the scaffold (which is set in libs/controller/scaffold) It seems there are no hooks for doing this, maybe i need to override the scaffold class? I am using cake 1.3 Thx! Check out the new CakePHP Questions site http://cake

Re: Avoiding $uses but binding not giving a result?

2010-05-27 Thread Shaz
I've set recursive only for the index, not the view (as I don't need comments in the index pagination). I don't suppose I would have to declare hasAndBelongsToMany? Strange; I'm pretty sure somewhere i haven't associated my models correctly. On 27 May, 10:22, Jeremy Burns wrote: > Have you set r

Re: Avoiding $uses but binding not giving a result?

2010-05-27 Thread Jeremy Burns
Have you set recursive anywhere? http://book.cakephp.org/view/439/recursive Jeremy Burns jeremybu...@me.com On 27 May 2010, at 10:16, Shaz wrote: > Thanks all - I went back to the models and checked the belongsto/ > hasmany declerations, some plurals where they shouldn't be and no more > errors

Re: Avoiding $uses but binding not giving a result?

2010-05-27 Thread Shaz
Thanks all - I went back to the models and checked the belongsto/ hasmany declerations, some plurals where they shouldn't be and no more errors. But now another delima; how do i get the ranks associated with the comments? Ideally I would like an array returned like: Article User Comment - Com - -

css @import

2010-05-27 Thread Lorenzo Bettini
Hi does css @import url work in cakephp? I tried to import another css in my main.css with @import url("css/other.css"); and @import url("/css/other.css"); but it does not seem to work. Of course, instead, I can always do in my layout echo $html->css('main'); echo $html->css('other'); but

Re: 404 error since updating to 1.3

2010-05-27 Thread Taff
The components I am using are $components = array('Acl','Auth','Session','Cookie','Email'); which I have defined in my app_controller and are therefore used in all of my controllers. I tried commenting everything out in the webcasts controller, but still to no avail. It is probably a coincidenc

Re: Header element not refreshing!!!

2010-05-27 Thread WebbedIT
Glad you resolved your issue :) 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.

the function findby have no any change for the param 'recursive'

2010-05-27 Thread Rimoe
hi, I have use the findby function, but the recursive param have no role. my cakephp version is 1.2.1.8004 for example I have use the model function findbyusername('', array('recursive' => 0)); but it has show like findbyusername('', array('recursive' => 1)); do I have wrong use the fu

Re: array of objects in the controller

2010-05-27 Thread WebbedIT
OK, this has nothing to do with differences between views and controllers, this is basic PHP logic. The error message is telling you what you need to know, so try and figure out why $existingUsers is not a valid argument to be passed to foreach(). Hint: it's not an array or it's empty. HTH Paul

Re: integrating SWF chart with cakephp

2010-05-27 Thread WebbedIT
Are these of any help? http://bakery.cakephp.org/articles/view/open-flash-chart-helper-draw-charts-the-cake-way http://bakery.cakephp.org/articles/view/flashcharthelper-version-3 Not used them myself yet, so can't recommend either one, but will be in the not too distant future. Paul. Check out

Re: HABTM Containable find('all') question

2010-05-27 Thread WebbedIT
Let me clarify what we're trying to achieve here, are you after a DISTINCT list of Users who have Friends or Admirers with an approved status of 0 or 1? As for finding my posts helpful, I'm glad they have been of help, but I can't take any credit for them as all I am doing is passing on what I hav

Re: Updating text field and observing drop down list using ajax helper

2010-05-27 Thread WebbedIT
This isn't the answer you were looking for, but hopefully it's more helpful. If your example above is your real-life code then why are you using ajax at all? There is no server side request for data as the data is already all there. Also why do you want to copy the id from the select list into t

Cakephp session is not setting in pages controller

2010-05-27 Thread Binu
Hi, I am using cakephp1.2 . I have override the pages controller. While login from my application, Im setting the session and redirecting to pages controller, but there I could not able to get the session. If I redirect to some other controller, Im getting the session over there. I have a table wi