Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Plugin support
  3. » smd_slimbox

#169 2007-07-02 19:45:18

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

Re: smd_slimbox

Joey wrote:

I just want to do: one thumb and some text like “click here for the slideshow” and then slimbox should show the whole slideshow. Is that possible?

Not very easily at the moment. This feature’s been requested before by progre55 but I haven’t figured out a neat way of doing it yet.

In order for the Slimbox part to work, it must have all the thumbnails “on the page”. Now, there is a hack and it involves using the slimbox tag twice like this:

<txp:smd_slimbox category="my-cat" limit="1" showpagelinks="0" />
<p>Click the image to see all the pics</p>
<div class="noshow"><txp:smd_slimbox category="my-cat" /></div>

Then set up a css rule like this to “hide” all the pics in the 2nd slimbox tag:

.noshow {
  display:none;
}

It’s ugly, but it works – and the slimbox code is clever enough to work out that one of the images is a duplicate, thus only displaying it once. When I finally decide on the best way to approach v3 of Slimbox I’ll try and build in a neater way of doing it.

mlarino:

Not sure why your configuration needed the full path. If your TXP is set up in the default manner with js and css dirs in the root of your site, then /js and /css should be all that is required. Very odd, but thanks to ragger for the fix.

Last edited by Bloke (2007-07-02 19:47:47)


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

#170 2007-07-03 15:59:13

Joey
Member
From: Netherlands
Registered: 2005-01-19
Posts: 257

Re: smd_slimbox

I’ve aproblem. When I use the slimbox plugin everything works smoothly. However, today I wanted to add a jQuery-based script, so I had to add this to my header:

<script src="/textpattern/jquery.js" type="text/javascript"></script>
<script src="/js/label_over.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
   $(document).ready(function(){
        $('label').labelOver('over');
   });
</script>

Problem is, slimbox is not working when this script is added to my website. When I click on a picture, the picture is opened itself and not in slimbox. Any idea how came? (The piece of code I’m using is labelOver.)

Last edited by Joey (2007-07-03 16:00:54)


Regards,

Joey

Offline

#171 2007-07-03 16:04:08

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

Re: smd_slimbox

Joey wrote:

today I wanted to add a jQuery-based script… Problem is, slimbox is not working when this script is added to my website.

jQuery and mootools will clash as they both use the $() notation. Follow the instructions on using jQuery with other libraries and see if it helps.

This will become more of an issue when TXP natively adopts jQuery from the next release. I’ll probably have to find some way to swap over from mootools to jQuery when that happens…

EDIT: he says, not noticing that v4.0.5 was released a day or so ago. D’oh!

Last edited by Bloke (2007-07-03 20:47:06)


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

#172 2007-07-03 20:04:49

Joey
Member
From: Netherlands
Registered: 2005-01-19
Posts: 257

Re: smd_slimbox

Thanks Bloke, that was helpfull, it works now.


Regards,

Joey

Offline

#173 2007-07-04 00:29:30

Kylor
New Member
From: /
Registered: 2007-07-04
Posts: 2

Re: smd_slimbox

Could you add a feature to the plugin where hyperlinks can use lightbox? Basically, I only really make single thumbnails or text links to images.

Currently I have to do this:

<a href="/images/23.png" rel="lightbox">Picture Here</a>

It’d be nice if the plugin would go through all the image links and add a rel attribute to them, or at least have a relatively simple tag:

<txp:snd_slimbox id="23">Picture Here</txp:snd_slimbox>

Offline

#174 2007-07-11 19:15:29

wheaticus
New Member
From: U.S.
Registered: 2007-07-08
Posts: 5
Website

Re: smd_slimbox

Howdy, great plugin! I’ve a question, or perhaps a feature request possibilities.

Say I’ve an image gallery category with 25 images, but the way I have the thumbnails arranged on the page, I can only display 8 at a time. I do have the Next and Prev displayed so a user can review the other thumbnails. But supposing a person clicks on one of the thumbnails, they can only review the 8 images that were displayed as thumbnails from that page. Is there a way that a user can view all 25 full size images (from that image category) without having to close slimbox and then click Next to view the next batch of thumbnails and hence that batch of fullsize images?

Also, if I’ve more than one gallery on a page and each gallery has a Next/Prev button which affects all galleries. Is there way to localize the Next/Prev button to affect only that one gallery?

Regardless, thank you for the awesome plugin!

Last edited by wheaticus (2007-07-11 23:07:39)

Offline

#175 2007-07-11 19:37:21

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

Re: smd_slimbox

@Kylor: Not quite sure what you mean. You want all pictures on the page to automatically get slimboxed even if not part of the tag?

wheaticus wrote:

a person clicks on one of the thumbnails, they can only review the 8 images that were displayed as thumbnails from that page.

Yes, no way round it right now unfortunately. Next rev (ha! when I sort my life out and/or finish this music video that’s sucking all my time up) will have more abilities to “cheat” like this by hiding groups of images using the wonders of CSS.

more than one gallery on a page and each gallery has a Next/Prev button which affects all galleries.

Yeah, annoying! It’s a small issue I spotted that affects all “gallery” style plugins right now, afaik. The next/prev would have to be way more intelligent than it currently is to handle this. If I can find a way to do it, it’ll be in the next rev, but issues like that are causing me to rethink the design quite radically.

Sorry on both counts.


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

#176 2007-07-11 21:00:49

Kylor
New Member
From: /
Registered: 2007-07-04
Posts: 2

Re: smd_slimbox

Bloke wrote:

@Kylor: Not quite sure what you mean. You want all pictures on the page to automatically get slimboxed even if not part of the tag?

Yeah, pretty much. Basically if I link to an image like this, the plugin would automatically add the rel="lightbox" attribute so that it uses slimbox.

Sorry for asking for so much.

Offline

#177 2007-07-12 00:51:46

mlarino2
Member
Registered: 2007-07-12
Posts: 30

Re: smd_slimbox

Hi
I was upgrading textpattern, but slimbox didnt work, so I just went back to the old version. i didnt want to deal with that now.
But I encountered a problem, all the back up I did of all my pages and forms etc… works fine after i set them all up again on the site.
But somehow now slimbox is not working on IE.
but it still works on firefox and safari.
here is the url www.mlarino.com/web2

Does someone see the error?
thanks

Offline

#178 2007-07-12 04:59:56

wheaticus
New Member
From: U.S.
Registered: 2007-07-08
Posts: 5
Website

Re: smd_slimbox

Hey mlarino2, I had also upgraded to the latest version of Textpattern and have NOT had any problems with slimbox working on Firefox or IE on my pc system. I suppose there could be a mac issue with one of those browsers.

Last edited by wheaticus (2007-07-13 05:57:17)

Offline

#179 2007-07-13 03:53:46

moslib
Member
Registered: 2005-08-11
Posts: 39

Re: smd_slimbox

yes – also having problems with Win IE 6 & 7 – that disappear when disabling smd_slimbox

Internet Explorer cannot open the Internet site http://www.domain.tld

Operation aborted

[ OK ]

Clicking OK then doing a refresh got the page to load. Sometimes it loaded without any problem.

Perhaps a jquery/mootools conflict?

Offline

#180 2007-07-14 23:07:05

wheaticus
New Member
From: U.S.
Registered: 2007-07-08
Posts: 5
Website

Re: smd_slimbox

Hey everybody, I’m very excited about this hack which may be useful for some as it works perfect for my needs.

If you have a page with multiple slimbox galleries in different categories on the same page AND they all have multiple pages of thumbnails (with prev/next). This hack will allow the prev/next buttons to ONLY page thru a local gallery’s thumbnails, leaving the other gallery’s thumbnail range intact.

The hack only requires modifying three lines of code.

First navigate to the smd_slimbox plugin via Admin —> Plugins then click Edit in the row of the smd_slimbox plugin. Here you will see the php code for this plugin, you want to do a search for:

$thumbpage = (!gps('tpg')) ? 1 : gps('tpg');

It is located around line #331, change it to:

$thumbpage = (!gps($category)) ? 1 : gps($category);

____________________________________________

The next two changes are at about line #429

$prevPage = smd_addQSVar($pretext['request_uri'], 'tpg', $thumbpage-1); $nextPage = smd_addQSVar($pretext['request_uri'], 'tpg', $thumbpage+1);

Change these two lines to the following.

$prevPage = smd_addQSVar($pretext['request_uri'], $category, $thumbpage-1); $nextPage = smd_addQSVar($pretext['request_uri'], $category, $thumbpage+1);

____________________________________________

That is all that I had to do and it works fine for my needs. Actually, even if you multiple galleries and only one of the galleries has multiple pages of thumbnails, this will help prevent the non-paged galleries from becoming empty when you click on another gallery’s prev or next button. Just remember that you may want to either backup the original code some where or just duplicate the lines you would change and comment out a copy.

I hope this helps out some using this wonderful plugin!

Last edited by wheaticus (2007-07-14 23:25:41)

Offline

  1. Index
  2. » Plugin support
  3. » smd_slimbox

Board footer

Powered by FluxBB