Re: CakePHP 2.x how to manage multiple user-tables and access areas?

2012-10-23 Thread Braindead
Actually you only need one table with the following fields: username or email password group + additional fields that might be useful for your application After login (with AuthComponent) you can check to which group the user belongs. Depending on the group you can redirect the user to the corre

Re: Social Networking Login with Auth Component.

2012-08-13 Thread Braindead
> > I think HybridAuth is better in response data provided. > The only difference I can see is that HybridAuth does automatically login using AuthComponent and Opauth does not. But actually this can be done in a few lines of code. Opauth has the advantage that it is a nice plugin that fits nic

Re: Social Networking Login with Auth Component.

2012-08-13 Thread Braindead
Have a look at Opauth. It's a nice plugin working really well. https://github.com/uzyn/cakephp-opauth -- 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.com. To unsubscribe from this group, se

Re: One Site With Multiple SubSite

2012-07-20 Thread Braindead
The Cookbook describes it very well. Have a look at rounting: http://book.cakephp.org/2.0/en/development/routing.html -- 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

Re: passing post_id to comments

2011-10-13 Thread Braindead
You're right, that someone could change the value using Firebug. To prevent this you should use Cakes Security Component. If you use the Security Component and the Form Helper to create your forms, Cake will automagically add a hidden field containing a hash of your fields and the values of hidden

Re: How would I do this project best in CakePHP?

2011-09-28 Thread Braindead
As your app seems to be very easy, you could create the database as Paul already described and then bake the rest (controllers, models, views). http://book.cakephp.org/view/1522/Code-Generation-with-Bake -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check

Re: Generate Excel from cakephp

2011-05-12 Thread Braindead
There is more than one way to create Excel sheets. 1. You can use a class like PHPExcel. You get a native Excel file. 2. You can save a simple HTML table as xls. Excel is able to read the table. 3. You can create a CSV file. Excel is able to import the file. Depending on your customers wishes, th

Re: Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 207 bytes

2010-11-19 Thread Braindead
What about not using php_excel and writing Office XML using a simple helper? That's the way I do it and it's working quite well. Of course the helper has only a few features, but for simple exports that's ok. Check out the new CakePHP Questions site http://cakeqs.org and help others with their Ca

Re: PHP CodeSniffer

2010-05-06 Thread Braindead
Hi Achilleas, you are right that CodeSniffer validates your code to make sure that it follows certain conventions. It is possible to define a validation set that reflects CakePHPs conventions. If your code doesn't follow these conventions CodeSniffer gives you a warning and you have the possibilit

Re: PHP CodeSniffer

2010-05-03 Thread Braindead
I use this plugin with NetBeans, too. Which coding standard you want to use is just a matter of taste. In every case you have to make the standard follow Cake conventions and this is my problem. Is there really no one who uses CodeSniffer in a Cake project? Check out the new CakePHP Questions site

PHP CodeSniffer

2010-04-30 Thread Braindead
Hi all is there anybody out there who uses PHP CodeSniffer with his Cake app? I tried PHP CodeSniffer for the first time and used the build in coding standards to sniff my code. Actually I get warnings because of Cake conventions. Method name "PostsController::admin_edit" is not on camel caps for

Re: dyamic dropdown list wtih dyanamic optgroup

2009-12-14 Thread Braindead
Actually it's quite easy. Have a look at the cookbook: http://book.cakephp.org/view/192/options-options Hope that helps, Markus 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 t

Re: How much memory should cakephp use?

2009-12-06 Thread Braindead
I think the memory usage is normal, as my app has the same usage. Markus 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 g

Re: Fatal Error: Out of memory error

2009-11-26 Thread Braindead
I got the same error while creating an Excel file with many rows and columns. So I guess the error is related to processing to much data. You can either increase the memory limit or decrease the amount of data to process. Hope that helps. Markus Check out the new CakePHP Questions site http://cak

Re: Export to CSV using Helper, resulting error

2009-11-25 Thread Braindead
The problem with this approach is that Excel tries to parse certain values. Just to mention one example: "1-10" will be converted to "01. Oct". I prefer the following approach from the bakery: http://bakery.cakephp.org/articles/view/excel-xls-helper Markus Check out the new CakePHP Questions site

Re: addons.mozilla.org soon will leave CakePHP..

2009-11-17 Thread Braindead
I use Cake alot in more or less big projects and personally I don't see a problem with the future of CakePHP. The only thing that will happen in case the Cake development is stopped is that there will be no new releases / features. Well that's a pitty, but if you can live with the current release

