Textpattern CMS support forum

You are not logged in. Register | Login | Help

#141 2008-06-11 06:37:05

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,394
Website

Re: smd_gallery: super-flexible gallery generator

I now have this in the form:

{onchange:category_title}
{grouptagstart}
<a href="{url}" title="{title}">{object}</a>
{grouptagend}

And you can see the result in the webpage. Thanks Stef! BTW – category ordering works great too with the fixed attribute.

Offline

#142 2008-06-12 14:25:40

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

Re: smd_gallery: super-flexible gallery generator

Hi again, thanks for you continuous help. I am trying to set up the smd_gallery with slideshow 2! for one image to fade into another image. Just two pictures. Here is my tag

<txp:smd_gallery id="29.gif, 30.gif" form="fade" wraptag="div" class="show" collate="quote:{imagedef}" />

and here is the form called ‘fade’

<div id="my_show" class="slideshow">
<img src="{imagepath#1}{imagedef#1}" alt="{alt#1}" />
</div>
<script type="text/javascript">
  var data = [{imagedef}];
  var myShow = new Slideshow('my_show', data, {controller: true, hu: '{imagepath#1}'});
</script>

i have the js and css loaded in the header, but nothing happens. thanks so much

Offline

#143 2008-06-12 16:00:13

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

Re: smd_gallery: super-flexible gallery generator

immarabi:

Try taking the space out between the images in your smd_gallery tag id=“29.gif,30.gif”.

Also for kicks, use Bloke’s category tag insted of ID and see if that makes a difference.

Make sure you have the css and fade code I referenced earlier, and let us know.

progre55

Last edited by progre55 (2008-06-12 16:01:49)

Offline

#144 2008-06-12 16:05:19

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

Re: smd_gallery: super-flexible gallery generator

immarabi wrote:

<txp:smd_gallery id=“29.gif, 30.gif” form=“fade” wraptag=“div” class=“show” collate=“quote:{imagedef}” />

As well as what progre55 suggested about the category attribute and the css/fade code, a couple of points:

  1. the spaces in the list shouldn’t make any difference (hehe, in theory, but I’m willing to be proved wrong!)
  2. However, the id attrbute must be just that: numeric IDs, not filenames with extensions :-)

Try removing the extensions and see if that helps.

Last edited by Bloke (2008-06-12 16:06:01)


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

#145 2008-06-12 19:39:31

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

Re: smd_gallery: super-flexible gallery generator

Thanks you two. I swapped the id for the category attribute and it worked perfectly.

Offline

#146 2008-06-13 18:36:42

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

Re: smd_gallery: super-flexible gallery generator

Bloke:

Need some guidance from you.

I have come across this gallery script: http://www.phatfusion.net/slideshow/

Not sure how familiar you are with this one.

I am very pleased with its look and results. I have it up and running and now want to integrate it with your smd_gallery: super-flexible gallery generator plug in. Right now I have manually placed all the images (thumbnails and full) And that is where the asisstance is requested.

The uniquness of this is that it has both thumbnails and images. I tried several variations of the plug in with no sucess.

I was hoping that you could shed some light.

progre55

Offline

#147 2008-06-14 08:02:34

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

Re: smd_gallery: super-flexible gallery generator

progre55 wrote:

I have come across this gallery script: http://www.phatfusion.net/slideshow/ Not sure how familiar you are with this one.

Never seen it before but it certainly looks sweet.

Looking at the source code and his usage, it doesn’t require anything fancy at all. So you’d use smd_gallery as usual to grab whichever pictures you wanted from any categories you like. Anything that isn’t a thumbnail/image you could wrap outside the smd_gallery tag:

<div id="slideshowContainer" class="slideshowContainer"></div>
<div id="thumbnails">
 <smd_gallery category="some_cat" form="gallery" />
 <p><a href="#" onclick="show.play(); return false;">Play</a> | <a href="#" onclick="show.stop(); return false;">Stop</a> | <a href="#" onclick="show.next(); return false;">Next</a> | <a href="#" onclick="show.previous(); return false;">Previous</a></p>
</div>

And then put this in your gallery form (or between <txp:smd_gallery>...</txp:smd_gallery> tags, since it’s so simple you might want to just put everything on the same page to save having to create a form). I copied this line straight out of his source code and just added the replacement tags instead of the hard-coded images:

<a href="{url}" class="slideshowThumbnail"><img src="{thumburl}" border="0" /></a>

I guess your javascript and libraries are on the page since you have it working already, so you should be good to go (without the onClick: function(i){alert(i)} of course, since you probably don’t want that popup to appear when you click an image!

I can’t see why that won’t work, but I haven’t tried it so if you hit any snags let me know.

Last edited by Bloke (2008-06-14 08:05:49)


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

#148 2008-06-16 12:34:45

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

Re: smd_gallery: super-flexible gallery generator

Bloke:

Thanks for the input.

When I attempt the above, I get a box with no image and the hyperlinks below. No error appears on the page.

If I hit the play button, I get the following error:

show is not defined
onclick(click clientX=0, clientY=0)

Here is the code I used:

<div id="slideshowContainer" class="slideshowContainer"></div>
<div id="thumbnails">
<smd_gallery category="slideshow" form="gallery_bloke" />
<p><a href="#" onclick="show.play(); return false;">Play</a> | 
<a href="#" onclick="show.stop(); return false;">Stop</a> | 
<a href="#" onclick="show.next(); return false;">Next</a> | 
<a href="#" onclick="show.previous(); return false;">Previous</a></p>
</div>

Form:

<a href="{url}" class="slideshowThumbnail"><img src="{thumburl}" border="0" /></a>

progre55

Last edited by progre55 (2008-06-16 12:45:15)

Offline

#149 2008-06-16 14:33:14

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

Re: smd_gallery: super-flexible gallery generator

progre55> Is the HTML output showing what you’d expect, i.e. does it match the format that Galleria expects? Compare the source code in their examples and your page to see if the gallery parts are of a similar structure.

Oh, and you have got the relevant mootools/Galleria <script> tags and have put:

window.addEvent('domready',function(){
	var obj = { // slideshow settings go here }
	show = new SlideShow('slideshowContainer','slideshowThumbnail',obj);
	show.play();
});

on the page somewhere, right? And made sure that jQuery isn’t clashing with mootools if you are using them both? ;-)

Last edited by Bloke (2008-06-16 14:33:39)


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

#150 2008-06-21 20:51:08

paulyoung
Member
Registered: 2008-06-21
Posts: 10

Re: smd_gallery: super-flexible gallery generator

Hi all, finally got smd_gallery working with slideshow in textpattern after using this thread.

Help file example #4 should be changed.

I have been using the following to show the first image in my slideshow:

<img src="{imagepath#1}{imagecap#1}" alt="{title#1}" />

Which works great. However when Javascript is off it doesn’t show an image, even with the style sheet turned off, but when viewing the source code the correct code is present.

Please help.

Offline

Board footer

Powered by FluxBB