Re: User management and authentication plugin for CakePHP 2
Slowly working up the list of TODO items, now the email uses views and the internationalization is set up. I could not find any information though on how e-mail views could be arranged to load automatically depending on the language. It looks like the only way is to do it by manually selecting the view template when creating the mail. Is this correct? On Wednesday, July 11, 2012 10:06:40 PM UTC+2, Albert 'Tigr' wrote: Hello, all! I wrote a yet another user authentication plugin for the CakePHP. I could not find a plugin that would satisfy my requirements for such operations. It is far from finished, there is a long TODO list but it is fully operational with support for user registration, administration, login etc. So it is perfectly usable already. I will appreciate any feedback on both the general CakePHP using code and the security of the thing. github: https://github.com/tigrino/Z Thanks! Albert aka Tigr -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: User management and authentication plugin for CakePHP 2
*If i'm right u can use echo __('some text') in your email views.* * * * * *AND a little tip* if ( !empty($this-request-data['Account']['ruhuman']) ) { /// We do not accept registrations from bots. $this-Session-setFlash(__d('z', 'bots_are_not_welcome')); $this-redirect(array('plugin' = null, 'controller' = 'pages', 'action' = 'index')); return; // just in case } I found it 4 times in AccountsController in 4 different actions. My tip for you: Do not repeat yourself! Write a private function __blockRobots(){ if ( !empty($this-request-data['Account']['ruhuman']) ) { /// We do not accept registrations from bots. $this-Session-setFlash(__d('z', 'bots_are_not_welcome')); $this-redirect(array('plugin' = null, 'controller' = 'pages', 'action' = 'index')); return; // just in case } } end call it when you need it in other actions like: public function register(){ if($this-request-is('post'){ $this-__blockRobots(); // rest of your code } } W dniu sobota, 21 lipca 2012 08:23:52 UTC+2 użytkownik Albert 'Tigr' napisał: Slowly working up the list of TODO items, now the email uses views and the internationalization is set up. I could not find any information though on how e-mail views could be arranged to load automatically depending on the language. It looks like the only way is to do it by manually selecting the view template when creating the mail. Is this correct? On Wednesday, July 11, 2012 10:06:40 PM UTC+2, Albert 'Tigr' wrote: Hello, all! I wrote a yet another user authentication plugin for the CakePHP. I could not find a plugin that would satisfy my requirements for such operations. It is far from finished, there is a long TODO list but it is fully operational with support for user registration, administration, login etc. So it is perfectly usable already. I will appreciate any feedback on both the general CakePHP using code and the security of the thing. github: https://github.com/tigrino/Z Thanks! Albert aka Tigr -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: router help
On Fri, Jul 20, 2012 at 11:23 PM, elogic asymo...@elogicmedia.com.au wrote: Hello, I am having some issues with my routes, I have put in the below route so I can have my front end pages all go to my contents controller view page. e.g. /home shows /contents/view/home or /about-us shows /contents/view/about-us (I'm using a slug) Router::connect('/*', array('controller' = 'contents', 'action' = 'view')); This works as needed for that part however now all of my other controller links are routing to the same area. e.g. /admin/users/login or /users/index etc all go to the contents/view controller / action. How can I get around this so both items work? Put that rule at the end of the route file so that it catches anything that hasn't already been defined. Think of it like a sieve with smaller holes the further down you get. Any specific rule only stops things that match it exactly whereas regex rules catch more things. To recap, put the specific rules at the top and less specific rules further down to make it work properly. Mike. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Cakephp with barcode
On 05/07/12 17:13, Mr. Manager wrote: Dear All, If everyone know the solution to deal with my issue is that I would like to build an application that manage product with cakephp and also use with barcode, the requirement is that I want to generate barcode for products with respect to their id and also read barcode from barcode scanner and process in the application to show data of the product and calculate the price for invoicing. I am looking forward to hearing good news from all of you as soon as possible. Best Regard, Mr. Manager, -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php Do you mean a hand scanner as in a scanner that plugs into a USB ? If that is the case, they usually emulate a USB keyboard, so all you need is an input field. I have used this in a book application in which the ISBN or EAN barcode on the back of the book is scanned. The barcode reader decodes the barcode for you as long it is a supported format and sends you the characters it finds. This gives you the flexibility of either entering the barcode characters by hand or scanning them which can be useful if your scanner breaks ! For Generation there is a helper published at the bakery that looks pretty comprehensive and it just requires the GD php extension. http://bakery.cakephp.org/articles/ixu38/2010/04/30/barcode-helper -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Ingherited models that filter active users/records?
On 20/07/12 17:44, geste wrote: I have a business system with a table called People and where we retain records of a Person even when they leave our organization. Each record has an active attribute that indicated if somebody is active (Duh!). However, I find myself writing a lot of snippets in controllers that essentially go WHERE active = '1' and that seems like it could be a pain and error-prone over time. What I'd like to do is leave People alone but create a new model or model called Users that simply flters People for active=1. And maybe a corresponding model that is OldUsers and feteches active=0. I started to implement something like this at the controller level but then asked myself why not implement at Model level. Does this seems liek a rational approach. Can anyone point to some good examples outside of basic API docs? Thanks, Jim -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php You *could* implement this as 2 database views as opposed to tables. So 'Users' and 'OldUsers' would simply be 2 views on the 'People' table. In MySQL this becomes... CREATE VIEW OldUsers AS SELECT * FROM People WHERE active='0'; OldUsers is then effectively a read-only table and CakePHP is quite happy to generate a model for it. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
how clear cache this view
I have a page with url : *http://example.com/threads/**một wiki và diễn đàn tự do về* (controller/slug) cached in tmp/cache/views/* threads_view_m_e1_bb_99t_wiki_v_c3_a0_di_e1_bb_85n_c4_91_c3_a0n_t_e1_bb_b1_do_v_e1.php * how can i clear cache this page ? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: how clear cache this view
Maybe the URL shouldn't contain special characters? Att., -- ***Thiago Belem* Desenvolvedor Rio de Janeiro - RJ - Brasil *Assando Sites* - Curso online de *CakePHP* assando-sites.com.br http://goo.gl/b1EEd thiagobelem.net cont...@thiagobelem.net *Skype / gTalk **»* thiago.belem.web *LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt On Sat, Jul 21, 2012 at 12:10 PM, Điển vũ meotimdi...@gmail.com wrote: I have a page with url : *http://example.com/threads/**một wiki và diễn đàn tự do về* (controller/slug) cached in tmp/cache/views/* threads_view_m_e1_bb_99t_wiki_v_c3_a0_di_e1_bb_85n_c4_91_c3_a0n_t_e1_bb_b1_do_v_e1.php * how can i clear cache this page ? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: User management and authentication plugin for CakePHP 2
Hi! On Saturday, July 21, 2012 11:23:52 AM UTC+2, Piotr Beschel wrote: *If i'm right u can use echo __('some text') in your email views.* Yes, but that is inefficient. You'd have to split the text in small chunks (length limits!) and translate them through the .po files. I'd rather have texts in different languages and have the system pick up one. There is only a couple of variables and the rest is, well, just text in a particular language. My tip for you: Do not repeat yourself! Write a private function __blockRobots(){ end call it when you need it in other actions like: A long overdue action and not only there. I will. Thanks a lot! Albert -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php