Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/16/2020 in all areas

  1. Sweet, thanks, works perfectly! I knew there had to be a non-destructive preset in there. You just saved me having to pour through the module classes ?
    1 point
  2. I don't think you can prevent the output of those fields - but there is a trick you can pull to prevent them being editable (as well as hiding them using a CSS rule on the wrap classes.) If you override the preset values - but to the same strings as the preset would use anyway - then the form renders them with the disabled attribute. Like this.. <?php echo $page->comments->renderForm([ 'presets' => [ 'cite' => $user->name, 'email' => $user->email, ], ]); I haven't verified, but I believe that the comments fieldtype will replace any tampered fields in the posted form with the original preset, so this might work for you.
    1 point
  3. They'll be copied to the page's assets/files/xxxx folder. It will be up to you to manually remove them from your temp folder.
    1 point
  4. thanks @horst for js-beginners like me here is my solution: function eraseCookie(name) { document.cookie = name+'=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; Domain=.your-domain.tld;'; } var privacyWireCookies = JSON.parse(window.localStorage.getItem('privacywire')); if (privacyWireCookies !== null) { if(privacyWireCookies.statistics == false) { eraseCookie("cookiename"); } } Be aware that you have set the domain to be able to remove the cookies for google-analytics!
    1 point
  5. As far as I know, you only can store strings in localStorage. So, without having a look into the code, I know it is common usage to stringify objects before writing them into localStorage, and to JSON.parse() them after retrieving from it. Just try something like this: var obj = JSON.parse(window.localStorage.getItem('privacyWire'));
    1 point
  6. I can't really give you a solution, but to understand and investigate, the following is happening: The data you are sending is not UTF-8 encoded. You should verify in first instance that the "parsed" data (the video link in body ?) is UTF-8. Just a hint.
    1 point
  7. 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.
    1 point
  8. Hi Ryan, When I read about the combo field, it almost seems like a jury-rigged version of a standard MySQL data table with column definitions. When I first came to ProcessWire, I had to get used to its splitting of the fields into separate tables. I'm not an expert DBA kind of person on advanced MySQL queries and indexing and things like complex join SQL statements, but how would you compare the traditional SQL approach of complex queries to both the standard ProcessWire method and the new Combo fields? My question might be too broad; not sure. Peter
    1 point
  9. Here is a script I made for the import of thousands of customers. You have to save this as shell script (f. e. sync-customers.php.sh), make the script executable and execute it via command line (./sync-customers.php.sh).
    1 point
×
×
  • Create New...