Re: Question about Routing (domain.com/{cityname}/controller/action)

2010-05-27 Thread Bennet Jeutter
Works perfect, thanks :) On 25 Mai, 14:25, emanuele emanuel...@gmail.com wrote: Router::connect('/:alias/:controller/:action/*',         array(),         array(             'persist' = array('alias'),             )); On Tue, May 25, 2010 at 10:32 AM, Bennet Jeutter

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

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

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

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: 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

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

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

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

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 I

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 -

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
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 jeremybu...@me.com

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

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

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

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 tuteco...@gmail.com wrote: Hi all. I'd like to change the default action to render so

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 luyang.l...@gmail.com wrote: CakePHP will add two single quotes for integer in SQL string, but execute this kind of sql will cause

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

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: 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/

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 findByfieldname does not take a second parameter. So in order to set the recursive to 0, do this before your findByfieldname call. [code] $this-YourModelName-recursive = 0; $data =

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 j.andersen...@gmail.com As specified in the CakePHP book at: http://book.cakephp.org/view/73/Retrieving-Your-Data#findBy-451 the findByfieldname does not take a second parameter. So in order to set the recursive to 0, do this

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 bino...@gmail.com 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

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

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 of

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/; script type=text/javascript var editor = CKEDITOR.replace('NewsFeature.content'); CKFinder.SetupCKEditor(editor,'?php

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

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

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: 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.id = '1'

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

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 ponton@gmail.com 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.

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 vangeneug...@gmail.com wrote: Hello Lorenzo, the @import url(..) line is CSS only. PHP has nothing to do with it. The best answer I can give is

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 i...@tetrafuck.com wrote: That's a lot... Maybe you can ask google for their database^^ On 27 Mai, 06:17, Shahjahan Russell shadow2b...@gmail.com wrote: can anyone please help

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 shamsuddi...@gmail.com wrote: this has been posted before by someone else but there was no

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 mileswjohn...@gmail.com 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

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 shadow2b...@gmail.com 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

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 eljavan...@gmail.com wrote: Hi there, Just a quick question. Is there way of changing the layout of the scaffold (which is set in

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 julian.aba...@gmail.com wrote: hi how to can have a application into / y other /proyectos the first

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

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,

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 jeremybu...@me.com wrote: Before answering can I clarify. Do you mean (for

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

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 drlob...@gmail.com wrote: Just add var like hasRendered, set and check it in beforeRender. Or keep customized views inside subfolders and

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: 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

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

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 webfa...@gmail.com wrote: The Security i had cahange it from begin, do not know why it wanna from me to do it again. and in the

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

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 http://api13.cakephp.org/class/security- Ed On Thu, May 27, 2010 at 6:18 PM,

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` =

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_activate

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

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

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 (as

Re: Two application same path

2010-05-27 Thread julian.aba...@gmail.com
I'll try thanks On 27 mayo, 13:40, John Andersen j.andersen...@gmail.com 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

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 cubeythero...@gmail.com wrote: I can't see how to retrieve the current

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 cro...@gmx.de wrote: Hey, i defined the following route: Router::connect('/aktivieren/*',

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 m...@watero.us wrote: I'm a recent convert from CodeIgniter to CakePHP, and up until now I haven't used Cake's scaffolding. This morning I

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+ckeditorie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a The fourth link down is

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 ));