Re: How to get user's country and language with cakePHP

2010-11-15 Thread dtemes
As an alternative to the webservice you can also use the apache api version. The geoip_country version works quite well. On 14 nov, 22:15, euromark dereurom...@googlemail.com wrote: for the country you can use RequestHandlerComponent::getClientIP() in combination with sth

prefix for join tables

2010-11-15 Thread p r
hello, i use for plugins different table prefixes. when i want to work with habtm relationship and a join table i can't use the plugin prefix for this table. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this

Re: Paginate Multiple Models in the same view

2010-11-15 Thread parallel32
On a certain project I ran into the same problem with Cake and couldn't find an elegant solution in the time I had..so what I did was paginate the different models on the same page using ajax. Probably not the answer you are looking for but it keeps things real simple! On Nov 13, 10:46 pm, Arak

Re: Cahe Helper: Cached Render Time

2010-11-15 Thread Gabriel
Thanks. Since i'm using jquery to get the json data, solved the problem using the dataFilter callback to remove that info before parsing the json. On 12 nov, 01:25, Amit Badkas amitrb...@gmail.com wrote: Hi, If you look at renderCache() method of class View, in file cake/libs/view/view.php,

Re: CakePHP Stores the user login information to Cookies automatically

2010-11-15 Thread John Andersen
Read the CakePHP book at: http://book.cakephp.org/view/1310/Sessions so that you may know how to set the timeout of the session. Enjoy, John On 14 Nov., 20:34, Muhaimen Ezabbad mezab...@gmail.com wrote: Team,         Maybe I didn't explain the issue,         In CakePHP 1.2.8, the cookie

Media View: Dowload works on local machine from external server, but production server gets 0 byte files...

2010-11-15 Thread DigitalDude
Hey, I ran into a strange problem today and need help... I added cake's media view as download action to my app, which works fine when I download files from my virtual hosts on my dev laptop. The files are being downloaded from a central fileserver, and all files are downloaded complete and

Re: Paginate Multiple Models in the same view

2010-11-15 Thread DigitalDude
Hey, that's because you need a different approach on pagination... Try this instead: $this-paginate['Model1'] = array( 'limit' = 20, 'conditions' = $conditions, ); $models1 = $this-paginate('Model1'); $this-paginate['Model2'] = array(

CakePHP Two Step View Pattern

2010-11-15 Thread Rey Philip
Hi guys I'm new here in CakePHP. How can I implement a two step view pattern in CakePHP? Example I have a layout there are two content divs namely content1 and content2. The code is like this html head titleMy Cake Blog Application/title ?=$html-css('styles');? /head body div id=container

Re: CakePHP Two Step View Pattern

2010-11-15 Thread Miles J
This isn't possible in Cake. You can only have 1 content, which is the HTML rendered based on the action/controller. If you want to display additional content, use an element include or requestAction. On Nov 15, 9:31 am, Rey Philip reyphilipre...@gmail.com wrote: Hi guys I'm new here in

Phantom URL

2010-11-15 Thread Dave Maharaj
So I have a site im building for myself so im just building it live on the server. Now no one can login or see anything other than the login screen.I am the only user and I deny everything with Auth (other than login / logout ). So that being said I was curious to google the site and sure

Problem with Cake session time out and security level

2010-11-15 Thread thomaus
Hi, My question is simple. Is it possible to have these 3 things set-up for my project: 1) Security level to medium (and not high) 2) A given time-out of 90 seconds 3) An automatic log-out after browser closing ??? From what I understood, if I want 3, then I need to set the Security level to

One page not loading in IE

2010-11-15 Thread sherzo
Hi All I have a very strange problem with IE, I have a My account page in my web site with Cake 1.2 and it is not showing in IE, the Security Level is set to Low and Sessions are controlling by Database. I used the Firebug and the only problem that I noticed was the cookies, Every time I tried to

Re: Site Development from Start to Finish

2010-11-15 Thread Amit Badkas
Hi, It seems that the controller is not Users controller but anything else. Am I right? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Sat, Nov 13, 2010 at 12:54 AM, naidim nai...@gmail.com wrote: I don't understand. Without the var $uses = array('User', 'Drug', etc.)

Re: Submit button label in e.g. swedish

2010-11-15 Thread Amit Badkas
Hi, You can also try echo $form-end(array('label' = 'Lägg till', 'escape' = false)); Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Sun, Nov 14, 2010 at 1:46 AM, cricket zijn.digi...@gmail.com wrote: On Sat, Nov 13, 2010 at 8:28 AM, Björn N edtb...@gmail.com wrote:

Re: CakePHP Stores the user login information to Cookies automatically

2010-11-15 Thread Amit Badkas
Hi, Have you checked the 'Security.level' configuration setting. It should be 'high' to set 'session.cookie_lifetime' to 0 so that session cookie will get destroyed after closing the browser. Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Mon, Nov 15,

