Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


joshua last won the day on December 1 2020

joshua had the most liked content!

About joshua

  • Birthday 01/14/1993

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Göttingen, Germany
  • Interests
    Next to web development? :D
    Mountainbiking and Lindy Hop

Recent Profile Visitors

2,627 profile views

joshua's Achievements

Full Member

Full Member (4/6)



  1. Is your ProcessWire instance installed in the root web directory or somewhere else? The only noticible change I find in your code examle is the directory within the script tag: <script nomodule type='text/javascript' src='.../site/modules/PrivacyWire/js/PrivacyWire_legacy.js'> Usually the src attribute starts directly with '/site/' instead of '.../site/' <style>.privacywire{position:fixed;bottom:-250%;left:0;right:0;box-shadow:0 -1px 3px rgba(0,0,0,.3);opacity:0;background:#fff;z-index:1;padding:1rem;transition:bottom .3s ease-in,opacity .3s ease}.show-banner .privacywire-banner,.show-message .privacywire-message,.show-options .privacywire-options{bottom:0;opacity:1}.privacywire-header{font-weight:700}.privacywire-ask-consent-blueprint,.privacywire button[hidden],[data-ask-consent-rendered="1"]{display:none}</style> <script>var PrivacyWireSettings={"version":1,"dnt":"0","customFunction":"","messageTimeout":1500,"consentByClass":"1","cookieGroups":{"necessary":"Necessary","functional":"Functional","statistics":"Statistics","marketing":"Marketing","external_media":"External Media"}};</script> <script type='module' src='/site/modules/Privacywire/js/PrivacyWire.js'></script> <script nomodule type='text/javascript' src='/site/modules/Privacywire/js/ie_polyfill.js'></script> <script nomodule type='text/javascript' src='/site/modules/Privacywire/js/PrivacyWire_legacy.js'></script>
  2. Hi Jens, sounds like an good workflow and also a nice improvement for the PrivacyWire module config. I'll add it as soon as I find the time. Best, Joshua
  3. Thanks for noticing! I fixed the typo in the git repo, should be updated in the PW module repo soon. Hm, I'm looking into this problem. Which version of PrivacyWire are you using?
  4. In this example the starting quote at the type attribute is missing: <script type="text/plain" data-type="text/javascript" data-category="external_media" class="require-consent">...</script> In your example: Does it work with the quotation mark?
  5. You mean something like the screenshot attached? That's possible with some CSS (this is just an example, how one could do this) .show-banner > .privacywire-page-wrapper, .show-options > .privacywire-page-wrapper, .show-message > .privacywire-page-wrapper { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; } .privacywire { display: none; } .show-banner .privacywire.privacywire-banner, .show-options .privacywire.privacywire-options, .show-message .privacywire.privacywire-message { display: block; position: relative; left: auto; right: auto; bottom: auto; max-width: 450px; }
  6. You can ommit the src attribute also. In my test case it works that way. I use it a lot in combination with vimeo video and used the implementation as in this video Bildschirmaufnahme 2021-04-05 um 14.46.29.mov
  7. In theory yes, but as PrivacyWire is not able to set the cookie without JavaScript in the first place, there is no cookie or localStorage to check. Also caching might be a problem when doing this with php.
  8. Without enabled JavaScript (thus the <noscript> tag), it is not possible to asynchronously load something (as there is no JavaScript to do so – chasing one's own tail).
  9. That's right! Currently I'm doing this with a pretty custom python script, which runs updates directly in the database. But RockMigrations seems to be a better solution - solid as a "rock" 😉 and easy to handle. Thanks!
  10. Hi @bernhard, Nice work! I'm currently working on something very similiar. Focus would be also mainly triggering the install process via CLI to automate the setup process of new projects. Further on I want to add the possibility to add Fields and Repeater Matrix Content Types via CLI.
  11. Right now there is no "clear cookie" function. You could add an custom js function, which gets triggered after saving the consent and insert the function name in the module config option. One easy way to not use google analytics afterwards, would be a simple reload: var reloadAfterConsent = function() { window.location.reload(); }; After the reload, the google script will not be loaded again, but the cookies will remain. To also delete existing cookies, some extra work is needed as PrivacyWire don't know, what cookies got set by which script and you probably don't want to delete all cookies. You could write a function to check for current consent state and delete cookies, if no consent to a specific category is given. Here is a very rough (and not tested in real life) idea, how you could do something like this: function eraseCookie(name) { document.cookie = name+'=; expires=Thu, 01 Jan 1970 00:00:00 UTC;'; } var removeGoogleCookies = function() { if(window.PrivacyWire.userConsent.cookieGroups.statistics !== true) { eraseCookie("_ga"); eraseCookie("_gid"); // or whatever your cookie names are } }; And then add removeGoogleCookies to the "Trigger a custom js function" config option. This script is written with the new logic from the ES6 branch, should also work in earlier versions with different naming though.
  12. @LAPS With this new version, there are even more customizations available. Have a look into the comments in PrivacyWire.module. This example code does the same as the one from my post from last Friday, but with the new syntax of the new version: <html> <head> <!-- your head content --> <?php $privacywire = $modules->get("PrivacyWire"); // load the css files echo $procache->link([ $config->urls->template . "path/to/your/stylesheet.css", $privacywire->getPrivacyWireStyles()->url ]); // load the inline script echo $privacywire->renderPrivacyWireConfigAsInlineJs(); ?> </head> <body> <!-- your body content --> <!-- your body content --> <!-- your body content --> <?php // render the required DOM elements echo $privacywire->bodyContent; // render the JavaScript files echo $procache->script([ $config->urls->template . "path/to/your/scripts.js", $privacywire->getPrivacyWireCore()->url ]); ?> </body> </html>
  13. Hey everyone, I did a lot of refactoring of PrivacyWire this weekend - both for the backend and frontend. The Javascript core of PrivacyWire is nearly completely rewritten in ES6. This results in much better readability and of course extensibility. For examle, as asked by @Torsten Baldes, one can now manually trigger to refresh the element detection of PrivacyWire by simple running the following function afterwards: window.PrivacyWire.refresh(); You'll find a brief overview of the updates here: https://github.com/blaueQuelle/privacywire/blob/es6/CHANGELOG.md#101b-beta Right now this update is in an separate branch at github: https://github.com/blaueQuelle/privacywire/tree/es6 I would be happy if some of you could test this version in your dev environment. If you haven't used any hooks or modifications, it should just run without any changes. I'm looking forward to your feedback! 🙂 Best, Joshua
  14. Hi @Torsten Baldes, right now there is no such functionality available. I'm will try some ways to implement this soon.
  • Create New...