Re: Problem with counting records

2010-06-14 Thread Kiza
Thanks for your quick replay. Here is what I did so far: I created method listing() inside voters_controller: function export_xls() { $this->layout = 'export_xls'; $locations = $this->Location->find('list'); $r

Re: Need help in url rewriting in cake php code.

2010-06-14 Thread mirza ameer
Hi, i did not understand can you please tel me how to do this iam wating for your reply thanking you, On Jun 15, 1:00 am, euromark wrote: > you dont need the .html extension - kinda outdated > just use mod_rewrite and routes in order to create like > > http://misspaulettehair.com/products/ > a

Re: Getting .htpasswd protection to work

2010-06-14 Thread calvin
Actually, you can use .htaccess for http authentication on windows machines; you just need to be running Apache or one of the few non- Apache web servers that mimic this functionality. I would recommend switching to a web hosting service based on *nix/Apache web servers-- especially if you're devel

Google Groups Related: Receiving Thread Activity Notifications

2010-06-14 Thread Jeff
Hello, As basic a question as this is, is it possible to receive emails from this group ONLY when there is new activity on a thread I have posted to? The trouble is, I don't want a "summary" of activity every day all I care about is the threads I have already been involved in. Google Groups

Re: Getting .htpasswd protection to work

2010-06-14 Thread Jeff
Hi Andy, Thanks again for the help. It turns out that because my server (hosted by GoDaddy) was running on Windows, I was not able to use .htaccess/.htpasswd authentication. In addition, as you mentioned, I did not have the server's full path, which GoDaddy provided me. I will have to keep that

Re: find list, filtered

2010-06-14 Thread cricket
On Jun 14, 9:16 pm, cricket wrote: > > ... it works fine. So, I tried Cake's query without the WHERE clause, > and also without the GROUP BY, but no change. There seems to be some > problem with the table aliases. OK, I got it. The problem was how I'd specified the condition. This: 'conditions'

Re: Custom pagination with plain SQL

2010-06-14 Thread cricket
On Jun 14, 2:26 pm, Lucca Mordente wrote: > The search is performed in about 40 tables. > Imagine instantiate 40 models to do this. > And I have some other tricks that force me to use plain SQL. > > Any sugestions? Yes, take a look at the SearchableBehavior I linked to. It'll create an index, in

Re: find list, filtered

2010-06-14 Thread cricket
On Jun 14, 4:18 pm, John Andersen wrote: > I just observed that your ON part of the JOIN statement has Country.id > in single brackets! > Check your code, maybe that is the issue! > Enjoy, >    John No, like most programming languages, MySQL seems to know to do the right thing. I tried, anyway, b

Re: showing data in a popup in aftersave()

2010-06-14 Thread calvin
You're getting server-side/client-side code confused. PHP code runs on the web server, not on the visitor's web browser. It can't create pop- up windows in the browser. If you want to use PHP to generate JavaScript in the _view_ to pop up a window, then you need to do that in the view, not in the

Re: model-view - related data; choos fields to be displays?

2010-06-14 Thread calvin
When you baked your models did you set the displayField property when cake bake asks you to? "requestName" and "mealclassKennung" are not standard display field names. Cake only knows to look for fields called "name" or "title" to use as display fields by default. If you want to display any other f

Re: admin routing.prefix

2010-06-14 Thread Davor Ilic
Thanks to all xD i´m so sorry but i did some big mistake without to know later. i wrote Router::connect('/admin', array('controller' => 'users', 'action' => '*admin_login*', 'admin' => true)); and this cause the issue i had. i didn´t see this and ignore this line i thought the action have to be

Re: CakePHP

2010-06-14 Thread Sam Sherlock
http://book.cakephp.org/view/912/Installation enjoy - S On 14 June 2010 17:07, Abrão Ximenes wrote: > can you send the steps how to install and configure cakePHP in Ubuntu 10.04 > LTS Lucid Lynx??? > Thanks > > Check out the new CakePHP Questions

Re: Need help in url rewriting in cake php code.

2010-06-14 Thread euromark
you dont need the .html extension - kinda outdated just use mod_rewrite and routes in order to create like http://misspaulettehair.com/products/ and http://misspaulettehair.com/products/Indian-Curly/ where "Indian-Curly" is your so called slug On 14 Jun., 22:34, Jeremy Burns wrote: > If you wan

Re: Cannot get CakePHP working on GoDaddy Grid Hosting

2010-06-14 Thread Suvlaki
I have a solution. Turns out mod_rewrite is not supported with GoDaddy Windows grid hosting. It is only supported on Linux hosting plans. Therefore, I had them switch me to Linux, installed CakePHP, and it worked without a hitch. If you're going to go with GoDaddy, make sure you choose Linux. Ni

Re: Need help in url rewriting in cake php code.

2010-06-14 Thread Jeremy Burns
If you want those urls, you don't want Cake. Jeremy Burns jeremybu...@me.com On 14 Jun 2010, at 16:24, mirza ameer wrote: > Hi, > > Iam mirza ameer, i want to rewrite my website urls. > > for example now my urls for the product menu is : > http://misspaulettehair.com/index.php/categories/ >

Re: find list, filtered

2010-06-14 Thread John Andersen
I just observed that your ON part of the JOIN statement has Country.id in single brackets! Check your code, maybe that is the issue! Enjoy, John On Jun 14, 10:07 pm, cricket wrote: > On Jun 14, 11:23 am, calvin wrote: > > > Ah, good call WebbedIT. I don't know how I missed that. Actually, I'm

Re: REST

2010-06-14 Thread Sheikh Irfan
Check out the link below http://book.cakephp.org/complete/3/The-Manual#REST-476 On Jun 14, 12:45 pm, ytbryan wrote: > Hi all, > > Does anybody know some good REST tutorial for cakephp? > > These resources below, are not > working:http://bakery.cakephp.org/articles/view/restful-web-application-d

1.3.2 Cake Bake Controller not displaying configuration

2010-06-14 Thread Danny
When I use cake bake on my controller (using cakePHP 1.3.2), it runs fine up until it displays the final configuration and asks if it looks ok. It doesn't show ANYTHING; it's two blank lines. Here is where it gets wierd, when you head on over to the baked controller file, it has been baked. Long

CakePHP

2010-06-14 Thread Abrão Ximenes
can you send the steps how to install and configure cakePHP in Ubuntu 10.04 LTS Lucid Lynx??? Thanks 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 "CakePH

Need help in url rewriting in cake php code.

2010-06-14 Thread mirza ameer
Hi, Iam mirza ameer, i want to rewrite my website urls. for example now my urls for the product menu is : http://misspaulettehair.com/index.php/categories/ now i want to rewrite this url to like this : http://misspaulettehair.com/products.html next in the product menu there is a list of i

Re: model-view - related data; choos fields to be displays?

2010-06-14 Thread Sam Sherlock
you can select which fields of a table you wish to retrive. if my model is Article then: $this->Article->find('all', array( ... 'fields' => array('Article.field1', 'DISTINCT Article.field2') ... )); see http://book.cakephp.org/view/1017/Retrieving-Your-Data you can use the containable behaviour t

Re: controller and view extention problem.

2010-06-14 Thread Sam Sherlock
> > but this not the answer of my problem. well it is the answer to the problem I understood you to have :) I have to use that address because it was used in the website address > rating. you have old url example.com/home/index.php and need these to point to cake controller and actions perha

