Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#511 2009-07-14 01:47:04

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: smd_gallery: super-flexible gallery generator

I’m not an smd_gallery user myself, but I’d start by trying sort="name desc". MySQL identifiers are (usually) case sensitive.


Code is topiary

Offline

#512 2009-07-14 01:50:36

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: smd_gallery: super-flexible gallery generator

jsoo wrote:

I’m not an smd_gallery user myself, but I’d start by trying sort="name desc". MySQL identifiers are (usually) case sensitive.

Tried. Does not make a difference.


Kevin
(graphicpush)

Offline

#513 2009-07-14 08:39:47

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: smd_gallery: super-flexible gallery generator

RedFox

If you don’t want the ‘box’ plugin to treat all images on a page as a contiguous set, you need to make sure that each “instance” of smd_gallery uses a unique rel= attribute. Currently, the images in each article use rel="fancybox-nieuws". Consider adding something else to it that’s unique to that page/gallery. If you are only showing one thumbnail, the {id} would do, e.g. rel="fancybox-nieuws_{id}".

kevinpotts

Hmmm, weird. All I can say is that sorting by name works for me — even with a tag the same layout as yours (minus the curly quotes of course). I doubt it has anything to do with your form, but what is its contents, out of curiosty? You could also try adding debug="1" (or 2, or 3, or…) to the gallery tag. If you look at the SQL statement it gives you, plus any other pertinent information, that might pinpoint why it’s not sorting properly. Failing that, post some debug stuff here or mail me with it and we’ll try and figure out what’s going on.

P.S. cool looking site!

Last edited by Bloke (2009-07-14 08:40:43)


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

#514 2009-07-15 11:27:29

simoin
Member
From: Ireland
Registered: 2009-02-10
Posts: 50
Website

Re: smd_gallery: super-flexible gallery generator

Hi, I’m using smd_gallery here,

http://www.athlonesportscentre.ie/index.php?s=gallery

What I would like is a number beside each thumbnail so you can know how many pictures are in a set before you click into it.

This is the form I’m using,

{onchange:category_title}
<a href="{url}"  title="{title}" rel="lightbox-{category}">
{object}
</a>

Any help appreciated.
Simon

Offline

#515 2009-07-15 12:18:17

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: smd_gallery: super-flexible gallery generator

simoin wrote:

What I would like is a number beside each thumbnail so you can know how many pictures are in a set before you click into it.

I had the same question. It’s a bit tricky.

Last edited by kevinpotts (2009-07-15 12:18:36)


Kevin
(graphicpush)

Offline

#516 2009-07-15 12:55:14

simoin
Member
From: Ireland
Registered: 2009-02-10
Posts: 50
Website

Re: smd_gallery: super-flexible gallery generator

Thanks, I’ll have look and hopefully get it sorted.

Offline

#517 2009-07-15 17:45:45

pullober
Member
Registered: 2008-02-06
Posts: 10

Re: smd_gallery: super-flexible gallery generator

i am desperate! maybe i should stick to graphic design, i can not find the error! i’m trying to create a automatically starting slideshow and whatever plugin i have tried, it didn’t work. noch i’m back – using smd_gallery.

after no javascript slideshow is working – it is maybe something easy to find out.

the categorized images should automatically display and loop:
qarante/beta

do you see anything suspicious?

the txp tag
<txp:smd_gallery category="test" form="gallery" />
should output the images.

my gallery form looks like this:

<div class="slideshow" id="slideshow1"> <img src="<txp:site_url />images/{id#1}.jpg" alt="{alt#1}" width="{width#1}" height="{height#1}" /> </div> <script type="text/javascript"> myShow1 = new slideshow("slideshow1", { hu: "<txp:site_url />images/", images: [{imglist}], captions: [{alt}], classes: ["prev","next","active"], type: "fade" }); </script>

am i doing this right?

thank you for any help in advance, stefan.

in the end – it should look like this:

qarante

Last edited by pullober (2009-07-15 17:48:50)

Offline

#518 2009-07-15 19:44:52

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: smd_gallery: super-flexible gallery generator

pullober wrote:

do you see anything suspicious?

Not suspicious, but you do need to think about how the slideshow is made up. Most slideshow scripts need one list of images to be given to them in one go. To do this you must use the collate attribute in smd_gallery. This collates (collects) all images in the categories you give into a big long list and then calls the form once at the end. Without collate it calls the form once per image in the categories.

Thus, your gallery Form is currently outputting:

<div class="slideshow" id="slideshow1">
 <img src="<txp:site_url />images/{id#1}.jpg"...
</div>
<script type="text/javascript">
  ...
</script>

<div class="slideshow" id="slideshow1">
 <img src="<txp:site_url />images/{id#1}.jpg"...
