Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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: 11,446
Website GitHub

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: 11,446
Website GitHub

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

#151 2008-06-22 00:55:31

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: smd_gallery: super-flexible gallery generator

paulyoung wrote:

src="{imagepath#1}{imagecap#1}"

Havent tried, but this looks definitely odd here :)


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

Offline

#152 2008-06-22 06:48:00

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

Re: smd_gallery: super-flexible gallery generator

paulyoung wrote:

Help file example #4 should be changed.

What should it be changed to? It demonstrates the first version of rloaderro’s slideshow plugin; perhaps I should add an example for slideshow2 but the help is already too big and is in danger of stopping the plugin installing (there’s a size limit). If I can compress the help any more I’ll see if I can squeeze in another example, but both versions of slideshow are very similar in approach.

I have been using the following to show the first image in my slideshow: <img src="{imagepath#1}{imagecap#1}" alt="{title#1}" />

Uli is right, that looks odd. There is no built-in replacement tag called {imagecap} so unless you made it yourself as a combo that will fail. In fact in debugging/testing modes it will probably issue a horrible warning, which I will have to fix in the next release. You should probably be using code similar to example 4:

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

fwiw, the reason it works with js on is because slideshow automatically shows the first image of the slideshow, effectively overriding your incorrect “starting image”. Look again at the HTML source and you’ll probably see a bogus src url with your code.


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

#153 2008-06-24 20:27:24

duchamp
Member
From: Patagonia
Registered: 2005-02-03
Posts: 222
Website

Re: smd_gallery: super-flexible gallery generator

What a shame! I don’t know how to show the gallery images in a reverse order! I mean, by default the oldest image is viewed first but I want to reverse that order and view the new ones in first position!
Wich tag I could use for that?

Thx in advance!

Update: Damm, too many years using TXP and I realise today that I can’t modify the order of the images inside the Content > Images Tab!
I was supposing that images date are managed the same way that articles date, but not.
That’s not so good, I’m developing a site for a client that needs to manage a Gallery and I can’t find the way to modify the order that images are displayed :S
Am I wrong?

Last edited by duchamp (2008-06-24 21:14:13)

Offline

#154 2008-07-04 18:14:36

fuls
Member
Registered: 2005-11-16
Posts: 117
Website

Re: smd_gallery: super-flexible gallery generator

Is it possible with your plugin and slideshow2 to rotate images of different sizes and use fade effect?
Thanks!

Offline

#155 2008-07-06 17:54:00

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

Re: smd_gallery: super-flexible gallery generator

fuls wrote:

Is it possible with your plugin and slideshow2 to rotate images of different sizes and use fade effect?

I don’t think so, but I don’t know slideshow2 very well at all. Certainly this plugin just shows images exactly how they are saved in the TXP Images screen. Whether slideshow2 can do any rotatory jiggery pokery I can’t say. Anyone else?


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

#156 2008-07-10 08:24:16

fuls
Member
Registered: 2005-11-16
Posts: 117
Website

Re: smd_gallery: super-flexible gallery generator

Thanks. What about category_title and MLP? I have 2 languages and it only shows default one.
Here is my form code:

<div class=“gallery”>
<a href=”/gallery/?c={category}”>
<txp:
{object}
</a>
{onchange:category_title}
</div>

Offline

Board footer

Powered by FluxBB