Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#709 2011-12-22 20:55:19

halftone
Member
Registered: 2011-12-22
Posts: 10

Re: smd_slimbox

Thanks both. I just tried with no spaces (changed to underscores) and single quotes around the tag-in-tag, and it still doesn’t work.. Is it me, or TXP? :) (I mean : Yes, I changed the custom field in admin to slideshow_category as well as in the form).

FWIW, before posting I already checked that (txp:custom_ field name="slideshow category" /> returned the value on the page, xmas_cards, so it’s just the context as input to smd_slimbox that seems iffy

Last edited by halftone (2011-12-22 21:04:53)

Offline

#710 2012-01-02 18:52:53

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

Re: smd_slimbox

Any ideas on how can I get paging to work with smd_slimbox.
Right now if i limit the number of thumbnails to say “9” it will display 9 thumnails.

The next link below the thumbnails will open up a blank lightbox screen with no image in it.

I’ve tried a couple ways:

<txp:smd_slimbox category="business_signs_images" limit="9" imagecaption="?caption"   wraptag="li" cellclass="cell"  />

and even messed about like this:

<txp:article  wraptag="ul" break="li" class="thumbs"  category="business_signs" limit="9">
    <txp:smd_slimbox limit="9" ><a href="<txp:permlink />?cat=<txp:category />"><txp:article_image thumbnail="1" /></a></txp:smd_slimbox> 
</txp:article> 

All i need is for the next thumnails in a category to appear on the page without launching a lightbox unless one of the new thumbs is clicked.

Last edited by kvnmcwebn (2012-01-02 18:53:08)


its a bad hen that wont scratch itself.
photogallery

Offline

#711 2012-01-02 19:45:59

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

Re: smd_slimbox

Also I get the same thing if I use nextlabel:

<txp:smd_slimbox imageid="48, 25, 4"
     category="dogs, ?custom1" subcats="all" limit="20"
     prevlabel="Back" nextlabel="next" sort="name desc, category" />

It just opens up a blank light box.

This is even if showpagelinks=“1” is manually set.

It must be because there is no where for the subsequent pages to populate? But I don’t understand what code i need to provide for that.

Last edited by kvnmcwebn (2012-01-02 19:50:04)


its a bad hen that wont scratch itself.
photogallery

Offline

#712 2012-01-02 20:00:46

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

Re: smd_slimbox

Ah! here’s the problem.

Here is how i can get slimbox paging to work. Only by omitting the required wrapping trigger div:

so in this example paging works but the lightbox doesn’t:

  <txp:smd_slimbox category="business_signs_images"   limit="5"
     prevlabel="Back" nextlabel="next" prevclass="prev_but"
nextclass="next_but"
  sort="name desc, category" showpagelinks="1"/>
<div class="clearthumbs">&nbsp;</div>

in this example the lightbox works but the paging doesn’t:

<div id="gallery"> <txp:smd_slimbox category="business_signs_images"   limit="5"
     prevlabel="Back" nextlabel="next" prevclass="prev_but"
nextclass="next_but" sort="name desc, category" showpagelinks="1"/>
<div class="clearthumbs">&nbsp;</div>

This is the head script trigger:

<!-- Ativando o jQuery lightBox plugin -->
    <script type="text/javascript">
    $(function() {
        $('#gallery a').lightBox();
    });
    </script>

Last edited by kvnmcwebn (2012-01-02 20:23:26)


its a bad hen that wont scratch itself.
photogallery

Offline

#713 2012-01-02 20:33:28

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

Re: smd_slimbox

here are examples of the problem. one with paging working and the other with the lightbox working, as stated above can’t get them both to work together.

paging without light box (no trigger div #gallery)
http://www.graphx.macdesign.eu/worky

paging with trigger div #gallery lightbox works but prev next paging doesn’t:

http://www.graphx.macdesign.eu/no_worky


its a bad hen that wont scratch itself.
photogallery

Offline

#714 2012-01-02 20:43:27

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

Re: smd_slimbox

ah i think i found the bug but I have no idea how to fix it.

http://www.graphx.macdesign.eu/images/culprit.jpg


its a bad hen that wont scratch itself.
photogallery

Offline

#715 2012-01-02 21:01:30

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

Re: smd_slimbox

i think this is the part of the plug in that is conflicting with jquery lightbox for paging: im really not sure though….

 //Add the paging features if required
		if (($limit > 0) && $showpagelinks) {
			$next = ($numPages > 1 && $thumbpage != $numPages);
			$prev = ($numPages > 1 && $thumbpage > 1);
// Replace any paging info in the query string
			$prevPage = smd_addQSVar($pretext['request_uri'], $gallID, $thumbpage-1);
			$nextPage = smd_addQSVar($pretext['request_uri'], $gallID, $thumbpage+1);
 $outStr .= ($navwraptag != "") ? '<' .$navwraptag. (($navclass != "") ? ' class="' .$navclass. '"' : '') . '>' : ''; $outStr .= ($prev) ? '<a' . (($prevclass != "") ? ' class="' .$prevclass. '"' : '') . ' href="' .$prevPage. '">' .$prevlabel. '</a>'.n : '';
			$outStr .= ($next) ? '<a' . (($nextclass != "") ? ' class="' .$nextclass. '"' : '') . ' href="' .$nextPage. '">' .$nextlabel. '</a>'.n : '';
$outStr .= ($navwraptag != "") ? '</' .$navwraptag. '>' : '';
$outStr .= n;
}
}
return $outStr;
}

Last edited by kvnmcwebn (2012-01-02 21:01:48)


its a bad hen that wont scratch itself.
photogallery

Offline

#716 2012-01-02 21:41:07

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

Re: smd_slimbox

kvnmcwebn

I know this is probably not what you want to hear, but have you considered smd_gallery instead of slimbox? The pagination is better.

This could well be a bug in the slimbox plugin but I don’t have time today to dive into the code so the shortcut might be to try gallery instead (or see if you can use Txp’s built-in tags, though I’m not sure if they’re flexible enough for this situation).


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

#717 2012-01-02 23:44:28

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

Re: smd_slimbox

no bother bloke. any reply is good. I’ll try smd_gallery, I should manage ok with that now that you mention it.
thanks for the reply.


its a bad hen that wont scratch itself.
photogallery

Offline

#718 2012-01-03 00:49:18

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

Re: smd_slimbox

steph the problem may not be in your plug in. I had the same results with smd_gallery so I tried a few different lightboxes and when I tried slimbox everything worked with smd_slimbox. I was using lightbox before. I guess seeing as how the plug in was named slimbox i should have started with that one in the first place!


its a bad hen that wont scratch itself.
photogallery

Offline

#719 2012-01-10 08:19:13

JeroenC
Member
From: Finland
Registered: 2010-04-14
Posts: 30
Website

Re: smd_slimbox

Bloke wrote:

colak wrote:

Is there a way to use the smd_slimbox with article image?

Yes. If you have a list of image IDs in your article image field then this works:

<txp:smd_slimbox imageid="?article_image" />

Hi Stef,

this works fine but how to display only 1 thumbnail on the page instead of all the thumbnails that are linked to the current article?
I got 3 image IDs in the “Article image” field (comma separated) but only want to show 1 of those on the page. When I click this thumbnail on the page the full version shows up in the lightbox with the “next” and “prev” option that brings me to the other 2 images.

<txp:smd_slimbox imageid="?article_image" limit="1"/>

shows indeed 1 thumbnail on the page but also only 1 full sized image inside the lightbox.

<txp:smd_slimbox imageid="?article_image" limit="3"/>

shows 3 thumbnails on the page and 3 full sized images inside the lightbox

Any ideas?
Thanks,
Jeroen


Time to volunteer? Come and join us at a great project which is going to be opensource: https://www.caloom.com

Offline

#720 2012-01-10 10:36:56

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

Re: smd_slimbox

JeroenC wrote:

how to display only 1 thumbnail on the page instead of all the thumbnails that are linked to the current article?

Try smd_gallery instead. It’s more powerful and has the thumblimit attribute (see my reply to that topic).


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