Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#913 2012-04-30 10:11:42

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

Re: smd_gallery: super-flexible gallery generator

The ReferenceError: Can't find variable: Slideshow is a pointer: it looks like you deleted one line too many, and now your actual slideshow plugin is not loaded, hence it has no idea what to do with Slideshow…

Did you specifically want to use that particular mootools slideshow? If you’re just looking for an image blender for a series of images, you might want to try jquery-cycle (or even its smaller lite cousin). It’s a good deal smaller and it would obviate the need to load both jquery and mootools. The markup is also more straightforward as you don’t need a javascript array – you can use txp’s built-in image tags instead of smd_gallery.


TXP Builders – finely-crafted code, design and txp

Offline

#914 2012-04-30 11:11:07

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

Re: smd_gallery: super-flexible gallery generator

Colorbox is a jQuery plugin. In your global.js there are theses lines for addressing colorbox:

    $(".movie").colorbox({iframe:true, innerWidth:640, innerHeight:385});
    $("a[rel='colorbox']").colorbox();

You have no class movie and neither do you have an iframe. Looking at the code examples on colorbox.com I don’t think that your code with var frontpage_slideshow etc. in the header is addressing colorbox. And even if it would do so: it’s placed too early in the document, namely before jquery is called.


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

Offline

#915 2012-04-30 11:37:20

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

Re: smd_gallery: super-flexible gallery generator

uli, just for info, the var frontpage_slideshow bit was addressing this mootools slider plugin which was previously loaded on that page but is currently missing. I presume colorbox is being used for something else on the site.


TXP Builders – finely-crafted code, design and txp

Offline

#916 2012-04-30 11:50:50

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: smd_gallery: super-flexible gallery generator

If you want to use the jquery cycle plugin I posted a tutorial on txptips explaining how it can be achieved without any plugins.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#917 2012-04-30 11:57:15

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

Re: smd_gallery: super-flexible gallery generator

jakob, yeah, there must have been changes in the code. I had a look at it yesterday and could not tell where the problem came from ;)

Last edited by uli (2012-04-30 11:58:00)


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

Offline

#918 2012-05-01 06:35:14

Zubanoid
New Member
Registered: 2012-04-01
Posts: 8

Re: smd_gallery: super-flexible gallery generator

Ok, I’m totally lost now. I have tried using the slideshow.js and mootools.js files that go with the plug in. Is it because the versions do not match? Any ideas?

Offline

#919 2012-05-01 08:24:16

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

Re: smd_gallery: super-flexible gallery generator

Zubanoid wrote:

Ok, I’m totally lost now.

Me too! Let’s step back a step. What exactly are you trying to achieve? Are you trying to replicate the Flash gallery I see at www.linesinthesand.com.au/gallery/? Or replace it with something else?

One other thing to check: if you load both jQuery and mootools on the same page you should follow the compatibility advice and try to consistently use $ for mootools and jQuery for jQuery. Alternatively, run jQuery.noConflict(); and assign the result to a variable to use for future jQuery calls. Even if you don’t actively use jQuery on that page, you should perform this step if it is to co-exist with other libraries.

fwiw, I exclusively use jQuery instead of $ as a function prefix, and leave $ for other libraries. It’s more typing, but causes fewer headaches!

If we can nail down what you want the gallery to look like and what functionality you need it to offer over and above what’s there already, we can start to figure out the best course of action for you. As others have said, you might not even need smd_gallery to achieve what you want. If you can possibly use the core tags, it’s always preferable to a plugin.

Last edited by Bloke (2012-05-01 08:25:23)


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

#920 2012-05-01 12:11:20

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

Re: smd_gallery: super-flexible gallery generator

Stef, I think this all has to do with the slideshow on the frontpage. That’s what all the messages about errors in the posts above refer to.

Ok, I’m totally lost now. I have tried using the slideshow.js and mootools.js files that go with the plug in. Is it because the versions do not match? Any ideas?

You write that but are you sure you did actually load both of them? The “slideshow not defined” error you report and the page we are seeing suggest that you did swap out the mootools version but also inadvertently deleted the line that loads the slideshow.js plugin. That’s why you get “slideshow not defined”. Try adding the line back in that loads the slideshow.js and then we take a fresh look.


TXP Builders – finely-crafted code, design and txp

Offline

#921 2012-05-02 05:10:45

Zubanoid
New Member
Registered: 2012-04-01
Posts: 8

Re: smd_gallery: super-flexible gallery generator

Basically, what I’m after is a simple image fader to dissolve from one image to another.

The story is that I inherited the site from another company and my client didn’t want anything to do with them anymore. Which is a problem because the previous company built the original slideshow using a Flash plugin from slideshowpro.net and I don’t have the credentials to login and change the images. I’m not a fan of having Flash slideshows anyway, why would you bother when JavaScript does it better with no need for a browser plugin… anyway. I’m a kind of “web designer” who dabbles in coding so I get a bit lost with you guys who actually know what you are doing!

I think though that Bloke is on the right track that jQuery is running also and is causing conflicts. But Bloke, you lost me with how to actually use that noConflict thing!??

Here is an example of what I want it to look like:
http://www.electricprism.com/aeron/slideshow/example1.html

I guess there is an obvious problem I have that I’m using someone else’s methods and I have no idea what they have done and don’t want to call them to ask (they charged the client a lot of money for a 10 min phone call from me….)

Thanks for all your help everyone by the way :)

Bill

Offline

#922 2012-05-02 07:32:06

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

Re: smd_gallery: super-flexible gallery generator

Hi Bill,

if you just want an image fader and want to avoid any conflicts between jquery and mootools, you could try my earlier suggestion (see also colak’s tutorial) for a much leaner overall setup. You won’t need mootools at all for that, which removes any possible conflict problems.


TXP Builders – finely-crafted code, design and txp

Offline

#923 2012-05-11 03:10:25

Zubanoid
New Member
Registered: 2012-04-01
Posts: 8

Re: smd_gallery: super-flexible gallery generator

Greetings, me again….

One last effort to get this to work…. I tried the txptips that was <a href=“http://txptips.com/simple-image-slideshow-using-jquery-and-native-txp-tags”>posted</a> but to no avail. I followed the instructions carefully but still no joy. There is an error that says $cycle is not a function.

Can I ask one last time how I can get this to work? If I can’t get it going I’m giving up on it. I also plan to rebuild the site myself later.

Bill

Offline

#924 2012-05-11 03:11:23

Zubanoid
New Member
Registered: 2012-04-01
Posts: 8

Re: smd_gallery: super-flexible gallery generator

oh, the url is: http://www.linesinthesand.com.au/

Sorry about the html, I thought I could put it in and it gets converted automatically…..

Offline

Board footer

Powered by FluxBB