Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#217 2008-09-03 08:46:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,468
Website GitHub

Re: smd_gallery: super-flexible gallery generator

joel wrote:

I get p-tags wrapping the gallery’s div.

Are you putting the smd_gallery call directly in an article? If so, try adding two space characters before the <txp:smd_gallery... to stop textile from treating the tag as a normal paragraph.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#218 2008-09-03 09:09:05

joel
Member
Registered: 2004-11-26
Posts: 162

Re: smd_gallery: super-flexible gallery generator

Thanks! That did the trick!

Offline

#219 2008-09-06 20:29:04

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

Re: smd_gallery: super-flexible gallery generator

I don’t even know how to put this… Hope you’ll understand.
I’m still trying to make the gallery work as I want it to and the latest idea is to add <txp:category_list type="image"> above the thumbnails to make a sort of image category navigation which is displayed only with a gallery. I tried different variants of <txp:if_...> but none seems to do the intended. Then I thought it would be nice if I could add something in a form, but let it stay out of the “loop”. Something like pageform, let’s say headform. Or maybe there are some other ideas how to do it?

I know I can put my heading in pageform+pagepos and then possition it with CSS, but that gives additional headache.

Offline

#220 2008-09-10 14:30:44

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,468
Website GitHub

Re: smd_gallery: super-flexible gallery generator

xzamen wrote:

trying to make … a sort of image category navigation which is displayed only with a gallery.

Sorry for the delay in replying.

That would indeed be very useful. When I first released the plugin it was one of the things it couldn’t handle particularly well; the mighty rloaderro brought this to my attention when using his awesome slideshow script with the plugin because he wanted to output a javascript portion in the <head> tag and the thumbs in the body, all from the same smd_gallery tag.

It would be very very cool to be able to ‘pull out’ some piece(s) of the replacements such that they could be placed anywhere on the page, however I can’t figure a good way of doing it. Combining the collate and regular modes would work (sort of). Setting up a sister tag that allows header/footer stuff was something else I toyed with, and it would work really well on articles. The problem is that it falls apart in an article list context because the header and footer parts would be reprogrammed for each article in the list; that could cause a lot of confusion!

Even the collate mode doesn’t help much in this situation because you don’t know how many categories there are going to be.

The only thing I can suggest right now is two semi-identical smd_gallery calls. The first sets up the menu and lists the category names + links in its container; the second displays the thumbs as normal. Not the most efficient way of doing things but it should work.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#221 2008-09-12 13:06:36

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_gallery: super-flexible gallery generator

Bloke:

Hope all is well.

I have run into a niggle that I hope you can assit me with. I am using smd_gallery with slimbox on my recent project. I have everything set up properly and it functions like a charm :) BUT and isn’t their always a but ….

… to get it work, here is the key part of the <head> info ….

<txp:smd_slimbox_inc jsdir="/js" cssdir="/css" />
<script type="text/javascript" src="http://www. ... .com/js/menu.js"></script>
<script type="text/javascript" src="http://www. ... .com/textpattern/jquery.js"></script>
<script type="text/javascript" src="http://www. ... .com/js/mootools.js"></script>
<script type="text/javascript" src="http://www. ... .com/js/slimbox.js"></script>
<link rel="stylesheet" href="http://www. ... .com/css/slimbox.css" type="text/css" media="screen" />

My problem is that when it displays the light box effect you still see the menu … to add one more wrinkle to the picture … the problem only appears in Firefox and not in IE (at least not in IE 7)

Finally, if I move the the lightbox code up in the <head> section then it does not work.

I am hoping you or others have see this happen and know a solution …

As usual, any and all assistance is greatly appreciated.

progre55

Last edited by progre55 (2008-09-12 13:07:04)

Offline

#222 2008-09-12 13:30:00

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,468
Website GitHub

Re: smd_gallery: super-flexible gallery generator

progre55 wrote:

when it displays the light box effect you still see the menu

Without knowing what menu.js does, it’s difficult to say why it might be doing this. Mucking about with the library load order isn’t generally a good idea; although menu.js can go last, make sure any 3rd party js library is loaded before slimbox.js and its css.

Is there a clash between mootools and jQuery? Do you get any js errors in Firebug?

P.S. you don’t need smd_slimbox_inc any more… especially not with smd_gallery :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#223 2008-09-12 14:04:24

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_gallery: super-flexible gallery generator

Bloke:

I do not get any error messages :)

If I try to use the work arounds from the page you reference, I can not get anything to load on the page … it is completely blank …

Also, I removed the unnecessary line you mentioned … thanks …

progre55

Last edited by progre55 (2008-09-12 14:05:06)

Offline

#224 2008-09-14 13:02:54

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

Re: smd_gallery: super-flexible gallery generator

The only thing I can suggest right now is two semi-identical smd_gallery calls. The first sets up the menu and lists the category names + links in its container; the second displays the thumbs as normal. Not the most efficient way of doing things but it should work.

Bloke, thank you for that solution.

I have another question. Is it possible to substitute anything? Let’s say I have categories cat-1, cat-2, cat-z etc and I want them all to be displayed so I would put something like category=“cat-?*” Sort of regular expressions or something?

Offline

#225 2008-09-14 15:34:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,468
Website GitHub

Re: smd_gallery: super-flexible gallery generator

progre55

Do you have a site link you can e-mail me? I can’t think of anything else off the top of my head without seeing the site in question or a bit more detail of either the HTML source code and/or this menu.js thing (is it a third party tool? If so, where did you get it?)

xzamen

Is it possible to substitute anything?

Currently no :-( Regexes did cross my mind but they cause all sorts of problems because of my ‘?’ and ‘!’ syntax already employed by the plugin. Plus, they’re a pig to write/support!

As a workaround, if you have a recent dev branch of TXP lying around you can quickly nest all your cat-1, cat-2, cat-z links in one fell swoop under a parent category. (Under TXP 4.0.6 and below you have to nest them one at a time, which might become tedious depending on how many you have). Then just use category="my-new-parent-cat" sublevel="all" in the plugin.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#226 2008-09-14 21:39:45

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

Re: smd_gallery: super-flexible gallery generator

Thank you Bloke! That workaround works around quite well :)

Offline

#227 2008-09-15 12:09:43

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_gallery: super-flexible gallery generator

Bloke:

Yes I will email you.

Like I mentioned. The problem only appears in Firefox and not in IE. As you will see, both the menu bar and the top new ticker are effected. And the issue occurs once you click on a thumbnail.

Any suggestion/guidance would be appreciated.

progre55

Last edited by progre55 (2008-09-15 12:10:59)

Offline

#228 2008-09-15 18:42:14

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,468
Website GitHub

Re: smd_gallery: super-flexible gallery generator

I know it’s been around for a while but I only had the pleasure to check it out in anger today. I can thorougly, thoroughly, thoroughly recommend shadowbox in conjunction with smd_gallery. It might require a few more files and three or four lines of javascript more to set up than most libraries, but boy is it worth it.

It is super-cool, super-smooth and rock solid. Pretty much everything you might want in a lightbox system and a whole load more if you wish to dive in further. It can run standalone or even integrate with existing libs if you have them (jQuery, mootools, Prototype, Ext, etc)

I tried it in jQuery mode, rendering a single-tag smd_gallery test page (with 6 automatically-separated sub-galleries using onchange and grouptag) of 150 pics/thumbs. It’s so good it even pauses and patiently sits there waiting for the rest of the page to load if you jump the gun and click a thumbnail before the DOM is ready; unlike FancyZoom and traditional lightboxes that would just show the raw pic on its own page and require you to click Back.

Plus it scales the full pics — retaining aspect — depending on browser size up to the maximum resolution of the file itself. So on a 1024×768 display you’d see maybe an 800×600 version of a 1280×960 pic, but on a 1600×1200 display (like wot I has) you see the full 1280×960 shot.

It really is terrific. Hats off to the creator; I’m very impressed.

Last edited by Bloke (2008-09-15 18:42:55)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB