Textpattern Forum

You are not logged in. Register | Login | Help

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,714
Website

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.

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: 5,714
Website

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.

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: 5,714
Website

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.

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: 5,714
Website

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.

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: 5,714
Website

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.

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

Board footer

Powered by FluxBB