Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#481 2009-05-12 17:42:57

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

Re: smd_gallery: super-flexible gallery generator

kvnmcwebn wrote:

Basically how do I get this duration into the below form?

I’m not 100% sure but I think you just list any parameters like that inside the new Slideshow, e.g:

var myShow = new Slideshow('slideshow', 
  [{imglist}], 
  {
    hu: "<txp:site_url />images/",
    type: "fade",
    duration: 2000 
  }
);

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

Online

#482 2009-05-12 18:10:50

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: smd_gallery: super-flexible gallery generator

Bloke wrote:

Cheers bloke easier than I thought, just added quotations and it works grand.
I didn’t expect it but it slows the transitions down as well.


<script type="text/javascript">
var myShow = new Slideshow('slideshow', 
  [{imglist}], 
  {
    hu: "<txp:site_url />images/",
    type: "fade",
duration: "2000",
  }
);
</script>

edited to say no doesn’t need quotes.

Last edited by kvnmcwebn (2009-05-12 18:15:39)


its a bad hen that wont scratch itself.
photogallery

Offline

#483 2009-05-14 17:07:16

Gulfcoast
Member
Registered: 2009-04-12
Posts: 76

Re: smd_gallery: super-flexible gallery generator

Just getting my feet wet with the plugin and gone through the steps on slideshow and pagination. With regards to slideshow I get the first image to show but no link when clicking on the first image. With regards to pagination I also get the first image and I see # of pics: 5
First « 1 » Last but once again no thumbs just broken image thumbs and no ability to link through to the next image. Any idea on where my problem might lie? Thank you.

Offline

#484 2009-05-15 02:16:25

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

Re: smd_gallery: super-flexible gallery generator

Gulfcoast wrote:

Any idea on where my problem might lie?

Not without seeing some code and/or a site link that shows the failing galleries ,sorry.


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

Online

#485 2009-05-26 16:50:07

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

Re: smd_gallery: super-flexible gallery generator

hey stef, on page 39 of support here i had a problem where i would put the latest plugin code into the box and it says “badly formed…” and rejects it. i’m still having this problem on fresh 4.0.8 installs. i do install the lib 0.36 and enable it beforehand. just wanted to check with you about it cause i’m not sure why it’s happening? thanks

Offline

#486 2009-05-26 16:58:32

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: smd_gallery: super-flexible gallery generator

mrtunes, have you tried the compressed version?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#487 2009-06-12 10:59:58

alanpmcd
Member
Registered: 2009-05-02
Posts: 21

Re: smd_gallery: super-flexible gallery generator

I’m trying to set up a gallery with sub-galleries per image category. It looks great with all images displayed, using the forms in the tag below. But I can’t make the category thing work. Here’s my test tag within a pictures section:

<txp:_gallery category=”?c” form=“panel_captionedpics” limit=“35” pageform=“pictures_nav” navclass=“picnavlist”/>

Here is an error message I’m receiving:

Tag error: <txp:_gallery category=”?c” form=“panel_captionedpics” limit=“35” pageform=“pictures_nav” navclass=“picnavlist”/> -> Textpattern Warning: tag does not exist on line 1104

Pardon my ignorance, I’m new to textpattern and the plugin. Do I need some kind of ‘if data’ loop in the form? or am I missing something else? Any help gratefully received.

alanpmcd

Offline

#488 2009-06-12 11:25:54

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

Re: smd_gallery: super-flexible gallery generator

alanpmcd wrote:

Tag error: <txp:_gallery… <snip>

You should amend the tag name. It’s <txp:smd_gallery... :-) After that, give us a shout back if you can’t get the gallery going.


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

Online

#489 2009-06-12 11:52:31

alanpmcd
Member
Registered: 2009-05-02
Posts: 21

Re: smd_gallery: super-flexible gallery generator

Oh I’m sorry, what an idiotic error, how patient and kind of you to reply. I’ll give it a try and see what happens next.

alanpmcd

Offline

#490 2009-06-12 12:02:25

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

Re: smd_gallery: super-flexible gallery generator

alanpmcd wrote:

what an idiotic error

lol, don’t worry about it: we’ve all been there. I’ve used some tags before, stared at them for ages, tweaked the attributes and couldn’t figure out why it wasn’t working how I expected. I posted on the forum and within minutes someone pointed out I’d missed an equals sign between an attribute name and its value. D’oh!


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

Online

#491 2009-06-12 17:25:49

alanpmcd
Member
Registered: 2009-05-02
Posts: 21

Re: smd_gallery: super-flexible gallery generator

Having got past the idotic error, I’m back. I love the basic gallery and am playing with FancyZoom to show individual pics and all that’s fine.

But. Here’s my tag:

<txp:smd_gallery category=”?c” form=“panel_captionedpics” limit=“35” pageform=“pictures_nav” navclass=“picnavlist” />

I was basing this on a query from someone weeks ago, that that format should produce category-based galleries. For me it produces an utter blank. Inserting an actual category produces a gallery so it’s something about the “?c” Do you know what it is?

Thanks, I hope I’m not being daft again.

alanpmcd

Offline

#492 2009-06-12 21:13:06

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

Re: smd_gallery: super-flexible gallery generator

alanpmcd wrote:

produce category-based galleries.

Hehe, it should, but it depends how you define category-based! Let me explain.

When you view a list of articles in a particular category (e.g. site.com/category/animals) that category name becomes what I call the “current” category. The ?c in smd_gallery simply reads this category name (if it exists) and looks for images with that same category name. So in the above example, your tag:

<txp:smd_gallery category="?c">

is interpreted as:

<txp:smd_gallery category="animals">

But if you are not viewing a category, i.e. your URL is site.com/article/lions then your smd_gallery tag sees:

<txp:smd_gallery category="">

which is why you see nothing. So in order to actually get your example to show any gallery at all you need to do two things:

  1. make sure you have defined some image categories that match article categories
  2. ensure the smd_gallery tag is inside a <txp:if_category> conditional

Alternatively, you might want to display images that match the category1 or category2 of the current article. Again, make sure you have some common categories and then put your smd_gallery tag inside a <txp:if_individual_article> conditional and change it to:

<txp:smd_gallery category="?category1">

(or ?category2 of course, or even both separated by a comma to list all images that match either category)

Another alternative is to read the category name(s) from some other source; it could be a custom field in an article, or a variable in the URL. Or you might perhaps want to show people a bunch of galleries from your actual list of image categories:

<txp:category_list type="image">
   <h2><txp:category title="1" /></h2>
   <txp:smd_gallery category='<txp:category />' limit="5" />
</txp:category_list>

That would show 5 images from every image category you have defined, and display the images under their respective category headings.

So you can see why I said it depends how you define ‘category-based’ :-) Does any of that get you going in the kind of direction you want to go?

Last edited by Bloke (2009-06-12 21:17:12)


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

Online

Board footer

Powered by FluxBB