Re: Howto save NULL for a date field?

2009-11-12 Thread Braindead
Is there realy no automagic in Cake that converts empty date fields to NULL? -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsub

Howto save NULL for a date field?

2009-11-12 Thread Braindead
Hi all, In my form I have a date field. I use the form helper to generate a year, month and day field for the date. $form->input('date_field', array('type' => 'date'); Now I was asked to change the field, so that the users can enter the date into a text field using -mm-dd as format. $form->

Re: validate - unique - error message

2009-10-12 Thread Braindead
http://api.cakephp.org/class/form-helper#method-FormHelpererror Maybe this helps... --~--~-~--~~~---~--~~ 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.com To u

Re: Paginate fat models

2009-09-30 Thread Braindead
That's what I thought. --~--~-~--~~~---~--~~ 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.com To unsubscribe from this group, send email to cake-php+unsubscr..

Re: remove authorization from Cakephp form

2009-09-30 Thread Braindead
In the beforeFilter event of your controller you have to use $this->Auth->allow('action_of_your_form'); http://book.cakephp.org/view/563/Setting-Auth-Component-Variables --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Paginate fat models

2009-09-30 Thread Braindead
I'm currently reworking one of my early Cake applications and I want to follow the "fat models - skinny controllers" principle. What I don't understand is how to paginate a fat model. Is it true, that I have to use pagination in the controller? Or is there another way? Thanks, Markus --~--~--

Re: Top Contributors

2009-09-20 Thread Braindead
You should also have a look at CounterCache: http://book.cakephp.org/view/816/counterCache-Cache-your-count Hope that helps. Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this g

Re: Returning file for download

2009-09-07 Thread Braindead
You could also have a look at Cakes media views: http://book.cakephp.org/view/489/Media-Views --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroup

Re: Organizing hierarchical system with breadcrumb navigation

2009-08-27 Thread Braindead
In my opinion using a model for breadcrumbs is bloated. Why don't you just set the breadcrumbs in the view manually? The HTML helper has two functions addCrumb and getCrumbs, which makes basic breadcrumbs really simple. --~--~-~--~~~---~--~~ You received this messag

Howto sort forum threads?

2009-08-24 Thread Braindead
I want to build a forum with CakePHP. The forum actually consists of many forums. Each forum hasMany threads. A thread hasMany replies. Forums, threads and replies are stored in separate tables. All assossiations are setup correctly. How can I sort threads and replies by date, so that the newest

Re: Export to Excel

2009-08-24 Thread Braindead
There are at least 2 articles in the bakery that describe how to create a real Excel file (no csv): http://bakery.cakephp.org/articles/view/generate-excel-spreadsheets-from-your-database http://bakery.cakephp.org/articles/view/excel-xls-helper Personally I use the second one and it works quite g

Re: Finding missing numbers in an array

2009-08-04 Thread Braindead
Or the Cake way: http://book.cakephp.org/view/666/diff $missing_numbers = Set::diff($the:array, $the_complete_array); On 4 Aug., 11:36, Fran Iglesias wrote: > You could try > > $missing_numbers = array_diff($the_array, $the_complete_array); > > El 04/08/2009, a las 9:57, liaogz82 escribió: >

Re: Write to log table for every successful update/delete

2009-07-03 Thread Braindead
You should write a behavior. I guess that's the way to go. :-) --~--~-~--~~~---~--~~ 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.com To unsubscribe from this g

Re: recursive = -1

2009-06-30 Thread Braindead
That's what I though about. But are there any unforseen problems with this approach? --~--~-~--~~~---~--~~ 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.com To u

recursive = -1

2009-06-30 Thread Braindead
Is it recommended to set recursive = -1 application wide and only set it to a higher value when it is really needed? Are there any unforseen problems? Thanks, Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "C

Re: Read-Only app

2009-06-30 Thread Braindead
and don't call $this->Model->save() ;-) --~--~-~--~~~---~--~~ 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.com To unsubscribe from this group, send email to c

Re: Web Installer

2009-06-30 Thread Braindead
Have a look at NeutrinoCMS. It is based on CakePHP and has a web installer included. http://dsi.vozibrale.com/articles/view/neutrinocms-0-1-beta-has-been-released Happy baking, Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: retrieve profile id from session

2009-06-25 Thread Braindead
Did you set up the relationship between User and Profile properly? There is no need to use "var uses" in your Profile controller, when the relatioship is setup correct. Markus On 25 Jun., 10:31, Paulos23 wrote: > Hello people, > i am having an issue about profile id.I am using 2 models, User a

Re: German Umlaut in form->end

2009-06-24 Thread Braindead
The problem was related to an encoding problem. Netbeans saved the files as utf-8, but I wanted ISO 8859-1 to be used on my page. After saving the files as ISO 8859-1 everything is ok now. But I wonder if there is a way to get the umlauts encoded as htmlentity (ü = ü) Is this not possible? Thanks

Re: German Umlaut in form->end

2009-06-22 Thread Braindead
Thanks for the help. I guess it's a problem with the encoding, because either "Löschen" nor "Löschen" work. :-( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cak

German Umlaut in form->end

2009-06-21 Thread Braindead
Hi, how can I use a German Umlaut in form->end('Löschen')? --~--~-~--~~~---~--~~ 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.com To unsubscribe from this group

Re: Router Connect

2009-06-19 Thread Braindead
This is the link to the corresponding chapter in the cookbook Adam mentions: http://book.cakephp.org/view/544/Prefix-Routing Hope that helps, Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To

Problem with associated model and form->dateTime

2009-06-08 Thread Braindead
Hi all, I've a problem with associated models and form->dateTime. I have the following models: User belongsTo Group hasOne Detail. Now I want to edit User, Group and Profile in one form. User and Group work without any problem, but there is a problem with the field foundation_date of the Detail

Re: Cake php connection with MS Sql Server 2000

2009-05-28 Thread Braindead
Are you sure, that the connection settings are ok and the MS SQL server is running? You also have to change the security salt as the first message says. But I gues that this is not related to your SQL server problem. --~--~-~--~~~---~--~~ You received this message b

Re: View Images

2009-05-28 Thread Braindead
I would save the files using the user id as part of the filename e.g. user_12.jpg --~--~-~--~~~---~--~~ 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.com To unsu

Database design

2009-05-27 Thread Braindead
Well, my problem is not directly related to CakePHP, but as it's about database design maybe I'll get some good answers. On my page I have news, downloads and users. These three can be commented. Additionally I have a shoutbox and a guestbook. The comments, shoutbox and guestbook have all the sam

Re: Moving a webapp from Windows to Linux

2009-05-26 Thread Braindead
Are you sure that your problem is related to the PATH_SEPARATOR? I guess they use the constant PATH_SEPARATOR to make it work on Windows and Linux without having to worry about that. I also develop on Windows using XAMPP and my production server is on Linux. I never had that kind of problems. --~-

Re: Are admin routes worthwhile? No automagic with Auth

2009-05-26 Thread Braindead
I use admin routing to build an administration interface that has a minimalistic design and is quite straight forward to the need to administer the main page (write news, edit user profiles etc.) So if you don't require this kind of admin interface than there is no need to use admin routing at all

Re: Validation and the return of data

2009-05-26 Thread Braindead
echo $form->input( 'password', array( 'type' => 'password', 'value' => '' ) ); Hope that helps, Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this grou

Re: using invalidate

2009-05-26 Thread Braindead
Why do you call save when validation in the controller fails? Save validates your data using the validation rules in your model. If you want to do some extra validate in your controller, you should make sure, that you don't call save when the extra validation fails. Did you setup validation rules

Re: How to use bindModel in Cake PHP

2009-05-22 Thread Braindead
You should have a look at the models section of the Cookbook: http://book.cakephp.org/view/66/Models This should be the most interesting part for you: http://book.cakephp.org/view/78/Associations-Linking-Models-Together --~--~-~--~~~---~--~~ You received this messag

Re: Appropriate requestAction() alternative required

2009-05-16 Thread Braindead
Have a look at the Cake based Neutrino CMS: http://dsi.vozibrale.com/articles/view/neutrinocms-0-1-beta-has-been-released It uses a component to get these kind of data. I use this approach all the time and it works like a charme. Markus --~--~-~--~~~---~--~~ You re

Re: data not write in excel sheet on server

2009-05-16 Thread Braindead
You should have a look at PHPExcel. It's a very good class for creating Excel sheets on the fly. http://www.codeplex.com/PHPExcel Hope that helps. Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" grou

Re: generating slug from title - must be unique! (using sluggable-1.1.3)

2009-05-13 Thread Braindead
As far as I can see from the source, the sluggable behavior increments a number at the end of the slug in the case the slug is already in use. Pls. check the beforeSave event of the sluggable behavior. Markus --~--~-~--~~~---~--~~ You received this message because

Re: Validate postal

2009-05-10 Thread Braindead
Hi Dave, I've never used the postal code validation rule, but I guess you have to use a cutom validation rule to validate postal code from different countries. Why don't you ask the user for the country, the town and the postal code? In that case you won't have to try different formats. Hope tha

Re: DB driven sidebars

2009-04-20 Thread Braindead
You can use a component to fetch sidebar data from the database. Have a look at NeutrinoCMS, a cake based CMS: http://dsi.vozibrale.com/downloads/categories/view/neutrinocms --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: Need high-level advice on how to implement cross Model csv exporter

2009-04-15 Thread Braindead
Using the RequestHandler you could automatically switch the layout based on the extension (in your case csv). In the layout file you could generate the CSV content, which should be quiete easy. --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: Dependent in Associations is not working.

2009-04-14 Thread Braindead
How do you delete the user? You have to set the cascade parameter of the del funtion to true. Otherwise related blog posts won't be deleted. http://book.cakephp.org/view/516/Deleting-Data --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: search engine bots and sessions

2009-03-13 Thread Braindead
Cake deletes expired entries from the session table automatically. Therefore using the session table to track users could lead to wrong figures. Multiple records for the same IP address are ok. Try to open your site with Firefox and IE at the same time. There will be 2 records for your IP address

Re: Expiry date

2009-03-12 Thread Braindead
If you are using the Auth Component, this is a simple task: http://book.cakephp.org/view/248/AuthComponent-Variables Hope that helps. Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to

Re: Form validation without model

2009-03-06 Thread Braindead
Yes, it is possible to use validation without a table. Simply define $useTable = false in your model and define the validation rules as if there was a table. You can then use cakes form helper without any problems. This is how you can force validation in your controller (part of my contact page):

Re: Labels around inputs

2009-03-06 Thread Braindead
I haven't tried it, but maybe this can help: http://bakery.cakephp.org/articles/view/overriding-specific-html-tags-before-using-helper-methods --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post

Re: How to use contained models in conditions?

2009-03-05 Thread Braindead
Miles, that's bad news. But how can I solve my problem? Is there any workaround? --~--~-~--~~~---~--~~ 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.com To unsu

How to use contained models in conditions?

2009-03-05 Thread Braindead
Hi all, I have 3 models: Company, Site and Country. All relations are set properly. Company hasMany Site Company belongsTo Country Site belongsTo Country Using the Containable Behavior find queries and pagination works well, except one thing: I can't get conditions to work that are related to t

Re: Validation Problem

2009-03-02 Thread Braindead
Take a look at the MultivalidateableBehavior in the bakery. That's what I used to solve your kind of problems. http://bakery.cakephp.org/articles/view/multivalidatablebehavior-using-many-validation-rulesets-per-model --~--~-~--~~~---~--~~ You received this message b

Re: Model localisation question.

2009-02-27 Thread Braindead
http://book.cakephp.org/view/198/options-error This should answer your question. :-) --~--~-~--~~~---~--~~ 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.com To

Re: switching databases on dev and production

2009-02-11 Thread Braindead
Instead of changing a value in core.php you could switch the database depending on the current DOCUMENT_ROOT or SERVER_NAME or some other server variable that fits for the distinction between development server and production server. That's the way I do it and it works very well for me. --~--~---

Re: Validate belongsTo model in select element - inList does not seem to work?

2009-02-03 Thread Braindead
Brian, your solution seems to be ok, but there is one problem: Let's assume the selectbox contains the 3 items de, nl and dk. Selecting one of the items would pass the validation. But aa, ab, ac, ad, ae and so on would also pass the validation without being valid. So what is the way to go? I gue

Re: odd database problem

2009-02-03 Thread Braindead
Did you already delete the cached files? I guess this should solve your problem. --~--~-~--~~~---~--~~ 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.com To unsub

Re: Security-Component-form-checks?

2009-02-03 Thread Braindead
As far as I know the SecurityComponent checks for hidden fields. But you could try it out using Firebug. ;-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-p

Re: content_for_layout

2009-02-03 Thread Braindead
On your website you will most likely have parts that are displayed on every page and other parts that change. $content_for_layout contains the part that changes. :-) Hope that helps. Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Separating user and profile tables

2009-01-28 Thread Braindead
LunarDraco, thanks for the explanation! Now it's clear why Janne wants to separate the information. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@google

Re: Separating user and profile tables

2009-01-27 Thread Braindead
Why do you want to separate login information from other information about the user? I cant't think of a good reason to do this. Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this

Re: Element placeholder help

2009-01-25 Thread Braindead
Hi Dave, you could select the element to show based on the controller and / or action that is currently used. $this->params['controller'] and $this->params['action'] should help you in your view. Markus --~--~-~--~~~---~--~~ You received this message because you

Validating the value of a selectboxes to be in a dynamic list

2009-01-25 Thread Braindead
Hi everyone, I'm searching for a way to validate selectboxes. I'm using the SecurityComponent and Cake 1.2. Let's assume I want to write an article. The article belongs to one category and the categories are stored in my database and therefore dynamic. So I have a selectbox on my form for the c

Validation error messages of related model are not shown

2009-01-15 Thread Braindead
I have a view were I show a news and it's related comments. There is also a form in the view where the user can enter a new comment. I want to save the new comment in the news controller comment action, because I don't want to use a comments controller. Everything works well except the fact that

Re: How to validate this?

2008-09-25 Thread Braindead
Hi Günther, just in case you haven't already solved this problem, the following link to the bakery should lead you into the right direction: http://bakery.cakephp.org/articles/view/multivalidatablebehavior-using-many-validation-rulesets-per-model Regards, Markus On 22 Sep., 14:25, Günther The

