8 – How to get drupal to check for a twig template in the active theme folder before checking the module folder?

I’m developing a contrib module for Drupal 8 that sends email notifications to group members when new content has been posted in groups they have subscribed to. The module defines some new view modes for nodes and comments. It then uses these new view modes to render the contents of the emails it sends out. The module defines a theme hook suggestion for each view mode and supplies a twig template for each view mode.

It works fine as is. The twig templates from within the module are utilized without a problem. What I’m not understanding is why copies of these templates placed within the active theme are not utilized. I’m familiar with the process of copying an existing twig template into a theme to be modified. But no matter what I do the template from the module is always used in this case. It was my understanding Drupal searches for suitable twig templates in the theme first and then works backward but perhaps my module is missing something.

Here are code samples for more details.

Define the view mode for comments – in modules/contrib/group_subscription/config/install/core.entity_view_mode.comment.group_subscription_immediate

langcode: en
status: true
dependencies:
  module:
    - comment
id: comment.group_subscription_immediate
label: 'Group Subscription Immediate (comment)'
targetEntityType: comment
cache: true

Define the theme hook suggestion – in modules/contrib/group_subscription/group_subscription.module

/**
 * Implements hook_theme()
 */
function group_subscription_theme($existing, $type, $theme, $path) {
  return (
    'comment__group_subscription_immediate' => (
      'base hook' => 'comment',
    )
  );
}

/**
 * Implements hook_theme_suggestions_comment_alter()
 */
function group_subscription_theme_suggestions_comment_alter(array &$suggestions, array $variables) {
  if ($variables('elements')('#view_mode') == 'group_subscription_immediate') {
    $suggestions() = 'comment__group_subscription_immediate';
  }
}

Please let me know if there is anything else I can provide to help me figure this out. I’ve been working with Drupal for years but am still relatively new to D8 and this is my first attempt at creating a module to give back. Thanks in advance!

is buycpanel.com still active ?

Hi,

is buycpanel.com still active ?

i do not get any new invoice,

do you also have the same issue ?… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1809978&goto=newpost

kerberos – Is there a way to force active directory group assignation without logoff/login?

as stated here and there, it looks like there is no way to avoid a user logoff/login in order to activate a new group assignation for this user (my use case was : activate an access to a shared folder by adding a user in a group).

Is there still no way to force the user group mapping assignation (without ending the session) with latest versions of Windows/Active directory ?

Thanks !

dnd 3.5e – How is miss chance calculated if a caster has Entropic shield active and is inside Darkness spell?

My question is simple. I have a warlock that has following invocations:

Darkness:

“This spell causes an object to radiate shadowy illumination out to a
20-foot radius. All creatures in the area gain concealment (20% miss
chance). Even creatures that can normally see in such conditions (such
as with darkvision or low-light vision) have the miss chance in an
area shrouded in magical darkness.”

Entropic warding:

“A magical field appears around you, glowing with a chaotic blast of
multicolored hues. This field deflects incoming arrows, rays, and
other ranged attacks. Each ranged attack directed at you for which the
attacker must make an attack roll has a 20% miss chance (similar to
the effects of concealment). Other attacks that simply work at a
distance are not affected.” Devil’s Sight: “You gain the visual acuity
of a devil for 24 hours. You can see normally in darkness and magical
darkness out to 30 feet.”

Devil’s Sight:

You gain the visual acuity of a devil for 24 hours. You can see
normally in darkness and magical darkness out to 30 feet.

With entropic warding I get 20% miss chance on ranged attacks as deflection. In addtion, Darkness grants 20% miss chance if the caster is in it. If I am inside darkness and I have entropic warding on, do my miss chances stacks up to 40% (given I get ranged attack) or do I roll miss chance twice as twice with 20% with each roll.

html – Efeito CSS Transition no Link – Pseudo Active

Como posso deixar o efeito de transição fixo utilizando a pseudo de classe “active” a:active{…}, ou seja, quando o link foi clicado (ativado) o efeito permanece. Exemplo abaixo:

CSS:

body{
  margin: 0;
  padding: 0;
  font-family: arial; sans-serif;
  font-size: 14px;
}
h1{
  background: #333;
  float: left;
  margin: 20px;
  padding: 20px 30px;
}
a {
  position: relative;
  color: #fff;
  text-decoration: none;  
}

a:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 3px;
  bottom: 0;
  left: 0;
  background-color: #fff;
  visibility: hidden;
  -webkit-transform: scaleX(0);
  transform: scaleX(0);
  -webkit-transition: all 0.3s ease-in-out 0s;
  transition: all 0.3s ease-in-out 0s;
}

a:hover:before {
  visibility: visible;
  -webkit-transform: scaleX(1);
  transform: scaleX(1);
}

HTML

<h1>
  <a href="#">
    Passe o Mouse
  </a>
</h1>

google analytics – How can I create a Firebase Audience based on the hour users are active?

I want to figure out how to set up an Audience of users who enter my app between 4:00 pm and 5:00 pm so I can send them push notifications. However, I have not been able to figure it out. Is it possible to segment an audience depending on what time they’re active?

falha no phpmyadmin: A session is active

Boa noite!

Sei que não é uma duvida diretamente relacionado a código e por isso peço perdão mas sinceramente não encontrei outro lugar onde poderia recorrer ajuda.

Instalei o phpmyadmin no meu ubuntu e consigo acessa-lo através do navegador na url localhost/phpmyadmin.

O problema é que parece que a configuração não está 100% correta pois durante toda a navegação no painel do phpmyadmin, eu fico recebendo essa mensagem:

inserir a descrição da imagem aqui

Já tentei algumas soluções como habilitar o session_path no php.ini, ceder permissão a pasta do session_path e alterar o dono do phpmyadmin para o user www-data. Porém, nada surtou efeito.

  • Versão do apache: Apache/2.4.29 (Ubuntu)
  • versão do PHP: 7.2.31-1+ubuntu18.04.1+deb.sury.org+1
  • Versão do cliente de base de dados: libmysql – mysqlnd 5.0.12-dev –
    20150407
  • Extensão de PHP: mysqli curl mbstring
  • Versão do phpmyadmin: 4.6.6deb5
  • Ubuntu subsystem no windows, versão 18.04.4 LTS

(apesar de estar usando o ubuntu através do WSL, subsystem do windows, todo o apache e php estão no ubuntu. Não estou usando nada do windows, como xampp).

Google script “if” condition not working on active sheet however no error recieved

The purpose of the google script is to compare cell B2 & cell A5 (Sum of C2:M2) in active sheet/tab; if B2 is less than A5 than it will pop up an alert & simultaneously change the background color of B2 to ‘red’ otherwise it will be ‘white’. Code seems to be Ok but it is only calculating sum in cell A5… I feel that “if” loop is not working.
Here is the code any help would be highly appreciable.

function onEdit(e) {
  // Set a comment on the edited cell to indicate when it was changed.
  //var range = e.range
  //range.setNote('Last modified: ' + new Date());
//var message = 'Alert';
  //var title = 'OTPS is over limit';
  //SpreadsheetApp.getActiveSpreadsheet().toast(message, title);
   //var currentSelection = SpreadsheetApp.getActiveSheet().getActiveSelection()

  var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();

var cell = sheet.getRange("A5");
cell.setFormula("=SUM(c2:m2)");

   var value1 = dataSheet.getRange(2, 2).getValue();               //Getting value from B2 in "Raw Data"
    var value2 = dataSheet.getRange(5, 1).getValue();              //Getting value from A5 in "Raw Data"

  if (value1<value2){
    var message = 'Alert';
  var title = 'OTPS is over limit';
  SpreadsheetApp.getActiveSpreadsheet().toast(message, title);
   sheet.getRange(2,2).setBackground('red');
      } else {
       sheet.getRange(2,2).setBackground('white');
      } 

  }

heatsink – Is it possible to swap passive for active cooling on this supermicro board?

I’m looking to buy this Supermicro Mini-ITX board for an upcoming NAS build:
https://www.supermicro.com/en/products/motherboard/A2SDi-H-TF

The only thing is, it has an integrated CPU with passive cooling – has anyone had success swapping the passive for an active cooler on these boards? I’m a newbie when it comes to supermicro – just wondering if this is a regular thing to do.

Cheers!