Jump to content

TheMick

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by TheMick

  1. On 6/16/2020 at 10:11 PM, Violet said:

    ? My question is, I'm wondering if there is (or could one day be) a function in the ProcessWire API that as a one line command, converts images on a page to a (temporary) page array, each element of which contains one image? ?The idea being that the resultant page array could be used directly for pagination purposes just like any other page array, which is handy for image gallery situations such as this. It seems like it's a common issue people are facing.

    @Violet I wonder if you missed the well explained solution of gingebaker here in this thread:

    Isn't the PaginatedArray class just what you are looking for?

    • Like 1
  2. Not really a solution, but you can instead load jquery-migrate for editors after jquery:

    if ($page->editable()) { echo '<script src="/path-to-js/jquery-migrate-3.3.2.min.js?NoMinify" defer></script>'; }

    This way you have at least the full functionality of the current jquery version for the editors, too.

    The same problem is discussed here.

    • Like 1
  3. Google allows to restrict API keys, but you can only restrict to URLs (useful for showing maps) or IP-addresses (useful for geocoding with PHP). I tested the inputfield using API keys with one of the restrictions each and one with no restrictions. The (expected) result:

    • key restricted only to URL: Map in the inputfield works, geocoding with hitting enter (not clicking outside the field before) works
    • key restricted to IP: Map does not work, but server-side geocoding (with PHP on save) works
    • key with no restrictions (not recommended!): everything works

    So I think, there should be two fields for the configuration in the module: one for a server-side key and one for a frontend key (also used fro the inputfiled map). Or do I get something wrong?

    Something else I noticed: In InputfieldMapMarker.module on line 79 and in MarkupGoogleMap.module on line 161 I think the domain should be googleapis.com instead of google.com

    • Like 1
×
×
  • Create New...