Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-09-06 16:09:16

pierlu
Member
Registered: 2014-08-12
Posts: 153

Slideshow with smd_gallery

I should create some slideshows different for every article: I have created a custom field in the article and unloaded smd_gallery.
How must I write for creating the slideshow and to combine him/it to the article?

Offline

#2 2016-09-06 20:11:46

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

Re: Slideshow with smd_gallery

Two unsinkable misconceptions about smd_gallery: It does not come with a gallery script built in and you do not need it any longer since 6 years or so. Bloke has done an excellent job on TXPs own image tags, back then. So, these days, Textpattern has all tags necessary for building galleries, lightboxes and slide shows in functional interaction with the necessary Javascripts.

How can you proceed now, after uninstalling smd_gallery? ;)

Choose your favorite script on the web (you’d needed to do so, anyway, with smd_gallery). All these scripts come with example code and instructions. Download a copy, try one of the examples included or copy code from an online example, follow these provided instructions, and make your favorite example work locally, just with an .html file and the necessary dependencies (jQuery, CSS files, initial script snippet, etc.)

Once it works, copy the HTML over to Textpattern, into a page. Save it, copy the necessary files over to your TXP directory (local or remote server) and link them correctly in your page. Use site_url in your href and src attributes. That’s to make sure the links don’t suffer from typos and other mistakes, and the code can be transferred from your local environment to the web server without you changing URIs.

Try your gallery script, correct URIs if necessary. Until here, that’s all just simple HTML/CSS/JS (plus one TXP life insurance tag).

Once you have it working in TXP, begin replacing the HTML tags for thumbnails and images with their TXP image counterpart tags, txp:thumbnail, txp:images, txp:article_image etc. (For a condensed list of only TXP’s image tags see the image category page in the old docs. Please note that the info there is a little outdated on tag subpages. The more recent info is the one from docs.textpattern.io, it just doesn’t have the tag categories yet). Have a look at the TXP example codes the, copy and alter as you need it.

When you have questions in any of these steps, ask and please don’t forget posting the particular code here.


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

Offline

#3 2016-09-06 20:22:13

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

Re: Slideshow with smd_gallery

OK, partly dispensable (I answered from memory after some hours). But the misconception part, the choose your script part, and the bolded part are still true.


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

Offline

#4 2016-09-06 20:50:44

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Slideshow with smd_gallery

Uli is right, you can create slideshows pretty easily with just txp tags.

See the Thumbnails theme, it uses txp:images to display 12 images at a time.

The link to the page source is on the bottom, it uses 1 small form.

etc_pagination works really well for the navigation.

Offline

#5 2016-09-07 06:12:40

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: Slideshow with smd_gallery

Also check your past questions, as you’ve asked several on making galleries in the past and we’ve given you detailed answers. If you mean a slideshow as a gallery of thumbnails, check your past questions. If you mean a slider (a carousel), the principle is essentially the same as for a gallery.

Here and here are two answers to similar smd_gallery / txp:image gallery question of yours in the past using magnific lightbox, and here is another answer using galleria with some more background information. If you are making a slider, you can take those as your starting point and then all you need to do is:

  • load javascript and css for your slider script instead of for a gallery script
  • adapt the code to output the HTML you need for your slider script. You’ll find that on the site with the slider script.

Good luck!


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB