Re: Creating links a la Html helper in a component

2007-01-17 Thread John David Anderson (_psychic_)
On Jan 17, 2007, at 10:17 AM, Rosie F. wrote: Hello all, I have a need to create links (both regular and images) from within the controller/component side of things. Normally of course we would use the Html helper to make links. But for this particular need I have, the links must be

Re: Creating links a la Html helper in a component

2007-01-17 Thread John David Anderson (_psychic_)
On Jan 17, 2007, at 11:13 AM, Rosie F. wrote: snip However that path fixing, IMO, should be part of the business logic and not part of the views. I don't want to call my path fixer every time I output user-submitted content in the view. I would rather prepare all the user-submitted

Re: Creating links a la Html helper in a component

2007-01-17 Thread John David Anderson (_psychic_)
On Jan 17, 2007, at 11:45 AM, Rosie F. wrote: Correcting the URLs is the goal here. The way I am doing it, with regular expressions, I am finding each anchor and img tag that contains one of the problematic paths, exploding all the attributes, fixing the src or href attribute, and then

Re: Ajax to show hidden select Tag.

2007-01-16 Thread John David Anderson (_psychic_)
On Jan 16, 2007, at 2:17 PM, salimk786 wrote: Hello, I was hoping someone can piont me in the right direction. I want to have a select tag where they choose their country and once they choose a country, another selectTag appears asking them to choose their state and once they choose their

Re: A little confusion with model associations

2007-01-16 Thread John David Anderson (_psychic_)
On Jan 16, 2007, at 3:45 PM, jyrgen wrote: hi all, my app has basically 3 models: users (actually webusers), authors and publishers. authors and publishers are both able to log into the app and do things, regard them as different usergroups. every author and every publisher has

Re: passing data from database to pages controller

2007-01-15 Thread John David Anderson (_psychic_)
On Jan 15, 2007, at 3:16 PM, sentel wrote: Hi All, first, I'm a bit of a newby to cakephp, but already loving it. I made some models, associations, controllers etc and I'm still using scaffolding (suites for now) to manage the contents of the database. Then I made some pages wich soon

Contributions vs. Criticism - Was: Cake 1.2

2007-01-13 Thread John David Anderson (_psychic_)
On Jan 13, 2007, at 2:11 AM, Sergei wrote: Canglan писал(а): I'm actually more concerned about the documentation. It's not an easy task yes, but if the documentation can be really enhanced then it will boost the Cakephp community by quite a large margin. :-) Indeed. Cake's

Re: Beginners Only Tutorial that was on the WIKI

2007-01-10 Thread John David Anderson (_psychic_)
On Jan 10, 2007, at 3:49 AM, Ryan Snowden (Beijing) wrote: Maintenance of code in the bakery will suffer the same problems of depreciation, but easily controlled through an admin panel addition unpublish reason depreciated which can contact the author, place a notice, or be dugg down

Re: OT - Q for PHPNut on DBDesigner 4 - Was: ER Tools

2007-01-10 Thread John David Anderson (_psychic_)
On Jan 10, 2007, at 10:29 AM, Matt Adams wrote: keymaster wrote: A final question: how important are REAL foreign keys in the database, if you are using cake associations. Are they superfluous? Are they still needed? It depends on what you're doing. They are extremely important if

Re: $content_for_layout data displaying after footer

2007-01-10 Thread John David Anderson (_psychic_)
On Jan 10, 2007, at 11:43 AM, milliseconds wrote: I have on layout where the $content_for_layout data is displaying after the footer. Since I am new to Cake I am pretty sure this is a rookie error. How do I fix it? We'd need to see your layout, but this is the basic idea. If you're

Re: First Bite notes data not shown

2007-01-10 Thread John David Anderson (_psychic_)
On Jan 10, 2007, at 11:37 AM, jvandal wrote: Hi, I am running the First Bite tutorial. I can see that the screen tells me it has found my mysql database memo. I then create note.php (in models)and notes_controller.php (in controllers)that contain the scaffolding statements. I try to call

Re: Association problem

2007-01-09 Thread John David Anderson (_psychic_)
On Jan 9, 2007, at 12:48 PM, Alessandro Nuzzo wrote: I have some problems to understand the association. For example, I have a model 'User' and model 'Address'. User: - id - bla bla bla - office_address : int - address.id - home_address : int - address.id Stick this in your model.

Re: Multi-Page Form and mySQL Updates

2007-01-09 Thread John David Anderson (_psychic_)
On Jan 9, 2007, at 4:09 PM, devon wrote: I have developed a form in Cake which contains several hundred questions. It will be used for a certification test when complete. The length of the form has required categories separated into 7 individual pages. Cake's database sessions do a good

Re: More Cake Magic in the future?

2007-01-08 Thread John David Anderson (_psychic_)
On Jan 8, 2007, at 11:11 AM, Veloz wrote: Thanks for this, I'm glad this a topic in the forefront of your minds while developing Cake. I like the product very much, but have seen good intentions turn into bloat many times over in my 25 years in the software industry :-) Just a couple

Re: Recommendations for code documentation / grumbles

2007-01-05 Thread John David Anderson (_psychic_)
On Jan 5, 2007, at 9:27 AM, Veloz wrote: I am a relative new-comer to Cake and am impressed and appreciative of the quality of effort that has gone into the project so far. However, I have found that many of my questions are not answered in The Manual nor in Tutorials/FAQ's, nor in the

Re: Recommendations for code documentation / grumbles

2007-01-05 Thread John David Anderson (_psychic_)
On Jan 5, 2007, at 10:40 AM, Veloz wrote: Thanks for your reply to this topic, John. I probably should have not brought up 1.2 at all, as it throws my comments into a special case of a development release, and we all expect less from a development release. In any event my nit is less about

Re: CakePHP programming problem

2007-01-02 Thread John David Anderson (_psychic_)
On Jan 2, 2007, at 12:49 PM, PHPBABY3 wrote: anselm wrote: 1. Create a button that will appear on all pages in the application at a particular location using CSS, and that does as follows. If you want your button to appear on all pages at the same place, then the easiest is to put

Re: direct data access?

2007-01-02 Thread John David Anderson (_psychic_)
On Jan 2, 2007, at 2:22 PM, Veloz wrote: I'm pretty new to Cake and have this question: is it possible to use Cake's lower level database classes in the case that you do not descend your model from AppModel? In other words, if you want to create a model class that does not descend from

Re: Where is Cake Conventions?

2006-12-29 Thread John David Anderson (_psychic_)
On Dec 29, 2006, at 10:58 AM, Ámon Tamás wrote: Hello, I see the wiki pages going to the Bakery, but I always use wiki for the looking for the Cake Conventions, but now it is not available. I putted to the new bakery site this document, if it is available in an other place please

Re: Looking for downloable doc

2006-12-20 Thread John David Anderson (_psychic_)
On Dec 20, 2006, at 11:01 AM, ReynierPM wrote: Hi every: I've been working with CI since a while and now I try to test CakePHP for make a simple comparison. Right now I have a doubt: exists any way for download all the documentation as PDF or CHM or maybe an entire .html page?

Re: Looking for downloable doc

2006-12-20 Thread John David Anderson (_psychic_)
On Dec 20, 2006, at 11:24 AM, Mariano Iglesias wrote: CI? What does it stand for? CodeIgniter. We're much more mature and feature-rich than CI, and there's much less code to write in a Cake app. /imho -- John --~--~-~--~~~---~--~~ You received this

Re: updating a div with ajax

2006-12-15 Thread John David Anderson (_psychic_)
On Dec 15, 2006, at 8:52 AM, luis_y27 wrote: This works perfectly thanks, however for some reason none of my code within javascript tags is render with this call. Is there a reason for that? Thanks in advance. Make sure the evalScripts option is set to true for any of your calls. --

Re: Problems to get cake running

2006-12-15 Thread John David Anderson (_psychic_)
On Dec 15, 2006, at 3:48 PM, moonraker wrote: Hi guys, i'm very interested in cakephp and tried to get it running on my local webserver (a xampp under winxp). I've putted the cake files under localhost/cake so that for example app is under localhost/cake/app. Afterwards i tried to do

Re: updating a div with ajax

2006-12-14 Thread John David Anderson (_psychic_)
On Dec 14, 2006, at 8:27 AM, luis_y27 wrote: Hey I'm really stuck with something here, I would really appreciate any help. I'm trying to figure out how to update a division after an ajax call. I have a div and within this div I render an element. Pretty simple something like this ?

Re: updating a div with ajax

2006-12-14 Thread John David Anderson (_psychic_)
On Dec 14, 2006, at 10:50 AM, luis_y27 wrote: thanks for your quick response John, I already have set up a controller action to respond to the ajax request. Also all necessary .js files are included in my code. I tried your suggestion and it worked but only partially thought. Mostly

Re: Good example for associations?

2006-12-14 Thread John David Anderson (_psychic_)
On Dec 14, 2006, at 11:46 AM, Tazz wrote: Is there any tutorials out there explaining how to use associations? I'm trying to do it strictly from the maual and I can't seem to get it to work... How so? This should go without saying, but not providing any details makes it much harder to

Re: javascript and css routing

2006-12-11 Thread John David Anderson (_psychic_)
On Dec 11, 2006, at 11:04 AM, [EMAIL PROTECTED] wrote: For some reason... my javascript and css files are being rendered through my default view instead of being served as javascript and css. So instead of getting file.css, i get an html file, which of course states that I have a missing

Re: Check an action exists

2006-12-11 Thread John David Anderson (_psychic_)
On Dec 11, 2006, at 12:33 PM, Mikee Freedom wrote: should they not? am i approaching this in completely the wrong way? i'm attempting to write some generic functions in one controller that may call requestAction on a range of others. But I don't want to have to set the action up in all

JQuery and Prototype [was Re: Share with CakePHP´s community]

2006-12-11 Thread John David Anderson (_psychic_)
On Dec 11, 2006, at 2:45 PM, Felix Geisendörfer wrote: Hi Langdon, JQuery looks good (powerful). I have not come across it before, so am on the learning curve. Do you use it instead of Scriptaculous and Prototype? Oh definitely! I've not touched Prototype/Scriptaculous since

Re: More than one app controller

2006-11-30 Thread John David Anderson (_psychic_)
On Nov 30, 2006, at 10:44 AM, cwsTrummer wrote: can i have more than one app controller No. i have my app_controller.php in /app can i hav app2_controller.php in the same directory? Yes. when i try to make a new controller in /app/controllers and extend it from controller and NOT

Re: Session problem

2006-11-30 Thread John David Anderson (_psychic_)
On Nov 30, 2006, at 11:18 AM, Felix Geisendörfer wrote: On my local dev machine something is messed up with Sessions as well and fixing it in php.ini does not help. Rescue comes from a little addition to /app/config/bootstrap.php

Re: Data not saving

2006-11-27 Thread John David Anderson (_psychic_)
On Nov 27, 2006, at 9:51 AM, joel wrote: So, the strangest thing is happening, and I don't know what else to do. On my development server, I am able to submit a form, and it's saving to the database. But when I deploy it to the production server, it does everything as though it DID

Re: object-based models

2006-11-27 Thread John David Anderson (_psychic_)
On Nov 27, 2006, at 1:19 PM, Evan wrote: i've read some posts here about object-based models in cakephp being released for v2.0. it's great that the cakephp developers are trying to do this. to be honest, i really hate the array-based model in v1.x right now. it's just not as agile and

Re: Default controller?

2006-11-09 Thread John David Anderson (_psychic_)
On Nov 9, 2006, at 10:00 AM, Erich C. Beyrent wrote: Silly newbie question here. I have followed the instructions in the manual to set up a default index page, with a new default.thtml layout, which echoes $content_for_layout. What I would like to know is where does

Re: Japanese Article about CakePHP

2006-11-06 Thread John David Anderson (_psychic_)
My Japanese is a little rusty, but thanks all the same for spreading the word! -- John On Nov 5, 2006, at 10:03 PM, Shunro Dozono wrote: Hello, I wrote an Japanese article about the CakePHP framework for codezine.jp. If you have Japanese developers or clients, this article might

Re: Manual translation to Spanish

2006-11-03 Thread John David Anderson (_psychic_)
On Nov 3, 2006, at 3:42 PM, juananruiz wrote: Hi, I've began the translation to spanish using the source xml files from the svn. But I have'nt enough permissions to upload then to a new spanish folder or project. I send a couple of mail but i have no response. Can somebody help me with

Re: Multiword Controller Name

2006-11-02 Thread John David Anderson (_psychic_)
On Nov 2, 2006, at 4:09 PM, Teriaki wrote: I'm fairly new to CakePHP, but I can't seem to get around this problem. I have created about a dozen models and controllers, but all controllers with multiword names fail. How? What's the error message look like? -- John

Re: Dynamic Scaffolding

2006-10-31 Thread John David Anderson (_psychic_)
On Oct 31, 2006, at 1:16 PM, AC wrote: I was wondering if Cake has the ability to generate the model, the controller, and all of the views for you when it comes to CRUD. Much like Ruby on Rails. I know that Cake has the scaffold option, but what I want is base level code generation for

