Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-10 14:51:55

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Article independent image gallery

I need a special gallery solution, and I can’t remember having read about one like I’d need. But there are lots of, so maybe you’ve found what I’d need.
My client changed his mind, so some steps are already done, and I’d really like to save the work doing some of them a second time.

The gallery should be capabable of the following:

  1. Sorting by image name.
  2. Single thumbnail display with prev/next thumb navigation.
  3. Click thumb to see enlarged version. This is the print version, it must be scaled to fit the screen, as all pictures are larger than the screen.
  4. Print version must be right-clickable (for printing or saving to HD).
  5. Prev/next navigation for enlarged pictures would be fine, but isn’t mandatory.
  6. No need to display image info/names/captions
  7. It’s all one huge chunk of potos, no categories.
but
  1. No “One image per article” solution if possible.
  2. All 210 images are already uploaded, but not into TXP. So I’d like to spare me of another uploading lap.
  3. Naming convention is txp-like, i.e. image.jpg + imaget.jpg for thumbs. Please spare me … see above.

So, all I’d need is something that lets me leaf through thumbs like excerpts, and through images like articles: both one by one. A whatever-box solution isn’t mandatory. Having said that, if you know one that could do all this, let me know, they really look yummier.

Maybe I could solve this for another forum user, but at the moment I’m a little dense. Thus I’d appreciate any hint. Thanks in advance!

Last edited by uli (2008-07-10 21:19:28)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#2 2008-07-10 15:42:07

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,729
Website

Re: Article independent image gallery

You say they’re not loaded into txp so does that mean you’re considering a non-txp solution. If so, try photostack. That will automatically create thumbs and intermediary sizes from a directory of images. The paged thumbnail overview is the standard setup, click on a thumb to get a larger image (you can set the size you want in the settings file), step through next/previous and you can insert a download link to the original image from your large image (straightforward).
It’s themable and does most of the work for you. There are a few themes that come with it including a lightbox driven one, too. If you need any help e-mail me.

It’s not tied into txp, though. Another gallery that people have often recommended but I have not used is zenphoto.

Last edited by jakob (2008-07-10 15:47:19)


TXP Builders – finely-crafted code, design and txp

Offline

#3 2008-07-10 17:16:14

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: Article independent image gallery

jakob wrote:

You say they’re not loaded into txp so does that mean you’re considering a non-txp solution.

Leaving the images where they are now and not renaming them isn’t mandatory, but it’d take half an hour or so of my time.
I’ve looked at documentation, screenshots and source, and found it does lots more than I need. Most of all I’m under pressure, so I’d prefer something I know. But I’ve downloaded it and will play with it when I find time. Roughly, it seems to be for images what TXP is for text.

jakob, though I’m looking for a TXP solution, thanks for your answer and for offering mail assistance! I appreciate that!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#4 2008-07-10 17:26:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Article independent image gallery

uli

If you’re looking for a TXP solution, have you considered smd_gallery?

  1. yes
  2. yes
  3. yes but scaling is down to whatever 3rd party plugin you use
  4. yes
  5. yes if you use a lightbox script
  6. Can if you want
  7. No bother(ish – there’s a small bug awaiting a fix)

All 210 images are already uploaded, but not into TXP. So I’d like to spare me of another uploading lap.

smd_gallery has an experimental directory attribute that reads images from a dir instead of the TXP database. It ignores the built-in category, hence the bug in the last point above won’t affect you.

I have absolutely no idea if the directory mode works because my host doesn’t allow me to read URLs as directories but in theory it should work, and it needs a good volunteer to test it :-)

Last edited by Bloke (2008-07-10 17:26:27)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#5 2008-07-10 17:38:52

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: Article independent image gallery

Bloke wrote:

Sounds interesting, Stef.

3. yes but scaling is down to whatever 3rd party plugin you use

What does this mean, especially “plugin”: the script employed, like lightbox, flashbox, anybox?