Re: Localizing autherror and loginerror

2008-09-11 Thread Braindead
Hi guys, after spending some more time I solved my problem with authError and loginError messages of the Auth component only displaying in the default language. Just in case somebody has the same problem I post the solution. :-) This is my app_controller.php file where only the L10n part and the

Re: afterDelete question

2008-09-07 Thread Braindead
Hi, there is no need to use the afterDelete event, because the delete function of the model class gives a return value. Depending on the return value you can set the flash message. Pls. have a look at the API: http://api.cakephp.org/class_model.html#680f1a7876f7be4d87308d4df3252e77 I hope this

Localizing autherror and loginerror

2008-09-07 Thread Braindead
Hi guys, I'm currently localizing my application in English and German. Everything works as expected. Except the authError and loginError messages of the Auth component. I'm trying to set these messages in the app_controller beforeFilter event. But the messages are always shown in German (default

Re: User Management\Login\Auth Framework

2008-02-06 Thread Braindead
There is an article in the bakery about ACL. Maybe this is something you are searching for? http://bakery.cakephp.org/articles/view/acl-management-plugin Hope this helps... Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: Independent Tab Component/Module?

2008-02-01 Thread Braindead
Why don't you use jQuery or any other JavaScript framework that supports tabs? I know they only work when JavaScript is enabled, but is there another reason for you? Happy baking, Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Auth + ACL + Guests handling

2008-02-01 Thread Braindead
Instead of granting access to the guest group, you could define public actions for each controller. function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('index', 'view'); } would be the way to go. Happy baking, Markus --~--~-~--~~~---~

