I am attempting to create a different output for mobile users. I need for them to view all images in all galleries and the images must be no larger than 320 px wide.
I am using this mobile detection code and a second content block "Mobile."
http://www.i-do-this.com/blog/14/Make-y ... bile-ready
(That really isn't completely pertinent to my questions but for anyone searching, this solution works very well.)
So, CGSmartImage allows for all images in a specific directory to be displayed (it's sub-directories) and that is what I need.
I've read the help file for the module and code is provided for accomplishing what I want but I don't need some of what is in it. Also I don't really understand where to place it. I don't know if I should place it in the template, the gallery template, the content block.... I'm thinking this particular page "Photos" on the website needs it's own template?
The smaller tags are easy enough and work fine. Obviously though that is not what I'm after (a particular image):
Code: Select all
{CGSmartImage src='uploads/images/picture.jpg'}Code: Select all
1: <__script__ type="text/javascript">{literal}
2: jQuery(document).ready(function(){
3: jQuery('a.fancybox').fancybox();
4: });
5: {/literal}</__script>
6: {assign var='files' value='uploads/album/*.jpg'|glob}
7: {if count(\$files)}
8: <div style="width: 100%; height: 150px; overflow: auto;">
9: {foreach from=\$files item='file'}
10: <a rel='simple_album' class="fancybox" href="{CGSmartImage src=\$file filter_rotate=90 filter_watermark=1 filter_resize='h,500' notag=1 noembed=1}">
11: {CGSmartImage src=\$file filter_rotate=90 filter_grayscale=1 filter_watermark=1 filter_resize='h,150'}
12: </a>
13: {/foreach}
14: </div>
15: {/if}- confirming where this code should go, if it needs to be split up, if a new template needs to be created for the "Photos" page
- strip to a basic code that just shows all images in the "uploads/images/Gallery" directory - I don't need watermarking, resizing, rotating etc.
If you can help, thanks, really appreciated!


