Textpattern CMS support forum

You are not logged in. Register | Login | Help

#241 2008-10-15 11:50:16

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,754
Website

Re: smd_gallery: super-flexible gallery generator

fuls wrote:

can we expect MLP plugin compatibility in near future?

Sorry, I haven’t thought much about it since you last asked. I’m such a slacker :-(

The same thing applies unfortunately: I don’t know in advance which things you are going to want to display and there are many things you could show. If you wanted to display a translated category, alt or caption, that’s perhaps possible because I could probably pre-load the necessary MLP translation array with the relevant info. But if you defined your own replacement variable as a combo I have no way of knowing what you are going to call it, so cannot pass that to MLP for translation (I don’t think… not sure if I can defer translation to a later point in time. If any MLP geniuses want to give advice on how I could do this, please shout)

I do have a development version lying around somewhere that I tried some MLP in. I think I abandoned it because it became too confusing but I may go back to it now I’ve learnt a bit more and see if anything leaps out at me. Which parts of the image info would you most want to translate? I can make those a priority and see if I can get it to work.

BTW, have you tried using snippets like that example in the help? It’s not ideal, but I’d love to know if it works.

Last edited by Bloke (2008-10-15 11:52:46)


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

Offline

#242 2008-10-15 12:02:29

fuls
Member
Registered: 2005-11-16
Posts: 117
Website

Re: smd_gallery: super-flexible gallery generator

Thanks for the quick reply, you are not a slacker;)!

I didn’t try anything yet but it would be really great if you could provide some quick solution for:

Category name in form here:
<li>
{changed:category_title}
<a href=”<txp:section />/?c={category}”>
{object}
</a>
</li>

and alt title here:

<li>
<a rel=“shadowbox[{category}];options={overlayOpacity: 0.6, resize: false}” href=”{url}” title=”{alt}”>
<img src=”{thumburl}” alt=”“ />
</a>
</li>

Thanks in advance!

Offline

#243 2008-10-16 08:01:27

fuls
Member
Registered: 2005-11-16
Posts: 117
Website

Re: smd_gallery: super-flexible gallery generator

Any ideas?
Thanks!

Offline

#244 2008-10-16 10:42:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,754
Website

Re: smd_gallery: super-flexible gallery generator

Easy tiger! When you said “a quick solution” I didn’t realise you meant “overnight” :-)

I’ve got my head in smd_tags land at the moment — preparing the 3rd version of the core image patch — then I’m considering a coding holiday for a few days to get over it, and work on my screenplay instead. There’s only so much PHP one man can take; which is part of the reason I don’t code for a living.

When I come back (hopefully) refreshed I’ll try and make MLP my next port of call.


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

Offline

#245 2008-10-16 10:49:12

fuls
Member
Registered: 2005-11-16
Posts: 117
Website

Re: smd_gallery: super-flexible gallery generator

Sorry Bloke, I’ll wait patiently :)
Thanks!

Offline

#246 2008-10-24 12:52:06

spgriffee
Member
Registered: 2004-12-21
Posts: 38
Website

Re: smd_gallery: super-flexible gallery generator

Stef,

Your smd_gallery plugin is very powerful and very useful—thank you for creating it!

I have a question:

How complicated do you think it would be to combine smd_gallery with regular Textpattern articles in such a way that individual images are displayed in an individual article page with its own permanent URL instead of the usual sitename.url/images/###.jpg? I want to avoid reliance on JavaScript to display each individual image along with its associated information such as title and caption.

I am looking for a way to make a Textpattern article be the thumbnail index page of a photographic essay that you would find at a URL such as: sitename.url/stories/essayname (your plugin is great for this), and when each photograph is clicked, the visitor is taken to an individual article page with a permanent URL containing the photograph, such as: _sitename.url/stories/essayname/photo-1

I can currently accomplish something close to this by inputting each photograph ID into an specific article image ID field, and am wondering if there is a quicker, simpler way by using your plugin perhaps combined with others.

This is what I have currently: http://simongriffee.com/lp/libero-pensiero (photos ‘manually uploaded’, not using your plugin for thumbnails, necessary for me to create a section for each ‘essay’ manually)

This is the kind of thing I’m aiming for: http://www.johnvink.com/story.php?title=Cambodia_March_of_the_Damned (notice the paged thumbnail list for each essay and permanent link for each photograph).

Any suggestions are very welcome indeed!

Offline

#247 2008-10-24 19:50:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,754
Website

Re: smd_gallery: super-flexible gallery generator

spgriffee wrote:

How complicated do you think it would be to combine smd_gallery with regular Textpattern articles in such a way that individual images are displayed in an individual article page with its own permanent URL

If I’ve understood correctly, this is a bit tricky. Just to get this clear in my head, the current process you have employed is:

  1. upload images into an image category
  2. create an article with the title of the image
  3. assign the image ID to the article image field
  4. use TXP tags to display the article image thumbnails such that, when clicked, they open the article in question which displays the full image via a TXP form

And you want to:

  1. upload images into an image category
  2. use smd_gallery to display the image thumbnails from a particular category such that, when clicked, they direct the browser to a URL that looks like an individual article but isn’t

Is that a summary of what you are trying to achieve? If so I’m not sure it’s possible cleanly with just tags. Certainly the plugin can be used to formulate a link to pretty much any URL, provided it is made up of bits of stuff held against an image (plus any fixed text of course). But without an actual article, you’ll get a 404 when you click on the thumb. For example:

<txp:smd_gallery category="lp">
  <a href="/{category}/{name}" title="{title}">
    <img src="{thumburl}" alt="{alt}" />
  </a>
</txp:smd_gallery>

Provided you set up your filenames without an extension in them, that’ll redirect to, for example, /lp/name-of-my-picture.

The only way round this I can think of is to use mod_rewrite to intercept the ‘fake’ URL (e.g. detect if you get a 404), pass the ‘title’ (image name) part of the URL to a single, known, real article which reads that bit of info and fetches the image of the same name from the database to display.

Whether you could add the navigation links from this page (next/prev) I don’t know because you’re essentially always viewing the same article! Perhaps smd_query or one of the neighbour plugins can get the next/prev image in sequence?

Past that I’m out of ideas. If anyone else has some cool nuggets to help out, please chime in, thanks.


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

Offline

#248 2008-10-25 11:15:34

spgriffee
Member
Registered: 2004-12-21
Posts: 38
Website

Re: smd_gallery: super-flexible gallery generator

Stef,

Thank you very much for addressing my question in so much detail.

I think you understand what I am after and I appreciate your ideas. I’ll probably need to give it more thought as I think the mod_rewrite interception stuff will get too unwieldy and complicated with the amount of images and articles I’ll be dealing with.

I imagine what I’m after is a system where when images are uploaded, articles with image titles, captions, category and image IDs are automatically generated. Then either I create another article as the ‘index page’ for these articles with thumbnails or this is also automatically generated.

I’ll keep thinking.

Thanks again for your time!

Simon

Offline

#249 2008-10-26 11:15:50

sirNemanjapro
Member
From: Čačak, Serbia
Registered: 2007-12-08
Posts: 59
Website

Re: smd_gallery: super-flexible gallery generator

I cant download the file. :( My ISP is crap.

Can someone email me the plugin at nemanja@plumts.com .

Thanks!


“… they were enterprising voyages…” – Mr. Spock ( from Spock vs. Q )

Offline

#250 2008-10-26 12:04:08

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: smd_gallery: super-flexible gallery generator

Can someone email me the plugin at nemanja@plumts.com

Done, and you are most welcome.

Offline

Board footer

Powered by FluxBB