Textpattern Forum

You are not logged in. Register | Login | Help

#161 2008-07-10 18:21:29

immarabi
Member
Registered: 2008-04-29
Posts: 57

Re: smd_gallery: super-flexible gallery generator

Hello again. Trying to sort my thumbnails from latest to oldest. this is what I tried:

<txp:smd_gallery category="?s" form="gallery" sort="id,desc" />

thanks again

Offline

#162 2008-07-10 18:37:57

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

Re: smd_gallery: super-flexible gallery generator

immarabi

So very close! Try a space instead of a comma:

<txp:smd_gallery category="?s" form="gallery" sort="id desc" />


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

Txp Builders – finely-crafted code, design and Txp

Offline

#163 2008-07-11 14:33:07

immarabi
Member
Registered: 2008-04-29
Posts: 57

Re: smd_gallery: super-flexible gallery generator

Great, thanks that works now. One more question though . .
How can I display the {alt} text when the mouse hovers over the thumbnail in both Firefox and Explorer? Right now when the mouse hovers over the thumbnail it displays the {title} text which is the same as is displayed in the caption under the full sized version using the lightbox effect (which is where I want the {title} text to go and go only.)

here is my gallery form:

<a rel="lightbox-{category}" href="{url}" alt="{alt}"
     title="{title}" >
 <txp:thumbnail id="{id}" alt="{alt}" />
</a>

thanks again!

Last edited by immarabi (2008-07-11 14:34:08)

Offline

#164 2008-07-11 14:40:53

masa
Member
From: Reykjavik, Iceland
Registered: 2005-11-25
Posts: 1,079

Re: smd_gallery: super-flexible gallery generator

As far as I know, displaying the alt text is one of IE’s non-standards conformant behaviours. If there’s a title attribute, that’s what the browser should display.

So I’m afraid, what you want might not be possible.

Offline

#165 2008-07-14 12:55:10

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,039

Re: smd_gallery: super-flexible gallery generator

Stef, is it possible to give any of the navigational elements a focusing JS like Google’s document.f.q.focus()? My client is fond of keyboard accessibility. Maybe it’s sufficient to do a one-line-mod? :)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#166 2008-07-14 13:04:26

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

Re: smd_gallery: super-flexible gallery generator

uli wrote:

is it possible to give any of the navigational elements a focusing JS

That’s kind of outside the scope of the plugin (in a sense) because it leads to all sorts of other things like shortcut keys and stuff that’s difficult to do generically.

If you just want the page to jump to a particular nav element when it loads, you can do it with some jQuery. Give a class / ID to the item you want to have focus and add this to your page (inside script tags of course!) :

jQuery(function() {
  jQuery("#element_ID_that_requires_focus").focus();
});

If you decide to use a class instead of an ID, swap the # for a . in the above.

Does that help or have I misunderstood your request?

Last edited by Bloke (2008-07-14 13:05:22)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#167 2008-07-14 13:13:54

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

Re: smd_gallery: super-flexible gallery generator

There’s a new version out, btw. v0.45 [ zipped ] fixes a small issue if you have not assigned a category to your images. Under those circumstances the plugin returned nothing, which is clearly bogus.

Thanks to robin746 for highlighting this and giving me time on his server to debug this oversight.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#168 2008-07-14 13:19:28

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,039

Re: smd_gallery: super-flexible gallery generator

Thanks, Stef!
No, no misunderstanding :)

However, it doesn’t work. I put this into the head section of my page:

<script language="JavaScript" type="text/JavaScript">
<!-- jQuery(function() {
  jQuery("#tab_test").focus();
}); //-->
</script>

And this in my form:

<div ID="tab_test" >{navnext:>}</div>

Even when I put the jQuery immediately before the element (into the form) nothing gets the focus.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#169 2008-07-14 13:21:38

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,039

Re: smd_gallery: super-flexible gallery generator

Bloke wrote:

fixes a small issue if you have not assigned a category to your images

Aaah, great, this was why I initially thought I wouldn’t get it running!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#170 2008-07-14 13:38:24

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

Re: smd_gallery: super-flexible gallery generator

uli

Hmmm, it’s supposed to work :-)

Perhaps the focus() function depends on exactly what it is you’re adding focus to. I think you can focus to all input elements (text boxes, radio buttons etc) plus anchors and maybe one or two other things. Have you added the id="tab_test" to the anchor itself or to a <span> / <p> / etc?

And regarding the no-category bug, sorry for not spotting it sooner. It was down to my (lack of) SQL skills.


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