rossoft.wordpress.com
MySecurity Component | RosSoft
https://rossoft.wordpress.com/2006/08/23/mysecurity-component
CakePHP Tips and Tricks. August 23, 2006. Posted by rossoft in CakePHP. Some tricks for extra security in cake. If you call http:/ example.com/users/render/delete. You’ve an UsersController) you will get rendered the delete.thtml view. Try it at home with any controller. Some security things for Cake. 8211; The public functions from controller and object now can’t be called from url. Class MySecurityComponent extends Object. Var $components=array(‘Security’);. Var array $forbidden actions. This- forbidde...
rossoft.wordpress.com
Working with HABTM associations | RosSoft
https://rossoft.wordpress.com/2006/08/23/working-with-habtm-associations
CakePHP Tips and Tricks. Working with HABTM associations. August 23, 2006. Posted by rossoft in CakePHP. I’ve done some functions for working with HABTM associations. You’ve the model Post and the model Tag. Post HABTM Tag. You want to add the Tag with id 12 to the Post with id 3. Then you can do it easy with. This- Post- addAssoc(3,’Tag’,12);. Now you want to delete the association between the Post 3 and the Tag 15? This- Post- deleteAssoc(3,’Tag’,15);. You can even add more than one tag at once:. In ar...
rossoft.wordpress.com
Optimizing your queries | RosSoft
https://rossoft.wordpress.com/2006/08/31/optimizing-your-queries
CakePHP Tips and Tricks. August 31, 2006. Posted by rossoft in CakePHP. I’m working on a project with CakePHP and MySQL 5, but it needs to be. DBMS independant. I don’t like putting raw queries with Model- query. Some complex queries require some mysql custom functions. Most of that functions are available in all the common DBMS, but have a different syntax. For that purposes I use Mysql 5 Views. CakePHP hasn’t support for them yet, but I’ve reported a ticket for fixing it. August 31, 2006. I was also lo...
rossoft.wordpress.com
March | 2006 | RosSoft
https://rossoft.wordpress.com/2006/03
CakePHP Tips and Tricks. March 30, 2006. Posted by rossoft in CakePHP. 1 Download the zip from http:/ blogus.xilinus.com/pages/javawin. Place window.js in /js/window/ and the content of css theme folder in /css/window/. 2 Put this on /app/views/helpers/window.php. Isset($params['width']) { $params['width'] =$this- default width; } if (! Isset($params['height']) { $params['height']=$this- default height; } if (! Isset($params['ok label']) { $params['ok label']=$this- default ok label; } if (! Isset($param...
rossoft.wordpress.com
December | 2008 | RosSoft
https://rossoft.wordpress.com/2008/12
CakePHP Tips and Tricks. December 16, 2008. Posted by rossoft in CakePHP. I recommend all of you to take a look at this book: CakePHP Application Development. It is a step-by-step introduction to rapid web development using the open-source MVC CakePHP framework. You can download the forth chapter “Controllers: Programming Application Logic” for free HERE. AJAX Star Rating helper. Log messages to SQL debug window. Working with HABTM associations. Updated packages in cakeforge. Blog tutorial Chapter 3 done.
rossoft.wordpress.com
September | 2006 | RosSoft
https://rossoft.wordpress.com/2006/09
CakePHP Tips and Tricks. AJAX Star Rating helper. September 7, 2006. Posted by rossoft in CakePHP. An AJAX Star Rating Helper based on link1. 1) Download install CJS Templates version 2.1 from cakeforge snippets. 2) Copy star CSS file. To app/webroot/css/star rating/star rating.css. And add the line “overflow: hidden;” to .star-rating. 3) Copy star Image file. To app/webroot/css/star rating/alt star.gif. 4) Copy the helper to app/views/helpers/star rating.php. Will be made to /posts/rate/$id/$rate value.
rossoft.wordpress.com
Mail Templates | RosSoft
https://rossoft.wordpress.com/2006/07/01/mail-templates
CakePHP Tips and Tricks. July 1, 2006. Posted by rossoft in CakePHP. New template view for sending mail through SMTP. 8211; file app/views/foo/mail view.mail. M:from name=”Miguel Ros” mail=”fake@teleline.es” /. That is the subject. This is the plain body text. This is the HTML b Body /b. M:attach path=”/tmp/test1.txt” name=”test file 1.txt” /. M:attach path=”/tmp/test2.txt” /. 8211; File views/foo/mail view.thtml:. The mail has been sent. 8211; Action in FooController:. This- view=’Mail’. Function render...
rossoft.wordpress.com
July | 2006 | RosSoft
https://rossoft.wordpress.com/2006/07
CakePHP Tips and Tricks. July 1, 2006. Posted by rossoft in CakePHP. New template view for sending mail through SMTP. 8211; file app/views/foo/mail view.mail. M:from name=”Miguel Ros” mail=”fake@teleline.es” /. That is the subject. This is the plain body text. This is the HTML b Body /b. M:attach path=”/tmp/test1.txt” name=”test file 1.txt” /. M:attach path=”/tmp/test2.txt” /. 8211; File views/foo/mail view.thtml:. The mail has been sent. 8211; Action in FooController:. This- view=’Mail’. Function render...
rossoft.wordpress.com
Cajax Component v2 | RosSoft
https://rossoft.wordpress.com/2006/05/07/cajax-component-v2
CakePHP Tips and Tricks. May 7, 2006. Posted by rossoft in CakePHP. First, some examples. Echo $cajax- replace html(div.mone,Changed by class.Hello world! Br/ Trying things);. Echo $cajax- replace html(array(#mas2,#otro),Changed by id);. Echo $cajax- effect(array(#mas2,#otro),BlindDown,array(duration= 1) ;. Echo $cajax- effect(#hola,Highlight);. Echo $cajax- effect(#mas2,Puff,array(duration= 1) ;. Echo $cajax- periodical remote(/pruebas/cajax call,2);. Echo $cajax- toggle(#xxxx);. Creation of proxy object.
rossoft.wordpress.com
Updated packages in cakeforge | RosSoft
https://rossoft.wordpress.com/2006/08/23/updated-packages-in-cakeforge
CakePHP Tips and Tricks. Updated packages in cakeforge. August 23, 2006. Posted by rossoft in CakePHP. I’ve been out because my internet connection at home was down😦 Now I return with some improvements in the HeadHelper. They’re in cakeforge (CJS Templates version 2.1). The syntax has changed a bit in HeadHelper (read the version changes) and don’t forget to read the installation instructions for CJS Templates. August 24, 2006. Happy to see you back! 2 majna - November 7, 2006. December 5, 2006. Follow ...