Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#133 2008-06-10 19:20:01
Re: smd_gallery: super-flexible gallery generator
Hmmm, I think that’s a byproduct of the if_different tag. I think it’s being processed first before the plugin tags. You might be better off adding onchange="category_title"
to the smd_gallery tag and using:
<h2>{onchange:category_title}</h2>
{grouptagstart}
<a href="{url}" title="{title}">{object}</a>
{grouptagend}
Last edited by Bloke (2008-06-10 19:20:18)
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
#134 2008-06-10 19:23:36
Re: smd_gallery: super-flexible gallery generator
Nuts, I meant:
{onchange:category_title}
{grouptagstart}
<a href="{url}" title="{title}">{object}</a>
{grouptagend}
and use onchangewraptag="h2"
as well
Last edited by Bloke (2008-06-10 19:24:51)
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
#135 2008-06-10 19:29:38
Re: smd_gallery: super-flexible gallery generator
Stef, what you post above did not quite work, so I now have this:
<txp:smd_gallery category="STA-Training, STA-Facilities, STA-Players, STA-Staff, STA-On-Tour" wraptag="div" class="thumbs" form="gallery" sort="fixed" grouptag="div" groupclass="contentbox" onchange="category_title" />
And form:
{grouptagstart}
<txp:if_different>
<h2>{category_title}</h2>
</txp:if_different>
<a href="{url}" title="{title}">{object}</a>
{grouptagend}
Please check the result in the page….looks ok to me!
Edit: I mean the previous example did not work – not tried your latest example.
Last edited by jstubbs (2008-06-10 19:31:17)
Offline
#136 2008-06-10 19:33:11
Re: smd_gallery: super-flexible gallery generator
This is what I now have:
{onchange:category_title}
{grouptagstart}
<a href="{url}" title="{title}">{object}</a>
{grouptagend}
<txp:smd_gallery category="STA-Training, STA-Facilities, STA-Players, STA-Staff, STA-On-Tour" wraptag="div" class="thumbs" form="gallery" sort="fixed" grouptag="div" groupclass="contentbox" onchange="category_title" onchangewraptag="h2" />
The results are on the STA website
Last edited by jstubbs (2008-06-10 19:33:36)
Offline
#137 2008-06-10 19:34:38
Re: smd_gallery: super-flexible gallery generator
jstubbs wrote:
Please check the result in the page….looks ok to me!
Yay!
But I have just spotted that it’s not in fact if_different, it’s my backwards logic at detecting when something has “changed”. Unfortunately it means — as you found — that if you put the {grouptagstart}
under the {onchange}
, it gets included in the next block instead of being on its own.
I think I know why it’s doing it but I gotta employ some brain power to figure a way round it. And I’ve just had some wine so my mind’s not on top form ;-)
If you can live with it for the time being I’ll see if I can patch it, sorry about the false start.
Last edited by Bloke (2008-06-10 19:35:17)
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
#138 2008-06-10 19:41:57
Re: smd_gallery: super-flexible gallery generator
Yeah I had two beers tonight so I have the same problem with my head :-)
Note I am now using the code from my previous post – #136. It would be good to figure a way to put the H2 outside of the contentbox div instead of inside it. I’ll think about that – when the beer wears off :-)
Offline
#139 2008-06-10 19:46:11
Re: smd_gallery: super-flexible gallery generator
jstubbs wrote:
It would be good to figure a way to put the H2 outside of the contentbox div instead of inside it.
Yeah, I’m on the case. It’s an unfortunate side-effect of me trying to cut corners and do things the easy way instead of doing it properly :-/
The end and start tags are sandwiched together at all places except the first and last gallery so there ain’t nothin’ gettin’ between ‘em no matter how hard you try!
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
#140 2008-06-10 22:18:56
Re: smd_gallery: super-flexible gallery generator
Once more with feeling.
v0.44 | compressed should now work as advertised in the grouptag
department.
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
#141 2008-06-11 06:37:05
Re: smd_gallery: super-flexible gallery generator
I now have this in the form:
{onchange:category_title}
{grouptagstart}
<a href="{url}" title="{title}">{object}</a>
{grouptagend}
And you can see the result in the webpage. Thanks Stef! BTW – category ordering works great too with the fixed attribute.
Offline
#142 2008-06-12 14:25:40
- immarabi
- Member
- Registered: 2008-04-29
- Posts: 57
Re: smd_gallery: super-flexible gallery generator
Hi again, thanks for you continuous help. I am trying to set up the smd_gallery with slideshow 2! for one image to fade into another image. Just two pictures. Here is my tag
<txp:smd_gallery id="29.gif, 30.gif" form="fade" wraptag="div" class="show" collate="quote:{imagedef}" />
and here is the form called ‘fade’
<div id="my_show" class="slideshow">
<img src="{imagepath#1}{imagedef#1}" alt="{alt#1}" />
</div>
<script type="text/javascript">
var data = [{imagedef}];
var myShow = new Slideshow('my_show', data, {controller: true, hu: '{imagepath#1}'});
</script>
i have the js and css loaded in the header, but nothing happens. thanks so much
Offline
#143 2008-06-12 16:00:13
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: smd_gallery: super-flexible gallery generator
immarabi:
Try taking the space out between the images in your smd_gallery tag id=“29.gif,30.gif”.
Also for kicks, use Bloke’s category tag insted of ID and see if that makes a difference.
Make sure you have the css and fade code I referenced earlier, and let us know.
progre55
Last edited by progre55 (2008-06-12 16:01:49)
Offline
#144 2008-06-12 16:05:19
Re: smd_gallery: super-flexible gallery generator
immarabi wrote:
<txp:smd_gallery id=“29.gif, 30.gif” form=“fade” wraptag=“div” class=“show” collate=“quote:{imagedef}” />
As well as what progre55 suggested about the category attribute and the css/fade code, a couple of points:
- the spaces in the list shouldn’t make any difference (hehe, in theory, but I’m willing to be proved wrong!)
- However, the
id
attrbute must be just that: numeric IDs, not filenames with extensions :-)
Try removing the extensions and see if that helps.
Last edited by Bloke (2008-06-12 16:06:01)
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