Account created on 22 December 2015, about 9 years ago
#

Merge Requests

More

Recent comments

🇫🇷France mably

Actually I got the idea from here: https://www.drupal.org/project/glossify/issues/3269949 Add in a synonyms feature Needs work

Here is what is said there:

With my patch, both "President of the United States" and "POTUS" are candidates to be glossified. Since my sites require only the first found match be glossified, if one term is glossified then the other will not be, regardless of which one occurs first.

But may be we can add a configuration option to behave differently.

🇫🇷France mably

Looks like it should be done with plugins rather than hooks.

🇫🇷France mably

Looks like some unit tests would be really welcome.

🇫🇷France mably

@sirclickalot problem identified and fixed.

Looks like we didn't need to escape HTML when reinjecting in the DOM using nodeValue.

Could you test this issue's one line fix and tell me how it goes on your side?

🇫🇷France mably

Ok, I can reproduce the problem, will investigate.

🇫🇷France mably

Do you know at which alpha release version the problem appeared?

Do the single or double quotes have to be in the glossary terms or not?

🇫🇷France mably

@sirclickalot the hook signature will slightly change (for the good) in this issue: 📌 New term_data alter hook and term_match hook signature change Active .

You will get in the second parameter the whole term data array instead of just the idea.

And you will be able to customize that term data array with a new hook term_data_alter coming in the same issue.

🇫🇷France mably

MR pushed.

List is restricted to multivalued string fields.

🇫🇷France mably

That will be something like this, is it ok?

🇫🇷France mably

I think it could be done rather easily, we could a minima use a simple text field in the configuration screen.

@sirclickalot Are you interested in testing such a configuration option?

🇫🇷France mably

Never used the Synonyms module , so can't say if its integration would have some interest.

But thanks for sharing.

🇫🇷France mably

Hi @danny-englander, thanks for your MR 👍

Let's wait for some user confirmation that there isn't any undesirable side-effect to this patch and then we should be able to merge it.

🇫🇷France mably

A new hook have been added for blocks:

hook_better_social_sharing_buttons_block_items_alter

🇫🇷France mably

@sirclickalot would you be interested in having a min-height setting for the jQuery dialog?

It could reduce the small display glitch we get with the resize in auto mode.

🇫🇷France mably

Hi @anybody, we have made quite a few improvements to the Taxonomy Term Glossary module on the recent weeks.

Would you mind adding a link to our module on the Glossify module home page as we just did on ours?

🇫🇷France mably

Ok, let's force it to auto on mobile (width < 500px)

🇫🇷France mably

mably changed the visibility of the branch 4.2.x to hidden.

🇫🇷France mably

mably changed the visibility of the branch 3505044- to hidden.

🇫🇷France mably

It should be custom_drupal_overrides_term_glossary_term_match_alter, you miss the match in your hook name.

🇫🇷France mably

@sirclickalot This issue's MR adds a new hook that should solve your problem.

You just need to add this hook in your theme or a custom module:

/**
 * Implements hook_term_glossary_term_alter().
 */
function my_module_term_glossary_term_alter(&$term_tag, &$term_id, &$term_value) {
  // Here alter the term button HTML render array.
  $term_tag['#attributes']['data-bs-toggle'] = 'tooltip';
  $term_tag['#attributes']['data-bs-placement'] = 'bottom';
  $term_tag['#attributes']['fallbackplacements'] = '["top", "left", "right"]';
  $term_tag['#attributes']['data-bs-delay'] = '{"show":1000, "hide":100}';
  $term_tag['#attributes']['data-bs-html'] = 'true';
  $term_tag['#attributes']['data-bs-title'] = 'Pop up a term definition.';
}

Tell me how it goes.

🇫🇷France mably

@niharika.s have you successfully tested it? Are you 100% sure it works?

🇫🇷France mably

I guess that would be a breaking change if this template is overridden in some custom site theme...

But may be we can make that change in 4.2.x...

🇫🇷France mably

May be we could add a hook to allow altering the HTML of the found glossary term. Will see what I can do. Then the tooltip addition could be done in a submodule or a custom module.

🇫🇷France mably

@sirclickalot is not a maintainer of this module.

@vinayakmk47 your commit was not working and clearly not tested so we cannot give credit for that.

🇫🇷France mably

Is there a particular reason why the code is using window.location.href instead of the page_url variable?

If not, it should be modified to use the same URL than the other buttons.

Can work on a fix if some are interested.

🇫🇷France mably

@atowl you would probably use that hook in your custom module like this:

/**
 * Implements hook_better_social_sharing_buttons_node_view_alter().
 */
function my_module_better_social_sharing_buttons_node_view_alter(&$items, &$node) {
  $config = \Drupal::config('my_module.settings');
  if ($config->get('preferred_url')) {
    $url = $node->get($config->get('preferred_url'))->value;
    if (isset($url)) {
      $items['page_url'] = $url;
    }
  )
}
🇫🇷France mably

Not sure it could be merged as is. It should probably be done in another module.

But I like the idea of having the possibility to use a different or modified url than the current page URL.

I will have to think about it.

We could then add a hook that would allow other modules to generate that substitute URL as they like...

🇫🇷France mably

Fix has been released on 4.2.x dev branch.

🇫🇷France mably

@sirclickalot it has been merged in dev branch 4.2.x, should be easier to deploy.

🇫🇷France mably

@sirclickalot 500px are the new default width and height for the dialog. It can be changed.

Production build 0.71.5 2024