Leaderboard
Popular Content
Showing content with the highest reputation on 10/13/2020 in all areas
-
Agrio is a medium-sized publisher with more than 70 employees and offers a leading cross-media agricultural portfolio. In the more than 30 years that Agrio has existed, we have managed to gain the position of market leader, with the highest reach in the agricultural in the Netherlands. In addition, our customers know where to find us for various printing, web design, copywriting, video productions and graphic design. Agrio does all this with a lot of passion and a proactive attitude. Farmer sobriety predominates. Independence, job satisfaction and growth are important core values within the organization. There is always room for new talent. We currently have room for a PHP Developer in our Media and Design department. https://www.agrio.nl/vacatures/php-developer/4 points
-
Today there are two updates for PrivacyWire (newest Version V0.2.7 ) 1. The update of elements after giving consent now observs more attributes (also srcset for responsive images and width/height attributes - especially good for iFrames) 2. When the user wants to choose the detailled cookies, there is now a option to show another "Accept All" Button instead of the "Toggle" Button - configurable via module config.3 points
-
$markup = array( 'item_content' => "<div class='InputfieldContent {class}'>{out}{error}{description}{notes}</div>", );2 points
-
Thanks Teppo, I do not know why I didn't think of this! Works like a charm!2 points
-
Users are not typical pages, so you should use wire()->users->find() instead. Or, alternatively, you can use wire()->pages->find('template=user, id=..., check_access=0').2 points
-
How to generate breacrumbs? I have this in my template if(page()->parent->id > $home->id) echo ukBreadcrumb(page(), [ 'class' => 'uk-visible@m breadcrumbs']); which is default with the profile. I want to add the current page and it looks like I need to re-build it from scratch to do so. However, the documentation is quite poor regarding breadcrumbs. no clue what is meant by… $processPageList->setupBreadcrumbs(); $processPageEdit->setupBreadcrumbs(); $processPageAdd->setupBreadcrumbs(); … there's no explanation and no examples but it's pretty much all I could find on this topic Thanks for help!1 point
-
1 point
-
It seems to me that the only case when we'd want mb_decode_mimeheader() to run is when the header is encoded, in which case it's always base64 or quoted-printable (AFAIK), and these are always (US-)ASCII. I'm not aware of any notable issues with current approach, though; most likely the "worst case" is that you'd pass something that doesn't need decoding to mb_decode_mimeheader(), and it seems like a major coincidence if this operation actually ends up scrambling the data. Anyway, the gist is that if we're looking for ASCII strings, it's better to be specific ?1 point
-
I can confirm that 0.2.5 works as expected. Thanks @joshua!1 point
-
Thanks @wbmnfktr for noticing this! There really was a bug with the version number and async loading of scripts etc. I fixed this in V0.2.5. After changing the version number in the backend (and refreshing ProCache - especially when you have activated the option to minify local Javascript) PrivacyWire will check the version number first before handling the elements requiring consent.1 point
-
Hi @joshua and fellow cookie munchers. I might have spotted another glitch in the cookie matrix. What I did/tested: I changed the version number in the settings. What happened: nothing until I cleared the ProCache cache (which is fine I guess), then afterwards... the cookie banner showed up again and asked for consent (which was expected) BUT... all external media assets, tracking scripts, etc. were still loading (which was unexpected) giving consent closed the banner (fine) BUT it came right back on the next page Why did it happen: The test user had already given consent and therefore and old entry existed in the local storage which said sure give me cookies and whatever BUT it didn't recognize the new version and therefore didn't revoke the old opt-in/consent on first load with the new version AND wasn't updated after opting in again. TL;DR Changing the version number in the settings does not reset/clear/delete/revoke all previously given and stored local storage settings and won't update after giving consent again to the new version.1 point
-
Same issue here. Found out anything @fliwire? Lol just gotta echo the variable that is passed by reference: $urlStr = '<p>' . $url . '</p>'; $modules->get('TextformatterVideoEmbed')->format($urlStr); echo $urlStr;1 point
-
Sorry, this is not my area of expertise either. Used to deal with that a lot, but thankfully no longer — switching all email sending features to use services like Mailgun has made my life so much better ? Anyway, your solution seems reasonable. Only thing I'm wondering is whether it'd be better to specifically check for ASCII encoding with mb_detect_encoding(), instead of "not UTF-8"? It's a really small nuance, though.1 point
-
@ngrmm https://processwire.com/talk/topic/1536-module-video-embed-for-youtubevimeo-textformattervideoembed/?do=findComment&comment=167329 or https://processwire.com/talk/topic/23528-lite-youtube-embed-module/ or https://processwire.com/talk/topic/11160-textformattervideoembedoptions/ (which has a privacy option which sets it to the nocookie URL). I would go with the 2nd or 3rd option.1 point
-
Hello, ok so what is the problem ? Ill try to explain it short. 1. Install the Module 2. Create a Field called "seo" with the type of "SeoMaestro" (Screen 1) 3. Edit your Template e.G. basic to add Seo field to the template which you heve created (Screen 2) 4. Put the code in your head from the site. (Screen 3) echo $page->seo->render(); So i hope you can understand:). The other settings you can setup in the seo field under the "Details" tab1 point
-
I use this approach for breadcrumbs with built in structured data to help Google etc know what is going on. Could definitely generate separate json to do the same but I kinda like doing it once and not worrying. It's nothing fancy, just building on the default sample function. Mainly adds extra schema stuff and the current page, in an <ol> for semantics and accessibility. Rather than a function, I often just plonk it in my default where I want the breadcrumbs, surrounded by an if to see if I want to display them or not. <nav class="breadcrumbs" aria-labelledby="breadcrumblist"> <h2 id="breadcrumblist" class="visually-hidden">Breadcrumbs</h2> <ol itemscope itemtype="http://schema.org/BreadcrumbList"> <?php // Display breadcrumbs in a Google-friendly aria-compliant microdata format $count = 0; // count link depth foreach($page->parents() as $item) { $count++; // output parent pages, links and schema breadcrumb info echo'<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="' . $item->url . '"><span itemprop="name">' . $item->title . '</span></a> <meta itemprop="position" content="' . $count . '"></li>'; } // output the current page as the last item $count = $count+1; echo'<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <link itemprop="item" href="' . $page->url . '"> <span itemprop="name" aria-current="page">' . $page->title . '</span> <meta itemprop="position" content="' . $count . '"></li>'; ?> </ol> </nav> After that, touch of CSS and you're ready to go. Correct breadcrumb data and order reported with Structured Data Testing Tool and Rich Results Test.1 point
-
For a basic approach: $breadcrumbs = $page->title; foreach($page->parents() as $parent) { $breadcrumbs = "<a href='{$parent->url}'>{$parent->title}</a> / " . $breadcrumbs; }1 point
-
@fruid I'm using this function for /** * Render breadcrumb navigation * */ function renderBreadcrumbs(PageArray $items, Array $options = []) { $page = wire('page'); if (!count($items)) return ''; $index = 1; $defaults = array( 'class' => 'breadcrumbs__list', // class for the <ul> 'a_class' => 'breadcrumbs__link', // class for a item 'a_active_class' => 'breadcrumbs__link--active', // class for a active item 'liclass' => 'breadcrumbs__item', // class for li item 'active' => 'breadcrumbs__item--active', // class for active item ); $options = array_merge($defaults); $out = "<ul class='$options[class]' itemscope itemtype='http://schema.org/BreadcrumbList'>"; foreach ($items as $item) { $class = $item->id == $page->id ? " class='$options[liclass]" . ' ' . "$options[active]'" : " class='$options[liclass]'"; $a_class = $item->id == $page->id ? " class='$options[a_class]" . ' ' . "$options[a_active_class]'" : " class='$options[a_class]'"; $title = $item("bradcrumbs_title|title"); $url = $item->url; $out .= "<li $class itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'><a $a_class href='$url' itemprop='item'><span itemprop='name'>$title</span><meta itemprop='position' content='$index' /></a>"; $out .= "</li>"; $index++; } $out .= "</ul>"; return $out; } Then in template file $breadcrumbs = renderBreadcrumbs(page('parents')->not('template=categories|products')->add(page()));1 point
-
Hi! Been doing some basic Twilio implementation for a client to enable them to automatically send text messages to registered users on page publish. As an upshot, I thought I would strip out the site specific work and stick up on github here: https://github.com/benbyford/TwilioChannels This modules pulls in the Twilio APi and enables you to send SMS messages from your front or backend. Send SMS message Truncate message to single message character limit Auto-select number from range of numbers depending on $To number country of origin–this enables you to send messages with a local number to that user if one added to the config. Templates usage: $twilio = $modules->get("TwilioChannels"); $twilio->sendSMS($toNumber, $message);1 point