Re: find list, filtered

2010-06-14 Thread cricket
On Jun 14, 11:23 am, calvin wrote: > Ah, good call WebbedIT. I don't know how I missed that. Actually, I'm > pretty sure I've read that part of the Cookbook but just forgot about > it when I wrote that post. I've added 'joins' to the available find > parameters/keys list and added a link to the "J

Re: find list, filtered

2010-06-14 Thread cricket
On Jun 14, 12:30 am, "Dr. Loboto" wrote: > public function getActiveCountries() > { >         return $this->Country->find( >                 'list', >                 array( >                         'joins' => array( >                                 array( >                                      

showing data in a popup in aftersave()

2010-06-14 Thread mivogt-LU
HI @ all, I would like to know if there is a way to settle some function inside my aftersave() (inside the modelcode) to open an popupwindow showing the modeldate in a printable format. I am thinking on something like function aftersave() { doPopupwindows($this->data) } and inside the popup ech

Re: controller and view extention problem.

2010-06-14 Thread fadhli -
but this not the answer of my problem. On Sun, Jun 13, 2010 at 7:13 AM, calvin wrote: > Yes, there is an HTTP status code specifically for that: > > Status: 301 Moved Permanently > Location: http://yoursite.com/new/page/location > > http://www.somacon.com/p145.php > > On Jun 12, 2:30 am, Sam She

Re: controller and view extention problem.

2010-06-14 Thread fadhli -
sorry i cant understand. can you explain more detail. On Sat, Jun 12, 2010 at 4:30 PM, Sam Sherlock wrote: > seo redirect old url to new one. > > new one being cake address > - S > > > > > On 12 June 2010 10:07, fadhli - wrote: > >> I have to use www.example.com/home/index.php address because it

Re: Custom pagination with plain SQL

2010-06-14 Thread Lucca Mordente
The search is performed in about 40 tables. Imagine instantiate 40 models to do this. And I have some other tricks that force me to use plain SQL. Any sugestions? On Jun 12, 8:20 pm, cricket wrote: > On Jun 10, 3:34 pm, Lucca Mordente wrote: > > > Hello there > > > I have a Search model which u

model-view - related data; choos fields to be displays?

2010-06-14 Thread mivogt-LU
HI there, if I choos in the index view the view button I get all my models data and also the related models are shown somehow. i.e. if I choos from customer-index: view I get the customer details. I also get the orders he placed in some manner. Sadly instead of an item name I am only shown the in

REST

2010-06-14 Thread ytbryan
Hi all, Does anybody know some good REST tutorial for cakephp? These resources below, are not working: http://bakery.cakephp.org/articles/view/restful-web-application-development-in-cakephp http://book.cakephp.org/view/476/REST How should the recipe tables look like? There seems to be missing in

Re: What is the best way to do simple authentication?

2010-06-14 Thread calvin
Are you logging in with the username "user" and the password "sekrit"? Do you have capslock on? I've never used the Security component in this way before (I only use HTTP Authentication to temporarily protect a directory), but if this is a single-user application, and you don't need user managemen

Re: Set format for DATETIME in model

2010-06-14 Thread LunarDraco
Why do you care about the format of the data in the data array? The only time format of the date time should really matter is for display. And for display you should use the Time Helper in your views. It has many functions for presenting date time. And if you need to you can create your own class

Re: Issue with saving data

2010-06-14 Thread calvin
Maybe post some of your code? On Jun 13, 7:40 pm, breakintheweb wrote: > First off, i'm still very new to cakephp. > > I have two tables i'm trying to work with. The first table contains a > list of orderable data. The second table is a list of ordered data > id's from the first table. > > I want

Re: should I know php in order to learn cakePHP

2010-06-14 Thread calvin
That's reasonable. It takes a while to get your head around the thought paradigms that a lot of veteran programmers take for granted; but it will come to you eventually. Personally, I started programming with BASIC, then VB, then JavaScript/ Perl/MySQL, then PHP, and I didn't start using Cake (or

Re: find list, filtered

2010-06-14 Thread calvin
Ah, good call WebbedIT. I don't know how I missed that. Actually, I'm pretty sure I've read that part of the Cookbook but just forgot about it when I wrote that post. I've added 'joins' to the available find parameters/keys list and added a link to the "Joining tables" section. cricket: Sorry, I h

Re: Self Join table cakephp

2010-06-14 Thread calvin
What part didn't work? You have to be more specific or we can't help you. This is all you need to know to create a self-join table, just replace "Post" with your model name in the last example: http://book.cakephp.org/view/1046/Multiple-relations-to-the-same-model And why not use a more intuitive

Re: How i can increase session time in cakephp,

2010-06-14 Thread calvin
If you set the timeout to 260, it's still going to time out after 4 minutes and 20 seconds of inactivity. If you want people to be able to leave their desk and come back the next day and still have the session active, you'll need to set it to something way higher (try 60*60*24). Also, if you are d

Two CakePHP installations with WAMP Server

2010-06-14 Thread Josh K
I have two CakePHP installations in separate folders. Each folder has its own core and application files. Both applications are the same application at separate stages of development, but use different databases. I plan to eventually merge them into the same repository. The problem is that one ins

Re: CakePHP, SSH PHP CLI not working on hostgator jailshell

2010-06-14 Thread calvin
Add the /cake/console directory to your PATH variable: http://www.codecoffee.com/tipsforlinux/articles/11.html On Jun 13, 9:48 pm, Adgower wrote: > I'm trying to setup CakePHP on my server and I have uploaded and > configured it properly and its working fine, but I wanna bake via SSH > into my se

Re: Problem with counting records

2010-06-14 Thread calvin
$locations = $this->Location->find('list'); $report = array(); foreach ($locations as $locationId => $locationName) { foreach ($statuses as $status) { $report[$locationId][$status] = $this->Voter->find('count', array( 'conditions' => array( 'Voter.location_id' => $locationId,

Re: XML Helper

2010-06-14 Thread calvin
I don't think I've ever used the XML helper, but this seems like a pretty simple array manipulation problem: foreach ($data['news']['news_images'] as $newsImage) { $data['news'][] = $newsImage; } unset($data['news']['news_images']); On Jun 14, 3:57 am, Jankeesvw wrote: > Hi fellow Cake bakers

Problem with counting records

2010-06-14 Thread Kiza
Hello, I'm currently working on app for Voters registering and it's pretty much completed. I have 5 tables in database: voters, locations, categories, users, statuses. Table voter is in "belongs to" relationship with other tables and tables have following structure: voters id int(11) NOT NUL

XML Helper

2010-06-14 Thread Jankeesvw
Hi fellow Cake bakers! I have a question about the XML helper I have a model which has a hasMany relationship. (News hasMany NewsImages). But when I use the serialize function to render the data to XML I get a result I don't really like. I would like cake to wrap a xml-node around the child nodes

Re: Cake 2.0 Roadmap - must it be all at once?

2010-06-14 Thread AD7six
On Jun 14, 12:56 pm, "j0n4s.h4rtm...@googlemail.com" wrote: > I like the roadmap, there only one big issue and one smaller thing: > > 1. the big issue - no mentioning > ofhttp://cakephp.lighthouseapp.com/projects/42648/tickets/95-afterfind-... How is that a big issue, in any event here's a men

Re: Session setting in app_controller

2010-06-14 Thread sherzo
Its been solved by writing "parent::beforeFilter();" inside other controllers beforeFilter() :jumping: sherzo wrote: > > Hi All > > I need to get some parameter from URL and set my sessions regarding to > those parameters, I need this function to be call in every controller, So > I wonder wh

Re: admin routing.prefix

2010-06-14 Thread Sam Sherlock
try Router::connect("/admin/:controller/:action/*", array('admin' => true)); also the 1.3 configuration fr routing prefix is like so Routing.prefixes.0 controller actions are public methods (not private or protected) - weather they are allowed publicly accessible or not is down to the logic of yo

Self Join table cakephp

2010-06-14 Thread Abhishek
Hi, I am in a situation where i need to self-join a table. This is the structure of the table .. CREATE TABLE IF NOT EXISTS `c_folders` ( `id` int(5) NOT NULL AUTO_INCREMENT, `parent_id` int(5) NOT NULL, `client_id` int(3) NOT NULL, `name` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ;

Re: admin routing.prefix

2010-06-14 Thread Davor Ilic
No it shouldn´t point every time to admin/login why i should do this :) it should look like admin/view, admin/edit or something else after he is logged in but this isn´t working because whatever i tell (admin_index or admin_login) action or something else it returns the issue i have thx 2010

Re: How i can increase session time in cakephp,

2010-06-14 Thread arif hossen
Thank you Marcelo, my session stay only few second or few minutes no stable time. I have set session security level high and set 260, but session time out certainly . i don't know why occurs this . On Mon, Jun 14, 2010 at 6:22 PM, Marcelo F Andrade wrote: > On Mon, Jun 14, 2010 at 8:15 AM, ari

Re: How i can increase session time in cakephp,

2010-06-14 Thread Marcelo F Andrade
On Mon, Jun 14, 2010 at 8:15 AM, arif hossen wrote: > Dear Experts, > How i can increase session time in cakephp, You can change Security.level in app/config/core.php and there is a Session.timeout entry too. Atts. -- MARCELO F ANDRADE Belem, Amazonia, Brazil "I took the red pill" Check out

Re: Cake 2.0 Roadmap - must it be all at once?

2010-06-14 Thread j0n4s.h4rtm...@googlemail.com
I like the roadmap, there only one big issue and one smaller thing: 1. the big issue - no mentioning of http://cakephp.lighthouseapp.com/projects/42648/tickets/95-afterfind-and-beforefind-callbacks-not-working-on-associated-models-was-translate-behavior-should-translate-associated-model-data 2. t

Session setting in app_controller

2010-06-14 Thread sherzo
Hi All I need to get some parameter from URL and set my sessions regarding to those parameters, I need this function to be call in every controller, So I wonder where to call it!! I tested the beforefiler() in app_controller but it didnt work :( Any Idea? Thanks Sherry -- View this message i

Re: Remove cakephp references from cookies

2010-06-14 Thread sherzo
Hi Ed Thank you very much, I fixed it :) Bests, Sherry Ed Propsner wrote: > > I haven't toyed with the cookies yet but it looks like they can be > configured in app/config/core.php > > Configure::write('Session.cookie', 'CakePHP'); > > HTH > - Ed > On Sun, Jun 13, 2010 at 7:50 PM, sherzo >

Re: Migrating to 1.3 - error "undefned property: view::$session in default.cpt

2010-06-14 Thread ytbryan
Go to your app_controller.php and add 'Session' to your var components and var helpers On Jun 12, 8:17 pm, Jeremy Burns wrote: > Add the Session helper and component to your app_controller, then call it > with $this->Session... > > Jeremy Burns > jeremybu...@me.com > > On 12 Jun 2010, at 13:01,

CakePHP and prepared statements

2010-06-14 Thread Ma'moon
Dear Bakers, I am in a setuation where i was asked to use "prepared statement" in the SQL queries that my Cake based application is performing, is there any way that i can use prepared statement in CakePHP? if there are any links or references regarding this subject then i will be very thankful if

Re: cakePHP emai component

2010-06-14 Thread Dmitry Shevchenko
Thank you Sergei, but ptoblem didn't fixed yetl. I have changed structure in my aoo. now I use email comoinent in controller, but variables didn't set also. And warnings stiil aprear. ... I haven't any Idea why this happen I have tried to use component by var $component, and by app:: import ...

Auth with dynamic homepage

2010-06-14 Thread Ernesto
Hello. i have a simple app using AuthComponent. this app has a lot of ->flash and ->redirect, most of them pointing to "/" is there any way i can modify the dispatcher homepage? this will avoid 2134343 conditions in every flash or redirect. i'm using cake 1.3.2 Check out the new CakePHP Questio

Re: Upgrading from CakePHP 1.1?

2010-06-14 Thread Sergei
I've upgraded 1.1 app to 1.3. Read the 1.1 -> 1.2 and 1.2 -> 1.3 migration guides and go through all controllers, models, views and configs. That's the only way. On Jun 14, 12:58 pm, Shutter41 wrote: > Hello everyone, > > I have a CakePHP application that was developed several years ago, > using

Re: table name

2010-06-14 Thread John Andersen
Please reply only to the group! Regarding you error, please show the code in which the error occurs! That way we may better be able to help you on the way, John On Jun 14, 2010 09:09, Adil wrote: > Thank John for the reply. I followed the information on the link you > sent. Everything is fine