Re: Accessing Controller information (like Action and URL) from app_model.php
Having thought about this more, I have a better solution. Going down this path would have broken the MVC pattern anyway, so best not to pursue it. Regards, Langdon Langdon Stevenson wrote: > Hi > > I need to be able to tell what Action and URL have been called from > app_model.php > > Is this possible? If so could someone show me how. > > Any assistance is greatly appreciated. > > Regards, > Langdon --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Error installing CakePHP
Hello, I put cakephp in the root. I am using Xampp on Windows XP. C:\Program Files\xampp\htdocs\cake\scripts>"c:\program files\xampp\php\php.exe" bake.php -project "\program files\xampp\htdocs\testcake10" ... Creating file \program files\xampp\htdocs\testcake10\views\pages\home.thtml Warning: fopen(\program files\xampp\htdocs\testcake10\views\pages\home.thtml): f ailed to open stream: No such file or directory in C:\Program Files\xampp\htdocs \cake\scripts\bake.php on line 1464 Error! Couldn't open \program files\xampp\htdocs\testcake10\views\pages\home.tht ml for writing. Welcome page created Warning: chmod(): No such file or directory in C:\Program Files\xampp\htdocs\cak e\basics.php on line 1005 Could not set permissions on \program files\xampp\htdocs\testcake10\tmp\* You must manually check that these directories can be wrote to by the server C:\Program Files\xampp\htdocs\cake\scripts> Any ideas please? I followed instructions for install and it doesn't work, sad. Thanks, Philip --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Framework Performance!
Yeah. They should really do a test like CakePHP vs. Symfony vs. CodeIgniter --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Using cake to serve files
I am trying to serve up files from the server using CakePHP. My goal is to provide authenticated access to files via a CMS built in cakephp. Simply putting the files in the webroot folder is not acceptable for security reasons. Is there a way to have my controller prevent the renderer from running, and instead serve up a file that is read from disk via php? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.6.3264 Released
Sweet, thanks. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.6.3264 Released
Way to go...progress is fast around here! Can I upgrade from 1.1.5.3148by simply replacing the /cake directory? Yes, it is that simple -- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access public */ --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP 1.1.6.3264 Released
Way to go...progress is fast around here! Can I upgrade from 1.1.5.3148 by simply replacing the /cake directory? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Webalizer and cakephp
An easy and effective way to do this is to change your .htaccess file to have requests that ask for the /webalizer/ pages completely bypass cakephp. By inserting a RewriteCond, one can make apache ignore the following rewrite rule and serve /webalizer/ RewriteEngine on RewriteRule^$ app/webroot/[L] # SNIP RewriteCond %{REQUEST_URI} !^/webalizer.* # /SNIP RewriteRule(.*) app/webroot/$1 [L] Now requests that contain /webalizer/ will just go straight to those files, and antyhing else will still go to your Cake app. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Usining Form
Use the $html->dateTimeOptionTag('Event/date','DMY','NONE'); function. Info from Cake API: HtmlHelper::dateTimeOptionTag ( $tagName, $ dateFormat = 'DMY', $ timeFormat = '12', $ selected = null, $ selectAttr = null, $ optionAttr = null, $ showEmpty = true ) Returns a set of SELECT elements for a full datetime setup: day, month and year, and then time. Parameters: string $tagName Prefix name for the SELECT element string $dateFormat DMY, MDY, YMD or NONE. string $timeFormat 12, 24, NONE string $selected Option which is selected. array $optionAttr Attribute array for the option elements. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
CakePHP 1.1.6.3264 Released
Celebrating summer with the release of CakePHP 1.1.6.3264 [1] This fixes the many bugs submitted by the ever growing and active CakePHP community. The DBOs have received some nice updates and a nifty little bug associated with PHP 5.2_dev was fixed. Check out the changelog [2] to see everything that was done. In other news, some new articles were published on Sitepoint [3] and in the International PHP magazine [4]. Fabio Cevasco [5] is the man behind these articles. Together with Fabio, we will be writing a book that will be published by Peachpit press sometime around December 2006. Yesterday, the documentation team and others got together for a meeting of the minds. John Anderson (_psychic_) had a great agenda and moved through it with great speed. So, expect to hear more from him and see some major improvements to the manual. Also, keep an eye out for CakePHP 1.2, which hope to release before the end of summer in the Northern Hemisphere. Stop by #cakephp to find out how you can help us with 1.2.Happy Baking,CakePHP development TeamCake Software Foundation, Inc. http://cakefoundation.org/pages/donate [1] Download: http://cakeforge.org/frs/?group_id=23&release_id=114[2] Changelog: http://cakeforge.org/frs/shownotes.php?release_id=114[3] SitePoint: http://sitepoint.com [4] International PHP Magazine: http://phpmag.net[5] Fabio Cevasco: http://h3rald.com-- /*** @author Larry E. Masters* @var string $userName* @param string $realName * @returns string aka PhpNut* @access public*/ --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
multi image uploader
Reference: (http://cakebaker.wordpress.com/2006/04/15/file-upload-with-cakephp/). I'm trying to adopt the "file upload to database" script referenced above to handle multiple files at once. Is possible? I'm having difficulty with it. Here is a sample of my code: In add.thtml: Main Image file('file[main]') ?> Thumb Image file('file[thumb]') ?> Mini Image file('file[mini]') ?> submit('Save') ?> The submit is first handled by the products_controller which inserts the other input fields into the products table and then gets the product_id. It then goes to the files_controller. in products_controller: if ($this->Product->save($this->data)) { $product_id = $this->Product->getInsertId(); if($this->requestAction("/admin/files/add/$product_id")) { $this->flash("Your product has been added. id: $product_id ", '/admin/products'); } else { $this->flash("Unable to upload a your image file for product id: $product_id", '/admin/products'); } } else { $this->flash("Unable to save your new product.", '/admin/products'); } in files_controller: function admin_add($product_id) { if ($product_id != null) { if (!empty($_FILES['file'])) { $mainFileData = addslashes(fread(fopen($_FILES['file']['tmp_name']['main'], "r"), $_FILES['file']['size']['main'])); $_FILES['file']['data']['main'] = $mainFileData; $_FILES['file']['product_id']['main'] = $product_id; // I think this is the line that's wrong //$this->File->save($_FILES['file']); // I also need to upload the "thumb" image and the "mini" image } } } Any suggestions? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Social Networking Example
In the past month I had the pleasure of creating a social networking site in Cake. We are still in BETA and would love to hear from the Cake community regarding any issues with the site. Please take a look at http://www.chattypet.com Thanks for an awesome framework and even better support along the way! Without all your help this initial step would've taken much longer than a month. We plan to eventually release the components on CakeForge. Please feel free to contact us if you're interested in exploring our social networking components sooner. You rock guys and gals! --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Framework Performance!
Interesting article about the relative performance of 3 MVC frameworks: http://wiki.rubyonrails.com/rails/pages/Framework+Performance They tested Symfony (PHP), Rail (Ruby), and Django (Python), and that's the order they came out in for performance -- from slowest to fastest. Not only that, but under high loads, Symfony couldn't complete more than half the transactions. Can we compare the relative performance and stability of Cake to these 3 frameworks? --wm --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Setting a variable throughout cake when user logs in
You still call the function in your beforeFilter.The general way that I am doing this is in my AppController I execute the beforeFilter = 'checkAccess';In my checkAccess function I first check a variable called $this->authorized for being null. If it is set to null I assume everyone has access. Otherwise I have the specific roles defined in an array in the $this->authorized variable that have access.So pseudocode is class AppController extends Controller{ var $beforeFilter = 'checkAccess'; var $authorized = null; function checkAccess() { if($this->authorized == null) return true; //check to see if your logged in user's role is in the authorized array //if it is return true, if not redirect to login page, or if already logged in return false. }} So in a controller that I want everyone to be able to access I can just not define the authorized array (it is set to null be default above).In a controller I want to restrict access to I would set it to an array of roles that get access. My setup is a bit more complicated than this, but that is the general idea.On 7/14/06, Luke <[EMAIL PROTECTED] > wrote:Anybody have an answer for this? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: work with relationships in controller and view
http://manual.cakephp.org/chapter/22Reviewing the conventions will help you out a lot here. Cake will then be able to do a lot of the work for you.After reviewing conventions take a look at the chapters on Models. Basically your tables should be 'areas_events'area_idevent_id'events'idname'areas'idnameAfter reviewing models and conventions and using the above as a general guideline you should be on your way to making things work. HTHOn 7/14/06, Kenia <[EMAIL PROTECTED]> wrote: hi...i have tables:events_areasid_areaid_eventareasid_areanameeventsid_eventnamei need to put in the view add of Event the multiple select with the existing areas.how I make this? thanks... and sorry my english is terrible --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Webalizer and cakephp
Have it created in app/webroot/webalizerOr modify the location of you app/webroot/* placing the contents in root/You will have to edit the app/webroot/index.php before doing this to set the proper locations of all files. -- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access public*/ --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
work with relationships in controller and view
hi... i have tables: events_areas id_area id_event areas id_area name events id_event name i need to put in the view add of Event the multiple select with the existing areas. how I make this? thanks... and sorry my english is terrible --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: redirect after a short delay
As suggested above, headHelper is what you are looking for.http://cakeforge.org/snippet/detail.php?type=snippet&id=56This will allow you to insert the _javascript_ between the head tags to redirect after a delay. The code to do this will go in whatever view you want to redirect from. The link above is to the snippet page which has links to RosSoft's website. It does require UtilHelper but that is available in the snippets as well.For directions on how to set it up the RosSoft link should guide you through. Good luck and happy baking!On 7/14/06, eDevil <[EMAIL PROTECTED]> wrote: Thanks for the comments. AD7six, you're right but I dont want to send amessage therefore Flash and setFlash are not useful to me. All I wantis to display whatever there is in /app/views/users/logout.thtml and then redirect after 5 seconds. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Webalizer and cakephp
I have my cakephp installed at the root of my domain. My host creates webalizer statistics also at the root /webalizer/. The problem, as you can expect is that there is no webalizer controller. What is the best way to handle this using good cakephp conventions? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Set table prefix depending on what user is logged in?
Hm, thanks, but i think i need a little more help. nate wrote: > Assuming you have 2 different database configurations in database.php > (we'll call them $default and $user), this should be pretty > straightforward. The point of having two different configurations is that the models using the default configuration won't be affected by the reconnect call below. Is that correct? > ConnectionManager::getDataSource('user')->reconnect(array('host' => > 'localhost', , 'prefix' => $prefix)); This should be placed in a controller, right? Can this be executed even if the current model doesn't and shouldn't use the $user configuration and the custom prefix? Now let me explain my current problem: Let's say that i, for example, have two user-specific tables, with the prefix "prefix_", called "prefix_table1" and "prefix_table2". When doing like you said, Cake tells me that the tables "table1" and "table2" (without the prefixes) are missing and have to be created. I tried to create those tables just to see if that could make it work, but then the tables without prefixes are used, instead of the ones with prefixes. Then i removed those again and tried to add this in every model using user-specific tables: var $useTable = false; I did this to stop cake from reading tables until i did the reconnect, but that only gave me a bunch of notices, warnings and errors. So, how do i do now? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Multi-table or Single-table Inheritance
>From a high-level design perspective, implementing something like this in Cake would be about the same as in Ruby on Rails. As far as table/class design, you could have a Person class which extends Model, and is extended by SalesPerson, Designer etc. (allowing the use of shared logic). To your point about having a type column, you could normalize your data either as you describe, or by creating a 'roles' table, where Person either belongsTo or hasOne Role (case depending on your design), where either 'people' has a 'role_id' field (Person belongsTo Role), or Role has a 'person_id' field (Person hasOne Role). Hope that helps. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Set table prefix depending on what user is logged in?
Great! Thanks alot, Nate. I forgot to thank you the last time but i'll do it twice today then. Thanks alot! --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Set table prefix depending on what user is logged in?
Assuming you have 2 different database configurations in database.php (we'll call them $default and $user), this should be pretty straightforward. Once you have the prefix you're going to use, you can do: ConnectionManager::getDataSource('user')->reconnect(array('host' => 'localhost', , 'prefix' => $prefix)); Then, in your user-specific models, you can put: var $useDbConfig = 'user'; --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: redirect after a short delay
Thanks for the comments. AD7six, you're right but I dont want to send a message therefore Flash and setFlash are not useful to me. All I want is to display whatever there is in /app/views/users/logout.thtml and then redirect after 5 seconds. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Setting a variable throughout cake when user logs in
Anybody have an answer for this? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Inserting in tables without sequences (in Postgres)
Hi. I have a table in which the primary key is set by hand and not by a sequence. After each insert, the model calls $db->lastInsertID() and fails because i don't have a sequence with the name Cake expects. How can i overcome this? Do i have to create the sequence Cake expects? Thanks in advance. -- Gonçalo Marrafa <[EMAIL PROTECTED]> --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: redirect after a short delay
hi eDevil. why not use the session->setFlash method to take care of the message and (for example) the headHelper, written by ros-soft, to put the meta refresh tag in place? The message and the redirect are 2 different requirements, and you need to put a meta refresh tag on the rendered page (or use Javascript) to redirect, otherwise it will be instantanious. HTH, AD7six --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: redirect after a short delay
you might want to consider using setFlash in Session and then displaying the message on the next page.If you search the group you should see examples of this.On 7/14/06, eDevil <[EMAIL PROTECTED]> wrote: Thanks gwoo and Ryan but you're missing the point. My Debug level isset to 0 and it DOES redirect.I tried $this->flash() but the problem is that it shows the message onwhite background.What I am looking for is the way header("location: there.html Refresh:5"); is handled in Cake. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: redirect after a short delay
Thanks gwoo and Ryan but you're missing the point. My Debug level is set to 0 and it DOES redirect. I tried $this->flash() but the problem is that it shows the message on white background. What I am looking for is the way header("location: there.html Refresh: 5"); is handled in Cake. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Cool Ebooks Site
http://cooldogebooks.blogspot.com Submit your comments because I need them! Thank You. Prentice Hall | Microsoft Press | Algorithics | Nolo Press & Law | Energy Conversion | DNA Biology | Money Management | Stock Trading | GNU Debugging | Online Unleashed | Origami | Object Recovery | TRS80 Radio Shack | McGraw Hill | Network Analysis | Business Management | Asbestos Cancer & Mesthelioma | Web Marketing | Computer Mix #2 | Oreilly & Java | Computer Security #2 | Oracle 9i & 10g | Apress | Actual Tests Cisco & Others | Windows Server Os | Oreilly Ebooks Pdf Chm | Home Improvement | TestKing | Political Ebooks | Network & Server Routing | Wireless | Computer Mixes | Digital Design And Synthesis | Mathematics | Chemistry | Neurology | Sybex | Recipes | New Riders | Macromedia Press | MySql | Dreamweaver | Scrambled Mixes | Engineering | FreeBSD | Internet Security | Software Books & Manuals | DaVinci Code | VOIP | Syngress | Fluid Mechanics | Que Books | XML & Feed Syndication | More Oreilly Ebooks | Mostly Oreilly Ebooks | Psychology Texts & Ebooks | Magic & Hypnosis | Website Promotion Texts | Computer Mix | Nonprofit And Charities | Magazines | PHP | Peotry Ebooks & Manuals | Dictionaries | Unix | Game Programming | World History | Microprocessor | Data Mining | Job Interview | Gaming Ebooks | Miscellaneous MIxes | Bluetooth | Addison Wesley | Certification Preparation | Cryptography Ebooks | PhotoShop | J2ME & J2EE Ebooks | LDAP Ebooks | Operating Systems | Artificial Intelligence | For Dummies Ebooks | Perl Ebooks | Compiler Construction | Guitar Ebooks & Manuals | Java Ebooks | Python Ebooks | Linux Ebooks | Christian / Evangelism Ebooks | Cisco Ebooks | Military Training Ebooks | Novels - Various Authors | Self Help | 29 Childrens Animal Encyclopedias | Online Marketing | Business Management | Non-IT Ebooks | Investing Ebooks | C++ Ebooks | Medical | Report & Request | O'Reilly & Others | Book Of The Month | User Agreement | Programming Mix | Martial Arts | Rapidshare Mix | --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: redirect after a short delay
$this->($message, $url, 5 ) and change 'app/config/core.php' define('DEBUG', 0); eDevil escreveu: I've tried $this->flash but the problem is that it just shows the message. I want to render the page /app/views/users/logout.thtml and then redirect after 5 seconds. any suggestions? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: redirect after a short delay
if you are in a DEBUG level higher than zero it will not redirect. On 7/14/06, eDevil <[EMAIL PROTECTED]> wrote: I've tried $this->flash but the problem is that it just shows themessage. I want to render the page /app/views/users/logout.thtml and then redirect after 5 seconds.any suggestions? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: redirect after a short delay
I've tried $this->flash but the problem is that it just shows the message. I want to render the page /app/views/users/logout.thtml and then redirect after 5 seconds. any suggestions? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Multi-table or Single-table Inheritance
I'm working on designing the database schema and model for an application that involves Administrators, SalesPeople, Designers, Customers, etc. They all share common attributes such as firstname, lastname, email, phone, password, etc. Traditionally, I've had a People table with the shared attributes, and other tables with the extended fields required for each of the Administrators, SalesPeople, Designers, Customers, etc. They have shared the same primary key as the table that they inherit from. I'm reading "Agile Web Development with Rails" to help me learn the MVC concepts better, and it suggests doing inheritance with a single table with a 'type' column and the extended fields for each of the specializations all in the People table. What is the best way to do this in the cake framework? I'm completely open for suggestions. If you have any good articles that you can point me to, that would be great. (I'll need some guidance on implementation either of these strategies, or a different stategy if needed.) Thanks, you all are great! Jimmy --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: findall in select tag
On Jul 14, 2006, at 10:28 AM, Fernando wrote: > > there is a helper to use the results by findall in a select tag? Check out Model::generateList() -- John --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
findall in select tag
there is a helper to use the results by findall in a select tag? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakeController could not be found ?
You sir, are good. It was actually a form that was causing the problems and as soon as you mentioned I had an additional /cake/ I was able to locate the problem and infact it is just as you said. Problem fixed and I'm good to go, much appreciated! --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Accessing $_SESSION from an image file
Nate, Thanks a million! Changing session.auto_start = 1 in php.ini did the trick. - Jack --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
model save problem
In the model constructor file model_php5.php function __construct($id = false, $table = null, $ds = null) { . $this->id = $id; } $id is expected to be an integer. However, even in simple queries, an array is passed to $id, which causes some weird behavior later on. The problem is not apparent since table.id field is usually defined as auto_increment, the data is inserted correctly. However, in the save() method, the following test will fail and causes some weird behavior . if (empty($this->id) Does anyone experience similar problem? Or have a solution to it? Thanks. - Harry --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Checkbox "checked" into database
Thanks, I'd actually found BOOL and was using it. I ended up implementing a solution in the following manner. I implemented and overrode the beforeSave() method in my Equipment model (http://manual.cakephp.org/chapter/6), it checks to see if the property is less than one and sets it to zero if it is. Thanks for all the help. Devo function beforeSave() { if($this->data['Equipment']['is_elec_taggable'] < 0) { $this->data['Equipment']['is_elec_taggable'] = 0; } return true; } --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Set table prefix depending on what user is logged in?
Hi, i'm building a quite complex Cake PHP application and i need to be able to use different database configurations depending on what user is logged in. The users of my system will manage quite large amounts of data so i need to keep their data separated. At the moment every user has a user specific table prefix on their private tables. That prefix is stored in the database and stored in a session variable when the user logs in. Now, what i want to do is to be able to use the logged in users prefix in some of my models to give the users access their own tables. Can this be done? If so, how? If anyone can help me work this out, i'll be very grateful. Note: I posted a similar question about a month ago with the subject "Set table prefix from session?" but i couldn't make it work the way i wanted using that solution. /David --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Accessing $_SESSION from an image file
Hi Nate, My php.ini file has session.auto_start = 0, but inside my app/config folder in Cake, I have the follow specified: /** * If set to false, session would not automatically be started. */ define('AUTO_SESSION', true); Should the cake setting 'override' the php.ini file? Or in this case, since I am generating a dynamic image file, is the cake setting ignored? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
using cake/scripts/bake.php to bake some scaffold - issues occur
I've been trying to get a two table realtional DB going using the built in bakery. Every time I get to baking the view I run into php error: "Call to a member function on a non-object dbo_source.php line 582" I wanted to clarify that my naming conventions were correct when going through the baking process. tables: psick_cats, psick_links(psick_links has a field psick_cat_id i.e. belongs to cats) When building the Model the bakery does a good job of pre-naming everyhting for me (model PsickCat and PsickLink ... At this time I also add a 1 to many for cats to links and belongs to association for links) Next to make controllers::I'm asked to specificy the controllers that I want to make. I use PsickLinks and PsickCats (not 100% on this, but i believe it to be right) i choose to build interactively. during this phase I am asked the question, ***Would you like this controller to use other models besides 'xx' This is where i'm confused, My original interpretation was that Yes, since i have a key relationship between the tables I want to use this, but I'm not sure weather this means the one controller would controll multiple classes? I've tried a lot of variations, and ultimately I burn a build and specify controller name "PsickLinks" when i select build the basic views i get the following eerr: PHP Fatal error: Call to a member function on a non-object in ... dbo_source.php on line 582 PsickCats view builds fine http://stahler.org/psick.txt <-- table deffs are here http://psick.org/psick_cats/ <-- cats built there http://psick.org/psick_links/ <-- links is missing the views --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Turning off debug
Try using die(); or exit(); after $this->render();Sam DOn 7/14/06, StinkyTofu <[EMAIL PROTECTED] > wrote:Is there any way to turn off debug output for one particular page? I am using a CakePHP script to return values back to a Flash program,however Flash doesn't like extra whitespace in its input, therefore theSQL debug output is messing up Flash's ability to read the program's output.Someone suggested putting define('DEBUG','0'); in the controller methodwhere you want to set a different debug level, but this doesn't work,because define('DEBUG','2'); is already defined in core.php .Any ideas how to do this? It's frustrating to have to go back andchange the debug setting in core.php everytime I want to test the Flashapplication.Thanks. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP Google TechTalk?
at google the are python fans/users. no other motivations --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Problem with scaffolding in cake_1.1.5.3148 ?!?!?
kain wrote: > ax0rz wrote: > > hey. i tried scaffolding (for a "generic" PostsController) with > > cake_1.1.5.3148 and it ISN'T WORKING at my end. it just creates the > > index view perfectly, but doesn't let me add, edit or delete posts! can > > someone else confirm this? > > > > i switched back to cake_1.1.3.2967, and scaffolding works perfectly. is > > there a problem with cake_1.1.5.3148 ?!?!? can someone else please > > confirm this? > > same problem here :) > > kain whoa! really? i just re-extracted the cake_1.1.5.3148 files and it "automagically" started working! wonder what's up with that... :P --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Problem with scaffolding in cake_1.1.5.3148 ?!?!?
oh shit! it's working now :P sorry about this! wonder what went wrong last time? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Project management software
Thanks for the replies so far. @Mika, I presume you meant Mantis Bug Tracking software? If so, that's interesting that it integrates with other programs. I should have mentioned that I am only interested in free (as in speech [although beer would be acceptable if it was really good]) software. It seems so far that neither of you are against the idea of Trac. I like the idea of the Wiki in Trac as I've heard of people using Wiki's for soft copies of 'User Story' cards in XP (which I'm trying my best to get in to). Anymore thoughts? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Problem with scaffolding in cake_1.1.5.3148 ?!?!?
ax0rz wrote: > hey. i tried scaffolding (for a "generic" PostsController) with > cake_1.1.5.3148 and it ISN'T WORKING at my end. it just creates the > index view perfectly, but doesn't let me add, edit or delete posts! can > someone else confirm this? > > i switched back to cake_1.1.3.2967, and scaffolding works perfectly. is > there a problem with cake_1.1.5.3148 ?!?!? can someone else please > confirm this? same problem here :) kain --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Problem with scaffolding in cake_1.1.5.3148 ?!?!?
hey. i tried scaffolding (for a "generic" PostsController) with cake_1.1.5.3148 and it ISN'T WORKING at my end. it just creates the index view perfectly, but doesn't let me add, edit or delete posts! can someone else confirm this? i switched back to cake_1.1.3.2967, and scaffolding works perfectly. is there a problem with cake_1.1.5.3148 ?!?!? can someone else please confirm this? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: generateFieldNames and multiple models
I've had the same problem. Im also using mutiple models but Controller::cleanUpFields() also only uses $this->modelClass wich results in not being able to display the proper error messages for a model update. thanks in advance for the help, takke --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Accessing Controller information (like Action and URL) from app_model.php
Hi I need to be able to tell what Action and URL have been called from app_model.php Is this possible? If so could someone show me how. Any assistance is greatly appreciated. Regards, Langdon --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: flash and FlashOut
I think it only redirects when Debug is set to 0 --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP Google TechTalk?
http://cakephp.org/screencasts --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: redirect after a short delay
Use $this->flash(). Though remember that in DEBUG > 0 the redirect will not happen automatically. http://api.cakephp.org/ class_controller.html#eaa6ef6e0916a18b07beec93c220dd37 --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
CakePHP Google TechTalk?
Why is there are video for Django, but not for CakePHP?!?!?!?!? :( :( :( heheh http://video.google.com/videoplay?docid=-70449010942275062&q=django%3F --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
redirect after a short delay
Hi, I'm building a user management system for my application. When the users log out, it will show a message and then redirect after 5 seconds. The problem is that I cant really get that working with Cake. $this->redirect('users/'); redirect the user instantly and doesnt display the message. How to I make that redirection delay by 5 secs? Thanks in advance. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
flash and FlashOut
what is the difrence betwen flash and FlashOut ? I'm usign $this->flash("my message","myurl",2"), but it not redirects after 2 seconds to myurl, what is wrong? tks --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Turning off debug
Is there any way to turn off debug output for one particular page? I am using a CakePHP script to return values back to a Flash program, however Flash doesn't like extra whitespace in its input, therefore the SQL debug output is messing up Flash's ability to read the program's output. Someone suggested putting define('DEBUG','0'); in the controller method where you want to set a different debug level, but this doesn't work, because define('DEBUG','2'); is already defined in core.php. Any ideas how to do this? It's frustrating to have to go back and change the debug setting in core.php everytime I want to test the Flash application. Thanks. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Project management software
Mantis and Bugzilla are good bug trackers, but they are not very customer friendly. Their interfaces are totally bloated and painful. Personally I have good experience using Trac to collaborate with my clients and I think there is also enough information about the project status and activity available. It is easy to create new projects with trac and integrate your svn repository. My clients accepted to use the trac interface to report bugs and feature requests very fast and they are no developers. I also use FogBugz at work. It has nice features and the interface is supporting you whereever it can. But it's not so easy to integrate it with your svn repository, documentation and roadmap. This is way easier with trac. --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Cake FindAll mysql view occured errors !
More informations about sql querys: 1 DESC `view_servererror` - 2 SELECT COUNT(*) AS count FROM `view_servererror` AS `serviceerror` WHERE 1 - 3 SELECT `serviceerror`.`server_id`, `serviceerror`.`service_id`, `serviceerror`.`service_error_log_id`, `serviceerror`.`error_type_id` FROM `view_servererror` AS `serviceerror` WHERE 1 ORDER BY `serviceerror`.`service_error_log_id` desc LIMIT 20 all sql querys above execute normaly and no error occured! ---== Finnaly I modified the \cake\libs\model\datasources\dbo_source.php Line 569(origin): $data = $model->{$associations[$key]['className']}->afterFind(array(array($key => $results[$i][$key]))); =>>> new: if(isset($associations[$key])){ $data = $model->{$associations[$key]['className']}->afterFind(array(array($key => $results[$i][$key]))); }else{ $data[0][$key] = $results[$i][$key]; } I hope there will be a man offer me a better way,thanks a lot! --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Cake FindAll mysql view occured errors !
I found the quesry result was formed in bellow format: array(2) { [0]=> array(4) { ["server"]=> array(1) { ["server_id"]=> string(2) "22" } ["service"]=> array(1) { ["service_id"]=> string(2) "12" } ["service_error_log"]=> array(1) { ["service_error_log_id"]=> string(1) "7" } ["error_type"]=> array(1) { ["error_type_id"]=> string(1) "3" } } [1]=> array(4) { ["server"]=> array(1) { ["server_id"]=> string(2) "22" } ["service"]=> array(1) { ["service_id"]=> string(2) "11" } ["service_error_log"]=> array(1) { ["service_error_log_id"]=> string(1) "6" } ["error_type"]=> array(1) { ["error_type_id"]=> string(1) "2" } } } That indicated that maybe cake got the mysql view's source sql,and use that sql instead? How to aviod that? --~--~-~--~~~---~--~~ 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 this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---