Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#91 2007-03-16 11:10:16

treb0r
Member
From: Hebden Bridge, UK
Registered: 2005-09-05
Posts: 20
Website

Re: smd_slimbox

I must be doing something wrong – I can only get the plug-in to work by specifying either category or image IDs directly in the tag. If I try to use any of the options that should allow me to pull categories and IDs from a given article (Custom Fields, Article Image, Title, etc), it doesn’t work.

I seem to be the only person on this thread with this problem, so I’m sure it’s me.

:)

Offline

#92 2007-03-16 14:28:55

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

Re: smd_slimbox

treb0r wrote:

I can only get the plug-in to work by specifying either category or image IDs directly in the tag. If I try to use any of the options that should allow me to pull categories and IDs from a given article (Custom Fields, Article Image, Title, etc), it doesn’t work.

Two things to check:

  1. Are you using the tag in an individual article page? The Custom Field / Article Image / Title etc won’t work on an article-list page because there’s no actual article to read from.
  2. Check 1 again :-)

<txp:smd_slimbox category=”?t” /> For some reason, this outputs all images, not just the ones in the correct category.

Yeah, sorry. It’s an annoying bug in version 0.23 and below. If it can’t find any pics from a ‘?’-specified field it panics and dumps everything out. I’ve found a fix, implemented in the next rev. For now, specify a non-existent category as well as the ?t option (e.g. category="?t, stef-is-a-hacky-coder")

Hope that helps. If it’s still playing up, let me know and I’ll diagnose further.


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

#93 2007-03-16 14:45:03

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

Re: smd_slimbox

Papuass wrote:

This is what I get in my RSS feed in place of pictures: Slimbox: Required libraries not loaded. Call <txp:smd_slimbox_inc /> in the <head> of this page.

Eeek, I’ve never tried delivering slimbox thumbs via RSS (in fact, I’ve never tried an RSS feed full stop).

What are you expecting the feed to say? Should it spit out some other text and the plugin is getting in the way and outputting that error when you don’t want any slimbox output at all? If so I’d better find a fix to stop it interacting with RSS.

On the other hand, assuming you do actually want the thumbs to be in your feed…

I’m not sure of the mechanism that RSS uses but I guess the feed is independent of the page: The RSS reader issues a “request” to the page (site?) to ask “what’s new” and the response is “here’s what’s new.” Is that right? Does an RSS browser get its own full page, with DTD/head/body and so on, or is it just a snippet of XML or something? Do you know how it is generated from TXP? As I say I’ve never used it.

I can only assume that when the request comes to the page, smd_slimbox is called which spots that it hasn’t got the slimbox.js / mootools.js / slimbox.css loaded, and complains.

If you don’t want the full lightbox-effect in the feed (i.e. just the thumbs to show new additions) you could try bypassing the feature for your feeds page by calling <smd_slimbox_inc skip="3"> before the smd_slimbox tag. That just tells slimbox “I know what I’m doing, I’ve loaded the relevant libraries, go about your business”. In this case you’re lying, but the plugin doesn’t care!

Does that help or have I misunderstood?


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

#94 2007-03-18 17:41:53

Papuass
Member
From: Rīga, Latvija
Registered: 2006-03-28
Posts: 21
Website

Re: smd_slimbox

I am afraid that I can not do that. RSS feed is not just another page and I can not modify its structure (put that skip directive in header).

I would prefer that only clickable thumbnails (link to bigger version) are sit out at RSS feed with no lightbox effect.

Temporary fixed for myself by commenting out checking for loaded libs.

Offline

#95 2007-03-18 18:00:37

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

Re: smd_slimbox

Papuass wrote:

I would prefer that only clickable thumbnails (link to bigger version) are sit out at RSS feed with no lightbox effect. Temporary fixed for myself by commenting out checking for loaded libs.

OK, not a problem. Sorry it doesn’t do that right now; I never considered RSSing the thumbs. I’ll maybe add an option in the next rev to do what you’ve just done: ignore the ‘loaded’ check for RSS. Thanks for the idea.

Last edited by Bloke (2007-03-18 18:03:48)


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

#96 2007-03-18 23:02:05

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: smd_slimbox

Hi Stef, I’m trying to use slideshow v2 along with slimbox without luck. I think it’s got something to do with moo tools. Load your version of moo and slimbox works and the slideshow stops, load the slideshow version of moo and slideshow works and slimbox stops. I’ve read up and know which modules to include in moo and went and got my own version of moo with all required modules – but still no luck.

Offline

#97 2007-03-19 09:12:44

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

Re: smd_slimbox

lee wrote:

Load your version of moo and slimbox works and the slideshow stops, load the slideshow version of moo and slideshow works and slimbox stops.

Very strange indeed. I’ve not tried them both together. Guess I should. I’ll see if I can replicate it and work out what’s going on.

From a purely practical viewpoint, doing as you have and loading all required modules into your own version of mootools ought to work for both plugins. There’s no earthly reason I can see why they shouldn’t co-exist. Lemme see if I can find something out. You might wanna bounce this off Aeron too if you haven’t already; I’ll try and hook up with him sometime and hammer this out as well.

Sorry it’s causing you a headache.


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

#98 2007-03-19 10:26:54

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

Re: smd_slimbox

Bloke wrote:

I’ve not tried them both together. Guess I should. I’ll see if I can replicate it and work out what’s going on.

lee, I’ve just installed aro_slideshow v2.01 on a site that had slimbox on it also. So I now have:

smd_lib                  v0.21
smd_random_banner        v0.22
smd_slimbox              v0.23
aro_slideshow            v2.0.1
slideshow.js/slimbox.js  Loaded using stm_javascript
mootools                 The version from smd_slimbox_v0.23, also loaded using stm_javascript

In my <head> tag I have:

<txp:js n="mootools"/>
<txp:js n="slimbox"/>
<txp:js n="slideshow"/>
<txp:css n="default format="link"/>
<txp:css n="slimbox" format="link"/>
<txp:smd_slimbox_inc skip="3"/>

and in a test article I put:

<txp:aro_slideshow category="pics" />
<txp:smd_slimbox category="empty" imageid="?Image_list" orderby="id" wraptag="div" />

The output wasn’t pretty, but it ran the slideshow in the centre of the page, cycling through the images, and had slimboxable thumbs around it, which I clicked as the slideshow was playing and it showed them as expected. I must have been lucky with mootools that the version I included with smd_slimbox had all the necessary modules to run aro_slideshow in its default configuration. That was fortunate!

So, the two plugins can work side-by-side; the question now is why yours aren’t. Have you got any example code / version info like the above you could post so I might try and work out why they’re not playing nicely?

Last edited by Bloke (2007-03-19 10:27:21)


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

#99 2007-03-19 11:07:48

treb0r
Member
From: Hebden Bridge, UK
Registered: 2005-09-05
Posts: 20
Website

Re: smd_slimbox

Bloke wrote:

Two things to check:

  1. Are you using the tag in an individual article page? The Custom Field / Article Image / Title etc won’t work on an article-list page because there’s no actual article to read from.
  2. Check 1 again :-)

Bingo!

Even though I’m viewing one article, it was in list context. (<txp:article limit=“1” form=“gallery”/>). I was wanting to display the most recent gallery added to the gallery section. I guess I’ll have to rethink the design.

Great plugin, thanks dude!

Last edited by treb0r (2007-03-19 21:31:32)

Offline

#100 2007-03-19 19:56:20

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

Re: smd_slimbox

OK, I relented and made an interim before v0.3 comes along.

v0.24 adds the feature requested by papuass: libcheck="0" will turn off the library checking feature so you don’t have to use smd_slimbox_inc at all. That way, it never complains if you haven’t loaded the libs and can therefore be used to output a thumb gallery for RSS feeds and the like.

Also in this version is a fix for the annoying “display all pics if ?field contains nothing” bug, and a small patch to add the Next/Prev link text into MLP (I’d forgotten to include them last time).

Let me know how you get on. I’ll now descend into my coding cave to work on v0.3.


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

#101 2007-03-21 19:21:01

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: smd_slimbox

ooh, ooh… pick me.

I found an obscure bug. hyphenated categories make this mad, mad (in a good way) plugin puke. Just helped someone fix a broken site.

Offline

#102 2007-03-21 20:28:04

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

Re: smd_slimbox

mrdale wrote:

hyphenated categories make this mad, mad (in a good way) plugin puke.

Damn, you’re right. That was me trying to be too clever with a RegEx. The plugin is actually fine, it’s the library at fault. smd_lib v0.21a fixes it.

Sorry about that. Good find, thanks.

As Yoda might say: “shoddy testing make not a good coder…”

Last edited by Bloke (2007-03-21 20:29:17)


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

#103 2007-04-02 21:52:06

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: smd_slimbox

Ace work.. easy to install, easy to use. Cheers.

Now then, not sure if this is a bug or a feature (as you say), but I can’t get this article form to output the article images if the article is a sticky…
<txp:smd_slimbox imageid="?article_image" showcaption="1" wraptag="li" captionclass="caption" />

If I flip the article to live status it’s fine… Do i win a prize – or just public humiliation? ;)

Meanwhile…

Bloke wrote:

Be aware that there’s a potential issue here: if your article does not contain an article image, the plugin will unfortunately fall back to showing all images in the database. I’ll try and work in a fix for that in the next rev (probably tonight, it’s going well…) but until then, to be on the safe side, use category="this_is_not_a_category" or something (any category that doesn’t really exist) and then you will get only the article image.

Alternatively, you could wrap it in tcm_if_article_image

Offline

#104 2007-04-02 22:40:55

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

Re: smd_slimbox

pieman wrote:

I can’t get this article form to output the article images if the article is a sticky… Do i win a prize

Confirmed bug, so you qualify for a “Stef’ll fix it” badge :-p

The reason: sticky articles transcend normal articles and display article list characteristics (i.e. showing up on article list pages), hence my fugly hack for determining if you are in an article list or an article fails. It’s smd_lib at fault: bad library. Bad library.

It only affects ?fieldname or !fieldname type queries and could be considered a good thing if you didn’t really want sticky articles to show slimbox thumbs. Sadly, this obviously flawed interpretation belongs solely to me so I’ll mend the code to match the expectation of everyone else on the planet. Sorry, but thanks for the catch.

me: if your article does not contain an article image, the plugin will unfortunately fall back to showing all images * snip * pieman: Alternatively, you could wrap it in tcm_if_article_image

Correct, that’s a solution if you’re using ?article_image and already have/don’t mind installing that plugin. Shouldn’t be an issue with v0.24 though as I’ve fixed it.

EDIT: OK, try v0.21b instead.

Last edited by Bloke (2007-04-02 23:25:18)


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

#105 2007-04-10 16:52:37

DigitalRealm
Member
From: Greenville, SC
Registered: 2006-07-22
Posts: 139
Website

Re: smd_slimbox

Just to relay some input….

I am using this plugin along with the slideshow V2 plugin and both are working perfectly. I did have to go and download a complete version of MooTools for it to work however. I download the entire library and uploaded it and now both plugins work perfectly. Just a heads up for those having trouble with it, they will work together.

Offline

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

Board footer

Powered by FluxBB