Re: Display Images off document root
This issue has been solved when i updated my Cake build. On Oct 23, 6:13 pm, mwcbrent [EMAIL PROTECTED] wrote: I am also experiencing this, it seems to get very partial data like there may be a timeout?? On Aug 28, 4:05 am, Andrewk [EMAIL PROTECTED] wrote: Hello, I encounter the same problem, when I trying to retrieve images viaMediaview, not all images displayed, for example I have 20 thumbnails images on the page an only 8~12 first displayed, and on others displayed alt text. In my application I am using cakephp Authentication component and when I trying to display not loaded thumbnails images, by pressing web browser refresh button I redirected to login page to perform Authentication. Moreover number of displayed images on page varies from browser to browser ; I checked in Opera , Firefox and IE6. Anyone have the solution? On Aug 3, 10:16 am, gapiangco [EMAIL PROTECTED] wrote: Got it to work now! Hurray! What I did: 1. Created a layout for items/view(controller/action) which contains nothing but: ?php echo $content_for_layout; ? 2. In my items/viewaction I have: functionview($file = null) { // check if user/member is logged her // ... if ($file) { $this-layout = 'view_image'; $this-view= 'Media'; $params = array( 'id' = {$file}.jpg, 'name' = $file, 'download' = false, 'extension' = 'jpeg', 'path' = 'items' . DS ); $this-set($params); } } And yeah it now displays the images. But I did encounter some problem. Not all images are displayed. Like out of 18 images per page, 8 of them doesn't show up. Trying the right-clickproperties on Firefox shows: Location:http://localhost/projects/tattoo/items/view/z0g7KSoXbu1217687984 Width: 100px Height: 100px Size of file: Unknown (not cached) Alternate text: blank Anyone can help? On Aug 3, 1:52 pm, Dr. Tarique Sani [EMAIL PROTECTED] wrote: On Sun, Aug 3, 2008 at 10:28 AM, gapiangco [EMAIL PROTECTED] wrote: Took a second look and yeah JPEG and JPG are there. My bad. The example from the book was intended for downloading. What if from the example URL mysite.com/designs/view/$slug where: designs: controller view: action $slug: slug name of the design category And from that URL, a list of images available under that specified category will be displayed. Something like a gallery of images. How to use MediaView on such? Would be nice to have more examples on the cookbook :-( Well - step back for a while or step out, take a deep breath and think! Do you know how to accomplish the above withoutMediaView? If yes then all you need to do is replace the links to images with the new controller call it say protectedimages and action called show You will have to do a certain amount of programming in the show action which will ensure that the person currently logged can see unwatermarked image or not I presume you are missing the trick that the img src will contain a URL to a controller action and some param rather than the URL to the image itself. If you want to create conditional links to image itself then you will have to write your own helper. HTH Tarique -- = Cheesecake-Photoblog:http://cheesecake-photoblog.org PHP for E-Biz:http://sanisoft.com =- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Display Images off document root
I am also experiencing this, it seems to get very partial data like there may be a timeout?? On Aug 28, 4:05 am, Andrewk [EMAIL PROTECTED] wrote: Hello, I encounter the same problem, when I trying to retrieve images viaMediaview, not all images displayed, for example I have 20 thumbnails images on the page an only 8~12 first displayed, and on others displayed alt text. In my application I am using cakephp Authentication component and when I trying to display not loaded thumbnails images, by pressing web browser refresh button I redirected to login page to perform Authentication. Moreover number of displayed images on page varies from browser to browser ; I checked in Opera , Firefox and IE6. Anyone have the solution? On Aug 3, 10:16 am, gapiangco [EMAIL PROTECTED] wrote: Got it to work now! Hurray! What I did: 1. Created a layout for items/view(controller/action) which contains nothing but: ?php echo $content_for_layout; ? 2. In my items/viewaction I have: functionview($file = null) { // check if user/member is logged her // ... if ($file) { $this-layout = 'view_image'; $this-view= 'Media'; $params = array( 'id' = {$file}.jpg, 'name' = $file, 'download' = false, 'extension' = 'jpeg', 'path' = 'items' . DS ); $this-set($params); } } And yeah it now displays the images. But I did encounter some problem. Not all images are displayed. Like out of 18 images per page, 8 of them doesn't show up. Trying the right-clickproperties on Firefox shows: Location:http://localhost/projects/tattoo/items/view/z0g7KSoXbu1217687984 Width: 100px Height: 100px Size of file: Unknown (not cached) Alternate text: blank Anyone can help? On Aug 3, 1:52 pm, Dr. Tarique Sani [EMAIL PROTECTED] wrote: On Sun, Aug 3, 2008 at 10:28 AM, gapiangco [EMAIL PROTECTED] wrote: Took a second look and yeah JPEG and JPG are there. My bad. The example from the book was intended for downloading. What if from the example URL mysite.com/designs/view/$slug where: designs: controller view: action $slug: slug name of the design category And from that URL, a list of images available under that specified category will be displayed. Something like a gallery of images. How to use MediaView on such? Would be nice to have more examples on the cookbook :-( Well - step back for a while or step out, take a deep breath and think! Do you know how to accomplish the above withoutMediaView? If yes then all you need to do is replace the links to images with the new controller call it say protectedimages and action called show You will have to do a certain amount of programming in the show action which will ensure that the person currently logged can see unwatermarked image or not I presume you are missing the trick that the img src will contain a URL to a controller action and some param rather than the URL to the image itself. If you want to create conditional links to image itself then you will have to write your own helper. HTH Tarique -- = Cheesecake-Photoblog:http://cheesecake-photoblog.org PHP for E-Biz:http://sanisoft.com =- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Display Images off document root
Hello, I encounter the same problem, when I trying to retrieve images via Media view, not all images displayed, for example I have 20 thumbnails images on the page an only 8~12 first displayed, and on others displayed alt text. In my application I am using cakephp Authentication component and when I trying to display not loaded thumbnails images, by pressing web browser refresh button I redirected to login page to perform Authentication. Moreover number of displayed images on page varies from browser to browser ; I checked in Opera , Firefox and IE6. Anyone have the solution? On Aug 3, 10:16 am, gapiangco [EMAIL PROTECTED] wrote: Got it to work now! Hurray! What I did: 1. Created a layout for items/view (controller/action) which contains nothing but: ?php echo $content_for_layout; ? 2. In my items/view action I have: function view($file = null) { // check if user/member is logged her // ... if ($file) { $this-layout = 'view_image'; $this-view = 'Media'; $params = array( 'id' = {$file}.jpg, 'name' = $file, 'download' = false, 'extension' = 'jpeg', 'path' = 'items' . DS ); $this-set($params); } } And yeah it now displays the images. But I did encounter some problem. Not all images are displayed. Like out of 18 images per page, 8 of them doesn't show up. Trying the right-clickproperties on Firefox shows: Location:http://localhost/projects/tattoo/items/view/z0g7KSoXbu1217687984 Width: 100px Height: 100px Size of file: Unknown (not cached) Alternate text: blank Anyone can help? On Aug 3, 1:52 pm, Dr. Tarique Sani [EMAIL PROTECTED] wrote: On Sun, Aug 3, 2008 at 10:28 AM, gapiangco [EMAIL PROTECTED] wrote: Took a second look and yeah JPEG and JPG are there. My bad. The example from the book was intended for downloading. What if from the example URL mysite.com/designs/view/$slug where: designs: controller view: action $slug: slug name of the design category And from that URL, a list of images available under that specified category will be displayed. Something like a gallery of images. How to use MediaView on such? Would be nice to have more examples on the cookbook :-( Well - step back for a while or step out, take a deep breath and think! Do you know how to accomplish the above without Media View? If yes then all you need to do is replace the links to images with the new controller call it say protectedimages and action called show You will have to do a certain amount of programming in the show action which will ensure that the person currently logged can see unwatermarked image or not I presume you are missing the trick that the img src will contain a URL to a controller action and some param rather than the URL to the image itself. If you want to create conditional links to image itself then you will have to write your own helper. HTH Tarique -- = Cheesecake-Photoblog:http://cheesecake-photoblog.org PHP for E-Biz:http://sanisoft.com =- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---