Textpattern Forum

You are not logged in. Register | Login | Help

#561 2008-08-24 00:03:45

xzamen
Member
Registered: 2007-02-12
Posts: 18

Re: smd_slimbox

Bloke,
Thank you for pointing out the issue with browsers. I think I’ll leave everything as it is now. Seems to be working fine.

Offline

#562 2008-08-26 00:36:09

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: smd_slimbox

Can I do this?

I want my article image loaded in my article, as normal (reduced in size using a php script – taken care of already)

Then if a user clicks on an anchor to trigger the lighbox action the article image in original large size will pop up lighbox style. I don’t need to navigate to the next or previous. I just want the user to be able to see the large version isolated.

Not sure how I could achieve this.


Art Rogue – Fine Art Photography

Offline

#563 2008-08-26 07:47:55

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

Re: smd_slimbox

mattmikulla wrote:

if a user clicks on an anchor to trigger the lighbox action the article image in original large size will pop up lighbox style.

It’s sort of possible in smd_slimbox but requires some kludging and CSS trickery, since it is only designed to have thumbnails clickable. You might be better off with upm_image but it’s slightly messy since I don’t think it can be used as a container tag. I have no idea if this’ll work but in my head I can see something like:

<txp:article_image /> // as normal
<txp:upm_article_image form="artimg" />

And in form artimg:

<a rel="lightbox-<txp:upm_img_id />" href="<txp:upm_img_full_url />">Click to see the image</a>

The ‘rel’ instructs the slimbox/lighbox script to do its stuff and it has the image ID added to it so it will only show that image in case there are more on one page (think article_list). If your article image and clickable link were close together on the page there’s no reason you couldn’t combine the two and use upm_image to display the thumbnail inside the artimg form as well, which saves you a call to TXP’s article_image tag.

smd_gallery can also do it if you happen to have that installed with the advantage that it’s a container tag BUT there’s no simple way of getting at the article_image’s URL so you’d probably have to use a bit of PHP to pull the URL out of the database: yuk!

I’d be tempted to just stick the lightbox scripts on the page and mess around with upm_image since you’re not really using smd_slimbox as a ‘gallery’ per se, so it’s overkill. Does that help at all?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#564 2008-08-27 16:46:39

MrLongbaugh
Member
From: Hamburg - Germany
Registered: 2004-10-11
Posts: 109

Re: smd_slimbox

Hey,

I would like to give the thumbnail an text with an a tag.
The thumbnail itself should have a link to the main image – as usual.

How can I make the plugin not to use the title in the a Tag of the Thumb? Or to use the alternate text as title?

This is the form:

<txp:asy_wondertag>
<txp:smd_slimbox imageid="<txp:custom_field name="Fotos" />" thumb="0:1" thumbtext="above:?caption" wraptag="li" sort="fixed" />
</txp:asy_wondertag>

Offline

#565 2008-09-12 17:29:18

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 529
Website

Re: smd_slimbox

There is only one thumbnail in the article, which is correct. Clicking on it shows all images (after eachother!) of a specific category in a slimbox, the cat is named ‘schilderijen’. Everything is going fine except the images in the show are not the three images of the cat specified … !?

I did check the images and their cat in TXP several times but I don’t understand why smd_slimbox doesn’t work as supposed.

code > <txp:smd_slimbox category="schilderijen" limit="1" showpagelinks="0" />
url > http://www.claraelders.nl/txp/kunst?98cb=2 under ‘Schilderijen…’!

Thanks for any help.

[edit]
I’ve now skipped the limit attribute … so there are three (3) thumbnails. But the show (slimbox) gives two more images … !?
And there are only three (3) images with the cat ‘schilderijen’. I don’t get it!

[edit]
Solved (more or less!). I’ve skipped the two images that didn’t belong to the cat from the TXP database … and yes, the slimbox is setup properly … :)

[edit]
Oops … I didn’t read the plugin help good enough. With ‘groupname=‘schilderijen’ into the tag everything is working as it should … :)

Last edited by RedFox (2008-09-15 10:29:38)

Offline

#566 2008-10-30 20:04:57

davidoleski
Member
Registered: 2008-10-24
Posts: 10

Re: smd_slimbox

So how/where do I manually include the relevant javascript libraries in my page, with the new update of smd_slimbox_inc no longer being supported? I’m following the same entries as above, and having the same results (images only open as images on a blank page) because the page is not finding the scripts. How do I force the page to find the script, as I’ve tried all the options you mentioned above. I’m using the tag < jsdir=”/js” cssdir=”/css” /> in the head of my page template, what else should I be doing to force the page to use the scripts? Do I have to manually upload a javascript to my server? Is this already included in the plugin? Thanks

Offline

#567 2008-10-31 13:41:03

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

Re: smd_slimbox

davidoleski wrote:

So how/where do I manually include the relevant javascript libraries in my page

I knew this would come back and get me one day when I forgot to put an example of the new syntax in :-)

You need to use normal HTML tags to include the javascript nowadays. So somewhere in your page template (or a form), add something like this:

<head>
  <script type="text/javascript" src="/js/mootools.js"></script>
  <script type="text/javascript" src="/js/slimbox.js"></script>
  <link rel="stylesheet" type="text/css" href="/css/slimbox.css" />
</head>

Adjust the paths according to where you have (separately) uploaded / FTPd the javascript and the stylesheet files. In this case the files are in the js and css folders which are directly off the root of your textpattern installation (the same level as the images and files directories).

Hope that helps get you going.

EDIT: if you are using Firefox, the Firebug add-on has an excellent tool in the ‘Net’ pane that allows you to see at a glance which scripts failed to load. Very useful for getting the paths to the files right :-)

Last edited by Bloke (2008-10-31 13:42:25)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#568 2008-10-31 14:37:30

davidoleski
Member
Registered: 2008-10-24
Posts: 10

Re: smd_slimbox

ahh, yes, thank you, now it works. Beautiful.

Offline

#569 2008-12-31 04:13:32

cbeyls
Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: smd_slimbox

Hi everybody,

I just wanted to notify you that I’ve ported my Slimbox to jQuery. You can now download Slimbox 2 from the official homepage.


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#570 2008-12-31 10:36:20

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

Re: smd_slimbox

cbeyls wrote:

I just wanted to notify you that I’ve ported my Slimbox to jQuery.

Brilliant, thanks for all your work on this Christophe. It’s definitely going to help those of us who like to stick to one library on our sites.

Since it’s kind of related I’ll post a notification in the smd_gallery thread as well.

Happy New Year.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB