Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#151 2008-06-22 00:55:31
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: smd_gallery: super-flexible gallery generator
paulyoung wrote:
src="{imagepath#1}{imagecap#1}"
Havent tried, but this looks definitely odd here :)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#152 2008-06-22 06:48:00
Re: smd_gallery: super-flexible gallery generator
paulyoung wrote:
Help file example #4 should be changed.
What should it be changed to? It demonstrates the first version of rloaderro’s slideshow plugin; perhaps I should add an example for slideshow2 but the help is already too big and is in danger of stopping the plugin installing (there’s a size limit). If I can compress the help any more I’ll see if I can squeeze in another example, but both versions of slideshow are very similar in approach.
I have been using the following to show the first image in my slideshow:
<img src="{imagepath#1}{imagecap#1}" alt="{title#1}" />
Uli is right, that looks odd. There is no built-in replacement tag called {imagecap} so unless you made it yourself as a combo that will fail. In fact in debugging/testing modes it will probably issue a horrible warning, which I will have to fix in the next release. You should probably be using code similar to example 4:
<img src="{imagepath#1}{imagedef#1}" alt="{alt#1}" title="{title#1}" />
fwiw, the reason it works with js on is because slideshow automatically shows the first image of the slideshow, effectively overriding your incorrect “starting image”. Look again at the HTML source and you’ll probably see a bogus src url with your code.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#153 2008-06-24 20:27:24
Re: smd_gallery: super-flexible gallery generator
What a shame! I don’t know how to show the gallery images in a reverse order! I mean, by default the oldest image is viewed first but I want to reverse that order and view the new ones in first position!
Wich tag I could use for that?
Thx in advance!
Update: Damm, too many years using TXP and I realise today that I can’t modify the order of the images inside the Content > Images Tab!
I was supposing that images date are managed the same way that articles date, but not.
That’s not so good, I’m developing a site for a client that needs to manage a Gallery and I can’t find the way to modify the order that images are displayed :S
Am I wrong?
Last edited by duchamp (2008-06-24 21:14:13)
Offline
#154 2008-07-04 18:14:36
Re: smd_gallery: super-flexible gallery generator
Is it possible with your plugin and slideshow2 to rotate images of different sizes and use fade effect?
Thanks!
Offline
#155 2008-07-06 17:54:00
Re: smd_gallery: super-flexible gallery generator
fuls wrote:
Is it possible with your plugin and slideshow2 to rotate images of different sizes and use fade effect?
I don’t think so, but I don’t know slideshow2 very well at all. Certainly this plugin just shows images exactly how they are saved in the TXP Images screen. Whether slideshow2 can do any rotatory jiggery pokery I can’t say. Anyone else?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#156 2008-07-10 08:24:16
Re: smd_gallery: super-flexible gallery generator
Thanks. What about category_title and MLP? I have 2 languages and it only shows default one.
Here is my form code:
<div class=“gallery”>
<a href=”/gallery/?c={category}”>
<txp:
{object}
</a>
{onchange:category_title}
</div>
Offline
#157 2008-07-10 08:46:50
Re: smd_gallery: super-flexible gallery generator
fuls wrote:
Thanks. What about category_title and MLP?
MLP is not supported directly at the moment, sorry. It’s on the TODO list but I couldn’t figure out the best way to handle it. See, there’s so much stuff you could output — and you can define your own stuff via combo — so I’m not sure how it would work.
I think you can MLPise the labels via snippets (there’s an example in the help, though it’s untested so I’m not sure it works). Perhaps you could try the same sort of thing and use a snippet here as a temporary workaround?
If you have any thoughts on what parts of the interface should go through MLP I’ll look into adding it.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#158 2008-07-10 10:22:16
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: smd_gallery: super-flexible gallery generator
Hi BLoke,
probably you already read it, anyway these are Steve’s suggestions for building mlp compatibles plugins.
Offline
#159 2008-07-10 10:26:31
Re: smd_gallery: super-flexible gallery generator
I need to keep onchange, so how would you suggest to use combo with onchange? I need to create a new replacement tag and
put it instead of category_title and it should be a ##snippet##. How:)?
Thanks!
Offline
#160 2008-07-10 10:47:39
Re: smd_gallery: super-flexible gallery generator
fuls wrote:
how would you suggest to use combo with onchange?
Any combo can be used with onchange so every time it’s different it will trigger.
But honestly, I’m not sure how to do it. It was just a thought off the top of my head. It depends how many categories you have because it could be a little labour intensive. All I wondered was whether you might be able to do this:
<txp:smd_gallery combo="mycat:##cat_title_{category}##" other="" options="" here="" />
And then in your form use onchange:mycat. You’d have to manually set up snippets called cat_title_lions, cat_title_tigers and so on — where the last part matched your categories — which is not ideal and why I suggested it only as a temporary measure. But that (or something similar, perhaps generate the snippet name in the form?) might work and get you going until I have time to work out how to make smd_gallery work with MLP properly.
redbot
Yeah I know about the mechanism for doing it, but thanks for the link. In fact, it’s even easier than that now both me and Steve have MLP wrappers in our libraries. The problems I have are:
- My MLP wrapper is in smd_lib but I don’t really want to have smd_gallery reliant on smd_lib; although there’s a lot of duplication in the two anyway so perhaps I should
- Ideally I’d like to make the plugin detect if smd_lib or Steve’s wrapper is enabled and only offer MLP support if so. I haven’t figured out how to do that yet so it gracefully falls back to “no MLP”
- I don’t know which of the replacement variables to put through MLP. Potentially it could be all of them, which is a lot of extra code. And what do I do if you define your own combos? I don’t know how to put those through the MLP machine because I need to supply “default” values in the plugin but I can’t supply defaults if I don’t know what your combos are going to be called :-)
That’s the main reason why smd_slimbox has MLP support but smd_gallery doesn’t (yet); slimbox has defined output but gallery does not. Any ideas from anyone gladly welcomed.
Last edited by Bloke (2008-07-10 10:48:35)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#161 2008-07-10 18:21:29
- immarabi
- Member
- Registered: 2008-04-29
- Posts: 57
Re: smd_gallery: super-flexible gallery generator
Hello again. Trying to sort my thumbnails from latest to oldest. this is what I tried:
<txp:smd_gallery category="?s" form="gallery" sort="id,desc" />
thanks again
Offline
#162 2008-07-10 18:37:57
Re: smd_gallery: super-flexible gallery generator
immarabi
So very close! Try a space instead of a comma:
<txp:smd_gallery category="?s" form="gallery" sort="id desc" />
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#163 2008-07-11 14:33:07
- immarabi
- Member
- Registered: 2008-04-29
- Posts: 57
Re: smd_gallery: super-flexible gallery generator
Great, thanks that works now. One more question though . .
How can I display the {alt} text when the mouse hovers over the thumbnail in both Firefox and Explorer? Right now when the mouse hovers over the thumbnail it displays the {title} text which is the same as is displayed in the caption under the full sized version using the lightbox effect (which is where I want the {title} text to go and go only.)
here is my gallery form:
<a rel="lightbox-{category}" href="{url}" alt="{alt}"
title="{title}" >
<txp:thumbnail id="{id}" alt="{alt}" />
</a>
thanks again!
Last edited by immarabi (2008-07-11 14:34:08)
Offline
#164 2008-07-11 14:40:53
- masa
- Member
- From: North Wales, UK
- Registered: 2005-11-25
- Posts: 1,095
Re: smd_gallery: super-flexible gallery generator
As far as I know, displaying the alt text is one of IE’s non-standards conformant behaviours. If there’s a title attribute, that’s what the browser should display.
So I’m afraid, what you want might not be possible.
Offline
#165 2008-07-14 12:55:10
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: smd_gallery: super-flexible gallery generator
Stef, is it possible to give any of the navigational elements a focusing JS like Google’s document.f.q.focus()? My client is fond of keyboard accessibility. Maybe it’s sufficient to do a one-line-mod? :)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline