Lovro Hrust
Forum Replies Created
-
Forum: Plugins
In reply to: [nLingual] Bulk editNow I understand what you meant as “bulk editing” – an option to change language while in quick edit. However, this is not bulk editing. It would be an option to select multiple posts/pages and run an action from “bulk actions” combo box drop down.
Forum: Plugins
In reply to: [nLingual] Bulk editHello again,
I still do not see bulk editing. There is a language switching option in a “quick edit” section when I am in “Pages” wordpress screen, but there is no option in “Bulk actions”Forum: Plugins
In reply to: [nLingual] PHP functions for language switchingI found the solution, but it was more troublesome than expected. I have only two languages on my page, so example is simplified in regards to general solution.
If you would accept my contribution, I will write and expose functions for developers to do exactly that simpler – return url of the page when language is given and return language of current pageHere is my code:
<?php function nLanguage_menuswitch_output() { // 1- english, 2-croatian $language_to_switch_to_id = (nLingual\Registry::current_language()->id == 1) ? 2 : 1; // get language object $language_to_switch_to = nLingual\Registry::get_language($language_to_switch_to_id); // get target url $target_url = nLingual\Rewriter::localize_here($language_to_switch_to); // output language menu if ($language_to_switch_to_id == 1) : ?> HRVATSKI / <a href="<?= $target_url ?>" aria-label="Change language to english">ENGLESKI</a> <?php else : ?> <a href="<?= $target_url ?>" aria-label="Promijeni jezik u hrvatski">HRVATSKI</a> / ENGLESKI <?php endif; }
Forum: Plugins
In reply to: [nLingual] PHP functions for language switchingI think I found it:
get_translate_post_linkNo, I was wrong, this is for new page in admin part
- This reply was modified 4 years, 4 months ago by Lovro Hrust.
Forum: Plugins
In reply to: [Bogo] Unexpected behaviourIt is still on my local development server. I keep it protected with password and IP restrictions. If you are serious about taking a look, I will put it on a public server. As I am currently very busy, I will do it over the weekend. Thanks for cooperation.
Forum: Plugins
In reply to: [Getwid - Gutenberg Blocks] Source code?I am sorry, but that is not the case. The javascript code is minified and that code is certainly not development code for Gutenberg blocks.
- This reply was modified 4 years, 4 months ago by Lovro Hrust.
Forum: Plugins
In reply to: [Out of the Block: OpenStreetMap] Maps not showing properlyEdit:
it seems it is due to map not showing by default, hidden inside<details>
tag until open. It is a leaflet issue, not of your plugin. I believe remedy on my side would be to triggermap._onResize()
when accordion element is opened.Forum: Plugins
In reply to: [Lightbox with PhotoSwipe] Opening photoswipe via javascript APII switched currently to invoking element.click() and it works fine. It feels somewhat of a hack, but it works and now I am fine with that.
So, please do not hurry with changes in code – consider these proposed changes just as a suggestion for future improvements.
All the best and thanks!
Forum: Plugins
In reply to: [WP Visual Sitemap] No help?Thanks, information about using plugin is usually in details section, while installation is usually just “upload plugin or install thorugh wordpress…”. I did not read those.
Forum: Reviews
In reply to: [Lightbox with PhotoSwipe] Very helpfulThanks for answering review!
I understand the reasoning and I like it very much without jQuery, as I try to have my sites jQuery-less for faster loading!Forum: Plugins
In reply to: [Lightbox with PhotoSwipe] output bufferI understand. The solution you propose is feasible.
Forum: Plugins
In reply to: [Lightbox with PhotoSwipe] output bufferI understand your points – however this is one very specific need, to mitigate issue with lot of pages where images are entered, but not linked to media element. These images should however by changes in design specs be shown as lightbox.
Another problem: witout a link there is nothing to show in the lightbox except the image itself. But just showing the image itself which is already visible in the page makes no sense. Usually you have thumbnails or smaller previews on the page/post and a link to the larger image which is shown in the lightbox when clicked.
The image source can be reconstructed from smaller versions, as they have addition of -aaaxbbb in the name.
A filter within my plugin would not help as it only works on links () and not images. In fact the data-attributes get added to the links if their target is an image. It does not matter if there is an image at all. Even links without visible images will be used as long as the link target is an image (something which ends with a known image extension, like “.jpg”, “.png” etc.).
A filter in that place in plugin with regex string would enable me to change regex expression in that place, without having to make my special modified version which would not be updatable. However, I understand that is not a top priority.
Forum: Plugins
In reply to: [Lightbox with PhotoSwipe] output bufferThanks for the answer, now I understand.
I was looking for a way to modify the plugin so non-linked images would be shown as lightbox as well.As I understand, the problem here is that all images in
tag on the page would be lightboxed, even those which are used as arrows, etc.
Let’s say I can cope with that.
What I would need to do is replace regular expressions which add data- attributes (a filter would be nice here in the plugin, so I do not break updates !) and add the same attributes to
<img>
tags
and also edit frontend js file to select all img tags instead of anchor tags.
Am I correct?- This reply was modified 4 years, 6 months ago by Lovro Hrust.
- This reply was modified 4 years, 6 months ago by Lovro Hrust.
Forum: Localhost Installs
In reply to: Very Slow Localhost config (Too slow too work)Update to my previous post: I was able to resolve slow server response time in Wampserver by updating all components (Apache from 2.4.43 to 2.4.46, mysql from 5.27 to 8.0.21, but it seems that updating PHP from 7.4.6 to 7.4.9 did the trick). I suspect that change of configuration perhaps new version of xdebug did speed the things up.
Previously I had 1500ms response time, which went down to ~50ms without xdebug. I also noticed that loading xdebug extension somewhat increases response time to 130 ms.Forum: Localhost Installs
In reply to: Very Slow Localhost config (Too slow too work)I am using both Wampserver and WAMP.NET. On Wampserver, I did not notice slow mysql performance, while on WAMP.NET it is noticeable, but changing localhost to 127.0.0.1 solves the problem. I recommend trying WAMP.NET (on Windows) for simplicity of use, it is a real gem.