smd_gallery has an experimental directory attribute that reads images from a dir instead of the TXP database. […] I have absolutely no idea if the directory mode works because my host doesn’t allow me to read URLs as directories but in theory it should work, and it needs a good volunteer to test it :-)

Is there a quick way of testing if it works? Or do I have to setup everything and at the end … it’s the directory that spoils everything?

(Hm, maybe I can build SQL queries by grep’ing the image names list, and thus make the images aquainted to the DB? What about the IDs, then?) And height, width, … fffforget it.

Last edited by uli (2008-07-10 17:40:48)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#6 2008-07-10 18:43:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Article independent image gallery

uli wrote:

What does this mean, especially “plugin”: the script employed, like lightbox, flashbox, anybox?

Yes. Sorry, confusing terminology. smd_gallery just makes a list of thumbnails and then its up to you to make them “do something”. The way you do that is up to the third party display mechanism you choose.

Is there a quick way of testing if it works?

Yep, easy. Drop it in with directory="http://site.com/your/image/dir" match="if you want to filter the list" attributes, then view the page. And cross your fingers. And toes.

EDIT: If it doesn’t work, try adding the debug attribute and some number from 1 to 3. And if that doesn’t work, then sorry in advance.

Last edited by Bloke (2008-07-10 18:44:10)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#7 2008-07-10 19:32:17

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: Article independent image gallery

Alright. I’ve used the standard tags, taken from example 1:
PAGE: <txp:smd_gallery form="gallery" directory="http://www.mysite.de/images/test" debug="3" />
FORM: <img class="animage" src="{url}" alt="{alt}" /><div class="acaption">{title}</div>
DEBUG:

++ COMBOs ++

array (
)

++ RECORD SET ++

array (
)

++ FINAL OUTPUT ++

array ( 0 => ‘’,
)

Stef wrote:

smd_gallery just makes a list of thumbnails

Can I also use my own? I’d prefer to.

Do you know about a -box script that would scale down images?

Edit: Switched back to this job here and tried the above tags on some images uploaded with TXP: nada. 02:19, I’m so tired … ;)

Last edited by uli (2008-07-11 00:19:47)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#8 2008-07-11 17:59:41

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: Article independent image gallery

Still haven’t found some any-box to suit my needs. But I’m not fixed on -boxes. I’m open to whatever suggestions.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#9 2008-07-13 22:48:10

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: Article independent image gallery

Done!

Couldn’t keep the imported images because the hoster showed me error 500 after 3 pictures imported with fpx_image_import. So I used it successfully on MAMP, transferred the SQL table and ftp’ed the images a second time. Renaming files was sometimes necessary, but could be done easily with the two Mac apps Renamer4Mac and File List, the former by letting one search for regular expressions with ease, the latter is capable of replacing name parts by suffixed numbers, i.e. good for producing valid thumb names.
The gallery itself was done with Stef’s/Bloke’s smd_gallery plus thickbox. Both provide prev/next navs. Thickbox actively scales the images to fit into the window.

smd_gallery is one genius peace of software which you can not praise loud and often enough. It’s replacement tags saved my life by making everything as flexible and adaptable as I needed it. Thanks, Stef!! :)

Last edited by uli (2008-07-14 18:03:44)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#10 2008-07-14 07:42:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Article independent image gallery

uli wrote:

Thickbox actively scales the images to fit into the window.

That’s useful to know, thanks for the tip.

smd_gallery is one genius peace of software which you can not praise loud and often enough.

Thanks for the thanks! Glad it worked for you. wet is the real genius as it was his wet_for_each_image that showed me what was possible with replacements. Under the hood smd_gallery is a stripped down smd_slimbox + wet_for_each_image on steroids.

Now if I could only figure out how to add MLP to the plugin in a clean manner…

Last edited by Bloke (2008-07-14 07:43:11)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

Board footer

Powered by FluxBB