8 – How can I remove all contextual links?

When using the layout builder module, the contextual links module is a hard dependency. This works quite well in the context of the layout builder. But I don’t want those links anywhere else, because elsewhere they are not helpful at best, and completly mess up my frontend theme at worst.

I’ve already written a custom theme negotiator to force my admin theme in layout building mode.

But I don’t know how to remove all contextual links when I’m in frontend. My current ugly hack is

function wt_cms_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
  /**
   * Suppress the contextual edit pen on frontend themes, we only want it
   * for layout builder in admin theme
   */
  if (isset($build('#contextual_links'))) {
    $routeName = Drupal::routeMatch()->getRouteName();
    if (!in_array($routeName, ('layout_builder.overrides.node.view', 'layout_builder.defaults.node.view'))) {
      unset($build('#contextual_links'));
    }
  }
}

and an additional rule in my frontend CSS

.contextual-toolbar-tab, (data-contextual-id) {
  display: none !important;
}

This does at least hide the contextual edit pen in frontend, but it does not really remove the contextual link menu. (There still is an empty placeholder div).

I’ve also tried @Shreya Shetty’s suggestion

function mymodule_contextual_links_alter(array &$links, $group, array $route_parameters) {
  $routeName = Drupal::routeMatch()->getRouteName();  //incorrect, this always returns "contextual.render"
  if (!in_array($routeName, ('layout_builder.overrides.node.view', 'layout_builder.defaults.node.view'))) {
    $links = ();
  }
}

In contextual alter I’ve got other problems: The current $routeName is always contextual.render and not the route of the host page, so I’ve no “entry point” to specifically alter non-layout bulder-pages. It also has the same problem as the hook_entity_view_alter workaround: The menu items are suppressed, but the empty contextual placeholder divs are still rendered.

Can anyone tell me how to reliably and cleanly remove the contextual links? I don’t want them anywhere, except in layout building mode.

8 – Current page link is not adding in my custom theme full pager links

I have created a view page showing products with full pager and full pager links are showing currently but current page link is not been added in the pagination links and because of this pagination links are showing home page and adding the parameters to home page links.
I have checked using Bartik Theme and other Contributed Themes available on drupal.org and full pager is working correctly as it should be(by adding current page links in the pager links) but it is not working only in custom theme.
I request, please help me with this as, I am beginner with Drupal and full pager is needed in almost all the projects.

Note: I am also using better exposed filters with exposed block.

Pager Links same in other themes also

Current page link is not adding in pager links in other themes current page link not showing in html but it is being added after page load

RSS tickler does not tick when using a collection of links rather than texts: what is wrong?

I am using a solution at: https://www.cssscript.com/rss-feed-scroller-marquee/ in order to create a tickler for my web page. All fine, but for the fact the tickler just showed the texts of the rss feed but it was impossible to click them to get to article. So I tried to tamper with it constructing a proper url and trying to animate it. Yet the item seems well constructed, but when I animate it, nothing happens. This the code of the modified js class:

/*!
* RSS Marquee
*
* Licensed under MIT
* Copyright (c) 2020 (Samuel Carreira)
*/
class RSSMarquee {
/**
*
* @param {string()} feedURLs Feed URLs
* @param {object} elementContainer the selector of the marquee container
* @param {number} options.speed duration in ms per character. Bigger values = slow speed
* @param {number} options.maxItems specify max number of titles to show (useful to debug)
* @param {object} options.hostnameSelector The selector of the element where you want to show the URL of the news feed source (usefull for copyright atttribution)
*/
constructor(feedURLs, elementContainer, options = { speed: 110, maxItems: null, hostnameSelector: null }) {
this._feedURLs = new Array();

if (Array.isArray(feedURLs)) {
this._feedURLs = feedURLs;
} else {
this._feedURLs(0) = feedURLs;
}

const URLvalidation = this._feedURLs.every(this.validateURL);

if (!URLvalidation) {
throw new TypeError(‘Invalid URL on list’);
}

this._urlIndex = 0;

this._anim = null;

this._newsText = ”;

this._lastTime = Date.now();

if (elementContainer === null) {
throw new TypeError(‘Invalid element selector’);
}

this._elementContainer = elementContainer;
this.styleElementContainer();

this._options = {
speed: this.validateSpeed(options.speed),
maxItems: options.maxItems,
hostnameSelector: options.hostnameSelector,
// …options
};

this.getRSS();
}

validateSpeed(speed) {
if (!Number(speed) || speed < 50 || speed > 300) {
return 110; // default safe value
} else {
return speed;
}
}

/**
* Set the animation speed
* @param {number} speed value between 50-300
*/
set setSpeed(speed) {
this._options.speed = this.validateSpeed(speed);
}

get getSpeed() {
return this._options.speed;
}

/**
* Validate URL (uses URL interface)
*
* @param {string} url Url to check
* @returns {boolean} true if valid
*/
validateURL(url) {
try {
const u = new URL(url);
return true;
} catch (e) {
return false;
}
}

/**
* Get Hostname from url string
*
* Sample: “https://www.dnoticias.pt/rss/desporto.xml”
* returns url
*
* @param {string} url url string
* @returns {string} hostname
*/
getHostname(url) {
try {
const u = new URL(url);
return u.hostname;
} catch (e) {
return ”;
}
}

getRSS() {
const url = this._feedURLs(this._urlIndex);

this.fetchRSS(url)
.then((xmlText) => {
this._newsText = this.parseXMLFeed(xmlText);

this.showMarquee(this._newsText);

this.showHostname(url);
})
.catch((err) => {
console.error(err);

this.handleErrors();
});

}

handleErrors() {
const diffTime = Date.now() – this._lastTime;

if (diffTime > 5000) {
console.log(‘Trying next feed URL…’);

this.nextURL();
this._lastTime = Date.now();
} else {
if (this._newsText === ”) {
console.log(‘delay…’);
setTimeout(() => {
this.nextURL();
}, 5000);
} else {
console.log(‘show again cached saved news’);
this.showMarquee(this._newsText);
}
}
}

nextURL() {
this.increaseIndex();

this.getRSS();
}

styleElementContainer() {
this._elementContainer.style.overflow = ‘hidden’;
this._elementContainer.style.whiteSpace = ‘nowrap’;
}

showHostname(url) {
if (!this._options.hostnameSelector) {
return;
}

this._options.hostnameSelector.innerText = this.getHostname(url);
}

showMarquee(aCollection) {
SEMrush

try {
const animKeyframes = ({
transform: ‘translateX(0)’
},
{
transform: ‘translateX(-100%)’
}
);

const animOptions = {
duration: 25000, // The number of milliseconds each iteration of the animation takes to complete. Defaults to 0. Although this is technically optional, keep in mind that your animation will not run if this value is 0.
easing: ‘linear’, // The rate of the animation’s change over time. Accepts the pre-defined values “linear”, “ease”, “ease-in”, “ease-out”, and “ease-in-out”, or a custom “cubic-bezier” value like “cubic-bezier(0.42, 0, 0.58, 1)”. Defaults to “linear”.
iterations: 1, // The number of times the animation should repeat. Defaults to 1, and can also take a value of Infinity to make it repeat for as long as the element exists.
delay: 0, // The number of milliseconds to delay the start of the animation. Defaults to 0.
endDelay: 0 // The number of milliseconds to delay after the end of an animation. This is primarily of use when sequencing animations based on the end time of another animation. Defaults to 0.
};

animOptions.duration = aCollection.length * this._options.speed;

const elementChildNode = document.createElement(‘span’);
elementChildNode.style.display = ‘inline-block’;
elementChildNode.style.paddingLeft = ‘100%’;

//const textNode = document.createTextNode(text);
console.log(aCollection.lenght);
aCollection.forEach(function(item, index, array) {
elementChildNode.appendChild(item)
})
console.log(“totale:”);
console.log(elementChildNode);
//elementChildNode.appendChild(textNode);

//this._elementContainer.appendChild(elementChildNode);

this._anim = elementChildNode.animate(animKeyframes, animOptions);
console.log(‘start animation’);
this._anim.onfinish = () => {
console.log(‘end’);
while (this._elementContainer.firstChild) {
this._elementContainer.firstChild.remove();
}
delete this._anim.onfinish;

this.nextURL();
};

this._lastTime = Date.now();
} catch (err) {
console.error(err);
}
}

increaseIndex() {
this._urlIndex += 1;
if (this._urlIndex > this._feedURLs.length – 1) {
this._urlIndex = 0;
}
}

/**
* Fetch RSS
* @param {string} feedURL RSS XML url
*/
fetchRSS(feedURL) {
return new Promise((resolve, reject) => {
console.info(`Start fetching ${feedURL}…`);

fetch(feedURL, { mode: ‘cors’, redirect: ‘follow’ })
.then((response) => {
return response.text();
})
.then((xmlTxt) => {
return resolve(xmlTxt);
})
.catch(() => {
console.error(‘Error in fetching the RSS feed’);
reject();
})
});
}

/**
* Parses RSS XML feed
*
* – Select title elementContainer
* – add dot separator between “headlines”
* – remove <!(CDATA( string
* – remove html tags
*
* @param {string} xmlText
* @returns {string} parsed feed
*/
parseXMLFeed(xmlText) {
try {
const parser = new DOMParser();
const doc = parser.parseFromString(xmlText, “text/xml”);

let news = ”;
let aCollection=();
let totals = 0;

for (let item of doc.querySelectorAll(‘item’)) {
let title = item.getElementsByTagName(“title”)(0).childNodes(0).nodeValue;
// let description = item.getElementsByTagName(“description”)(0).childNodes(0).nodeValue;
let link = item.getElementsByTagName(“link”)(0).childNodes(0).nodeValue;
if (title) {
if (news.length) {
news += ‘xa0’ + ‘ • ‘ + ‘xa0’;
}
title = this.remoteCData(title);
title = this.stripTags(title);
news += title;
var a = document.createElement(‘a’);
var linkText = document.createTextNode(title);
a.appendChild(linkText);
a.title = title;
a.href = link;
aCollection.push(a);
totals += 1;
}

if (this._options.maxItems !== null && totals >= this._options.maxItems) {
console.info(‘Maximum items reached!’);
break;
}
}
//console.log(aCollection);
//console.log(news);
console.info(`Parsed ${totals} title(s)`);
return aCollection;
} catch (err) {
console.error(err);
return ‘ ‘;
}
}

stripTags(textWithTags) {
return textWithTags.replace(/<(.|n)*?>/g, ”);
}

remoteCData(originalText) {
return originalText.replace(“<!(CDATA(“, “”).replace(“))>”, “”);
}
}

The non occurring animation is in function: showMarquee(aCollection). The original site shows how to test it.

Thanks,

 

What is normal verified links number in Tier 1/2/3?

What is normal verified links number in Tier 1/2/3?

Posting for EDU links

Hi Guys,
Can you please help me how to set up GSA Ser so it will only post on dot EDU links? 
I am also interested in buying .edu link list for GSA posting. 

I Can Build 300 web 2.0 blog of Highest Quality & Most Effective Links for $10

I Can Build 300 web 2.0 blog of Highest Quality & Most Effective Links

JOINBuild 300 web 2.0 blog of Highest Quality & Most Effective Links for $5 99.7% (12,422) ORDER NOW ($5) 345

  • Guaranteed by seller or 25% money back

I Can Build 300 web 2.0 blog of Highest Quality & Most Effective LinksThese days when it comes to building links or even just promoting your website, Web 2.0 & Social sites are more important than ever. Building your presence online is the key to high rankings, high earnings and getting that coveted social traffic, which all of us are looking for it.

Now get Top Quality Web 2.0 blog related articles that will contains your link(s)/keyword(s).

Use this directly for your money site, it’s 101% Safe and WhiteHat.

The most popular SEO campaigns, is to get some of Web 2.0 backlinks as tier, then get some quality (articles or profiles) backlinks for these created web 2.0s as a link pyramid.

