ngrmm
Members-
Posts
441 -
Joined
-
Last visited
-
Days Won
3
Everything posted by ngrmm
-
wow! processWire is just amazing, thank you
-
i need to search inside an table which is inside a repater which is inside a repeater matrix fiels so this is the structure: (matrix_repeater) -> (matrix_repeater_item) -> (repeater) -> (table) -> (table column [page reference field]) -> title or text_field $matches = $pages->find("matrix_repeater.matrix_repeater_item.repeater.table.table_page_reference.title%=$q"); is that even possible?
-
Is there a way to search in a multilingual-site only through default language values? My selector for my other languages work like this: $selectorEn = "seo_description.data1032~=$q, limit=50, template!='pw_child'"; $selectorFr = "seo_description.data1031~=$q, limit=50, template!='pw_child'"; 1032 is english and 1031 ist french and my default language ID is 1021. However this does not work $selectorDe = "seo_description.data1021~=$q, limit=50, template!='pw_child'"; and this selector searches all languages $selectorDe = "seo_description~=$q, limit=50, template!='pw_child'"; What i want is to search and get the results in different languages and show those results in the different languages.
-
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
? ok, is it possible to do this via php? $_COOKIE["cookieName"]; -
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
@joshua is there any solution for this? -
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
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! -
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
great! thanks again @joshua But i wasn't able to find any info in the window object path you suggested. I found it here: window.localStorage.privacywire But this console.log(window.localStorage.privacywire) outputs a string, so i'm not able to check with if(window.localStorage.privacywire.statistics !== true) { // remove cookies } Am i missing something? -
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
@joshua is there something like a „clear cookie“ function? Let's say user clicks on „allow all“ and some google-cookies (statistics) are set. Now users changes his mind and will go to the cookie-options and unset the statistics-cookie checkbox and saves his options. Right now the statistics-cookies remain. -
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
Thank you all! I had the formatters not in the right order! So for all noobs like me: Textarea Text Formatters: 1. Video embed for YouTube/Vimeo 2. PrivacyWire Textformatter and i guess after updating to 0.4.3 then: 1. Video embed for YouTube/Vimeo 2. Apply options for embedded YouTube and Vimeo videos 3. PrivacyWire Textformatter -
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
Ok. Then i'm doing something wrong. I installed PrivacyWire and TextformatterVideoEmbed and added them both to my textarea-field as textformatters. After that i choosed ExternalMedia to as you suggest above. Now when i add a YouTube-Link inside my textarea and external-media-cookies are off, i still can see the Iframe. I also installed TextformatterVideoEmbedOptions and activated YouTube: Enable privacy-enhanced mode. All Modules are updated to newest version. -
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
@teppo & @joshua does this mean, that iframes generated via TextformatterVideoEmbed will use PrivvacyWite data-attributes and are hidden untill given consent? -
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
haha i see, you have already thought of that <button class='privacywire-consent-button' data-consent-category='external_media'>allow cookies</button> -
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
@joshua thx again. Works great for iframes. Is there also a solution to have it for external content which loads through scripts and divs. For example GoogleMaps. Right now i can do this: // this puts content into #myMap <script type="text/plain" data-type="text/javascript" data-category="external_media" data-src="gmaps.js"></script> <div id='myMap'></div> But unlike the your-iframe solution i cant have a ask-consent-button. It would be nice to have links like this integrated: <a href="#" class="privacywire-allow-category" data-category="external_media" data-ask-consent="0">Allow Cookies for external media</a> -
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
Hi @joshua i tried to have an iframe only be shown if consent is given. This is my code: <div data-category='external_media' data-ask-consent='0'> <div class='video_content' >"; <iframe src='https://www.youtube-nocookie.com/embed/XXXXXXXXXX?enablejsapi=1' width='640' height='390' frameborder='0'></iframe> </div> </div> If consent for external_media is not given, the module asks you to give consent. „To load this element, it is required to consent to the following cookie category: External Media.“ But if consent is given, it does not show the div.video_content or the iframe. I tested to have some plaintext instead of the iframe and it works. So this works: <div data-category='external_media' data-ask-consent='0'> <div class='video_content' > <p>hello world!</p> </div> </div> And it looks like as if 0 or 1 for data-ask-consent does not make any difference. UPDATE: my fault, this works! <div class='video_content' >"; <iframe src='' data-src='https://www.youtube-nocookie.com/embed/XXXXXXXXXX?enablejsapi=1' data-category='external_media' data-ask-consent='0' width='640' height='390' frameborder='0'></iframe> </div> -
here are some solutions:
-
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
@joshua what do you think about the idea to have a style.css file instead of the styling inside your js? -
module PrivacyWire - Cookie Management & async external asset loading
ngrmm replied to joshua's topic in Modules/Plugins
@joshua thanks for the module. would you consider changing the header tag into a div? <header class="privacywire-header">…</header> Some might using page header in their css-files without a class. It might get into style conflicts. What do you think? -
you're right. I'll use the localStorage and hide/minify the modal with js/css if modal is dismissed.
-
i found a solution here: https://processwire.com/blog/posts/pw-3.0.141/ as ryan writes, you can use this script to set a cookie in javascript: https://github.com/processwire/processwire/blob/master/wire/modules/Jquery/JqueryCore/jquery.cookie.js
-
My clients wants a modal to show up on every page. But when a user clicks inside the modal -> a session-cookie is set and the modal gets a class. // user clicks on modal button $('.modal_button').click(function(){ // 1. set PW session cookie // 2. toggle class $('.modal').toggleClass('off'); }); I know how to set a cookie on page-load via PW-API. But the click on the modal button does not force a page-load. So i have to set the cookie through javascript. Is there a way to do that?
-
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
ngrmm replied to ryan's topic in Modules/Plugins
What do i need to change in the Module-file to change the outout from <iframe … src="https://www.youtube.com/embed/XXXXXXXX"></iframe> to <iframe … src="https://www.youtube-nocookie.com/embed/XXXXXXXX"></iframe> I need to do this because data protection GDPR -
Inputfield: Repeater Matrix Item Duplicator
ngrmm replied to David Karich's topic in Modules/Plugins
i send you a pm- 33 replies
-
- 1
-
search for array chunk. you could divide all your blog-posts into segments with five posts. and add a work sample add the end of the segment
-
@Robin S thanks for the Module. I installed the module and added it to my template. But it looks like PagePathHistory is overwriting the new custom path. my old path: /test/folder/page/ new custom path /test/page/ When i enter domain.com/test/page/, the site redirects me to the old path. Did i forgot something?