Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#271 2007-09-20 18:01:33

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

Re: smd_slimbox

@Ambitiouslemon:

OK, thanks. All done.

For reference, the first trick of putting ‘0’ in smd_slimbox did actually work. It was just that “other error” I mentioned you’d probably not encounter… well, you encountered it! So I’ve fixed that too for now. A new official version of smd_lib and smd_slimbox will be out later tonight to wrap up these little oversights – there are a few other places that might cause problems with “undefined index” errors so I’ll jump on those before they bite.

One thing: I added <txp:smd_slimbox_inc skip=“3” /> to the gallery article so I could see the output. You might want to move that to inside the <head> tag, and put the proper options in when you set it up :-)

Many thanks for letting me do that and also for spotting the bugs. Sorry it didn’t work for you first time.


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

#272 2007-09-20 21:17:52

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

Re: smd_slimbox

OK, v0.29a is the official fix for the warnings encountered in debugging mode that Ambitiouslemon spotted.

Hand-in-hand with that is an update to smd_lib. The new version 0.22 has some internal enhancements so spaces are now allowed in custom field names. This should enable DrRogg to use imageid="?Cover Image ID (Main)". Just make sure your custom field names don’t contain commas and you’ll be ok! Anyone previously relying on the fact that category/ID lists could (unofficially) be supplied as comma- or space-separated lists will now have to use commas. But you can still use spaces around the commas: they get stripped off by the plugin.

It doesn’t address DrRogg’s weird extra blank space appearing and I’m at a bit of a loss to explain it. Your code is fine, and you seem to have covered all the bases. Do you have you a web link I could take a look at with the problem on it? I might be able to spot something. If the site’s not for public consumption yet, send me it privately

Hope this version helps anybody having issues with the plugin and the new space-aware stuff is of some use. Report any code wrongdoings/breakages/success stories with the latest version here as usual. And for my part I’ll try and remember the mantra: “Test the plugin with site debugging mode on before release…” :-)


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

#273 2007-09-24 10:17:14

fuls
Member
Registered: 2005-11-16
Posts: 117
Website

Re: smd_slimbox

Hi, I’m sorry if this has already been asked.
I have this inside my article form:

<txp:smd_slimbox category=”?id” imageid=”?article_image” imagecaption=”?alt” limit=“1”/>

and what I want to do is to show only one photo per article. When I open the big article photo, below the caption it says image 1of 5, but I only want to show 1 article image (it automatically starts previewing images form other articles).
Also, you’ve put MLP support which is really great, but how can we preview big photos with navigational images in different language (previous,next,close)?

Thank you very much!

Last edited by fuls (2007-09-24 10:18:07)

Offline

#274 2007-09-24 11:33:45

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

Re: smd_slimbox

fuls wrote:

what I want to do is to show only one photo per article… it automatically starts previewing images form other articles.

Yes it will, especially on article list pages. It’s a feature/side-effect (you choose) with the way Slimbox works.

To change it, add the groupname option (examples) and use a unique value of either a fixed string per slimbox tag or make it automatically choose unique values by using something like groupname="?id" to limit the output to one photo only.

how can we preview big photos with navigational images in different language (previous,next,close)?

Good question. That bit’s out of my hands because the image URLs are hard-coded into the slimbox.css stylesheet. Two options as far as I can tell:

  1. Have a different style sheet per language that overrides the default slimbox.css and points at different image URLs. Perhaps include slimbox.css as normal but modify it to remove the references to the image URLs, then use some of the built-in MLP tags to include an ‘extension’ style sheet for the current language. Each such style sheet would contain your language-specific rules which in this case would hold the URLs to language-specific images
  2. Change the graphics to just arrows/symbols like ‘—>’ and ‘<—’ and ‘x’ :-)

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

#275 2007-09-24 13:42:50

fuls
Member
Registered: 2005-11-16
Posts: 117
Website

Re: smd_slimbox

Thanks Bloke, groupname did it!:)

Offline

#276 2007-09-25 16:20:30

evergreenthompson
New Member
Registered: 2007-09-25
Posts: 4
Website

Re: smd_slimbox

I love this plug-in. It works so much better than the other gallery plug-ins I’ve tried.

The only problem I ran across was with the sample CSS. I found it worked much better for me to rewrite the styles in tag.style form.

And I know it’s a no-no to change the CSS for Slimbox, but I couldn’t resist. :D


Lee
Whatever happens at the campsite stays at the campsite. Most of it anyway.

Offline

#277 2007-09-25 17:19:00

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

Re: smd_slimbox

evergreenthompson wrote:

with the sample CSS. I found it worked much better for me to rewrite the styles in tag.style form.

That’s cool. You mean the sample CSS I supplied in the help file or the slimbox.css file? If it’s my bit and you’ve got any suggestions for how it can be improved that may benefit others, let me know.

And I know it’s a no-no to change the CSS for Slimbox, but I couldn’t resist. :D

Hehehe, that’s why I love open source: it’s your call :-) You’ll only make a tiny bit of work for yourself if Christophe updates Slimbox and does something differently with the layout. But I think it’s pretty stable now so the chances of him changing the CSS are quite slim. Hack away!


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

