Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#757 2010-08-20 18:32:17
- mauricerm
- New Member
- From: Tepic, Nay
- Registered: 2010-07-02
- Posts: 2
Re: smd_gallery: super-flexible gallery generator
hello, I was reading the forum but found no satisfactory answer. I am developing a website, and the main part I put a slideshow, and follow the instructions of Example 4, which I have just listed, and does not work.
Here the page:
http://www.acontecer.mx/tecuala.gob.mx
the slideshow should be displayed in the top of the page,
the tag is as follows:
<txp:smd_gallery category="ejes-de-desarrollo" form="slideshow" combo="imglist:{id}{ext}" collate="quote:{imglist}:{alt}"/>
the block is as follows:
<script type="text/javascript">
myShow1 = new Slideshow("slideshow1",
{ hu: "<txp:site_url />images/",
images: [{imglist}],
captions: [{alt}],
classes: ["prev","next","active"],
type: "fade"
});
</script>
<div id="slideshow1"><img src="<txp:site_url />images/{id#3}.jpg" alt="{alt#3}" width="{width#3}" height="{height#3}" /></div>
Additionally,
I downloaded the most current version of the slideshow
and my head is formed as follows:
<script type="text/javascript" src="<txp:site_url />js/mootools.js"></script>
<script type="text/javascript" src="<txp:site_url />js/slideshow.js"></script>
<script type="text/javascript" src="<txp:site_url />js/slimbox.js"></script>
<link rel="stylesheet" type="text/css" href="<txp:site_url />css/slimbox.css" />
Offline
#758 2010-09-02 02:28:57
Re: smd_gallery: super-flexible gallery generator
Yeah, me again.
Just a query here Mr B. I can’t see a way to produce a thumbnail from an article_image using smd_gallery. It doesn’t appear to have an easy call up for either just the image, a thumbnail or a popup. I can only get the image, not a thumb.
The deficiency is in either of two places, smd_g or at the top of my body, just under where the hair should be. I’m trying most variations along the lines of:
<txp:smd_gallery id="?article_image" thumb="1" limit="1" delim="@" imgsize="150px, 69px" />
This, of course, produces a link to a thumbnail from the full sized article image.
Nice to just produce the thumb.
Cheers
Last edited by detail (2010-09-02 07:20:36)
Offline
#759 2010-09-02 08:30:05
Re: smd_gallery: super-flexible gallery generator
detail
If you don’t specify a form or container content, smd_gallery uses default markup, which is ‘show me a full size image’. Hence that’s what you’re seeing. That should solve the mystery.
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
#760 2010-09-05 16:56:05
Re: smd_gallery: super-flexible gallery generator
I am trying to grab image ids from my article image field but I get no output. My tag is this:
<txp:smd_gallery debug=“2” id=”?article_image” form=“main-image”/>
main-image form is:
<txp:image id=”{id}” />
in debug I get this:
++ INCLUDED/EXCLUDED IDs, NAMEs AND CATs ++
array (
0 => ‘\‘article_image\’‘,
)
++ WHERE CLAUSE ++
(1=1 AND (txp_image.id IN (‘article_image’)) ) ORDER BY txp_image.id asc
SELECT DISTINCT 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.thumb_w,txp_image.thumb_h,txp_image.thumbnail FROM txp_image WHERE (1=1 AND (txp_image.id IN (‘article_image’)) ) ORDER BY txp_image.id asc LIMIT 0, 99999
++ COMBOs ++
array (
)
So it is taking article_image literally and passing the string and not getting the ids from the field. Any ideas? Can I use multiple id’s in the article image field like so, 1,3,5?
I am on 4.2.0
smd_gallery 0.62
smd_library 0.36
Thanks in advance as always
Last edited by cuda (2010-09-05 17:01:00)
Offline
#761 2010-09-06 08:00:31
Re: smd_gallery: super-flexible gallery generator
cuda wrote:
it is taking article_image literally
As far as I recall, the only time it will do this is if you are using the gallery outside an article context because then article_image is not defined. Are you trying to display the gallery on a list page? It needs to be inside an article, or in an article (or article_custom) container/form.
And yes you can use multiple IDs.
Last edited by Bloke (2010-09-06 08:01:14)
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
#762 2010-09-06 20:06:37
Re: smd_gallery: super-flexible gallery generator
<——Idiot alert – Yeah I was in a section not the article…thanks bloke as always! having some way to store section data would be kinda nice. Some sort of custom field for sections
Offline
#763 2010-09-08 08:06:38
Re: smd_gallery: super-flexible gallery generator
Just an update on my image display quest.
My conundrum was that I needed the article image ids for two conflicting reasons.
upm_article image for my thumbnail in an article list needs a comma separated list, although I only want one to show.
smd_gallery needs an @ to separate the numerous listed article images.
Solution: put both “comma” and “@” in the article image box, ie [31, 31@ 32@ 33@ 34] etc
Who wudda guessed that would work?
The [31,] works for the article list thumbnail, the [@s] for the slideshow. And it didn’t explode.
Offline
#764 2010-10-11 02:07:17
Re: smd_gallery: super-flexible gallery generator
Hi,
I am using smd_gallery with this from
bc.
<div id=“my_show” class=“slideshow”>
<a rel=“lightbox” href=”{imagedef#1}”><img src=”{imagepath#1}{imagedef#1}” alt=”{alt#1}”/></a>
</div>
<script type=“text/javascript”>
var data = [{imagedef}];
var myShow = new Slideshow(‘my_show’, data, {controller: true, hu: ‘{imagepath#1}’, linked: true, width: 650, height: 480});
myShow.start();
</script>
And this is my article tag
<txp:smd_gallery category=“front-page” form=“gallery_one” collate=“quote:{imagedef}” />
I actually want to add the thumbnails at the top of the slideshow, how do I do that?
Here’s my result:
http://bahamasny.net/photos
I am using [Aeron Glemann] slideshow with mootools.js.
Any help would be appreciated.
Last edited by jrubio (2010-10-11 08:29:27)
Offline
#765 2010-11-13 20:00:57
Re: smd_gallery: super-flexible gallery generator
I’m having a weird problem, and am pretty sure I have done everything correctly.
All I am trying to do is have this work as a super straight forward gallery.
http://s111698.gridserver.com/machinery/
This is the smd_gallery tag:
<txp:smd_gallery category=“machinery” form=“gallery” />
This is the gallery form:
<li>
<a rel=“shadowbox{category}” href=”{url}” caption=”{name}”>
{name}
</a>
</li>
The images open up fine, but I can not go through the rest of the images in the gallery.
I apologize if this is ridiculously easy and I’m over looking something totally obvious.
-Chris
Offline
#766 2010-11-13 20:06:34
Re: smd_gallery: super-flexible gallery generator
Totally figured it out.
Sorry for the unnecessary post!
Offline
#767 2010-11-24 00:20:22
- Marek Zelenka
- New Member
- Registered: 2010-11-23
- Posts: 6
Re: smd_gallery: super-flexible gallery generator
Hi guys, I get crazy :-)
Just how can I tell that plugin I want to show the image in the same page design on definite position and not as an individual image?
After I`ll choice the thumb image I want to first show the original thumb with description and then click and show the full image size. It has to be trivial I think :-/
http://www.webspravce.cz/galeriejakubska/artshop/
Thanks a lot for any kick!
Offline
#768 2010-11-24 09:53:40
Re: smd_gallery: super-flexible gallery generator
Marek Zelenka wrote:
After I`ll choice the thumb image I want to first show the original thumb with description and then click and show the full image size.
If you are using TXP 4.3.0 you can probably do this with the new built-in image tags. For examples and inspiration, see Jeff’s excellent gallery demo.
But if you really want to do it in smd_gallery then you have a few options depending if you want to refresh the page or not when you click a thumb.
Page refresh method
Something along these lines will get you going. Essentially you are passing the image id of the clicked image to the same page, letting the adi_gps plugin extract the image ID for you and then ask smd_gallery to display it along with the relevant author / caption info:
<txp:adi_gps />
<!-- Display the list of thumbs -->
<txp:smd_gallery category="some-cat" wraptag="p" class="thumblist">
<a href="?img_id={id}"><txp:thumbnail id="{id}" /></a>
</txp:smd_gallery>
<txp:if_variable name="img_id">
<!-- We have been given an image ID so show it -->
<txp:smd_gallery id="?img_id">
<a href="{url}"><txp:thumbnail id="{id}" /></a>
<div id="obsah-dilo-nav">
<a href="{url}">Zoom this image</a>
<a href="#">See all images by this artist</a>
<div id="obsah-dilo-popis">
<p>{author}</p>
<h3>{alt}</h3>
<p>{caption}</p>
</div>
</div>
</txp:smd_gallery>
<txp:else />
<p>Click a thumbnail to view the image</p>
</txp:if_variable>
The downside to this is that TXP only natively allows two image sizes out of the box so the second thumb that displays will be the same size as the one in the thumbnail list. To get round this you can either generate your own <img>
tag and force the sizes, allowing the browser to scale the thumbs (making the medium-size thumb larger or — preferably — the thumbnails in the list smaller). Alternatively, if you are running TXP 4.3.0 you can try the smd_thumbnail plugin which allows you to automatically create and maintain multiple image sizes.
Non-page refresh method
Requires javascript / jQuery to be loaded on your page so when you click an image thumbnail from the list it populates the target div with the relevant information. Example 3 in the plugin help will give you some ideas on how to achieve this.
Non-smd_gallery method
Use the built-in TXP (4.3.0) image tags and smd_thumbnail to offer the same thing, perhaps employing <txp:image_display />
or <txp:images />
. Jeff’s examples will show you some tricks for doing this.
To display the full size image you can then employ a lightbox or popup a new window or extend the above methods further to display the full size image in a known location on the page.
Hope that gives you some ideas on the varying approaches. Let us know if you need any further help.
Last edited by Bloke (2010-11-24 09:56:11)
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