Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#331 2007-11-09 19:06:35

raveoli
Member
From: Copenhagen
Registered: 2004-03-06
Posts: 205
Website

Re: smd_slimbox

Thank you Stef, that one worked;-)

Your plugin is joyful by the way. I enjoy it very much.

Have a nice weekend!

Offline

#332 2007-11-10 18:16:21

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

Re: smd_slimbox

Bloke wrote:

Try moving slimbox.js to the bottom of the page instead.

Hey hey hey! I moved slimbox.js at the end of the page, and now those hated loved videos seem to load without causing my pc to explode! Finally, the solution has come!

Having said that, looking at your page you have a lot of other javascript functions on there. Google Syndication, Technorati, and Feedburner to name three, plus some weird EO library (I have no idea what it does!)

Yes, I know there’s quite a lot of js code in my pages. But, except for Eo.js, which is an Email Obfuscator, Google Analytics, Technorati, Feedburner… could you blog without them?! :-)

Any one of those could be doing a document.write() at a time that IE (or mootools) thinks is inappropriate. It certainly looks like Technorati does a document.write() without waiting for the DOM, perhaps that’s the culprit? Maybe add a defer=“defer” to that <script> tag?

Don’t know why, but each time I add defer="defer" to some <script src=""> strange things happen… tried with technorati and the whole page turned empty… :-\

Anyway, after days and days spent trying… I will settle down with the slimbox.js at the end of the page. And amen!


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

Offline

#333 2007-11-23 03:13:06

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

Re: smd_slimbox

I want to do the simplest possible thing.

Inside an article I want to display a single image by ID and have ONLY that image show up in the lightbox. But if I add this code inside the Write box:

<txp:smd_slimbox imageid="2"/>

Then I have a problem. Although the thumbnail for the image in question shows up correctly, the lightbox image has a “Prev” button that allows browsing through all my other images. The following does not help:

<txp:smd_slimbox maxlimit="1" imageid="2"/>

Neither does this:

<txp:smd_slimbox showpagelinks="0" imageid="2" />

Please help me out with this or I cannot use this nice plugin.


robin

Offline

#334 2007-11-23 05:52:49

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

Re: smd_slimbox

odd. i just tested on my own site using your first example format <txp:smd_slimbox imageid="2" /> in an article and i get the correct thumbnail with working slimbox effect with no ‘prev’ or ‘next’ buttons.

Last edited by iblastoff (2007-11-23 05:53:05)

Offline

#335 2007-11-23 09:13:08

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

Re: smd_slimbox

robin746 wrote:

if I add this code inside the Write box: <txp:smd_slimbox imageid=“2”/> … the lightbox image has a “Prev” button that allows browsing through all my other images.

My guess is you have other slimboxable images on the same page; perhaps you’re using this on an article list page?

The way round it is to use groupname to uniquely identify each slimbox tag on a page. In your case the best option will be groupname="?id" which will give each image within each slimbox its own unique identity (check out the source of the page after you apply it and look for the rel= attribute on the images to see what it’s done).

Other options are groupname="?c" to give each image in each slimbox the name of the category that image is in, or groupname="?author" and so on. Examples in the docs. (ab)Use of this feature allows some quite interesting navigation effects. You can also use any fixed string of your choice for groupname if you’re using it within an article.

Hope that helps.


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

#336 2007-11-23 12:51:42

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

Re: smd_slimbox

@Bloke: That’s it exactly. Using groupname works:

.bc <txp:smd_slimbox groupname=”?id” imageid=“2”/>

Thanks for the quick reply. This plugin rocks, even if the attributes are a bit complex.


robin

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,428
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.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

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

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

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.com -

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,428
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.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

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

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

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.com -

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: 12,428
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.

Hire 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: 12,428
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.

Hire 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

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

Board footer

Powered by FluxBB