</div>
<script type="text/javascript">
  ...
</script>

<div class="slideshow" id="slideshow1">
 <img src="<txp:site_url />images/{id#1}.jpg"...
</div>
<script type="text/javascript">
  ...
</script>

........

That is invalid HTML because you have the same id multiple times on the page. It also duplicates the javascript, which destroys any chance of making the slideshow work. Look at Example 4 in the plugin help. That will get you on the right road.


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

#519 2009-07-16 04:03:06

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: smd_gallery: super-flexible gallery generator

Hey Bloke – thanks for the reply :)

I couldn’t get it to work though :( – probably me being stupid… rather than post what a mess I came up with, I thought its best to post what I had originally. There are 2 forms, one for thumb images, one for text –

Here is my form for the text

{grouptagstart}
<a rel="shadowbox[{category}]"  href="{url}">{onchange:category}</a>
{grouptagend}

And here is how I am calling it:

<txp:smd_gallery category="formal" sublevel="all" form="trt-gallerytxt" wraptag="ul" break="li"  class="subnav" thumblimit="1" />

Here is the form for the images – this is working with a div wraptag – but I would like to use a li if possible:

<div class="trtholder">
{grouptagstart}
<a rel="shadowbox[{category}]"  href="{url}">{object}
</a>
{grouptagend}
<br /><em>{onchange:category}</em>
</div>

And here is how I am calling it.

<txp:smd_gallery category="formal" sublevel="all" form="trt-gallery" thumblimit="1" onchange="category" wraptag="div" class="trtgallery" />

When using the countform method, I just ended up with one piece of text or image :(

Offline

#520 2009-07-16 15:04:34

pullober
Member
Registered: 2008-02-06
Posts: 10

Re: smd_gallery: super-flexible gallery generator

finally! no errors, a more complete installation of slideshow.js and it still doesn’t start automatically!

there must be some kind of minimal error, which i can not locate!

beta

please have a look at my resource code!

thanks in advance for every hint.

have a nice day, stefan.

Offline

#521 2009-07-21 12:09:55

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: smd_gallery: super-flexible gallery generator

Hi all,

I’m using smd_gallery to show project images related to articles, the plug-in uses the article image field to determine the correct images to show. However, some articles don’t have an image so I’d like to tell the plug-in to use images if the article image field has content, else use a generic image.

As far as I can see this is not possible using the plug-in as is, so I installed smd_if. My code is as follows, but I can’t get it to work correctly – Can anyone help?

<txp:smd_if field="{thisid}"
     operator="isused">

<txp:smd_gallery id="?article_image" wraptag="div" html_id="fade" class="pics">
<txp:image id="{id}" />
</txp:smd_gallery>

<txp:else />

    <txp:image id="11" />

</txp:smd_if>

Offline

#522 2009-07-21 12:22:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: smd_gallery: super-flexible gallery generator

decoderltd

So close! Try:

<txp:smd_if field="thisid" operator="isused">
...

The {} syntax isn’t used in the field attribute natively — only if you are embedding smd_if inside smd_gallery can you do that kind of thing :-)

Last edited by Bloke (2009-07-21 12:22:53)


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

#523 2009-07-21 13:22:08

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: smd_gallery: super-flexible gallery generator

Great, thanks for your quick reply Stef.

One more question, my <txp:else /> statement doesn’t seem to be working properly as it’s only displaying a blank image – it’s the correct size, just nothing is appearing so it seems to be some kind of rendering issue. Any ideas what it could be?

Offline

#524 2009-07-21 13:24:37

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: smd_gallery: super-flexible gallery generator

decoderltd wrote:

… only displaying a blank image – it’s the correct size, just nothing is appearing

Weird. Without seeing the page I can’t really think why. Does the HTML source give you any clues?


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

#525 2009-07-21 14:18:54

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: smd_gallery: super-flexible gallery generator

Hi Stef,

Not really, it just confirms that nothing’s there –

<div id="content">                   
          <div id="feature_panel" class="grid_16">

</div><!—ends #feature_panel—>

Do you think it could have something to do with the Javascript, this is what an article with an image looks like –

<div id="content">
        <div id="feature_panel" class="grid_16">
            <div id="fade" class="pics">
            <img src="http://www.gardensbydesign.uk.net/images/10.jpg" width="940" height="320" alt="Garden Project 1a" title="Garden Project 1a" />
            <img src="http://www.gardensbydesign.uk.net/images/11.jpg" width="940" height="320" alt="Garden Project 1b" title="Garden Project 1b" />
       </div>
</div><!--ends #feature_panel-->

The actual page is here although I’ll have to remove from view shortly. You’ll see there’s still a bit of CSS tidying to do, but it’s the testimonials that are causing the problem.

Offline

Board footer

Powered by FluxBB