Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2010-03-10 20:44:38

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

Re: Creating a photo gallery using smd plugins

jmart wrote:

Yep- the images are definitely there. But they aren’t assigned a category.

Rats. Stupid bug in the plugin that I’ve been meaning to address for the last year and never quite got round to investing the time to fix. Is it too much trouble to ask you to stick those images in a category for the time being? That should fix things for now. If it’s going to cause you a major problem over time then I can see if I can fix the plugin once and for all.

Sorry for the hassle this is causing.


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

#14 2010-03-10 21:08:35

jmart
Member
Registered: 2008-08-25
Posts: 68

Re: Creating a photo gallery using smd plugins

No worries. If inputting categories will fix, then that’s fine. But can you tell me where to correct the tag in the form and where ever else it needs to be corrected. I’m still new to your plugin so the learning curve is steep. Note that I will have multiple albums on this page so should I assign each album a different category?

Though, I’m curious as to why my other gallery on the other site works but doesn’t work here.

Last edited by jmart (2010-03-10 21:11:50)

Offline

#15 2010-03-10 21:33:16

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

Re: Creating a photo gallery using smd plugins

jmart wrote:

But can you tell me where to correct the tag in the form and where ever else it needs to be corrected.

You shouldn’t need to do anything to your smd_gallery tag (besides remove the debug bit!) as simply putting your images in a category — any category — will make the plugin behave. I’ve just whipped up what I thought was a fix, but it breaks something else in the plugin so I’m trying to figure that out now.

I will have multiple albums on this page so should I assign each album a different category?

That’s entirely up to you. If you are happy to assign your images to an article using a list of IDs in the article_image field then you can assign your images to any category you like. However, a nice approach to multiple galleries is to actually create logical categories for them to reside in. That means you have more options open to you later.

For example, you could simply put the name of the category in the article_image field (or any custom field) and have the plugin read that value as its category. It will then create the gallery from all images in that category. So if you add images to a collection, once they are added to the category the plugin automatically picks them up and adds them to your page without you having to do anything else. You can also list more than one image category in your article image / custom field if you wish and it’ll make a gallery from all of the images it finds.

You could be even more clever and tie the image category to the article category (call them the same name) so you don’t need to rely on someone entering the category name in a custom field. Or if your article naming convention was quite strict in this section, you could use (parts of) the article title as the category to grab images from. It really is only limited by your imagination here.

The other thing that categorising images allows you to do is easily make multiple lightboxable galleries on a single page. There’s an example of this in the documentation but as a quick teaser you could set up your nested image categories like this:

portfolio
  |--> bloke
  |--> jmart
  |--> jandw
  |--> ...

Then in your smd_gallery tag you could tell it to grab all images from category="portfolio" sublevel="1" and it’d get all images from all sub-categories of your portfolio main category. In your smd_gallery Form/container you could then tell it to add a heading above each change of category so you could display a single page containing the images from each artist. And the beauty is that if you add an image to an artist category or add a completely new artist to your portfolio, the plugin keeps track of it all for you and expands the page automatically.

Category support is where this plugin really shines so I would encourage you to use them. But if you prefer not to, that’s fine!

I’m curious as to why my other gallery on the other site works but doesn’t work here.

Probably because your images were categorised.


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

#16 2010-03-10 23:10:02

jmart
Member
Registered: 2008-08-25
Posts: 68

Re: Creating a photo gallery using smd plugins

Got it. Thanks for the tips.

I assigned a category for the images but they are still not displaying properly.

I never assigned a category for the images on the other site so that can’t be a reason.

Offline

#17 2010-03-10 23:20:47

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

Re: Creating a photo gallery using smd plugins

jmart wrote:

I assigned a category for the images but they are still not displaying properly.

What do you mean ‘properly’? I can see 4 images per group: 1 thumbnail and 3 links beneath that. When I click them they show the main image, so smd_gallery is doing its job. What do you expect to happen when you click the image/links?

If you’re expecting a lightbox popup effect, check that your paths to external scripts (js/css) are all correct. Use Firebug’s Net pane to track down stuff quickly here. For starters, your jquery file isn’t being found at the moment…

Last edited by Bloke (2010-03-10 23:22:28)


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

#18 2010-11-01 21:09:45

Dimitri
Member
From: Johannesburg
Registered: 2010-10-31
Posts: 129

Re: Creating a photo gallery using smd plugins

portfolio
  |--> bloke
  |--> jmart
  |--> jandw
  |--> ...
and the texts u wrote
I will appreciate it if you create a tutorial for newbies like me. I have been to your website, I cannot make head or tails of your docs. I do not want to use the light box.

I just want it to be shown on 1 page showing all this below.

portfolio

|—> bloke | list of images Jandw | list of images Jmart | list of images

Thanx

i tried something like this but it still pulling all the images (5 categories of images into each category), gave up after my 4th hour of time-a-wasting
<txp:smd_gallery category="main-gallery" sublevel="all" wraptag="ul" imgsize="200" grouplimit="1" > <li> <h2>{category_title}</h2> <txp:smd_gallery category="main-gallery" sublevel="all" wraptag="ul" break="li" imgsize="200" > <img src="{url}" width="{width}" /> </txp:smd_gallery> </li> </txp:smd_gallery>

Last edited by Dimitri (2010-11-01 21:11:08)


<txp:way_too_cool />

Offline

#19 2011-02-03 16:02:49

drudog
Member
Registered: 2011-02-01
Posts: 20

Re: Creating a photo gallery using smd plugins

Dimitri wrote:

i tried something like this but it still pulling all the images (5 categories of images into each category), gave up after my 4th hour of time-a-wasting
<txp:smd_gallery category="main-gallery" sublevel="all" wraptag="ul" imgsize="200" grouplimit="1" > <li> <h2>{category_title}</h2> <txp:smd_gallery category="main-gallery" sublevel="all" wraptag="ul" break="li" imgsize="200" > <img src="{url}" width="{width}" /> </txp:smd_gallery> </li> </txp:smd_gallery>

I think you mis-used the sublevel tag in your example. I think (not sure) it’s a true/false statement so saying “sublevel=1” would mean to include all the sublevels and “0” would include no sublevels.

Offline

#20 2011-02-03 17:07:59

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

Re: Creating a photo gallery using smd plugins

drudog wrote:

I think you mis-used the sublevel tag in your example.

Normally yes, but this an smd_ plugin so all bets are off! sublevel="all" is valid to get all category levels. Supplying a number limits the category to the given level. Will look at Dimitri’s problem later when I get a moment (sorry I missed this thread).

Last edited by Bloke (2011-02-03 17:09:16)


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