Re: Conditions using habtm associations

2006-10-27 Thread John David Anderson (_psychic_)
On Oct 27, 2006, at 8:57 AM, Gonçalo Marrafa wrote: I would like to know how(if) i can impose conditions to the tuples of Foo based on tuples of Bar. For example, can i findAll() only the tuples of Foo that have an associated Bar tuple with id = 1 ? Can Cake do this for me or do i have

Re: new to cake, and mvc in general

2006-10-23 Thread John David Anderson (_psychic_)
On Oct 23, 2006, at 10:28 AM, [EMAIL PROTECTED] wrote: Data Validation - It's way too simple for what I want. I'm looking for ways to say, validate a date field is a real date, and then also validate that it's in an acceptable range (ie: over 14 years old). I'd also like to be able to set

Re: new to cake, and mvc in general

2006-10-23 Thread John David Anderson (_psychic_)
On Oct 23, 2006, at 12:04 PM, [EMAIL PROTECTED] wrote: John David Anderson (_psychic_) wrote: I did try some of the snippets out there for overriding invalidate in app_model.php. I mainly just encountered preg-match errors all over the place and they didn't work. You shouldn't need

Re: Cake associations question (foreign keys)

2006-10-23 Thread John David Anderson (_psychic_)
On Oct 23, 2006, at 3:35 PM, Robert wrote: Hey guys, ok, been doing a lot of reading the last few days and I think I am nearly ready to start creating some more complex models and associations. But I have a question about Foregin keys. In the manual

Re: Cake associations question (foreign keys)

2006-10-23 Thread John David Anderson (_psychic_)
On Oct 23, 2006, at 4:03 PM, Robert wrote: Cheers John for the quick reply. Haven't run into problems, it was just that from my Databases lecture I vaguely remember something about foreign keys;) and the manual didn't mention it all, was just checking if it was something the author

Re: Scaffolding

2006-10-19 Thread John David Anderson (_psychic_)
On Oct 19, 2006, at 12:37 PM, Erich wrote: And nothing is displayed! I am missing something so fundamental here that I ought to be shot, but I have no idea what's wrong. I get nothing but a blank page - no errors, warnings, etc. Have you set DEBUG to a value greater than 0? Apache

Re: problem with updates

2006-10-18 Thread John David Anderson (_psychic_)
On Oct 18, 2006, at 4:26 PM, mike091 wrote: Hi, Have quite a simple question: Currently have $this-params['data']['Enquiry']['status'] = 'booked'; in my appointments controller. I need to change the status field in my enquiries table when a record is edited. I can get it saving to a

CakeBot on #cakephp

2006-10-17 Thread John David Anderson (_psychic_)
Quick FYI: You can ask her to point you to the pastebin using ~bin or ~paste. If you want someone else to paste something you can ~tell nickName about bin, or ~tell nickName about paste. Doing this autofills your IRC nick in a form field for the paste. Instead of copying and pasting the

Re: Is Model::findCount supposed to work?!?!?!?!

2006-10-16 Thread John David Anderson (_psychic_)
Model::findCount() isn't supposed to work, we actually added it to fake people out back in 0.9. Sorry about that. ;o) On Oct 16, 2006, at 11:09 AM, SoCalCakeBaker wrote: snipped This leads to my problem which occurs in AppModel::beforeFind. To calculate num_pages, you have to know how

Re: Cake PHP Zend Studio Templates

2006-10-14 Thread John David Anderson (_psychic_)
On Oct 14, 2006, at 4:23 PM, Marcelo de Moraes Serpa wrote: Not right now. I will install Eclipse + PHPEclipse tomorrow and create a conversion script so I can publish that too. Might not this stuff fit well into the cakedocs Cakeforge project (alongside the manual, cakesheet, PDF, and

Re: Problem with associations

2006-10-13 Thread John David Anderson (_psychic_)
On Oct 13, 2006, at 7:12 AM, leo.cacheux wrote: Hello everyone. I want to display a table in a CakePHP with informations from 3 tables, let's call them posts, users, profiles, and the 3 associated models Post, User, Profile. Post has a foreign key to User, and User has a foreign key

Re: Image display script...

2006-10-10 Thread John David Anderson (_psychic_)
On Oct 10, 2006, at 11:30 AM, Daniel Jewett wrote: snip Can anyone put me on the right track with this? What exactly isn't working? Seems like this type of thing should basically work.. are you getting errors? Header problems? -- John --~--~-~--~~~---~--~~

Re: Image display script...

2006-10-10 Thread John David Anderson (_psychic_)
On Oct 10, 2006, at 12:38 PM, radioflyer wrote: On Oct 10, 1:56 pm, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: On Oct 10, 2006, at 11:30 AM, Daniel Jewett wrote: snip Can anyone put me on the right track with this?What exactly isn't working? Seems like this type of thing

Re: Image display script...

2006-10-10 Thread John David Anderson (_psychic_)
) for the table output (which calls the image output action). -- John On Oct 10, 2:44 pm, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: On Oct 10, 2006, at 12:38 PM, radioflyer wrote: On Oct 10, 1:56 pm, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote: On Oct 10, 2006, at 11:30

