Debug Academy: How to create a partial date field in Drupal (i.e. Year & Month without Day)

How to create a partial date field in Drupal (i.e. Year & Month without Day)

One of Drupal’s main strengths is its data modeling.

But sometimes choosing the appropriate field type comes with a form widget that isn’t what we’re looking for. For example, using a Date field results in the form displaying a date “widget” (form input) which includes a full date consisting of a day, month, and year, and optionally a time.

How to remove the time from a date field in Drupal

Because removing the time from date fields is such a common request, Drupal allows its removal without writing any custom code.

How to hide the time Drupal’s frontend

Fortunately, the date field has a highly configurable display on the frontend. By visiting the “Manage Display” page (or configuring the field’s block, if using layout builder), you will have the option of selecting (or creating) a date format.

Follow these steps to change the date’s output for your frontend:

ashrafabed
Fri, 04/26/2024

Passphrase timeout for disk decryption at boot added (potential battery lifesaver)

Have you had your laptop accidentally un-hibernate while you weren’t looking, leaving you with a totally drained battery?

Now OpenBSD-current has a fix for that, thanks to this commit by Klemens Nanni (kn@). The commit message reads,

List:       openbsd-cvs
Subject:    CVS: cvs.openbsd.org: src
From:       Klemens Nanni <kn () cvs ! openbsd ! org>
Date:       2024-04-25 18:31:49

CVSROOT:	/cvs
Module name:	src
Changes by:	kn@cvs.openbsd.org	2024/04/25 12:31:49

Modified files:
	sys/lib/libsa  : softraid.c 
	sys/arch/amd64/stand/boot: boot.8 
	sys/arch/amd64/stand/efiboot: Makefile.common cmd_i386.c conf.c 
	                              efiboot.c efiboot.h 

Log message:
Add boot.conf(8) 'mach idle [secs]' to halt at idle passphrase prompts

Read more…

gnulib @ Savannah: GNU gnulib: gnulib-tool has become much faster

If you are developer on a package that uses GNU gnulib as part of its build system:

gnulib-tool has been known for being slow for many years. We have listened to your complaints. We have rewritten gnulib-tool in another programming language (Python). It is between 8 times and 100 times faster than the previous implementation.

Both implementations behave identically, that is, produce the same generated files and the same output. Nothing changes in your way to use Gnulib; it’s only faster.

In order to reap the new speed:

1. Make sure you have Python (version 3.7 or newer) installed on your machine.

2. Update your gnulib checkout. (For some packages, it comes as a git submodule named ‘gnulib’.) Like this:

  $ git checkout master
  $ git pull

  Set the environment variable GNULIB_SRCDIR, pointing to this checkout.

  If the package is using a git submodule named ‘gnulib’, it is also advisable to do

  $ git commit -m ‘build: Update gnulib submodule to latest.’ gnulib

  (as a preparation for step 4, because the –no-git option does not work as expected in all variants of ‘bootstrap’).

3. Clean the built files of your package:

  $ make -k distclean


4. Regenerate the fetched and generated files of your package. Depending on the package, this may be a command such as

  $ ./bootstrap –no-git –gnulib-srcdir=$GNULIB_SRCDIR

  or

  $ export GNULIB_SRCDIR; ./autopull.sh; ./autogen.sh

  or, if no such script is available:

  $ $GNULIB_SRCDIR/gnulib-tool –update


5. Continue with

  $ ./configure
  $ make

  as usual.

Enjoy! The rewritten gnulib-tool was implemented by Dmitry Selyutin, Collin Funk, and me.

Safety in typing, no cloud needed

TWIF generated on Thursday, 25 Apr 2024, Week 17

Community News

@linsui is forced to tap the sign:

We are sad to read articles like the latest one from The Citizen Lab, “The not-so-silent type: Vulnerabilities across keyboard apps reveal keystrokes to network eavesdroppers”, and rather baffled to see that “cloud-based keyboards” are even a thing. While the F-Droid repo does not hold millions of apps we are users ourselves and we include and maintain apps that, while being FOSS, are also user-centric, from like-minded developers.

