two times on one page.

Permalink Browser Info Environment
Hey,

(How will I start)...
I have one page where I want to put some pictures, the gallery page.
nevertheless I wish to use two or three file sets,
It means that I did use the add-on "Magic tabs" for this.
I did create One tab for One file set!
the result is three tabs so: three file sets
But It seems to be true that I can use just one instance of the Grid Gallery at the time.
I don't succeed to use two instances of the grid gallery on this gallery page.
how do I have to accomplish two (or three) instances of the Grid gallery on this page.
One instance per tab.
Do I buy two licenses?


best regards,

Stefaan De Reu

Type: Ticket
Status: Archived
stedereu
View Replies:
stedereu replied on at Permalink Reply
stedereu
I did forget to say.
please take a look athttp://www.mynearmusicalway.be

it is the test website

best regards,

Stefaan De Reu
stedereu replied on at Permalink Reply
stedereu
https://www.mynearmusicalway.be
shahroq replied on at Permalink Reply
shahroq
Hi,
You should create 2 gallery and use them for each tab and it should be a problem.
stedereu replied on at Permalink Reply
stedereu
Hey Shahroq,

Thanks for your reply.
I did make two tabs with two gallery.
If I click on a tab, the photos don’t appear immediate.

I have to refresh the page to achieve a good result.
It can not be possible to refresh the page eventime I change of tab.

regards,

Stefaan De Reu



> Op 6 dec. 2017, om 10:03 heeft concrete5 Community <discussions@concretecms.com> het volgende geschreven:
stedereu replied on at Permalink Reply
stedereu
Hey Shahroq,

I did contact the developer of the magic tabs block.
It seems to be a complex situation.
I mean, for me it is indeed complex.
He recommend me to contact you for the problem.
He describes the problem like this:

'Gallery does not render if div is initially hidden and made visible later'.

best regards,

Stefaan De Reu
JohntheFish replied on at Permalink Reply
JohntheFish
@sharoq
I anticipate this could be fixed by you implementing the 'start when visible' trick in the block JS, as implemented in the core Google Maps block.
eg:
$(document).ready(function(){
  var t;
  var startWhenVisible = function (){
    if ($('#id').is(':visible')){
      window.clearInterval(t);
      initialiseWhatever();
      return true;
    } 
    return false;
  };
  if (!startWhenVisible()){
    t = window.setInterval(function(){startWhenVisible();},100);      
  }
});


There are some notes on my support site at
https://www.c5magic.co.uk/add-ons/magic-tabs/problem-solving/...

#id is a selector for the block. Could be any selector.

initialiseWhatever() is a call to start your addon js code.
stedereu replied on at Permalink Reply
stedereu
In attachment
the ad-on in compressed format
shahroq replied on at Permalink Reply
shahroq
Hi,
I attached a template specific for magic tab, please copy and extract provided file at :
\packages\whale_grid_gallery\blocks\whale_grid_gallery\
Then select this template for each gallery reside on magic tab.
Cheers,
stedereu replied on at Permalink Reply
stedereu
Hey shahroq,

Thank you for your reply.

I did copy the view-magic-tab.php to the pad
> \packages\whale_grid_gallery\blocks\whale_grid_gallery\

Can you be more specific What to do next?
I don’t see any difference for the moment.

Best regards,

Stefaan De Reu





Verstuurd vanaf mijn iPad

> Op 9 dec. 2017 om 10:32 heeft concrete5 Community <discussions@concretecms.com> het volgende geschreven:
shahroq replied on at Permalink Reply 1 Attachment
shahroq
Next you should select the new template for grid gallery. For doing so:
1- go to edit mode
2- click on grid gallery block and select "Design & Custom Template"
3- Click on Cog icon (left side of cancel button)
4- From "Custom Template" dropdown select "View Magic Tab"
5- Press Save
Do it for all instances of grid gallery.
stedereu replied on at Permalink Reply
stedereu
Dear shahroq,

First I wish to Thank you for your support and concern.

I did successfully find the template.
Nevertheless I don’t seem to see a change on my images page.
The view magic tab is selected in the design option and saved that way.
The fact that I find this template confirms that I did copy the file correctly in the given Path?

