Execute gallery on pageload?

Permalink Browser Info Environment
Hello,

My javascript isn't the greatest, I was looking to configure Touch Gallery so it executes on pageload, not on thumbnail click.

How would I go about doing this?

I've tried fiddling around with changing document.ready to document.load in controller.php but to no luck.

Any help would be much appreciated

Type: Discussion
Status: Resolved
mikejay
View Replies: View Best Answer
mnakalay replied on at Permalink Reply
mnakalay
Hello,
Do you mean like if you come from another page and depending on the link clicked on that page open a specific image, or just open the first image any time the page loads?
mikejay replied on at Permalink Reply
mikejay
I mean simply when the page loads. Not when you click on anything.
mnakalay replied on at Permalink Reply 1 Attachment
mnakalay
ok.
I am sending you a file.
In your root blocks folder create a folder called touch_gallery and extract the file I sent you in it and you're good to go.
you should have the file in blocks/touch_gallery/controller.php
mikejay replied on at Permalink Reply
mikejay
Thanks so much for your solution. Worked perfectly. Legend! Wasn't expecting such fast and accurate help
mnakalay replied on at Permalink Best Answer Reply 1 Attachment
mnakalay
Another way you can do it is by using a template.
I am sending you a second file.
in your root blocks folder create a folder called touch_gallery and inside it a folder called templates. Extract the file I'm sending you in it.
You should have blocks/touch_gallery/templates/auto_touch_gallery.php

Now apply the template Auto Touch Gallery to Touch Gallery on your page.

This is better than the previous solution for future compatibility in case of update to Touch Gallery but if you are already using a template it might pose a problem
mnakalay replied on at Permalink Reply
mnakalay
You are very welcome, happy to help.

If you like the add-on and had some time to spare, I would really appreciate a review on the add-on's page. Many thanks in advance.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.