Textpattern CMS support forum

You are not logged in. Register | Login | Help

#261 2008-11-05 22:30:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,787
Website

Re: smd_gallery: super-flexible gallery generator

progre55 wrote:

I want to take your plug in and integrate it into an automatic slideshow…. to run automatically.

Have you looked at using jQuery Cycle? I’ve used it successfully with smd_gallery on a few projects. If you just want the fadey effect, there’s cycle lite which is much easier to get going.


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

#262 2008-11-06 13:20:48

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

Re: smd_gallery: super-flexible gallery generator

Bloke:

Thanks for the quick reply. I guess I was hoping for something more along the lines of what HP has on their website where you have some controls, as well as the capability to jump around.

progre55

Offline

#263 2008-11-06 13:52:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,787
Website

Re: smd_gallery: super-flexible gallery generator

progre55 wrote:

I was hoping for something more along the lines of what HP has on their website where you have some controls, as well as the capability to jump around.

Well if you find out which tool they have used (assuming it’s a third party one and not custom built) you can download it and integrate it. Or steal that one off their site! It’s only divs, js, an image map and some css. smd_gallery will most likely work, with a bit of ingenuity!

First task is to pick the tool/effect you want to use, then asses how easy it is to make smd_gallery get the graphics into it.


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

#264 2008-11-06 14:02:52

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

Re: smd_gallery: super-flexible gallery generator

Bloke:

I will do some digging and maybe with the some of your expert assistance I can get it moving in the right direction. To be continued …..

progre55

Offline

#265 2008-11-11 06:11:34

mcx
Member
Registered: 2008-11-11
Posts: 12

Re: smd_gallery: super-flexible gallery generator

Great stuff Stef!

However my newbiness prevents me from using all but the most basic of features… I was hoping that someone would be able to point my in the right direction on loading the related images for an article dynamically.

I have the plug-in working up to the point where the correct images load if the <txp:smd_gallery… > tag is place in the article, but once I try to place the tag in either a page or a form (swapping out the static category attribute for a dynamic”?” attribute), it all heads south.

I have tried to emulate a set-up from another plug-in by categorizing the images by the article number to which are associated (e.g. “30”), then using the <txp:smd_gallery category=”?id” form=“gallery” debug=“1”> in either the default page or form.

I suspect that I missing something about the textpattern’s method of retrieving the article id or the correct use of the dynamic id retrieval system. I am pretty sure I will be kicking myself when the answer comes around, moreso if there is a simpler, more refined method achieving the same result.

Thanks for you patience and consideration!

Last edited by mcx (2008-11-11 12:28:26)

Offline

#266 2008-11-11 09:20:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,787
Website

Re: smd_gallery: super-flexible gallery generator

mcx wrote:

using the <txp:smd_gallery category=”?id” form=“gallery” debug=“1”> in either the default page or form.

Hi mcx. No, you’re not missing anything, that should work (assuming you have the trailing / in the tag on your site). It works on my test site.

What sort of thing do you see in the debug output? You should see a line that starts with 1=1. Under that you should see a REPLACEMENTS section with each of your matching images listed and a load of junk about each one. If all you’re seeing is array() then for some reason the plugin is not pulling out the correct info. Post what you see and I’ll try and figure it out.

If all that looks ok and the first part is pulling the correct stuff out of the database, the next thing to look at is the form. What is the content of your gallery form? And you’re using v0.45 of the plugin, yes? (I still haven’t fixed the id attribute bug that I *cough* fixed badly from 0.44, but it shouldn’t affect you here because you are using category).

You’re approach seems sound and logical. The default form is the right place for the tag, and keying the image category off the article ID is a great way to make “auto galleries” that expand if you add new images. There are other ways, but they all involve an extra step and/or nominating another field to hold the category name, so yours is by far the most efficient method.

So at the moment I’m a bit flummoxed, sorry.


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

#267 2008-11-11 10:52:47

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: smd_gallery: super-flexible gallery generator

progre55 wrote:

Bloke:

Thanks for the quick reply. I guess I was hoping for something more along the lines of what HP has on their website where you have some controls, as well as the capability to jump around.

progre55

Hey, progre555, the jquery cycle plugin can be made to have controls.
take a look at their advanced demos

i have implemented cycle with pagers/prev next several times, including in my portfolio (shameless plug)

I’d be happy to help out if you have any questions


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#268 2008-11-11 12:06:54

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: smd_gallery: super-flexible gallery generator

smd_gallery + smd_if = lot of fun = the infinite is the limit


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#269 2008-11-11 12:10:50

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,787
Website

Re: smd_gallery: super-flexible gallery generator

maniqui wrote:

smd_gallery + smd_if = lot of fun = the infinite is the limit

Another satisfied customer :-)


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

#270 2008-11-11 12:25:45

mcx
Member
Registered: 2008-11-11
Posts: 12

Re: smd_gallery: super-flexible gallery generator

Thanks for the speedy reply Stef – much appreciated!

So I’ve gone through it once more, but have not been able to spot any obvious discrepancies.

Please have a look at the following and let me know where I am getting blind-sided.

In the “default” form:
<txp:smd_gallery category=”?id” sublevel=“1” form=“gallery” debug=“1” />

The “gallery” form:
<a rel=“lightbox-{category}” href=”{url}” alt=”{alt}” title=“A picture of {title}” height=”{height}” width=”{width}”> <txp:thumbnail id=”{id}” />
</a>

With in the <head> tag of the “default” page:
<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” />

With this combination the debug prints:
“++ WHERE CLAUSE ++
txp_image.category = “smd_1053391178” ORDER BY txp_image.category asc
select txp_image.name,txp_image.id,txp_image.alt,txp_image.caption,txp_image.category,txp_image.author,txp_image.date,txp_image.ext,txp_image.w,txp_image.h,txp_image.thumbnail, txp_category.title AS category_title from txp_image, txp_category where txp_category.name = txp_image.category AND txp_category.type=“image” AND txp_image.category = “smd_1053391178” ORDER BY txp_image.category asc LIMIT 0,99999”
x5 – with different “smd_…” for each.

I have seen the “1=1” debug output during my various trials but forget by which combination it was produced.

Thanks again for your support!

Last edited by mcx (2008-11-11 12:26:42)

Offline

Board footer

Powered by FluxBB