Can iT be true that there is something overlooked.

Best regards,

Stefaan De Reu










> Op 9 dec. 2017 om 14:26 heeft concrete5 Community <discussions@concretecms.com> het volgende geschreven:
stedereu replied on at Permalink Reply
stedereu
Dear shahroq,

First I wish to Thank you for your support and concern.

I did successfully find the template.
Nevertheless I don’t seem to see a change on my images page.
The view magic tab is selected in the design option and saved that way.
The fact that I find this template confirms that I did copy the file correctly in the given Path?

Can iT be true that there is something overlooked.

Best regards,

Stefaan De Reu
JohntheFish replied on at Permalink Reply
JohntheFish
@sharoq
I had a quick look at the template and I don't think it will work:
- MT handles those click events, so the handler may not get triggered.
- If it was triggered, it would happen on every reveal of the tab, not just the first. Could that be a problem for the gallery?

Furthermore, it ties the solution to MT, where the generic problem will occur in any situation where a block is rendered without size or visibility and shown later.

The below is untested because I am away from my dev system, so all I have done is copy parts of the gallery template into the usual solution. However, it is closer to the usual solution as used in the core maps block and has worked for many similar generic situations with both MT and other tabs, accordions and theme that render areas hidden & then reveal.

$(document).ready(function () {
    var container = $('#<?php echo $gallery->containerID; ?>');
    var start_gallery = function () {
        <?php echo $gallery->js ?>
    };
    var t;
    var startWhenVisible = function () {
        if ($(container).is(':visible')) {
            window.clearInterval(t);
            start_gallery();
            return true;
        }
        return false;
    };
    if (!startWhenVisible()) {
JohntheFish replied on at Permalink Reply 1 Attachment
JohntheFish
The attached is my quick hack of the complete template. Needs to be renamed to remove the .txt extension.
No guarantees it will work, it is completely untested and there could be hidden complexities in $gallery->js that I am unaware of.
shahroq replied on at Permalink Reply
shahroq
@John:
The problem with your code is it only triggers when user clicks on each tab for the very first time. It's fine in most cases, but if visitor resize the window, the gallery needs to re-layout to adapt to new window size, so again we won't see gallery on hidden tabs. That's why i implemented "On Tab Click" event.
shahroq replied on at Permalink Reply
shahroq
@Stefaan,
I updated the attached file, plz copy that again and it should fix it.
stedereu replied on at Permalink Reply
stedereu
Hey Shahroq,

I really appreciate it that you help me out of this.
I thank you and concrete5 for the support.

It seems to work perfect.

Thank you again,

Best regards,

Stefaan De Reu

> Op 10 dec. 2017, om 09:05 heeft concrete5 Community <discussions@concretecms.com> het volgende geschreven:
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

# concrete5 Version
Core Version - 8.2.1
Version Installed - 8.2.1
Database Version - 20170802000000

# concrete5 Packages
Buttons Factory Pro (2.2), C5DK Blog (8.2.1.0), Event Calendar (3.4.1), EZ Event (1.0), Icons for Redactor (0.9), Login Page Background (0.9.1), Magic Tabs (7.1.2), Pixel Theme (2.0.1), Social Share Lite (2.1.3), Stucco (2.1.3), Under Construction (1.0.1), Whale Grid Gallery (2.3.5)

# concrete5 Overrides
elements/conversation/message/author.php, elements/conversation/message, elements/conversation/message.php, elements/conversation, tools/conversations/add_message.php, tools/conversations

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
7.1.10

# PHP Extensions
bcmath, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, exif, fileinfo, filter, gd, gettext, hash, iconv, imap, intl, json, libxml, mbstring, mcrypt, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, readline, Reflection, session, SimpleXML, soap, SPL, sqlite3, standard, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib

# PHP Settings
max_execution_time - 50
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 5000
memory_limit - 536870912
post_max_size - 96M
sql.safe_mode - Off
upload_max_filesize - 96M
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0.1 Safari/604.3.5

Hide Post Content

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

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.