DA and PA .. check the below :

Note: If you want to create web 2.0 blogs ” dedicated” accounts for you only, and you will received them with report , then don’t forget to add this option from extras:

FAQs:

  • How many Keywords and Links we accept ?

-We accept 1 URL and up to 5 Keywords per order.

In SEO, Quality of the links is everything. don’t go with quantity.

  • What we need from your side ?
  1. Your URL.
  2. Your Keywords.
  3. Article Topic ( optional ).

  • Is it available to get sample reports?

– Yes for sure.-Buy 4 get 1 for free.

  • Can you work in non-English sites? What about articles?

-Yes, we can, however, we use English related articles, with your exact keywords as you type in your language, it ranks well don’t worry ^^

  • Do you accept Adult, Hacking, Betting,Warez,Cracking topics?

-Sorry We can not accept websites that promote hate, contain pornography, dating, promote gambling or spamming of any kind. We reserve the right to disapprove any website that we feel does not sufficiently meet our standard of quality.

.(tagsToTranslate)Highquality(t)Qualitybalink(t)Web2blog(t)Web(t)Traffic(t)Blog

Should I avoid underlined links on mobile app?

Although your post does make some mention of “button vs link”, I don’t think that is actually part of the question, so I will not talk about that area. I will assume you are happy to use links and you just want to know if they should be underlined.

However, I will say that having many buttons is not a reason to not use them. If it’s looking cluttered, then redesign the buttons so they feel less cluttered when there are lots of them.

Why do we underline links in the first place?

The reason for this is so that it is obvious to the user that they can be clicked. Typically, underlining the links will ensure they stand out from normal (unclickable) text. This is important so the user is aware that they can interact with them.

Should you use underlined links or not?

Unfortunately, it depends, and you will need to make the decision for yourself based on your design.

The important factor is that you need to ensure that the links stand out, and that the user will know they can click on them. However, underlining them is just one option. You can style them in many ways including font weight (bold) and a different font colour.

Underlining has the benefits of familiarity for the user. However, there are some situations where underlining might not work. For example, your designs may already heavily use lines for other styling which will cause your links to have less impact. This is why I say it really depends on your designs.

It is recommended that you try a few different options and see what works well with the rest of your design.

Manually Create Top 20 High Domain Authority Do Follow Social Bookmarking links for website rankings for $1

Quick 1 day delivery

If the seller fails to deliver the service in the specified time, the order will automatically cancel returning your funds.

$2 10 DA80+ manual mix backlinks 1 days $1 200 niche relevant unique manual blog comment 3 days $5 Link wheel submission 1 days $1 25 Social signals From High DA Sites 1 days $1 45 web2.0 multiple anchor text backlinks 1 days $2 15 classified ads posting on your targeted location 1 days $1 Top 10 .Edu or .Gov backlinks 1 days $1 15 directory submission relevant category-based 1 days $1 15 PDF submission 1 days $1 10 forum profile backlinks with login details 1 days $1 15 infographic submission 1 days $1 15 social bookmarking 1 days $1

.

chrome – Why won’t network links open in pdf documents from SharePoint 2016?

We have multiple pdf documents in a SharePoint 2016 document library and we use Office Online Server. Within the pdf documents are links to network files. The pdf files open in a web browser (Edge Chromium and Chrome). Clicking a link (points to a network file, word/excel document) in the pdf from the web browser does nothing. The document never opens. No errors. No information in browser developer tools. Opening the pdf in Adobe Acrobat Reader and then clicking a link to network files, opens the file. Is SharePoint preventing the network link from opening the file? Is Office Online Server preventing the network link from opening the file? Is this a browser issue?

sharepoint online – How to remove Quick links, news with json

I would like to remove default team site components such as: Quick links and news. So far I have been using Site design JSON schema to change navigation(remove, add new) on the left side.

Can this be done with a script and JSON schema ? Maybe it can be done in some other way e.g. with power shell ?