Re: creating and using multiple po files for cleaner maintenance

2008-09-30 Thread exo_duz
This is the code that is being used, but this does not work for sites using layouts as the $this-set('domain',...) only picks up the last item that it is set to and not both. Is there a way to get both to work? So the default layout which uses - layout-default.po and the view to uses

Re: creating and using multiple po files for cleaner maintenance

2008-09-30 Thread exo_duz
This is the code that is being used, but this does not work for sites using layouts as the $this-set('domain',...) only picks up the last item that it is set to and not both. Is there a way to get both to work? So the default layout which uses - layout-default.po and the view to uses

Re: Auth Redirect Problems

2008-09-30 Thread Okto Silaban
How come? I get no problem with the syntax.. It works fine for me.. This is the full code in app/app_controller.php (I just copy paste it) beforeFilter() { $this-Auth-loginAction = array('controller' = 'users', 'action' = 'login'); $this-Auth-logoutRedirect = '/';

Re: Saving self-referential-HABTM relationships...

2008-09-30 Thread wallerdm
Thanks Bernardo - that makes sense. I think I might drop the concept of admirers and have an accepted state for friendships. This all works well when displaying user data, a user model automatically has data about previous friendships but I still can't add new friends. The best I can get when I

Add comment in the bakery doesn't work

2008-09-30 Thread Kanten
Hi, I'm afraid there is something wrong with the add comment function in the bakery: http://bakery.cakephp.org/ When trying to add a comment it always comes back with: The comment could not be saved. Please correct the errors below. When looking below at the comment, no errors are listed and

Re: Add comment in the bakery doesn't work

2008-09-30 Thread dr. Hannibal Lecter
I second that, doesn't work for me either. On Sep 30, 10:30 am, Kanten [EMAIL PROTECTED] wrote: Hi, I'm afraid there is something wrong with the add comment function in the bakery:http://bakery.cakephp.org/ When trying to add a comment it always comes back with: The comment could not be

Re: Saving self-referential-HABTM relationships...

2008-09-30 Thread wallerdm
Ha Ha! Started again from scratch using the Cake Bake console and it all seems to be working. A few errors again when adding friends but should be fixable. In case it's of use to anyone here's how it's all set up now... DATABASE... Users table... id | username | password Profiles table... id

Re: 'Undefined index' problem on production server

2008-09-30 Thread Pieter Van Leuven
Hello David, thanks for the tips. Both are currently running in debuglevel 2 mode. That's why I think it's so strange. Can someone give me some tips about what could be wrong with the database? The application can reach the database, because some data is fetched correctly... Thanks in advance,

Re: 'Undefined index' problem on production server

2008-09-30 Thread David C. Zentgraf
No, I mean the PHP error reporting in your php.ini. http://jp2.php.net/manual/en/configuration.php http://jp2.php.net/manual/en/errorfunc.configuration.php#ini.display-errors The error is coming from PHP, not Cake. You should switch error reporting on on your development system and off on your

Re: 'Undefined index' problem on production server

2008-09-30 Thread Pieter Van Leuven
Ah I see. I switched the error reporting value for my local PHP to E_ALL, but I'm getting no errors at all. It has indeed to be difference in configuration between my local machine and the online server, but I have absolutely what it could be. Is the fact that I didn't build the models with the

CakePHP 1.1, AJAX and forms not doing anything.

2008-09-30 Thread aka
Hi! I have a controller, which fetches other controllers data through requestAction(). The first element contains a form in which there is an $ajax- submit(...); the problem here is that the form does nothing. The form doesen't even send XHR request. However, the $ajax-link's works just fine

Re: validate alphanumeric

2008-09-30 Thread [EMAIL PROTECTED]
Still I get the same error message. At /cake/libs/validation.php line 830 if (preg_match($_this-regex, $_this-check)) { I have an array in $_this-check and this is what generates the error. In my model I use the following validation rule: var $validate = array( 'nev' =

cake bake doesn't find new tables

2008-09-30 Thread Kenchu
I use cake bake to generate all my controllers, views and models. Unfortunatelyl cake bake doesn't seem to realize the changes I make in my database anymore. I've added a couple of more tables, but when I try to bake some new models, they aren't even in the list of models. Only the old tables

Re: cake bake doesn't find new tables

2008-09-30 Thread Markus Muschol
You have to clean the cache. Delete all files in tmp/cache/models. Best Regards Am 30.09.2008 um 14:54 schrieb Kenchu: I use cake bake to generate all my controllers, views and models. Unfortunatelyl cake bake doesn't seem to realize the changes I make in my database anymore. I've added a

Re: app_controller.php causing errors with my app

2008-09-30 Thread Ryan
That did it. What was I thinking?! Thank you On Sep 30, 4:47 am, dr. Hannibal Lecter [EMAIL PROTECTED] wrote: This may be a dumb suggestion, but try removing the var $name = 'AppController'; line and see if that helps. It's not correct anyways, or at least seems incorrect to me. On Sep

Re: cake bake doesn't find new tables

2008-09-30 Thread [EMAIL PROTECTED]
Hi, when you make changes to the database you have to clean the cache. Delete all files in tmp/cache/models/. Then you should find your new table. On 30 Sep., 14:54, Kenchu [EMAIL PROTECTED] wrote: I use cake bake to generate all my controllers, views and models. Unfortunatelyl cake bake

Re: CakePHP 1.1, AJAX and forms not doing anything.

2008-09-30 Thread clemos
Hi You should at least give the code from your view, so that we can figure out what's going on. Also, english is not my mother language, and I don't understand this sentence : However, the $ajax-link's works just fine and when I click one of the links, resultin an update to the that element

Re: Auth Redirect Problems

2008-09-30 Thread Tony Thomas
I don't know why. Are you you using 1.2 or 1.1? I'm using 1.2. This: $this-Auth-autoRedirect = FALSE; Gives me: unexpected T_VARIABLE I haven't had a chance to investigate. On Sep 30, 2:06 am, Okto Silaban [EMAIL PROTECTED] wrote: How come? I get no problem with the syntax.. It works fine

Re: cake bake doesn't find new tables

2008-09-30 Thread Kenchu
Thank you. Works excellent now. :) On Sep 30, 3:05 pm, Markus Muschol [EMAIL PROTECTED] wrote: You have to clean the cache. Delete all files in tmp/cache/models. Best Regards Am 30.09.2008 um 14:54 schrieb Kenchu: I use cake bake to generate all my controllers, views and models.

question about hasMany and length of form

2008-09-30 Thread (withheld)@gmail.com
I am in the process of learning relational database design by making a scoring system for golf. in the early stages of planning the database I know I will have a general relationship as follows: Tournament hasMany stablefords, pars, eagles etc.. now question is, when i'm making a new

Re: bigner for cake

2008-09-30 Thread anjum
I am also getting same error on this example I putted the file into app/view/tasks/index.ctp But it gives up can't load page error. Secondly if i go through this way http://localhost/CakeTooDoo/app/views/tasks/index.ctp It only shows up the plain HTML form. After adding the add method in

Simple Ajax link to update div

2008-09-30 Thread qwanta
Hi, I have been struggling a bit to get a simple Ajax link working. I have searched this group for help in older posts, but it seems like a key tutorial (the grahambird one) is no longer available - perhaps because it no longer works with 1.2. If there is a tutorial somewhere that covers this,

help me understand cakaphp

2008-09-30 Thread [EMAIL PROTECTED]
I m totally new to cakephp and i need to develope my project using cakephp framework .Previously all projects was done using simple php coding no framework nothing was used.Can any body tell me how do i start my application using cakephp. Before this i used devlope coding in php .I have read

how can run my first program in cakephp

2008-09-30 Thread Sonal Kumari
Hi All i m new in cakephp. i have installed all things regradinh cakephp... and now i want to run my programs.. but not getting proper so anyone would you help me... plz give me steps for first program.. thanks a lot.. --~--~-~--~~~---~--~~

Re: help me understand cakaphp

2008-09-30 Thread majna
http://book.cakephp.org/view/219/Blog http://groups.google.com/group/cake-php/web/faq bakery app https://svn.cakeforge.org/svn/bakery there's some cakephp books on amazon On Sep 30, 3:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:  I m totally new to cakephp and i need to develope my

Re: how can run my first program in cakephp

2008-09-30 Thread Donkeybob
if you follow the manual step by step, then you should have a basic cake site running. Run through the blog tutorial . . .it will help. On Sep 30, 4:19 am, Sonal Kumari [EMAIL PROTECTED] wrote: Hi All i m new in cakephp. i have installed all things regradinh cakephp... and now i want to

Re: bigner for cake

2008-09-30 Thread villas
Hi, As you have already created a table, why not try to use the commandline 'Cake Bake' script? This should give you a flying start and create everything you need :-) On Sep 23, 12:31 pm, akhilesh [EMAIL PROTECTED] wrote: http://localhost/myfirstcake/ this is my cake folder name

Re: bigner for cake

2008-09-30 Thread PaulW
On Sep 30, 8:28 am, anjum [EMAIL PROTECTED] wrote: I am also getting same error on this example I putted the file into app/view/tasks/index.ctp Hi I assume you are both working through the samples in the book CakePHP Application Development by Ahsanul Bari and Anupom Syam? If so I have done

Umlauts and regular expressions

2008-09-30 Thread thomas
Hi, I use 1.2.0.7296 RC2 and got problems to check user input via regular expressions. In my project, users are able to change their name. Works well, except when entering umlauts. My regex always identifies umlauts as illegal characters. The $validate array for the field looks like this:

javascipt onclick in $html-image

2008-09-30 Thread bartez
hey all, This is really bugging me and i'm sure it's something that i'm not doing. my code is: $id = $module['Module']['id']; echo $form-input($module['Module']['refer_name'], array(

Re: 'schema generate' and different connections (was: help with YAML pls basic syntax...etc)

2008-09-30 Thread mark_story
David, So you have different models using different connections, and when specifying a -connection the shell is attempting to schem-ify models not using that connection? If that is the case please open a ticket, with some examples on how to reproduce it. -Mark On Sep 30, 1:53 am, David C.

Re: javascipt onclick in $html-image

2008-09-30 Thread ORCC
Double quotes should work too: 'on_click' = open_win($id); On 30 sep, 10:37, bartez [EMAIL PROTECTED] wrote: Panic over answer is: 'onclick'='open_win('. $id .')' cheers a --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Using model without a database for form

2008-09-30 Thread sniper
Hi I am not sure if this has already been asked, but i couldnt find the answer anywhere sad.gif Anyway my question is i have a controller,model and view i dont want to use database/tables since persistance will be webservice(soap) based. and i am using cake_1.2.0.7296-rc2. PHP Code ?php /** *

Find - table join - find all posts by user_id using the name

2008-09-30 Thread Benster
Hi, Im building a site where i would like to retrieve all articles based on a username. The username is supplied as part of the url i.e. mysite.com/userName. So i need to use find to list all posts based on username however I only have user_id in the posts table, which then joins to the user

Re: validate alphanumeric

2008-09-30 Thread [EMAIL PROTECTED]
It seems somehow the root of the problem is I try to override the built-in alpaNumeric function. Still no idea how to solve it --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group,

how to save twice??

2008-09-30 Thread rocket
I am trying to save an entry twice after getting processed. Ideally the query would look like $this-Post-save($this-data()); // the first save, so in the mySQL db it will have id 1 $this-Post-save($this-data()); // a second save, so another row with id 2 However it doens't seem to work

Re: page refresh?

2008-09-30 Thread rocket
interesting fix. thanks On Sep 29, 5:15 pm, 3lancer.eu [EMAIL PROTECTED] wrote: Hi, but when you change the picture, the old picture is still stuck in the cache, so to see the new pic the user needs to push F5... I can't figure out how to refresh the page automatically. any ideas?

Re: Simple Ajax link to update div

2008-09-30 Thread qwanta
Thanks for the reply. I placed an fwrite statement in ajaxfcn1() and it is writing to file. So I'm getting as far as triggering ajaxfcn1 now. But the div isn't updating. I guess what I am having trouble understanding is how CakePHP generates a response to the asynchronous call. With the standard

override built-in validation methods

2008-09-30 Thread [EMAIL PROTECTED]
Is anyone knows how to properly overrdie a bult-in validation function? I just created in my app_model.php file a function named alphaNumeric, the whole function is the same as the built-in, I just changed the regex. Still I get error message: Warning (2): preg_match() expects parameter 2 to be

Re: how to save twice??

2008-09-30 Thread Daniel Hofstetter
Hi rocket, I am trying to save an entry twice after getting processed. Ideally the query would look like $this-Post-save($this-data()); // the first save, so in the mySQL db it will have id 1 $this-Post-save($this-data()); // a second save, so another row with id 2 However it doens't

Re: how to save twice??

2008-09-30 Thread teknoid
you need to call $this-Post-create(); before the second save, that is if you are getting an update instead of an insert, but you've never specified what problem you are actually having. On Sep 30, 11:29 am, rocket [EMAIL PROTECTED] wrote: I am trying to save an entry twice after getting

Re: how to save twice??

2008-09-30 Thread teknoid
Btw, you also have saveAll(), which allows to save multiple records at once. On Sep 30, 11:50 am, teknoid [EMAIL PROTECTED] wrote: you need to call $this-Post-create(); before the second save, that is if you are getting an update instead of an insert, but you've never specified what problem

Re: override built-in validation methods

2008-09-30 Thread grigri
I frequently override validation functions in AppModel, it works fine for me. Put a debug statement inside your AppModel's alphaNumeric method. If it appears, then the problem is in your regexp/validation handling. If it doesn't appear, you've probably got a typo in the method name. Also make

Re: how to save twice??

2008-09-30 Thread grigri
Btw, you also have saveAll(), which allows to save multiple records at once. The 1.1 people don't have that --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: page refresh?

2008-09-30 Thread rocket
just implmemented it works. lol cool :) i ended up doing a md5 on time() :) On Sep 30, 11:30 am, rocket [EMAIL PROTECTED] wrote: interesting fix. thanks On Sep 29, 5:15 pm, 3lancer.eu [EMAIL PROTECTED] wrote: Hi, but when you change the picture, the old picture is still stuck in the

Re: how to save twice??

2008-09-30 Thread rocket
perfect the -create() works i'd also like to tell others it unsets $this-data On Sep 30, 12:03 pm, grigri [EMAIL PROTECTED] wrote: Btw, you also have saveAll(), which allows to save multiple records at once. The 1.1 people don't have that

pushing my luck -- complete pm system?

2008-09-30 Thread rocket
I'm about to write a PM system for users... but why invent the wheel? Anyone know of a good prebuilt cake pm system, or a vendor I can use? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Re: Wrong i18n query

2008-09-30 Thread BrendonKoz
Without posting the CakePHP code you used to generate your query, there is little anyone can offer to help. Hopefully, however, you've gotten this straightened out by now. On Sep 24, 12:21 pm, davidhc [EMAIL PROTECTED] wrote: Hi at all! I'm using i18n and i'm trying to search results with a

Re: pushing my luck -- complete pm system?

2008-09-30 Thread Gonzalo Servat
On Tue, Sep 30, 2008 at 1:26 PM, rocket [EMAIL PROTECTED] wrote: I'm about to write a PM system for users... but why invent the wheel? Anyone know of a good prebuilt cake pm system, or a vendor I can use? * What does PM stand for? Your abbreviation search returned 164 meanings* Which one of

Schema troubles

2008-09-30 Thread neverlosty
Hi, I'm having some trouble with schemas. I'm using 1.2.x.x trunk. I'm using it to migrate my DB by using the update feature. I use schema generate to do a snapshot of my development DB and use schema update on prod with the generated schema file. However, I've run into a few different

Finding records that have associated records

2008-09-30 Thread Daniel
I'm a bit of a newbie when it comes to CakePHP and MySQL and I'm not really sure about all of the terminology involved, so if this question has been asked before, I apologize. I have three models: Skill Tree Link A Skill hasAndBelongsToMany Links. A Skill hasMany Trees. Under normal

Re: 'Undefined index' problem on production server

2008-09-30 Thread Pieter Van Leuven
Ok, I did some research and discovered the following: On my local system I have a query like this: (as seen in the query overview delivered by CakePHP when running in debugmode 2) SELECT `Post`.`id`, `Post`.`title`, `Post`.`content`, `Post`.`created`, `Post`.`modified`, `Post`.`user_id`,

Re: Auth Redirect Problems

2008-09-30 Thread LunarDraco
In my original response, I mentioned there are a couple of requirements for this auth redirect issue to present itself and fail. 1 - logoutRedirect has to point to the loginAction. (your example doesn't) 2 - autoRedirect needs to be true. (your example is set to false) 3 - You've called the

Re: CakePHP 1.1, AJAX and forms not doing anything.

2008-09-30 Thread aka
Yes Sorry clemos, was alittle tired on this afternoon. Here is the question completely rewritten :) 1. Download the latest stable release of CakePHP (1.1.19.6305) 1.1 Set it up and running. 2. Download the prototype.js library and copy it to your fresh cake installation js -folder. 3. Lets

Re: Find - table join - find all posts by user_id using the name

2008-09-30 Thread Benster
Cracked it! $this-set('posts',$this-Post- find('all',array('conditions'=array('User.name'=$username; Ben. On Sep 30, 3:58 pm, Benster [EMAIL PROTECTED] wrote: Hi, Im building a site where i would like to retrieve all articles based on a username.  The username is supplied as part of

Re: pushing my luck -- complete pm system?

2008-09-30 Thread rocket
PM stands for private messages. basically a system inside cake that will allow my users to send messaages to eachother. On Sep 30, 12:35 pm, Gonzalo Servat [EMAIL PROTECTED] wrote: On Tue, Sep 30, 2008 at 1:26 PM, rocket [EMAIL PROTECTED] wrote: I'm about to write a PM system for users...

Re: CHAR datatype problem

2008-09-30 Thread Donkeybob
Nevermind, it works fine with VARCHAR. . . . On Sep 28, 11:14 am, Donkeybob [EMAIL PROTECTED] wrote: Can cake use this datatype? VARCHAR(36)? On Sep 27, 6:37 pm, Donkeybob [EMAIL PROTECTED] wrote: I'm using a CHAR(36) for my id fields and my dev machine is fine with that but when I move

Re: pushing my luck -- complete pm system?

2008-09-30 Thread Markus Muschol
This should be kind of easy to write on your own setup a new database table: id int sender_id int foreign key to user table receiver_id int foreign key to user table message varchar Then create a message write form and a message list

Best solution to glue ACL authorized by action witch per element

2008-09-30 Thread [EMAIL PROTECTED]
So i have usersroles, roles: administrator and moderator can create events, administrator have all privileges but moderator can delete only he own events best solutions for it ? now i have that $this-Auth-authorize = 'actions'; ACL per action ROOT +Events --create --edit --delete

dealing with curly quotes

2008-09-30 Thread Ryan
I'm using a UTF-8 character set and the curly single and double quotes are causing some problems with my app. I have a couple of questions regarding the best way to deal with (eliminate) them: Allow the curly quotes to go into the database, but convert them to straight quotes before display? Or

Re: Simple Ajax link to update div

2008-09-30 Thread qwanta
OK, I understand things a bit better now and got it to work. My problem was that my editor renamed my default layout to default.ctp.php causing the links to prototype scriptaculous to not register ( echo $javascript-link('prototype'); echo $javascript- link('scriptaculous'); ) to not register.

One controller for multiple models - Or any better design?

2008-09-30 Thread Jimmy Bourassa
I've been thinking about how to do this cakelike and so far I haven't found anything that is not messy (and mostly because I am fairly new to cake should I say) Heres what I would like to do. I have Games and Events. On my homepage, I want a Coming up section to show, let's say, the next five

CakePHP Auth - Basic Template User System

2008-09-30 Thread Tom Chapin
I've been using CakePHP for a number of projects over the past two years (and I love it). One of the things that's been holding me back is the Auth system. I was using a custom coded user system for CakePHP 1.1, and it worked pretty well. However, now that I'm moving to 1.2, I found that it no

Re: dealing with curly quotes

2008-09-30 Thread Adam Royle
If your database is correctly setup as utf8, cakephp db settings as utf8 and your html is output as utf8, and make sure all of your code is utf8 compliant (eg string conversion, etc) then you shouldn't have any issues. Unless you just don't like the look of curly quotes? Cheers, Adam On Oct 1,

sending mail through google server using EMail component

2008-09-30 Thread Zoltan
Hello, The mail on my website is done through a google account and I'm trying to use that server to send mail (this is being done local from a site running on XAMPP locally currently). The settings I'm using are: function send( $subject = 'General', $msg ){ $this-Email-from=

Re: CakePHP Auth - Basic Template User System

2008-09-30 Thread Sam Sherlock
Try Neutrino CMS its fantasic; that uses auth. I downloaded some time ago; I have not used it on any projects though; Its a working example you can learn from All you'd have to do is throw some other models and controllers on it and you'd have a complete web app. I have found adding auth to

Re: sending mail through google server using EMail component

2008-09-30 Thread Gonzalo Servat
On Tue, Sep 30, 2008 at 10:10 PM, Zoltan [EMAIL PROTECTED] wrote: [..snip..] The settings I'm using are: function send( $subject = 'General', $msg ){ $this-Email-from= '[EMAIL PROTECTED]'; $this-Email-to = 'Zoltan [EMAIL PROTECTED]'; $this-Email-subject =

Re: 'schema generate' and different connections (was: help with YAML pls basic syntax...etc)

2008-09-30 Thread forrestgump
Hey, So ive been messing around with cake schema for 2 days and i learnt y i dont like it. 1)it doesnt let u insert data 2) it does not let you rollback 3)there is no way u can save ur queries and run them up anytime u feel like with a simple command 4)all of the above makes team-development a

Re: Effect.Fade and Effect.Appear

2008-09-30 Thread Arak Tai'Roth
Anyone able to assist in this matter? Not a big deal, as like I said, it works, I just wouldn't mind better. On Sep 29, 3:27 am, Arak Tai'Roth [EMAIL PROTECTED] wrote: This is my ajax link that I am using: echo $ajax-link($html-image('/img/portfolio/small/' .