Re: Yet another Auth and ACL question

2008-02-01 Thread Braindead
I think it is not right to be redirected to the referer page and display the error message on the referer page. This is not what I would expect when I try to access a certan page. At first I wanted to be redirected to the login page, because I though it is the right behavior to give the user the c

Re: Yet another Auth and ACL question

2008-01-29 Thread Braindead
That's what I already did. When I'm not logged in and want to enter an access controlled controller, I'm redirected to $loginAction. But how is it possible to be redirected to $loginAction, when I'm already logged in, but not allowed to access a controller? --~--~-~--~~~---

Yet another Auth and ACL question

2008-01-29 Thread Braindead
Hello group, I'm using Auth and ACL in Cake 1.2. It took quite a long time to get it to work, but now everything is working, except one thing: When I'm logged in and try to access a controller I don't have access to, I'm redirected to the url I came from and get the message that I'm not allowed

Re: Using Acl to display a user-specific menu

2008-01-16 Thread Braindead
On Jan 17, 1:47 am, Luke <[EMAIL PROTECTED]> wrote: > like 3 different menu.ctp files (menu-admin.ctp, menu-manager.ctp, and > menu-default.ctp) ? Yes, thats what AD7six meant. :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: Auth in 1.2

2008-01-16 Thread Braindead
On Jan 16, 5:51 am, Baz <[EMAIL PROTECTED]> wrote: > Oooohh, that's something I forgot to put in my tutorial! > > The session messages for Auth aren't written to Message.flash, it's to > Message.auth... > Baz, I was searching for the reason that no auth errors are displayed for a long time! Than

Re: Badword Bahavior

2007-10-09 Thread Braindead
dardosordi, that is exactly the solution to my problem! Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from

Re: Badword Bahavior

2007-10-08 Thread Braindead
I don't want to use the badword model in my controller. I want to use it in a behavior. Are there any possibilities? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send emai

Badword Bahavior

2007-10-08 Thread Braindead
I'm trying to write a badword behavior for my guestbook, where a guestbook entry has to be verified when one or more badwords are detected inside the guestbook entry. My badwords are stored in a database. The problem is how to query the badwords, when the current model is the guestbook? Is the on

Re: Select only a few fields

2007-09-04 Thread Braindead
I've got it! This is now part of my 'Comments' model. var $belongsTo = array('Author' => array('className' => 'User', 'conditions' => '', 'order' => '', 'foreignKey

Re: Select only a few fields

2007-09-04 Thread Braindead
4 21:46:23 [modified] => 2007-09-04 21:46:23 [Author] => Array ( [id] => 1 [nickname] => Braindead [hash] => *

Select only a few fields

2007-09-04 Thread Braindead
[user_id] => 1 [content] => The first test [created] => 2007-09-04 21:46:23 [modified] => 2007-09-04 21:46:23 [Author] => Array ( [id] =>

Re: Storing Site Preferences

2007-08-21 Thread Braindead
Thanks for the link. After searching the Bakery I found the tutorial for the component: http://bakery.cakephp.org/articles/view/confcomponent-db-based-configuration-tutorial Brain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: Storing Site Preferences

2007-08-21 Thread Braindead
I'm currently also using a seperate file to store the configuration. But I would prefer to store it in my database. Where is the best place to query the database for the settings? When the bootstrap.php is executed, the models are not yet available. Do I have to use beforeFilter in every controll

Re: How to set title of home page that doesn't have a controller? (../views/pages/home.thtml)

2007-08-06 Thread Braindead
You can set the title of the page inside the page. Just enter $this- >pageTitle = '' on top of the page. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cak

Re: post title as parameter for view action... how?

2007-07-23 Thread Braindead
> I can add another attribute to the Posts table, "url_title" for > example, and then, when i add a Post, fill it with the title with > white spaces string replaced to '-'. > > I was looking for a clean solution to string replace the white spaces, > directly from $html-link() call. Felix Geisend

Re: Date format with $form->input

2007-07-20 Thread Braindead
> There is already a Enhancement ticket in the trac for this > athttps://trac.cakephp.org/ticket/2405(along with a few other dateTime > enhancements). > > If you want it now you can apply the patch in the ticket. Thanks for the link. The first attachment already includes a patch for my problem.

Re: Date format with $form->input

2007-07-20 Thread Braindead
On Jul 20, 1:02 am, Geoff Ford <[EMAIL PROTECTED]> wrote: > It is possible, you misread what speccy was saying. Use what you have > and add a dateFormat key in the options array I tried to add the dateFormat key yesterday before posting my question and I tried it 2 minutes ago. Both times the se

Re: Date format with $form->input

2007-07-19 Thread Braindead
I want to use $form->input with the type set to 'date'. The advantage is, that it generates the select fields AND a label for the fields. $form->dateTime does not generate the label. My problem is, that I want to change the dateFormat to DMY. But I think this is not possible, because the dateForm

Date format with $form->input

2007-07-19 Thread Braindead
I'm using Cake 1.2 and want to display some selects for date input. This is my code: input('User.birthday', array('type' => 'date', 'label' => 'Birthday', 'empty' => true, 'minYear' => date('Y')-60, 'maxYear' => date('Y')-15)); ?> Is it possible to tell Cake to display the fields in DMY order in

Re: Where to store the logic? V or C?

2007-07-12 Thread Braindead
Thanks for the answers. I never thought about putting this kind of logic into the model. But Chris' recommendation with "Fat Models and Skinny Controllers" makes sense to me. So I think I will take this way. :-) --~--~-~--~~~---~--~~ You received this message beca

Where to store the logic? V or C?

2007-07-12 Thread Braindead
Hi, I'm new to MVC development and at the moment I'm quiet unsure about V and C. Let's assume I have a list of users in which I want to display an avatar next to each user. If the user has no avatar I want to display the default one. Both, the user avatar and the default avatar, are stored in th

  1   2   >