A keyboard is the way we talk with our computing devices, telling them our fears, hopes and greatest secrets, it can basically read our minds, hence having all that sent to some server, and allowed to be spied upon in transit or at destination, is a great betrayal of our trust.

While Latin based keyboards abound, like the latest HeliBoard which was updated to 1.3, we have something for IME users too, Trime and Fcitx5 (and its plugins) can cover everyone’s needs to type in their own locale. And, if being FOSS is not enough, these don’t even have the permission to connect to the Internet, nor a need for that. Eg. Trime can even sync user data without Internet, via self hosted apps like Syncthing.

Breezy Weather was updated to 5.2.1_freenet, bringing Fused location support for all flavors, available natively since Android 12.

The YouApps Suite already had six apps in F-Droid, and this week CalcYou, Privacy Focused Calculator app built with MD3, joins too.

Many Gitlab users were waiting for a LabCoat update, and while the newly 2.7.9 is from an year old codebase, it took three and a half years to drop (wow!). The new icon might be fancy, but the date bug fix (posts from one second ago were dated 19 hours in the past) is sweet.

maid, Interact with artificial intelligence models (llama.cpp models locally, and with Ollama, Mistral, Google Gemini and OpenAI models remotely), was just added. Now you can run LLMs on your smartphone with a nice UI (no more messing with Termux and command lines!). But if you don’t have a powerful device, the LLM is very slow: it may take tens of seconds to spell out one word. Maid also supports remote models so you can still enjoy its results no matter the device used.

@Licaon_kter doesn’t split the atom, but gives us protons:

After being mentioned in the news two weeks ago, Proton Pass: Password Manager, created by the scientists who met at CERN behind Proton Mail, is finally live for everyone to enjoy. The Proton team has a blog post about it too, that you can read here. The app description is missing, and upstream is aware.

Standard Notes was update to 3.193.9, but did you know that its developers were acquired by Proton? You can read more on their blog.

And since we are deep in Proton news, SimpleLogin – Anti-spam, also acquired back in 2022, will be moving its legal domicile to Switzerland.

Newly Added Apps

13 more apps were newly added
  • Accelerrace – Simple HTML5 racing game made just for fun
  • Aria for Misskey – Dive into the interplanetary microblogging platform
  • Asteroid’s Revenge – Endless survival bulletHell (highscore based)
  • Flexify – Track gym progress, visualize graphs, enjoy offline support & timers
  • Fossify Notes – To do list widget with a notebook organizer, checklist, simple shopping list
  • GPS Locker – Keep the GPS locked at all times
  • Mat-O-Id – Pay beverages with RFID-Tag
  • Metadata Remover – Protect your privacy by removing metadata from your photos!
  • OpenDefault – Help opening URLs with your default App
  • Shiori – Client for Shiori, the bookmarks manager
  • SpamBlocker (Call & SMS) – Silences unwanted calls/SMS messages without replacing your default apps
  • Stream Player – A simple HTTP stream player
  • eQuran – An enriching way to connect with the Holy Quran

Updated Apps

153 more apps were updated

Thank you for reading this week’s TWIF 🙂

Please subscribe to the RSS feed in your favourite RSS application to be updated of new TWIFs when they come up.

You are welcome to join the TWIF forum thread. If you have any news from the community, post it there, maybe it will be featured next week 😉

Corporate greed from Apple and Google have destroyed the passkey future

William Brown, developer of webauthn-rs, has written a scathing blog post detailing how corporate interests – namely, Apple and Google – have completely and utterly destroyed the concept of passkeys. The basic gist is that Apple and Google were more interested in control and locking in users than in providing a user-friendly passwordless future, and in doing so have made passkeys effectively a worse user experience than just using passwords in a password manager. Since then Passkeys are now seen as a way to capture users and audiences into a platform. What better way to encourage long term entrapment of users then by locking all their credentials into your platform, and even better, credentials that can’t be extracted or exported in any capacity. Both Chrome and Safari will try to force you into using either hybrid (caBLE) where you scan a QR code with your phone to authenticate – you have to click through menus to use a security key. caBLE is not even a good experience, taking more than 60 seconds work in most cases. The UI is beyond obnoxious at this point. Sometimes I think the password game has a better ux. The more egregious offender is Android, which won’t even activate your security key if the website sends the set of options that are needed for Passkeys. This means the IDP gets to choose what device you enroll without your input. And of course, all the developer examples only show you the options to activate “Google Passkeys stored in Google Password Manager”. After all, why would you want to use anything else? ↫ William Brown The whole post is a sobering read of how a dream of passwordless, and even usernameless, authentication was right within our grasp, usable by everyone, until Apple and Google got involved and enshittified the standards and tools to promote lock-in and their own interests above the user experience. If even someone as knowledgeable about this subject as Brown, who writes actual software to make these things work, is advising against using passkeys, you know something’s gone horribly wrong. I also looked into possibly using passkeys, including using things like a Yubikey, but the process seems so complex and unpleasant that I, too, concluded just sticking to Bitwarden and my favourite open source TFA application was a far superior user experience.

Domaćice sa Bosfora – 53 Epizoda

Video by via Dailymotion Source Glumac/GlumicaSerhat TutumluerCeyda DüvenciÖzge ÖzderHale AkınlıBennu YıldırımlarBatuhan KaracakayaSongül ÖdenMelda AratCenk Ertanİlker Kurtİncilay ŞahinMetin BüktelEvrim SolmazServer MutluEce HakimDevrim ÖzderErdal BilingenFurkan Andıç Go to Source

Suprema Corte dos EUA julga se Trump tem imunidade presidencial absoluta; Neitzke comenta

Video by via Dailymotion Source A Suprema Corte dos Estados Unidos vai analisar, nesta quinta-feira (25), se Donald Trump pode ser processado por crimes supostamente cometidos quando era presidente. Fabrizio Neitzke comentou. Assista ao Jornal da Manhã completo: https://youtube.com/live/zsEdDHjo8iM Baixe o app Panflix: https://www.panflix.com.br/ Inscreva-se no nosso canal:https://www.youtube.com/c/jovempannews Siga o canal “Jovem Pan News” no … Read more

Mau Bikin Acara Besar? Begini Tutorial Dapatkan Izin Keramaian dari Kepolisian| SINAU

Video by via Dailymotion Source KOMPAS.TV- Demi keamanan dan kelancaran acara, penyelenggara wajib izin kepada kepolisian. Perizinan atau surat izin diperlukan untuk menjaga suasana acara tetap kondusif baik pihak peserta maupun penyelenggara acara Adapun pemberian izin dipertimbangkan dengan risiko yang kemungkinan timbul kesiapan personel, sarana dan prasarana Polri untuk antisipasinya. Baca Juga Viral Kematian Bayi … Read more

Dennis Trillo at Jennylyn Mercado, ipinagdiwang ang 2nd birthday ng kanilang bunso | 24 Oras

Video by via Dailymotion Source 24 Oras is GMA Network’s flagship newscast, anchored by Mel Tiangco, Vicky Morales and Emil Sumangil. It airs on GMA-7 Mondays to Fridays at 6:30 PM (PHL Time) and on weekends at 5:30 PM. For more videos from 24 Oras, visit http://www.gmanews.tv/24oras. #GMAIntegratedNews #KapusoStream Breaking news and stories from the … Read more

फार्महाऊसचं कर्ज फेडण्यासाठी प्राजक्ता करतेय ‘या’ गोष्टी | BTS Of Prajakta Mali’s Ad Shoot

Video by via Dailymotion Source अभिनेत्री प्राजक्ता माळी तिच्या फार्महाऊसचं कर्ज फेडण्यासाठी काय गोष्टी करतेय. याचा एक व्हिडीओ तिने शेअर केलाय. पाहूया याची खास झलक. Go to Source