Re: Making a file downloadable

2010-11-15 Thread rlparker81
Hi, I am having a similar problem only my folder 'files' is already in the webroot directory. The files folder contains xml files which the site takes some of its contents from. Sometimes it works fine and reads the xml files but others it looks for files_controller Does anyone know why it's

Book software like on book.cakephp.org

2010-11-15 Thread Saša
Hey guys, (Maybe a little off-topic) I was just browsing through http://book.cakephp.org/view/875/x1-3-Collection and marveling at the implementation of the book software. Is this open? And if not do you know of any similar web apps that allow a community of contributors to create a book

Auth / Acl redirect issue CakePHP 1.3.4

2010-11-15 Thread danielnolan
I have an application setup with admin prefix route, Auth, and ACL. everything seems to be working as expected, except when I am logged in as an admin user and I try to access a ACL restriced action by typing the url in the address bar of the browser. I get redirected to the home page of the site

Mail Distributor

2010-11-15 Thread TimK
Hello Everybody! I like to write a mail distributor. It shall send an email to all registered users with an valid email address. The distributor has no table in a data base, thus I set var $useTable = false;. But I have a user module including the email address of every registered user. I thought

Re: Phantom URL

2010-11-15 Thread Jeremy Burns | Class Outfit
Is this the error you'd expect to see if the login fails validation? If so, is your code in the login action checking for the presence of data before processing it further? If not, the error will fire. Another suggestion is to clear the cache. Jeremy Burns Class Outfit

Re: Mail Distributor

2010-11-15 Thread Jeremy Burns | Class Outfit
Why not run this out of the User model? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Nov 2010, at 20:23, TimK wrote: Hello Everybody! I like to write a mail distributor. It shall send an email to all registered users with an valid email address.

Re: Mail Distributor

2010-11-15 Thread TimK
Hi Jeremy! Thank you for your idea. I'm sure it will work. I thought I separate the mailing function for the user for structural reasons. But the mailing module is extremely small and maybe my idea is only micro management. Nevertheless I am still interested in a solution with two models. Best

Re: Making a file downloadable

2010-11-15 Thread cricket
On Mon, Nov 15, 2010 at 4:59 AM, rlparker81 rlparke...@googlemail.com wrote: Hi, I am having a similar problem only my folder 'files' is already in the webroot directory. The files folder contains xml files which the site takes some of its contents from. Sometimes it works fine and reads

RE: Phantom URL

2010-11-15 Thread Dave Maharaj
I was not expecting anything to show since everything is denied with redirect to login. If I type in /anything/here it goes to login as expected it I type in /password/error it goes to login yet password/error/script sits there with the error message. From: Jeremy Burns | Class Outfit

Re: Phantom URL

2010-11-15 Thread Jeremy Burns | Class Outfit
That's my point. Is it the code behind the login form that is triggering the error? So when the login page is opened the code tries to log the user in based on the values entered (which are of course empty) and therefore log in is failing, even though its the first visit to the page? Jeremy

RE: Phantom URL

2010-11-15 Thread Dave Maharaj
Not sure I follow what you are saying.sorry. No login attempt is being made. Google has indexed this 1 page that shows up when I search for my site and its an error page that is coming from no where. There is no access to anything on the site except login. If you play with the url it all

Re: Phantom URL

2010-11-15 Thread Jeremy Burns | Class Outfit
So you haven't programmed your Opps! Error message... in anywhere? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Nov 2010, at 21:34, Dave Maharaj wrote: Not sure I follow what you are saying…sorry. No login attempt is being made. Google has indexed

Paginator Question

2010-11-15 Thread Ma'moon
Hello Bakers, I am using cake's paginator to paginate my views, i am actually using the folowing code to accomplish this task: $paginator-numbers(array('tag' = 'td align=center', 'separator' = '')); My question is, how do you guys put a dynamic ALT for the links being generated by the paginator

RE: Phantom URL

2010-11-15 Thread Dave Maharaj
No that is me.I just tossed that into missing controller error page. . But why is an error showing when the only thing allowed is login. And the debug thing too. That's what puzzles me. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related

Re: Media View: Dowload works on local machine from external server, but production server gets 0 byte files...

2010-11-15 Thread euromark
the path usually doesnt start with http:// its a file path - at least afaik windows: c:/... linux /var/www/... but the constansts should be just about fine: ROOT.DS.'files'.DS.'whatever' thats why you need the media view in the first place because usually you want to serve files that are below

Re: Phantom URL

2010-11-15 Thread cricket
On Mon, Nov 15, 2010 at 4:41 PM, Dave Maharaj m...@davemaharaj.com wrote: No that is me…I just tossed that into missing controller error page. . But why is an error showing when the only thing allowed is login. And the debug thing too. That’s what puzzles me. Seeing an error view has nothing

RE: Phantom URL

2010-11-15 Thread Dave Maharaj
Ok to clarify I put the Opps! Message in the standard missing controller.ctp error folder. I have not made a custom error handler or setup any cake error directs or anything like that. So this is what I did step by step, I am not logged. Not even attempting to login, not even going to login

Re: Paginator Question

2010-11-15 Thread cricket
On Mon, Nov 15, 2010 at 4:40 PM, Ma'moon phpir...@gmail.com wrote: Hello Bakers, I am using cake's paginator to paginate my views, i am actually using the folowing code to accomplish this task: $paginator-numbers(array('tag' = 'td align=center', 'separator' = '')); My question is, how do

Re: Site Development from Start to Finish

2010-11-15 Thread naidim
At the time of last testing it wasn't, now it IS User and I'm getting all kids of errors. Without a $uses var, I get Error: Database table homepages for model Homepage was not found. which is to be expected since there is no related MODEL for the homepages controller. With an empty $uses ( var

Re: Paginator Question

2010-11-15 Thread Ma'moon
Thanks for the answer cricket, i am already aware of [$paginator-numbers(array('title' = 'foo')] but this is a static ALT for the link, i am trying to dynamically fill the ALT with something like Page Number X From Section Y where X is the page number for the link and Y is a dynamic or static

Re: mysql connection refused

2010-11-15 Thread rogwei
This is a dev environment where the application server is a VBox host. The MySQL server is a VBox guest machine on the VBox host. phpmyadmin runs from a browser on the VBox host, so it *is* using tcp. Everything was working fine until I upgraded the guest OS from 9.10 to 10.04. I think I might

Re: Paginator Question

2010-11-15 Thread cricket
On Mon, Nov 15, 2010 at 7:21 PM, Ma'moon phpir...@gmail.com wrote: Thanks for the answer cricket, i am already aware of [$paginator-numbers(array('title' = 'foo')] but this is a static ALT for the link, i am trying to dynamically fill the ALT with something like Page Number X From Section Y

Saving data in many tables in CakePHP

2010-11-15 Thread Rey Philip
I a newbie question. This is how can I save data in many tables. Heres a scenario, example I have a Profiles controller, then I have a register method/action. Lets say I have 2 tables involved the users table and emails table, this is only for the sake of the demonstration. In my view in the

Re: Problem with Cake session time out and security level

2010-11-15 Thread Amit Badkas
Hi, If you want custom session settings then change configuration to something like Configure::write('Session.save', 'my_session'); and after that create app/config/my_session.php where you can define your own session settings, something like ini_set('session.use_trans_sid', 0);

Re: Auth / Acl redirect issue CakePHP 1.3.4

2010-11-15 Thread Amit Badkas
Hi, The redirection after ACL fails depends on HTTP_REFERER environment variable. If you access the restricted URL directly then referrer doesn't get set, that's why '/' (by default, home page) is being used. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Mon, Nov 15,

yahoo web hosting problem

2010-11-15 Thread fadhli
hello everybody I had a problem about hosting at yahoo web hosting. i can't upload .htaccess files (i think They Used IIS becauce IIS do not support .htaccess, CMIIW) so I use the way in http://book.cakephp.org/view/1533/A-Note-on-mod_rewrite to fix the problem. it's works. but now, i have new

Re: Saving data in many tables in CakePHP

2010-11-15 Thread Amit Badkas
Hi, First of all you need to set User's relation with Email. From the DB schema you provided, I think it should be User hasOne Email. The view should be something like echo $form-create('User'); echo $form-input('name'); echo $form-input('Email.email'); echo $form-end('Submit'); and the code in

RE: yahoo web hosting problem

2010-11-15 Thread whmeroe
Please describe what is occurring vs. what you think should be. Stating it doesn't work doesn't help us help you. From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of fadhli Sent: Tuesday, November 16, 2010 12:16 AM To: cake-php@googlegroups.com Subject: yahoo web

Re: yahoo web hosting problem

2010-11-15 Thread Louie Miranda
I think, it would be easier to just change web hosts. -- Louie Miranda - Email: lmira...@gmail.com - Web: http://www.louiemiranda.com On Tue, Nov 16, 2010 at 2:14 PM, whmeroe whme...@gmail.com wrote: Please describe what is occurring vs. what you think should be. Stating it doesn't work

Re: Submit button label in e.g. swedish

2010-11-15 Thread Zaky Katalan-Ezra
Did you try to translate with gettext and not using the Swedish characters in the code? On Mon, Nov 15, 2010 at 8:34 AM, Amit Badkas amit.sanis...@gmail.comwrote: Hi, You can also try echo $form-end(array('label' = 'Lägg till', 'escape' = false)); Amit Badkas PHP Applications for E-Biz: