Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#337 2007-11-23 13:28:38

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

Re: smd_slimbox

robin746 wrote:

This plugin rocks, even if the attributes are a bit complex.

Yeah, it’s kind of uber-powerful but can become a bit of a head scramble if you don’t keep your wits about you.

I sort of hoped that I built it in such a way that you can get something usable out of the tag with no/very few options and as your experience or needs grow (or you find time to wade through the docs), the tag can grow with you; up to a point. But I’m always open to suggestions. If you have any ideas on how to make the docs or usage more – I think luke perman once used the phrase “penetrable” – then please let me know!

Trying to demonstrate groupname in words is quite an awkward concept (more the naming convention than anything else); for anyone without knowledge of how Christophe’s code does the magic it’s a little confusing. Perhaps I should include a few more/better examples or give a little insight in the docs on how the system works: a sort of ‘techie bit’ at the bottom for those that wish to know more?

Then again, the docs are too big as they are and most people don’t have a spare lifetime to read my epic prose.


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

#338 2007-11-23 19:22:10

colin99
Member
Registered: 2005-11-15
Posts: 65

Re: smd_slimbox

I would like to do something fairly simple with this wonderful plug-in.

I would like to left or right justify (align or float – insert your favorite term here…)

Here is an example -
http://www.bubbyrosesbakery.com/article/52/the-people-we-know

Note the wonderful espresso shot on the left… I would like the article to wrap around the gallery picture…
You know – align=left or align=right.

an_7 plugin does this – but the overall integration with the image manager in textpattern is no
where as fancy as this plug-in.

Many thanks in advance!


On the World Wide Web since Day 1 – Editor/Creator – Coffeecrew.comCoffee.bc.ca
Twitter – Twitter.Com/CoffeeCrew -

Offline

#339 2007-11-23 20:40:47

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

Re: smd_slimbox

colin99 wrote:

I would like to left or right justify (align or float – insert your favorite term here…)

Easiest thing is to do it outside the plugin. Since you’re only showing one image, wrap the slimbox tag with a div like this:

<div class="slimbox"><txp:smd_slimbox ... /></div>

Then use a rule like this to float the image left:

.slimbox img {
  float:left;
}

See the styling section of the docs for more. If I can wrap my brain around it, the next version (or perhaps smd_thumbs, I haven’t decided) will have better support for finer control over classes so it can all be done within the plugin.

Hope that helps, and thanks for the kind words about the plugin!

Last edited by Bloke (2007-11-23 20:42:36)


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

#340 2007-11-23 22:35:26

colin99
Member
Registered: 2005-11-15
Posts: 65

Re: smd_slimbox

Thanks a bunch for that very quick response…

I am also one of those people that suffers from the following with this plug-in:

I have an article which outputs a slim-boxed gallery, but the js files work only when you are on the homepage, not when you are on the article page. Thusly —

http://www.bubbyrosesbakery.com/

Versus – http://www.bubbyrosesbakery.com/article/52/the-people-we-know
Click on the pic.

I did fix this same problem with an7_img plugin – but for the life of me, I cannot remember how.

I must also congratulate you on your personal homepage. I have, in 14 years, looked at many, many
unusual webpages — and your personal site takes the cake for unusual… using the term eccentric
would not be doing it justice.


On the World Wide Web since Day 1 – Editor/Creator – Coffeecrew.comCoffee.bc.ca
Twitter – Twitter.Com/CoffeeCrew -

Offline

#341 2007-11-23 22:45:54

robin746
Member
From: Ireland
Registered: 2007-09-22
Posts: 113
Website

Re: smd_slimbox

@colin99, Bloke

Actually, you can justify images within the plugin, for nice text wrap layout, without the need for an extra DIV. Simply pass the attribute imgclass=“left” and the rendered HTML will have class=“left” in the image tag. Or, do the same with “right”. Then, in your CSS have something like:

img.left {
  float:left;
  margin-right:1em;
  margin-bottom:1em;
}
img.right {
 float:right;
 margin-left:1em;
 margin-bottom:1em;
}

robin

Offline

#342 2007-11-23 23:37:34

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: smd_slimbox

colin99 wrote:

Thanks a bunch for that very quick response…

I am also one of those people that suffers from the following with this plug-in:

I have an article which outputs a slim-boxed gallery, but the js files work only when you are on the homepage, not when you are on the article page. Thusly —

http://www.bubbyrosesbakery.com/

Versus – http://www.bubbyrosesbakery.com/article/52/the-people-we-know
Click on the pic.

I did fix this same problem with an7_img plugin – but for the life of me, I cannot remember how.

I must also congratulate you on your personal homepage. I have, in 14 years, looked at many, many
unusual webpages — and your personal site takes the cake for unusual… using the term eccentric
would not be doing it justice.

i’m assuming it has something to do with you for whatever reason also including prototype.lite, moo.fx and another litebox script thats conflicting. because i see relative urls that aren’t correct (js/ vs /js).

Last edited by iblastoff (2007-11-23 23:38:20)

Offline

#343 2007-11-24 19:09:14

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

Re: smd_slimbox

robin746 wrote:

Actually, you can justify images within the plugin… pass the attribute imgclass=“left”

Correct, thanks for pointing it out. The annoying thing about this is that it potentially bloats the page since each image gets the same class, which is usually kinda redundant. In this case it’s fine because there’s only one article image but on large galleries it’s a pain. Hence I intend to revisit this oversight in the next major version. Poor (*cough* no) planning on my part.

btw, personally I’d try and avoid use of the word ‘left’ as a class name because its name implies how not why the element is displayed. If someone wants to move the image to the right of the article they’d probably have to do this:

.left {
  float:right;
}

;-)

colin99 wrote:

I have an article which outputs a slim-boxed gallery, but the js files work only when you are on the homepage, not when you are on the article page.

Hmm, for starters your source code doesn’t validate right now. You appear to have 2 different DOCTYPE declarations and half a HEAD section. But it may not be causing the problem because your home page is similar and the lightbox works fine :-s

I’ve looked through the source and can’t see anything else obvious. You must have removed any other conflicting libraries, as iblastoff mentioned, because they’re not on the page any more. So I’m a bit stumped. What I can say is that you’ll normally see this behaviour under 3 circumstances:

  1. If the javascript cannot, for whatever reason, be loaded. In your case, Firebug is telling me it finds all the scripts ok (twice!)
  2. A clash with another javascript library. Again, I can’t see that happening on your page now
  3. When the page/doctype is invalid and the link cannot be passed correctly to the javascript. I suspect this one, but your home page validates worse than the article page, yet it works!

Other people have had this problem and solved it somewhere throughout this thread, I can only suggest searching here or in Christophe’s forum to see if it gives you any clues. If I think of anything in the meantime I’ll shout. Sometimes I have a brainwave or remember how others fixed it last time.

I must also congratulate you… I have, in 14 years, looked at many, many unusual webpages — and your personal site takes the cake for unusual…

Thank you :-) It’s not even got all the content I want yet either (must.. make… time), and is quite tame compared with how it was before my previous hoster went bust. Consider yourself lucky you didn’t see that one!

Last edited by Bloke (2007-11-30 01:46:15)


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

#344 2007-11-25 17:04:27

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

Re: smd_slimbox

Just a quickie. I’m half-considering dropping the smd_slimbox_inc tag part of the slimbox plugin. I have various reasons, including the fact it’s a bit of a kludge that I thought might be nice at the time, but perhaps is more of a hindrance to enjoying the plugin. Plus, I’d like to include support for moonbox (a jquery version of slimbox) in the next revision and will need to bloat the code to officially support it (it already works, but I need to patch smd_slimbox_inc to allow it!)

From reading through the posts on this and other topics it appears most people just include a version of mootools or jQuery or whatever by hand. Having to tell the plugin to do it, when you have to upload the libraries/css to your server anyway, is perhaps a little over the top. Plus it causes problems with atom/rss feeds, hence the nolibcheck hack.

But that’s just my opinion. What do you all think? Is it a useless feature or is it an indispensable part of the plugin? Please spend 10 seconds to take the poll and let me know. Based on your feedback I’ll decide which way to go in the next version. I’ve got no problem continuing to support it if the majority of you use it and think it’s great!

Thanks in advance for your replies.


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

#345 2007-11-27 20:34:29

karl.spencer
New Member
Registered: 2007-11-27
Posts: 1

Re: smd_slimbox

I just started to use txp and your great plugin (btw: thanks for that!).

I just noticed when switching the ‘production state’ to ‘Debug’, that I get lots of errors like this:

tag_error <txp:smd_slimbox orderby="fixed" groupname="11,10" imageid="11,10" /> -> Notice: Undefined index: below on line 534 textpattern/lib/txplib_misc.php(534) : eval()'d code:534 smd_slimbox() textpattern/publish.php:963 smd_slimbox() processtags() textpattern/publish.php:922 preg_replace_callback() textpattern/publish/taghandlers.php:1812 parse() textpattern/publish.php:963 body() processtags() textpattern/publish.php:922 preg_replace_callback() textpattern/lib/txplib_misc.php:1383 parse() textpattern/publish/taghandlers.php:243 parse_form()

Whats wrong here? Did I use the plugin wrong?

Thanks, Karl

Offline

#346 2007-11-27 20:48:22

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

Re: smd_slimbox

karl.spencer wrote:

I just noticed when switching the ‘production state’ to ‘Debug’, that I get lots of errors

Bah! Humbug. You’re using the plugin fine, you just found a small oversight in my code. I’ll work on a fix for the next revision, thanks for finding it.

In the meantime, don’t worry: it’s only a warning. The plugin will still function exactly as intended and you’ll only ever see this yukky output in debug mode; and since you’ll never run a production site in anything other than ‘live’, nobody else will see the fact that I’m rubbish at coding/testing :-)

Sorry to cause the hassle on your first few steps with TXP. It is awesome, trust me.

Last edited by Bloke (2007-11-27 20:49:22)


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

#347 2007-11-27 21:05:12

colin99
Member
Registered: 2005-11-15
Posts: 65

Re: smd_slimbox

I have a valuable clue about why the smd_slimbox plugin is not working thusly:

http://www.bubbyrosesbakery.com – works
http://www.bubbyrosesbakery.com/article/52/the-people-we-know – Does not work.

When I shut off the comments “form” for this article, the image plugin works fine.

It is a valuable clue for digging deeper.


On the World Wide Web since Day 1 – Editor/Creator – Coffeecrew.comCoffee.bc.ca
Twitter – Twitter.Com/CoffeeCrew -

Offline

#348 2007-11-27 23:57:54

vittorio
Member
From: Roma caput mundi
Registered: 2006-02-01
Posts: 122
Website

Re: smd_slimbox

colin99 wrote:

I have a valuable clue about why the smd_slimbox plugin is not working thusly:

http://www.bubbyrosesbakery.com – works
http://www.bubbyrosesbakery.com/article/52/the-people-we-know – Does not work.

When I shut off the comments “form” for this article, the image plugin works fine.

Try disabling the plugin hak_textile_tags. I had the same problem sometime ago (go back some posts on this thread and you’ll find it).

Last edited by vittorio (2007-11-27 23:58:22)


Happily served with Txp: Strampelli.net, Brain Essence, NicolaTranfaglia.com

Offline

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

Board footer

Powered by FluxBB