[my work] Simple image gallery
Posted: Thu Feb 03, 2005 8:01 pm
Hi everybody out there!
First of all, I'd like to say this is a GREAT cms, simple, powerful and straightforward (I think this is the right word for what I mean, you've to excuse me since I'm Italian and my English could not be very good...
)
I needed a very simple gallery for CMSMS and, since I wasn't able to find something that fits my needings, I decided to write something very simple: it is, infact, not a module, but only a special "tag" that shows your images uploaded with CMSMS image manager.
[size=18px]-- EDIT: see below for an improved version --[/size]
This small script produces a simple table with image - description rows, where description is the content (no parsing) of a text file with the same name of the image but with the .txt extension or, if this doesn't exist, the file name. The link opens the full-size image in a popup with the sized of the image (more or less
).
There are some config options: $dir is the subdirectory of uploads/images/ where images you want to show are stored, the other ones I think are quite clear. In regexp filters it's better to leave "thumb_" and "editor_" because files like these are generated by the image manager.
I haven't tested it very much, but it seems to work.
INSTRUCTIONS:
Create a new custom tag, call it something like "gallery" (or whatever you want), past the code in the code-area, customize the settings, save it and use it in the content with {gallery} or the name you gave to it.
Currently, you need a new tag for each gallery you want to show, since I don't know how to get parameters in these plugins. (Is there any method?)
I haven't any demo to show, since the whole site I'm developing in on my hard-disk: please, try it and say what do you think
Bye, Federico
[/b]
First of all, I'd like to say this is a GREAT cms, simple, powerful and straightforward (I think this is the right word for what I mean, you've to excuse me since I'm Italian and my English could not be very good...

I needed a very simple gallery for CMSMS and, since I wasn't able to find something that fits my needings, I decided to write something very simple: it is, infact, not a module, but only a special "tag" that shows your images uploaded with CMSMS image manager.
[size=18px]-- EDIT: see below for an improved version --[/size]
This small script produces a simple table with image - description rows, where description is the content (no parsing) of a text file with the same name of the image but with the .txt extension or, if this doesn't exist, the file name. The link opens the full-size image in a popup with the sized of the image (more or less

There are some config options: $dir is the subdirectory of uploads/images/ where images you want to show are stored, the other ones I think are quite clear. In regexp filters it's better to leave "thumb_" and "editor_" because files like these are generated by the image manager.
I haven't tested it very much, but it seems to work.
INSTRUCTIONS:
Create a new custom tag, call it something like "gallery" (or whatever you want), past the code in the code-area, customize the settings, save it and use it in the content with {gallery} or the name you gave to it.
Currently, you need a new tag for each gallery you want to show, since I don't know how to get parameters in these plugins. (Is there any method?)
I haven't any demo to show, since the whole site I'm developing in on my hard-disk: please, try it and say what do you think

Bye, Federico