Re: Manual database connection

2006-10-09 Thread John David Anderson (_psychic_)
On Oct 9, 2006, at 9:21 AM, RJT wrote: Hi, I've just started using Cake and so far I'm quite impressed. I've dabbled with a couple of PHP frameworks but this is the first that I've gone so far as to begin building a real-world application with. The app I'm building need to connect to

Re: select something in form - do ajax action.

2006-10-09 Thread John David Anderson (_psychic_)
On Oct 9, 2006, at 2:37 PM, [EMAIL PROTECTED] wrote: hi. How do I make an ajax call from a form like this? form select name=select size=8 option value=1Blue/option option value=2Red/option option value=3Orange/option option value=8Yellow/option option value=eBlack/option

Re: One to many relation

2006-10-09 Thread John David Anderson (_psychic_)
On Oct 9, 2006, at 3:35 PM, Emils wrote: My experience with CakePHP has only begun but after creating some small examples with great help of the cake manual I think some areas of interest suffers. A very common issue (problem for starters) is when you have a one-to-many relation in

Re: Day One - hardly a piece of cake!

2006-09-30 Thread John David Anderson (_psychic_)
On Sep 30, 2006, at 9:35 AM, Mick wrote: Thanks John Still don't understand when it creates the new notes directory etc. Tried localhost/index.php/notes and got following;- No new files or directories are created when using scaffold. From a fresh batch of cake code, all you need to do to

Re: Parse error running blog tutorial

2006-09-29 Thread John David Anderson (_psychic_)
On Sep 29, 2006, at 1:21 PM, [EMAIL PROTECTED] wrote: Hi, all, I ran through the tutorial at http://manual.cakephp.org/appendix/blog_tutorial%22, and after modifying MySQl to use old passwords (since I'm using PHP4.4.1 and it's not set to use MySQLi), and messing around with the

Re: CakePHP 1.1.8.3544... the start of something new

2006-09-22 Thread John David Anderson
On Sep 22, 2006, at 8:30 AM, nate wrote: bbuchs wrote: Is it more than a little ironic that the article on the first page is touting how easy it is to add an RSS feed to an app, yet the Bakery doesn't have one? No, it doesn't have one. We're too busy outdoing ourselves. Yeah: we've

Re: CakePHP 1.1.8.3544... the start of something new

2006-09-22 Thread John David Anderson (_psychic_)
On Sep 22, 2006, at 8:30 AM, nate wrote: bbuchs wrote: Is it more than a little ironic that the article on the first page is touting how easy it is to add an RSS feed to an app, yet the Bakery doesn't have one? http://bakery.cakephp.org/articles/rss/tutorials

Re: Stats

2006-09-21 Thread John David Anderson (_psychic_)
On Sep 21, 2006, at 7:48 AM, [EMAIL PROTECTED] wrote: Hello, i looking for some code that would help me to 1) display realtime stats on my cake website (like number of hits in the last xx minutes, of which how many guests and how many registered. including the usernames of the registered

Re: Security Exploit.

2006-09-19 Thread John David Anderson (_psychic_)
On Sep 19, 2006, at 11:01 AM, [EMAIL PROTECTED] wrote: Is there any chance that the security expert would be willing to put together a brief overview of security concerns within Cake? I get overwhelmed with the number and variety of exploits and exploiters out there now. Everywhere I look

Re: View what scaffolding does?

2006-09-15 Thread John David Anderson (_psychic_)
On Sep 15, 2006, at 8:37 AM, TWIOF wrote: If you go to: your_server\htdocs\cake_root_dir\cake\scripts\ using command prompt (win) or the shell on linux (i think) and run cake.php you can get it to build the same output as the scaffold, it inserts the controller and view in the

Re: passing url var to static page.

2006-09-14 Thread John David Anderson (_psychic_)
On Sep 14, 2006, at 12:44 PM, [EMAIL PROTECTED] wrote: I am trying to pass a variable to a static page through the pages_controller like this: /pages/about_us/1 but that gives this error: aboutus1.thtml for action aboutus1 in controller Pages could not be found. If I remove the /1 the

Re: Pear (Re: wiki parser)

2006-09-14 Thread John David Anderson (_psychic_)
On Sep 14, 2006, at 2:36 PM, Brian French wrote: Actually, an extended questions to his... How could you use PEAR in cakephp? (no, im lazy ad didnt do even a basic search) Let us know how that search turns out. ;o) Hint: vendors(). -- John codecowboy wrote: I am looking to give

Re: date format

2006-09-13 Thread John David Anderson (_psychic_)
On Sep 13, 2006, at 9:49 AM, M wrote: Hello, seems that mysql store dates in the following format: -mm-dd. How can I easily :) do, to let my application users to insert data in a field in the following format: dd-mm-??? http://us2.php.net/strtotime http://us2.php.net/date

Re: Migrating to Cake and Few General Questions

2006-09-12 Thread John David Anderson (_psychic_)
On Sep 12, 2006, at 10:00 AM, Tony wrote: So I was on the right track with the URL params. I totally agree with you that cake makes things a lot easier. I read through pretty much the entire CakePHP manual, including the models chapter. Let me refocus my question. If I have those two

Re: Migrating to Cake and Few General Questions

2006-09-12 Thread John David Anderson (_psychic_)
On Sep 12, 2006, at 11:40 AM, Tony wrote: John and AD7six, Did I do this correctly? class Level extends AppModel { var $name = Level; var $hasMany = array('Role1' = array('className' = 'Role', 'conditions' = '',

Re: Parent/Child Relationships

2006-09-12 Thread John David Anderson (_psychic_)
On Sep 12, 2006, at 11:42 AM, Hanzgroove wrote: Hi guys, Quick question. If I have a table called categories like this: Categories --- id parent_id category What sort of relationship would that be in the category model? Category belongsTo Parent.

Re: Parent/Child Relationships

2006-09-12 Thread John David Anderson (_psychic_)
On Sep 12, 2006, at 1:21 PM, Hanzgroove wrote: Is there a way to dynamically set the value of $this-ModelName-recursive? $this-ModelName-recursive = $whateverYouWant; It just has to end up as an integer somehow. -- John --~--~-~--~~~---~--~~ You received

Re: Migrating to Cake and Few General Questions

2006-09-12 Thread John David Anderson (_psychic_)
On Sep 12, 2006, at 1:35 PM, Tony wrote: Okay I just thought of something John. If I'm doing a $hasMany in the Level model will I also need to do a $belongsTo in the Role model? Yeah, if you want to see Level data from a Role model perspective. Would I do the same thing and just use

Re: I want to select information from a related table inside of my view function and present that information in my view.thtml file

2006-09-08 Thread John David Anderson (_psychic_)
On Sep 8, 2006, at 6:23 PM, Chris Hartjes wrote: Nate, is there someplace on the CakePHP web site that info could go or should I simple add a blog posting and drive traffic there instead? :) How about I base a chapter in the manual off of your blog post? :) -- John

Re: Sanitize HTML Question

2006-09-06 Thread John David Anderson (_psychic_)
On Sep 6, 2006, at 9:09 AM, Chris wrote: much harder but still possible I think? Should I just use http://cyberai.com/inputfilter/ and create it as a helper? Helpers are usually things to help you with presentational stuff in views - you might try making a component (which is something

Re: Leverage Cake For File Downloads

2006-09-06 Thread John David Anderson (_psychic_)
On Sep 6, 2006, at 9:48 AM, Brandon wrote: Sorry for the lame subject, I'm not sure how to title what I would like to do. I have a series of audio files saved on my web server. Information about the audio files are contained in a database (artist, title, date, etc). The audio

Re: Creating database tables within an application

2006-09-05 Thread John David Anderson (_psychic_)
On Sep 5, 2006, at 10:11 AM, gorbster wrote: Is it possible to dynamically create tables from within a Cake application, and then use the table with Cake's Model class? Make a generic model that doesn't use a table (var $useTable = false), and use the execute() function of the model to

Re: NON-CAKE files within cakephp framework.

2006-09-02 Thread John David Anderson (_psychic_)
On Sep 2, 2006, at 11:12 AM, Olivier Percebois-Garve wrote: 1. use the page controller. 2.use elements or in the layout file. 3.use the page controller. 4. Dunno what NON-CAKE files are but again, just use the page controller. olivvv globalnomad wrote: please help me with these

Re: Is cake right for my needs?

2006-08-31 Thread John David Anderson (_psychic_)
On Aug 31, 2006, at 9:35 AM, TWIOF wrote: Cheers Dieter, I meant to say tables reather than dbs, I've been making that mistake for two years (foolish I know), I'll have to check that part of the manual more closely. One quick question, how do yhou create controllers with no model? Is

Re: Pulling data to the home page

2006-08-31 Thread John David Anderson (_psychic_)
On Aug 31, 2006, at 7:10 PM, dmancan wrote: Hi I'm currently testing cakePHP to decide if our company should switch over. I have a quick question which I'm sure is a snap for you gurus to answer. I want my homepage to draw a collection of requests from various database

Re: Using a model for multiple tables

2006-08-29 Thread John David Anderson (_psychic_)
On Aug 29, 2006, at 8:50 AM, Kabuto wrote: Hi, I have several tables all of the same structure. I would like to use one model for them all. Is it possible to change the table of a model at runtime? I'm thinking of something like $this-Model-useTable = 'tableName' which unfortunately does

Re: Using a model for multiple tables

2006-08-29 Thread John David Anderson (_psychic_)
On Aug 29, 2006, at 7:36 PM, Bret Kuhns wrote: I've never done this before so I have no idea how cake itself would handle it (if someone knows for sure, please chime in), but because models are objects that extend the AppModel, you could create a generic model object that extends

Re: New at Cake PHP?

2006-08-24 Thread John David Anderson (_psychic_)
On Aug 23, 2006, at 11:51 PM, jatrojoomla wrote: Hi friends, Any body could tell me what Cake PHP actually dose? What can I do using this ? I saw so many people using Cake PHP, but what is it real purpose. CakePHP is a web application framework. It allows you to build web

Re: how to use Cookie in Cake PHP ?

2006-08-24 Thread John David Anderson (_psychic_)
On Aug 24, 2006, at 3:04 AM, JitZhang wrote: how to use Cookie in Cake PHP ? Same as you normally would in any PHP application, though most of your work would be done in a controller. Check out the PHP manual for more information. http://us2.php.net/manual/en/function.setcookie.php --

Re: Seperate controllers by function in sub-directories

2006-08-24 Thread John David Anderson (_psychic_)
On Aug 24, 2006, at 8:26 AM, Peter wrote: I apologize if this question has been asked. I searched the topics and did not see anything related to my question. What I would like to do is group by controllers in subdirectories based on logic functions. For example the application I am

Re: Problem with Methods in AppController!!!

2006-08-24 Thread John David Anderson (_psychic_)
On Aug 24, 2006, at 8:24 AM, kacperix wrote: Hi! !!! In my app_controller.php file a have this function: function getConfig($name) { $ret = $this-query(SELECT value FROM config WHERE name='.$name.'); $wynik = $ret[0]['value']; return $wynik; } And when

Re: Checkbox Problem

2006-08-24 Thread John David Anderson (_psychic_)
On Aug 24, 2006, at 12:13 PM, Simplerules wrote: I have this in a view file: ?php echo $html-checkbox('User/Coppa', array('onclick' = watch('data[User][Coppa]', 'regform', 'birthdate', 'Coppa'))); ? but the html attributes are not added. That's because they are the third parameter

Re: Checkbox Problem

2006-08-24 Thread John David Anderson (_psychic_)
On Aug 24, 2006, at 12:24 PM, Simplerules wrote: I guess the CakePHP manual is out of date: checkbox string $fieldName array $htmlAttributes boolean $return = false Make sure to log a ticket to make sure it gets fixed. -- John --~--~-~--~~~---~--~~ You

Re: Not following the conventions

2006-08-24 Thread John David Anderson (_psychic_)
On Aug 24, 2006, at 12:44 PM, eDevil wrote: Hi, I'm trying something different here by not following the conventions because of my very complex requirements. Here's how I want it to work: app/controllers/publisher_controller.php

Re: Not following the conventions

2006-08-24 Thread John David Anderson (_psychic_)
On Aug 24, 2006, at 1:08 PM, eDevil wrote: You might try using routes to play with URLs rather than class names. That's a good idea. Any idea how I might do that? http://manual.cakephp.org/chapter/configuration Section 3: Routes Configuration I'd start there. What does your

Re: Post Page Function

2006-08-22 Thread John David Anderson (_psychic_)
On Aug 22, 2006, at 3:32 PM, Simplerules wrote: Is there a way for me to set a function to run at the end of every page load? Controller::afterFilter(); You might implement it in your AppController if you want it site-wide: class AppController extends Controller { function

Re: Unwanted GET variable in URL

2006-08-22 Thread John David Anderson (_psychic_)
On Aug 22, 2006, at 3:54 PM, JRGould wrote: Is there a way to disable passing session variables with GET when users have cookies? Yeah[1]: session.use_trans_sid boolean session.use_trans_sid whether transparent sid support is enabled or not. Defaults to 0 (disabled). Note: For PHP

Re: Google Search Api.

2006-08-22 Thread John David Anderson (_psychic_)
On Aug 22, 2006, at 4:35 PM, salimk786 wrote: Hello, I'd like to use google api along with cakephp. I found an article online explaining how to do this. Can you tell me, if i was to download NUSoap, where would i place their lib folder so that my controller can easily call it.

Re: 's' vs. 'ies' plural for table names

2006-08-21 Thread John David Anderson (_psychic_)
On Aug 21, 2006, at 9:21 AM, Zoltan wrote: A bit of a newbies question here, but what is the correct way to handle tables like 'city', should I name it 'cities' or 'citys'? Have you tried it? Should be 'cities'. -- John --~--~-~--~~~---~--~~ You

Re: 's' vs. 'ies' plural for table names

2006-08-21 Thread John David Anderson (_psychic_)
On Aug 21, 2006, at 9:33 AM, Zoltan wrote: Yes, I tried it and it seemed to work at first, then got some errors about missing controllers. This was about a week ago, but going from memory I used something like: class City extends AppModel { var $name = 'City'; } and class

Re: Raw Query

2006-08-21 Thread John David Anderson (_psychic_)
On Aug 21, 2006, at 4:48 PM, Simplerules wrote: How do I do a raw SQL query? If at all possible, I would use model functions, but you can also always use the query() and execute() functions of the model as well. I need to access a table called 'Users', which belongs to UsersController,

Re: Raw Query

2006-08-21 Thread John David Anderson (_psychic_)
On Aug 21, 2006, at 4:55 PM, Simplerules wrote: Yes, it has a Model. 'Users' is a fully working area, but I need to access some data from the table Users in this component. Just to clarify, are you using Cake vocabulary here? Is your question that you want to know how to access and use

Re: inheritance beyond model?

2006-08-18 Thread John David Anderson (_psychic_)
For inherited models, you might look to see how Cake's ACL models are set up. ACO and ARO are both children of a class called AclNode. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To

Re: Session variable in $helpers array

2006-08-18 Thread John David Anderson (_psychic_)
On Aug 18, 2006, at 2:28 PM, mutabor wrote: According to this session variable I want to include appropriate helper , so I need something like that: var $helpers = array('Html','Pagination',$this-Session-read ('lang')); but it does not work. Could anybody tell me what is the best way

Re: Saving with hasMany

2006-08-18 Thread John David Anderson (_psychic_)
On Aug 18, 2006, at 3:54 PM, Rolo D. Monkey wrote: I know that you cannot save associated records directly from a model that has a hasMany relationship, but how do you do it indirectly? I have been all over the web for hours looking for this. Here is a simplified version Model Member

Re: commit, rollback and transactions

2006-08-17 Thread John David Anderson (_psychic_)
On Aug 17, 2006, at 4:27 AM, M wrote: Hello, I read a few emails about the lacking of transaction management in Cake. As I am building a web application with Cake for a potential customer, i wonder how to assure that my application has consistent data on the database. For example, if

Re: Request other model in controler

2006-08-17 Thread John David Anderson (_psychic_)
On Aug 17, 2006, at 3:22 PM, [EMAIL PROTECTED] wrote: so i have a 1st model and controller for Files and 2th / controller and model for Comments, my question is - Can I use findAll() for Comments in files Controller ? stick in var $uses = array('File', 'Comment'); In your

Re: How can I do this?

2006-08-17 Thread John David Anderson (_psychic_)
On Aug 17, 2006, at 3:42 PM, [EMAIL PROTECTED] wrote: snip Any ideas and suggestions are appreciated! Since its rather view-related, it might be better housed in a helper. So you have user-created data that is gathered in the controller. I'd hand it to the view, which is then manipulated by

<    1   2   3   4   5   >