Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2008-05-21 23:18:52

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: smd_gallery: super-flexible gallery generator

ROFLOL (repeat a few times)

I just WILL not use flash.

Thanks for that, Purple Chump, awesome to have you around! You’re like a swiss army knife that’s seven feet wide.

“Oh, that’s what you wanna do, hmm ok, so the stock version of gallery can do most of that, except wash the cat… but here’s some PHP to help you do that… mkay?”

Last edited by mrdale (2008-05-21 23:19:32)

Offline

#62 2008-05-23 19:23:29

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

Re: smd_gallery: super-flexible gallery generator

I am testing a new site on a local windows XP XAMP install and the output for the files url’s uses a “\” backward slash rather then a “/” forward slash which does not allow the image to resolve in FF and or display in FF (IE it is fine)…just thought I would report this slight bug and maybe let others know if they are having an issue with it.

By the way Bloke you rock!!!! Here is a gallery I just completed using this great plugin Bayou Magic Performer Labradors Gallery

cheers

Offline

#63 2008-05-23 19:31:29

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

Re: smd_gallery: super-flexible gallery generator

cuda wrote:

on a local windows XP XAMP install and the output for the files url’s uses a “\” backward slash rather then a “/” forward slash

Thanks for letting me know. I believe I was riding on bogus info when I wrote the plugin so I’ll fix it in the next update. For the interested, I’m using the built-in DS constant to make up directory paths — which is supposedly the preferred way of doing it — except in local installs and other edge cases it can get it wrong as cuda found. I’ve since read that using a raw / is the best option so I’ll go with that instead.

Here is a gallery I just completed using this great plugin…

Thanks for the props. Nice gallery. Or is that a labbery ;-)

Last edited by Bloke (2008-06-21 08:29:48)


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

#64 2008-05-23 19:45:27

cuda
Member
From: Georgia, USA
Registered: 2008-02-06
Posts: 70
Website

Re: smd_gallery: super-flexible gallery generator

ever seen “Best in Show”….that’s all I got to say and thanks bloke for the php notes

Offline

#65 2008-05-26 00:49:10

visualpeople
Member
From: Corvallis, Oregon - USA
Registered: 2005-11-16
Posts: 73
Website

Re: smd_gallery: super-flexible gallery generator

Maybe this is easy and I’m just missing it, but is there a way to make an image’s url essentially the same as the url for {navnext}?

ie. Clicking on the image sends you to the next image in the sequence.

Offline

#66 2008-05-26 11:32:31

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

Re: smd_gallery: super-flexible gallery generator

visualpeople wrote:

Maybe this is easy and I’m just missing it, but is there a way to make an image’s url essentially the same as the url for {navnext}?

Nope, not easy. But it is now :-)

v0.41 | zipped

This version adds:

  • 5 new paging replacement tags that output raw URLs:
    • {navfirstpageurl} : raw URL to the first page
    • {navprevpageurl} : raw URL to the previous page
    • {navthispageurl} : raw URL to the current page
    • {navnextpageurl} : raw URL to the next page
    • {navlastpageurl} : raw URL to the last page
  • New attribute paging which switches paging on independently of using pageform (so you can have paging on but not use a pageform if you wish — using pageform automatically switches paging on, as before)
  • When paging is on, the paging replacement variables (including the 5 new ones) all become available in the standard gallery replacement tags
  • Hopefully, a fix for the directory problem that cuda found

So now you can do this:

<txp:smd_gallery category="?custom1" limit="1" form="gallery" paging="1" />

And in your gallery form:

<a href="{navnextpageurl}"><txp:image id="{id}" /></a>

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

#67 2008-05-26 19:48:33

visualpeople
Member
From: Corvallis, Oregon - USA
Registered: 2005-11-16
Posts: 73
Website

Re: smd_gallery: super-flexible gallery generator

Just when I think I’m impressed by you and your plugin(s), you have to go and make it better…

This is excellent! Thanks so much. I wish everything was as flexible and expandable as this plugin.

Offline

#68 2008-05-27 02:00:05

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

Re: smd_gallery: super-flexible gallery generator

Amazing work Stef! Just an stupid question … if I use wraptag and break to obtain a list of thumbnails and pagination, the pagination list is nested inside the thumbs list (at the top), but I want to have the list of thumbnails first and then the pagination list outside and after the first list … what’s the way to do this?

I’ve just tried this, taken from the examples:

<txp:smd_gallery category="zoo" sublevel="all" form="mygallery" limit="10" wraptag="ul" break="li" pageform="mygallery_nav" navwraptag="ul" navbreak="li" />

Thanks in advance!

Offline

#69 2008-05-27 09:50:10

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

Re: smd_gallery: super-flexible gallery generator

duchamp wrote:

if I use wraptag and break to obtain a list of thumbnails and pagination, the pagination list is nested inside the thumbs list (at the top), but I want to have the list of thumbnails first and then the pagination list outside and after the first list

D’oh! Not a stupid question at all. Stupid coding, more like… *embarrassed*

Try v0.42 | compressed which splits the pageblock and the thumb blocks into two distinct areas, each with their own wrap and break tags (as they should have been all along). Thanks for spotting that.

In addition, there is now a new attribute pagepos which allows you to specify the position of the paging block. Default is below, but you can specify above instead of — or in addition to — this if you want the nav block to be repeated at the top and bottom of your thumbs. Use the delim character (default = comma) to separate the two options if you want them both, i.e. pagepos="above, below".

I also fixed a tiny bug in the previous version that output {navnextpageurl} and {navprevpageurl} even if there was no next/prev page. That’s now corrected so if you’re at either end of the pagination, those variables are correctly set empty when necessary. This also means you can detect this fact with smd_if and take action accordingly if you wish.

Hope that helps, and sorry to cause you bother.


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

#70 2008-05-27 20:57:56

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

Re: smd_gallery: super-flexible gallery generator

Fantastic … superb … and Thanks!
Didn’t try it yet, Im going to work with TXP and that gallery later.
Anyway, you’re giving us one of the best plugins! Thx again!

Offline

#71 2008-05-27 22:20:37

visualpeople
Member
From: Corvallis, Oregon - USA
Registered: 2005-11-16
Posts: 73
Website

Re: smd_gallery: super-flexible gallery generator

Not sure if this should go here or in the smd_if forum, but since it deals specifically with the gallery, I’ll try here…

I can’t quite get my feeble mind around correctly detecting the front and back of the pagination.

I’ve tried:

<txp:smd_if field="{navprevpageurl}" operator="ends" value="=0" > Home
<txp:else />
{navprev}
</txp:smd_if > 

and a host of other things I thought might work, but I can’t get it to work…

When I turn on debugging, it even appears that it should be working:

[<txp:smd_if field="/sandbox/return2?smd_glry_c8db=0" operator="ends" value="=0" > Home
<txp:else />: true]

Offline

#72 2008-05-27 22:43:09

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

Re: smd_gallery: super-flexible gallery generator

visualpeople wrote:

I can’t quite get my feeble mind around correctly detecting the front and back of the pagination.

OK, don’t ask me why (no, please don’t) but I’ve tried your example and it doesn’t work as you found:

<txp:smd_if field="{navprevpageurl}" operator="ends" value="=0" > Home
<txp:else />
{navprev}
</txp:smd_if > 

But this example here does work:

<txp:smd_if field="{navprevpageurl}" operator="ends" value="=0" > Home
<txp:else />
{navprev}
</txp:smd_if>

Let’s play spot the difference for a moment. Anyone? Anyone? Bueller? The space before the closing ‘>’ of the last smd_if.

If I delete that, it works fine, even though the debug says it equates true in both cases. /me flummoxed. Try that and see if it helps.

*shrug* Answers on a postcard to the usual address if anyone can shed some light on why it doesn’t matter on the opening tag but matters on the closing tag.


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

Board footer

Powered by FluxBB