#278 2007-09-25 21:43:55

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

Re: smd_slimbox

why is it a no no to change the css for slimbox?? never heard of that stigma.

Offline

#279 2007-09-26 19:20:00

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

Re: smd_slimbox

iblastoff wrote:

why is it a no no to change the css for slimbox?

It’s not really. It’s just a minor hassle for you if Christophe updates slimbox.css ‘cos you’ve got to go through and make the same changes again when you upgrade. I don’t mind one way or the other! Hence the “it’s your call” comment.

I’m sure evergreenthompson had good reason to do it, and might even have found out something that may have benefited us (or specifically Joel and progre55 if they’re still having CSS nightmares).

My stance is: if you want to change anything, be my guest. And if you find anything cool in the process, post it back to me.


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

#280 2007-09-29 11:35:50

Mr. Smith
Member
From: Denmark
Registered: 2006-11-10
Posts: 56

Re: smd_slimbox

I’m sorry if this has been answered already, but reading all 28 pages in this thread will take all day, and my searches didn’t help me.

When smd_slimbox outputs the paths to the relevant images – using category=“some-category” – it outputs the path to my localhost (e.g. http://website.localhost/images/8.jpg), which complicates things when I upload the site to a remote server, as it still outputs the paths to localhost even on another server.

The plugin works perfectly otherwise.

Any ideas?


Textpattern n00b

Offline

#281 2007-09-29 18:28:58

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

Re: smd_slimbox

Mr. Smith wrote:

When smd_slimbox outputs the paths to the relevant images – using category=“some-category” – it outputs the path to my localhost (e.g. http://website.localhost/images/8.jpg), which complicates things when I upload the site to a remote server, as it still outputs the paths to localhost even on another server.

Hmm, think that’s a first: no wonder the searches came up blank. I’m really not sure on that one.

As far as I can assure, smd_slimbox does not have any hard-coded paths so it should read all values from the stuff in your admin screens. Under the hood, it makes up the path to the images using two internal variables; one called “hu” (a constant which seems to be the one containing the domain; I just used it because zem (or maybe wet/ruud, I don’t remember) had used it and I figured it was therefore the right thing to do) and a conventional global variable called $img_dir which is normally associated with the “images” directory on your server.

My guess is that, for some reason, the ‘hu’ variable is being incorrectly assigned in your setup and contains localhost. When you upload the site to the remote server, do you change any of the admin settings to reflect the new home?

Perhaps I shouldn’t be using ‘hu’ and should instead be using the site_url() call instead? Any devs out there wish to chip in and let me know the “official” procedure for making up image/thumbnail paths?

Sorry if that’s a bit over your head; not sure on your programming prowess. But if anyone has anything to say on this matter to either correct my (probably false) assumptions on TXPs variable/constant use, or any pearls of wisdom that may help Mr. Smith, then please speak up.

Cheers.

Last edited by Bloke (2007-09-29 18:32: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

#282 2007-09-30 12:16:52

Mr. Smith
Member
From: Denmark
Registered: 2006-11-10
Posts: 56

Re: smd_slimbox

Thanks for your input! I haven’t made any changes to the admin setting after uploading to the remote server. I’ll try reinstalling the plugin, and I will of course let you know how it goes in a day or two.


Textpattern n00b

Offline

#283 2007-10-01 20:19:27

fuls
Member
Registered: 2005-11-16
Posts: 117
Website

Re: smd_slimbox

Hi again;)

Since I’ve installed this plugin I think I have a problem with loading my site inside internet explorer (both 6 & 7). I got this error and it seems like page cannot be loaded completely:

“Internet explorer cannot open the internet site. operation aborted”

I can also see that page is trying to load closelabel.gif (it says: downloading the picture http://mysite.com/css/closelabel.gif)

When I refresh the site it loads ok.

Can this be plugin related?

Thanks!

Last edited by fuls (2007-10-01 20:20:24)

Offline

#284 2007-10-01 20:34:43

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

Re: smd_slimbox

fuls wrote:

“Internet explorer cannot open the internet site. operation aborted”

I’ve seen this before a looong time ago when wouaren brought it to my attention. We discussed it and tried bug fixes for a while chatting over instant messaging but it was such a specific thing with his site that I didn’t think to post the fix in the thread here for all to see. D’oh!

From memory I think it was to do with using the <embed> tag on the same page as slimbox/mootools rather than the standards-compliant (* cough * ish) <object> tag. Do you have any video/embedded content on the same page? Maybe the swfobject.js library? Perhaps try slimbox without the embed/object/swfobject loaded and see if it makes a difference?

If it’s not that, you could try asking wouaren directly – he’s a helpful guy and he may remember what we did to fix it.

Last edited by Bloke (2007-10-01 20:35:56)


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

#285 2007-10-01 20:38:38

fuls
Member
Registered: 2005-11-16
Posts: 117
Website

Re: smd_slimbox

Yes, that’s it probably! I have a swfobject installed. I’ll contact wouaren, thanks again for helping me out:)!

Last edited by fuls (2007-10-01 20:39:21)

Offline

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

Board footer

Powered by FluxBB