Re: Complex Images Route
Probably but then wouldn't that kind of defeat the purpose of using Cake? On Sep 23, 1:34 am, Vivi Vivi vivianbog...@gmail.com wrote: Maybe can be done within htaccess with rewrite rule. On Thu, Sep 23, 2010 at 8:28 AM, Kyle Decot kyle.de...@gmail.com wrote: I've tried the following w/ no success Router::connect('/:model/:size\_:filename.:extension', array('controller' = 'images', 'action' = 'server'),array( 'model'='(blog|event|users)+', 'size'='(t|m|l|o){1,1}', 'filename'='[a-zA-Z0-9]+', 'extension'='.(gif|png|jpg){3,3}', )); Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.c omFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Vivihttp://photos.vr-3d.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: Complex Images Route
No, You can mix them and get better results. From my point of view it's much easier to put some rules into .htaccess and after treat them into routes.php But we can made a controller to treat the images. in route.php add Router::connect(/img/*, array('controller' = 'image', 'action'='some action')); And in the controller make what you want. The controller is called only if the image doesn't exist. On Thu, Sep 23, 2010 at 10:16 AM, Kyle Decot kyle.de...@gmail.com wrote: Probably but then wouldn't that kind of defeat the purpose of using Cake? On Sep 23, 1:34 am, Vivi Vivi vivianbog...@gmail.com wrote: Maybe can be done within htaccess with rewrite rule. On Thu, Sep 23, 2010 at 8:28 AM, Kyle Decot kyle.de...@gmail.com wrote: I've tried the following w/ no success Router::connect('/:model/:size\_:filename.:extension', array('controller' = 'images', 'action' = 'server'),array( 'model'='(blog|event|users)+', 'size'='(t|m|l|o){1,1}', 'filename'='[a-zA-Z0-9]+', 'extension'='.(gif|png|jpg){3,3}', )); Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.c omFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Vivihttp://photos.vr-3d.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Vivi http://photos.vr-3d.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: Complex Images Route
maybe this help you http://bakery.cakephp.org/articles/view/cakephp-s-routing-explained On Thu, Sep 23, 2010 at 11:23 AM, Vivi Vivi vivianbog...@gmail.com wrote: No, You can mix them and get better results. From my point of view it's much easier to put some rules into .htaccess and after treat them into routes.php But we can made a controller to treat the images. in route.php add Router::connect(/img/*, array('controller' = 'image', 'action'='some action')); And in the controller make what you want. The controller is called only if the image doesn't exist. On Thu, Sep 23, 2010 at 10:16 AM, Kyle Decot kyle.de...@gmail.com wrote: Probably but then wouldn't that kind of defeat the purpose of using Cake? On Sep 23, 1:34 am, Vivi Vivi vivianbog...@gmail.com wrote: Maybe can be done within htaccess with rewrite rule. On Thu, Sep 23, 2010 at 8:28 AM, Kyle Decot kyle.de...@gmail.com wrote: I've tried the following w/ no success Router::connect('/:model/:size\_:filename.:extension', array('controller' = 'images', 'action' = 'server'),array( 'model'='(blog|event|users)+', 'size'='(t|m|l|o){1,1}', 'filename'='[a-zA-Z0-9]+', 'extension'='.(gif|png|jpg){3,3}', )); Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.c omFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Vivihttp://photos.vr-3d.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Vivi http://photos.vr-3d.net -- Vivi http://photos.vr-3d.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Complex Images Route
I am attempting to make a route that will handle the generation of all of my images. Basically I want it to be something similar to Flickr. For example: http://images.example.com/[models]/[sizes]_[filename].[extension] [models] = (blog|event|user) [sizes] = (t|s|l|o) [filename] = example [extension] = (png|gif|jpg) I don't know how to write the route for this however. I've tried a couple of different ways but I can't seem to get it to work. I'm by no stretch of the imagination an expert of regex. Anyone willing to help me out? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: Complex Images Route
Anyone? I know this is possible. I've been trying off and on all day today with no success. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: Complex Images Route
I've tried the following w/ no success Router::connect('/:model/:size\_:filename.:extension', array('controller' = 'images', 'action' = 'server'),array( 'model'='(blog|event|users)+', 'size'='(t|m|l|o){1,1}', 'filename'='[a-zA-Z0-9]+', 'extension'='.(gif|png|jpg){3,3}', )); Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en
Re: Complex Images Route
Maybe can be done within htaccess with rewrite rule. On Thu, Sep 23, 2010 at 8:28 AM, Kyle Decot kyle.de...@gmail.com wrote: I've tried the following w/ no success Router::connect('/:model/:size\_:filename.:extension', array('controller' = 'images', 'action' = 'server'),array( 'model'='(blog|event|users)+', 'size'='(t|m|l|o){1,1}', 'filename'='[a-zA-Z0-9]+', 'extension'='.(gif|png|jpg){3,3}', )); Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- Vivi http://photos.vr-3d.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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?hl=en