steveush
Forum Replies Created
-
Hi @irina1975,
This is directly related to the previous issue you logged here https://wordpress.org/support/topic/your-plugin-is-not-working-properly/. You have the CSS provided earlier in the thread by @influxfooplugins still in your page. Please remove that CSS and only use the CSS I gave you in that thread. The problem will be resolved.
Thanks
Hi @irina1975,
Apologies I didn’t say where to put it as this is also just CSS as the previous replies were. You should be able to place it in the same place you did previously when you were trying the previous answers.
Thanks
Hi @irina1975,
I took a look at your example page and wanted to address as many of your concerns as possible. This may be a bit lengthy but hopefully answers everything.
(A) Portfolio Issues
1. Huge Left & Right Indents. Left and right indents are because the items are center aligned and no more items can be fit into the current row.
2. Not done in two rows. The template makes as many rows as neccessary to display all items.
3. Making squares smaller doesn’t help. Portfolio template specifically tries to maintain the original thumbnail size set in the admin.Solution: Custom CSS
/* This media query only allows these styles to be applied on a screen with a width smaller than or equal to 480px */ @media only screen and (max-width: 480px){ .foogallery.fg-simple_portfolio .fg-item { /* Change the gutter size */ margin: 10px !important; /* Change the width so two columns are displayed. The 20px value is the gutter multiplied by 2 as it is displayed on the left and right of the item. */ width: calc(50% - 20px) !important; min-width: calc(50% - 20px) !important; max-width: calc(50% - 20px) !important; } }In the above CSS you may want to adjust the 480px width to whatever you may deem to be a mobile appropriate size. The two column layout will only be applied when the screen is smaller than or equal to this value.
(B) Masonry Issues
1. The bottom is not even. This is simply how Masonry works. It is designed to be displayed with multiple rows of items with the next row interlocking into the bottom of the previous “filling” the gaps.
Solution: None – This is simply how it works.
(C) Tablet Landscape Image
The gallery itself is set to use 100% width of whatever element it is placed into. In the screenshot you provided yes, the template is responsible for a little bit of the left and right indent but the majority of it is your content wrapper limiting the available width.
Solution: Custom CSS – You would need to adjust your themes content wrapper to allow the gallery to use more of the page width.
(D) Mobile Portrait Image
See the first response regarding the Portfolio template and it’s solution. That solution should also resolve the issue displayed here.
Forum: Plugins
In reply to: [Lightbox & Modal Popup WordPress Plugin - FooBox] No pinch&zoom on iPhone?Hi @lionsmane,
Could you give me some additional details please. Basically just which iPhone and iOS version are you seeing the issue on? I’ve tested using my personal devices and can pinch and zoom however my devices are not able to install the latest iOS (older model iPhone and iPad) so I just wanted to know what you are using so I can test through an emulator.
Thanks
SteveHi @zectorinc,
The issue is being caused by a script in your themes https://zectorinc.com/wp-content/themes/startit/assets/js/modules.min.js?ver=5.4.2 file. The specific script is the below:
function x() { qodef.body.hasClass("qodef-smooth-page-transitions") && (a(window).bind("pageshow", function(b) { b.originalEvent.persisted && a(".qodef-wrapper-inner").fadeIn(0) }), a("a").click(function(b) { var c = a(this); 1 == b.which && void 0 === c.data("rel") && void 0 === c.attr("rel") && c.attr("href").indexOf(window.location.host) >= 0 && (void 0 === c.attr("target") || "_self" === c.attr("target")) && c.attr("href").split("#")[0] !== window.location.href.split("#")[0] && (b.preventDefault(), a(".qodef-wrapper-inner").fadeOut(1e3, function() { window.location = c.attr("href") })) })) }Looking through the code is a little hard as it is minified at the moment but going by the class names this seems to be something to do with your theme attempting to perform smooth page transitions when the gallery thumbnails are clicked. Essentially your theme is binding to the click event of any
alinks in your page that have a url pointing to your domain. When any of these links are clicked a fade out transition occurs and then the url is changed.This is not something we can fix from our side, you will need to either disable the smooth page transitions option in your theme or contact the theme developer regarding this issue.
Thanks
It is still showing the stylesheets as being delivered as HTTP. Could you please try going to the FooGallery > Settings > General tab and then clicking both the Clear Gallery HTML Cache and the Clear CSS Optimization Cache buttons. Also just to make 100% sure all caching is cleared, if you use a plugin like Autoptimize please clear its cache as well.
Let me know if that resolves it.
Thanks
SteveHi,
The issue here is one with HTTP and HTTPS on your site. If you check the developer console there are a few errors relating to this problem but in short your site is being loaded with mixed content. What this means is the page itself is saying it is HTTPS secure while some of the assets being loaded into the page are being supplied as HTTP unsecure. Most modern browsers will block all unsecure content from loading at all, in this case the foogallery CSS stylesheets as well as some images are all being delivered as HTTP and are therefore not being loaded by the browser. This results in the alignment issue as there is no CSS in the page at all to style the galleries.
Once this mixed content issue is resolved the gallery issues should also disappear. One thing you can try as a temporary work-around is to enable the FooGallery > Settings > Advanced > Force HTTPS option.
Thanks
Hi @shivgohil,
The issue here is that the column layout uses percent sizes as it needs to fill the space. By default the normal gutter is 1% of the total width, which is why it is looking a bit large on a full width page.
To trim it down a bit I would recommend sticking with percent values instead of fixed pixels by simply decreasing the defaults for the 4 column layout to something like the below:
.fg-masonry.fg-masonry-4col .fg-item, .fg-masonry.fg-masonry-4col .fg-column-width { width: 24.85%; } .fg-masonry.fg-masonry-4col .fg-gutter-width { width: 0.2%; } .fg-masonry.fg-masonry-4col .fg-item { margin-bottom: 0.2%; }This should give a much thinner gutter while still maintaining the total as 100% of the available width. 24.85% * 4 columns = 99.4% and then 0.2% * 3 gutters = 0.6% to make up the remainder. Of course you can fiddle with these values but ideally they should always add up to 100%.
To explain the above, the
width: 24.85%property is the width of each column/item. Thewidth: 0.2%property is the width of the gutters and themargin-bottom: 0.2%is the height of the gutters.The above CSS is generic and should work for any Masonry gallery with a 4 column layout so it could theoretically be added to your sites styles.css file. This means all Masonry 4 column galleries on your site will use this new CSS. If you would rather apply it to just a single gallery then you can make use of the Custom CSS option and specify the gallery ID as you previously did. As an example, using the ID of
foogallery-gallery-9404from the https://www.shiv.photo/weddings-asian-wedding-gallery/ the above CSS would change to be the following:#foogallery-gallery-9404.fg-masonry-4col .fg-item, #foogallery-gallery-9404.fg-masonry-4col .fg-column-width { width: 24.85%; } #foogallery-gallery-9404.fg-masonry-4col .fg-gutter-width { width: 0.2%; } #foogallery-gallery-9404.fg-masonry-4col .fg-item { margin-bottom: 0.2%; }Thanks
SteveHi,
While I agree with Brad’s suggestions and do have some improvements in mind for fututre releases, something seems a little off on your server.
When using something like Chrome’s developer tools and inspecting the network activity on page load the majority of delay is server side. This delay is what I believe is responsible for the load times, combined with having to wait for the various 500 and 404 errors being thrown to complete. As for what could be causing this, I couldn’t say for certain but it could be a caching plugin issue? If your site is hosted I would ask support to please take a look and see what is going on.
To help explain it a bit clearer, please take a look at this Imgur link where I have captured some screenshots and provided descriptions.
I believe once the server side issues are resolved the page load speeds will increase.
Thanks
SteveHi @davidmendesgd & @phillcoxon,
Although this seems to be a front end issue it actually stems from the PHP code. However while I do not do very much PHP development if I remember right this has been caused by a couple things in the past:
1. Themes/plugins override the default output of the esc_attr method by hooking into the attribute_escape filter and then they do not handle the JSON encoding correctly of the
data-foogalleryattribute.
2. Caching/minifying plugins that store and alter the page output not correctly handling the JSON encoding of thedata-foogalleryattribute during minification of the page HTML.I’ll tag in @bradvin though as he is our PHP developer and should be able to help you out with this issue better than I can.
Thanks
SteveHi @liskynd,
It’s no problem and I hope the theme developer fixes the issue. If they read my reply they should hopefully know exactly what I am talking about and be able to solve the problem.
Thanks
SteveHi @liskynd,
This is simply the theme developers not checking out the cause of the error. It’s fine though as I will gladly explain it so you can get them to fix their issue.
Firstly FooGallery outputs the HTML for its’ items and the JavaScript expects that HTML to be in a certain format. In this case most notably for parsing of the items so we can work with them on the front end. To parse an item the JavaScript loops through the HTML output by the server and queries it for the various elements it needs. It does this using CSS selectors to find those elements. If all the required elements are not found then it reports the error you’re seeing in the console letting us know that it can not parse the current item and as such does not know how to handle it.
Now onto the issue.
The primary cause of the problem here is that the
<a/>element within a FooGallery item no longer has the CSS class offg-thumb. The thumbnail is required and so parsing fails as it can’t find the<a class="fg-thumb"/>element.If you view-source of your page and check the
<a/>elements within the gallery markup they all now only have a single CSS class,grouped_elements. As this is in the page source received from the server this means that somewhere in the PHP someone is hooking into the rendering pipeline and simply replacing all CSS classes on anchors instead of adding there own CSS classes to them. Quite simply the result should be<a class="fg-thumb grouped_elements"/>instead of the current<a class="grouped_elements"/>.Now you may ask how do I know it’s the theme doing this and not some other plugin? Well quite simply I went through all the JavaScript being loaded by the front end to find out which scripts are specifically looking for elements with a CSS class of
grouped_elementsand as you suspected, it was the themes tc-scripts.min.js found at the following URL:http://www.2xtemp.jirina.fi/wp-content/themes/customizr/inc/assets/js/tc-scripts.min.js?ver=4.1.55
If you view this in Chromes developer console you can format the minified file into a more readable state and find the specific reference on line 4406.
So this comes down to a bug in the implementation of FancyBox done by the theme developers. They need to update their PHP code so that it appends additional CSS classes to the anchors instead of replacing everything.
Now we could work around the parsing issue but you would simply encounter additional problems as many of the galleries features are implemented though CSS and specifically the
fg-thumbCSS class. Removal of this CSS class by the theme is breaking the gallery.Thanks
SteveHi @phillcoxon,
This issue has been fixed on our internal development build which is why you are probably not seeing the issue however it has not been pushed live yet.
@andypressdee you can either wait for the next release to resolve the issue or include the following CSS in your sites styles.css file.
.foogallery.fg-simple_portfolio .fg-thumb { min-width: auto; min-height: auto; }Thanks
SteveHi @mikemp,
The issue here is that there seems to be another plugin adding extra HTML markup into the gallery. There are extraneous
<p>elements in the gallery markup on your page that do not appear to come from our plugin. One wraps the label containing the image count while another is being inserted just after the Next button and yet another is added into the root container. The below shows the simplified HTML markup containing these<p>elements.<div class="foogallery"> <div class="fiv-inner"> <!-- ...items --> </div> <div class="fiv-ctrls"> <div class="fiv-prev"><span>Prev</span></div> <p> <label class="fiv-count"><span class="fiv-count-current">1</span>of <span class="fiv-count-total">28</span></label> </p> <div class="fiv-next"><span>Next</span></div> </p> </div> </p> </div>The above should actually look like the below:
<div class="foogallery"> <div class="fiv-inner"> <!-- ...items --> </div> <div class="fiv-ctrls"> <div class="fiv-prev"><span>Prev</span></div> <label class="fiv-count"><span class="fiv-count-current">1</span>of <span class="fiv-count-total">28</span></label> <div class="fiv-next"><span>Next</span></div> </div> </div>So I would try and find the plugin that is adding in this extra markup and disable it or exclude the galleries from being included in whatever it is trying to do.
That said if you can’t find what is adding in this extra markup you can style away the problems being caused using the following CSS inserted into your styles.css file.
.foogallery.fg-image-viewer .fiv-inner > p { display: none; } .foogallery.fg-image-viewer .fiv-inner .fiv-ctrls { position: relative; } .foogallery.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next, .foogallery.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev { position: absolute; float: none; width: 80px; top: 0; } .foogallery.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev { left: 0; } .foogallery.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev { right: 0; }Thanks
SteveHi all,
Internally the JavaScript for the justified template has an option called
justifyThreshold. What this option does at the moment is override thelastRowvalue and forces it to be justified if the total width of all images in that last row exceeds 50% of the maximum width of the gallery. This is what is leading to the issues you are currently experiencing.Unfortunately in the free version there is no easy way to adjust this option. I’ll look at upping the default value to something closer to 75-80% or more than likely simply remove the option entirely as it has definitely caused some confusion.
If you have a method of enqueueing custom JavaScript in your page this behavior can be disabled using the following script:
(function(fg){ if (!fg || !fg.Justified) return; fg.Justified.defaults.justifyThreshold = 1; })(FooGallery);This should effectively make the
lastRowoption behave as expected.Thanks
Steve