Textpattern Forum

You are not logged in. Register | Login | Help

#151 2008-06-22 00:55:31

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,017

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,815
Website

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.

Txp Builders – finely-crafted code, design and Txp

Offline

#153 2008-06-24 20:27:24

duchamp
Member
From: Patagonia
Registered: 2005-02-03
Posts: 222
Website

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

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

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,815
Website

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.

Txp Builders – finely-crafted code, design and Txp

Offline

#156 2008-07-10 08:24:16

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

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,815
Website

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.

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,399

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

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

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,815
Website

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:

  1. 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
  2. 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
  3. 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.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB