Category: News

Home / Category: News

Nowadays we have social media everywhere, so having the ability to share content on your website is essential.

By default Drupal doesn’t provide social media sharing buttons out of the box. However, when delivering Drupal services, we use modules that can help with this. The most popular solution is the AddToAny module.

AddToAny module provides a huge number of share buttons including the universal (‘+’), Facebook, Twitter, Pinterest, Reddit and many more.

And popular AddToAny features list is also impressive:

  • Floating share bars for mobile, desktop, and various site layouts; 
  • Image share buttons to share your images; 
  • Share counts and share count recovery;
  • Google Analytics integration; 
  • Vector sharing icons made for mobile, Retina and high-PPI displays; 
  • Universal sharing button and smart menu; 
  • Visitor personalization; 
  • International support (i18n/localization); 
  • Accessibility and graceful degradation; 
  • Cross-browser and backward compatibility; 
  • Optimized performance and efficient loading via world-class CDNs; 
  • Complete control for publishers & developers of all sizes

Dates

The first version of the module was released on 15 April 2008, the latest update – 15 may 2020.

The module can be installed on:

  • Drupal 7 (7.x-4.16 stable release version); 
  • Drupal 8 (8.x-1.14 stable release version);
  • Since 8.x-1.13+ it supports Drupal 9 as well.

All stable releases for this project are covered by the security advisory policy.

Module popularity

According to the statistical data from the module’s page, it is currently used by about 47.000 websites.

Module creators

The module is created and maintained by the only person – micropat (see his profile).

What is the module used for?

It is a highly customizable module, allowing to share content probably to any social media. It has a very friendly and excellent documentation with many examples.

Unboxing

To install AddToAny go to the webpage or do it via composer:

composer require drupal/addtoany

Configure placement

By default, share buttons are disabled and placed in Manage display section of each content type, e.g. Structure > Content types > Blog post > Manage display. Be sure it is enabled before we continue.

Configure AddToAny

To configure AddToAny options, go to Administration > Configuration > Web services > AddToAny.

Let’s go through each section briefly.

Buttons section

AddToAny uses SVG sharing icons that can be scaled to any size, the default value is 32×32 pixels. You can customize the share buttons by editing the “Service Buttons HTML Code” box. More details can be found in the official documentation, where you will find the additional feature examples, such as:

  • Share event handling & modifying; 
  • Templates & endpoint parameters; 
  • Link tracking & URL shorteners; 
  • Custom color buttons; 
  • Image share buttons; 
  • Share counters; 
  • Share count recovery; 
  • etc. 

Here are a few examples.

Like buttons:

<a ></a>
<a ></a>
<a ></a>

Share counts buttons:

<a ></a>
<a ></a>
<a ></a>
<a ></a>

Under the universal button section you can also customize the + button or even remove it:

Additional Options section

Here you can add some custom JS or CSS code for AddToAny with no need to do it programmatically.

As an option, you can for example set a custom color to perfectly match any design’s color scheme. Just add the following JS code to your “Additional JavaScript” box on the Configuration page.

 a2a_config.icon_color = "#0166ff"; 

Entities section

In this section you can toggle the content entities where AddToAny will be available to interact with.

Once the AddToAny Share Buttons module is installed and enabled, a few sharing buttons will appear on your page. Let’s check out how they look.

By default we have a “+” icon (called the “Universal Button”), next Facebook share is there, as well as Twitter, and email. Clicking the “Universal Button” you will see all available share buttons for other services.

And here is an example of Twitter sharing popup. When a visitor clicks one of the buttons, a pre-populated post pops up.

Let’s dive into the documentation and see if we can adjust the template.

Voila, you can change the default message, by adding the following JavaScript code:

var a2a_config = a2a_config || {};
a2a_config.templates = a2a_config.templates || {};
a2a_config.templates.twitter = {
    text: "Reading: ${title} ${link} by me",
    hashtags: "sharing,social"
};

Hook & Templates

If you think that standard settings is not enough, you can try extending the addtoany-standard.html.twig template.

The default theme implementation to standard AddToAny buttons includes the following variables:

  • addtoany_html: HTML for AddToAny buttons;
  • button_image: URL for universal button;
  • button_setting: Setting of button;
  • button_size: Size of buttons;
  • universal_button_placement: Value of ‘before’ or ‘after’ to place button;
  • link_url: Value of URL to share;
  • link_title: Value of page title to share.

There is also one hook, allowing you to programmatically alter the entity types that the AddToAny pseudo-field is available for:

/**
 * @param array $types
 *   The entity types.
 */
function hook_addtoany_entity_types_alter(&$types) {
  // Add the "taxonomy_term" entity type.
  $types[] = 'taxonomy_term';
}

Alternative solutions

There are a few other options that you might want to investigate. Here is the list:

  • Better Social Sharing Buttons (Drupal 8 & 9); 

Has less settings options and services. According to the description this module delivers the most clean solution without making a lot of external calls, having tracker scripts, or even connecting to ad servers.

  • Sharethis (Drupal 8 beta version);
  • Service links (only Drupal 7 version);
  • Addthis (only Drupal 7 alpha version). 

Summary

Now you have all the necessary information on how to add social links to your Drupal site on the example of the AddToAny module. However, if you want to know more about how to most effectively use this module for your website, please contact our Drupal consultants. Once you have installed this module, you will get a very customizable platform with many fine features, which makes your content easy to share.

Keyword: drupal agency

By

Recently, the advanced gearbox bearing production line of Luoyang Bearing Group Co., Ltd. came with bursts of busy sounds, marking Luoxiang Group to seize industry opportunities and accelerate the pace of the formation of new quality productivity.


The product just off the line in this production line is a 6 MW high-power wind power bearing independently developed by LYC. The launch of this bearing solves the core problem of the autonomy of China's high-power wind power gearbox bearings, and also marks the realization of the independent production of high-end bearings, the product technology level has reached the international leading level, and the localization rate has reached 100%.


The reorganization of LYC has brought new opportunities for its development. As a successful case of state-owned enterprise reform in Luoyang, Luoxiang Group has undergone two mixed ownership reforms since 2022, introducing strategic investors such as Zheng Coal Machinery Group and AVIC Industry Investment to set up joint stock companies. These reform measures have stimulated the enthusiasm and vitality of the enterprise's second entrepreneurship, and written a new chapter of the rebirth of Luoxing Group.


At present, LYC sprint A-share listing preparations have entered the Henan Securities Regulatory Bureau guidance filing stage. Luoxiang Group is committed to becoming a high-end, service-oriented and internationalized world bearing supplier integrating research and development, production and service.


A series of restructuring and integration projects are rapidly advancing in Luoyang, forming a new development pattern.


Luoyang Industrial Holding Group Co., Ltd. was formally established recently, integrating Guohong Group, Wanji Group and other high-quality industrial equity, the business scope covers bearing and intelligent equipment manufacturing, high-end petrochemical, aluminum and aluminum deep processing, electricity, new energy and other more than 30 fields, the total assets of more than 100 billion yuan.


In addition, Luoyang Trading Company is also in the process of preparation, aiming to focus on the construction of a large transportation system, to achieve the integrated development of public transportation investment, construction, operation and management, and to create a first-class comprehensive operator of public transportation investment and development in China.


In accordance with the principles of similar industries, related industries, the same main business and complementary advantages, Luoyang City vigorously promotes the reorganization and integration of city-owned enterprises, and has initially formed a “4+1+N” state-owned assets layout, and city-owned state-owned enterprises are transforming from traditional investment and financing platforms to modern enterprises.


The relevant person in charge of the municipal SASAC said: “The reform of state-owned assets and state-owned enterprises is one of the key tasks of comprehensively deepening reform in Luoyang, we will deeply implement the spirit of the Third Plenary Session of the 20th Central Committee of the Party, continue to optimize the layout of state-owned assets, deepen the reform of enterprises, and contribute more state-owned assets and state-owned enterprises to the construction of modern Luoyang.”

By

In construction and building sites, snow tarps are extremely useful tools that provide protection and assistance during harsh winter weather conditions, ensuring the smooth progress of construction projects. Here is a detailed description of the use of snow tarps in construction and building sites:

1. **Material Protection**: Construction sites typically have a large quantity of building materials such as lumber, bricks, cement, and steel. During the winter, snow and rain can potentially damage these materials. Snow tarps can be used to cover these materials, preventing them from being affected by snow or freezing, ensuring their quality and availability.

2. **Equipment Protection**: Construction sites commonly use various equipment such as excavators, cranes, generators, and more. The proper functioning of this equipment is crucial for construction tasks. Snow tarps can be employed to cover equipment, preventing them from icing up or being covered by snow, ensuring they remain reliably operational when needed.

3. **Work Area Coverage**: Snow tarps can be suspended above the work areas in construction sites, providing additional shelter and protection, allowing workers to continue their tasks in snowy or rainy conditions. This helps maintain a relatively dry workplace, enhancing worker comfort and safety.

4. **Construction Project Progress**: During winter, weather conditions can be unpredictable, with occasional snowfall or temperature drops, potentially causing delays in construction projects. The use of snow tarps can mitigate this risk, as they help maintain a relatively dry construction site, allowing construction schedules to proceed.

5. **Keeping the Construction Area Clean**: Snow and rain can make construction sites muddy and messy, increasing inconvenience and hazards for workers. By using snow tarps, mud can be reduced, helping to keep the site clean and minimizing the risks of slips and accidents.

6. **Safety Considerations**: Frozen surfaces can increase the risk of workers slipping. Snow tarps can be placed over steps, stairs, and slopes to provide additional traction, reducing the likelihood of accidents.

In summary, snow tarps are widely employed in various ways on construction and building sites, offering protection, comfort, and safety, especially in cold winter environments. Whether used to safeguard materials and equipment, provide a relatively dry and comfortable work environment, or ensure compliance with construction project schedules, these tarps play a crucial role in construction and building site management during winter months.

Keyword: PVC tarpaulin

By

Full Description

45 deg elbow type: weld on 45 deg elbow, Material: ASTM SA-234 Grade B, Dimensions conform to ASME B16.9, Nominal Pipe Size: 1 ¼ inch, Outside Diameter: 1.66 inch, Inside Diameter: 1.38 inch, Wall Thickness: 0.14 inch, Center to Center A: 1 inch, Approx Weight: 0.33 LBS

Click here for a downloadable and printable specification sheet on carbon steel 45 degree butt weld elbows
Products specifications

Attribute name

Attribute value

Product Type

45 degree elbow, Weld on Elbows

Country of Origin

Import

Material

Carbon Steel

ID Type

Pipe

Schedule

40

Size

1-1/4"

By

Full Description

45 deg elbow type: weld on 45 deg elbow, Material: ASTM A403, Dimensions conform to ASME B16.9, Nominal Pipe Size: 1-1/4 inch, Outside Diameter: 1.66 inch, Inside Diameter: 1.38 inch, Wall Thickness: 0.140 inch, Center to Center A: 1.0 inch, Approx Weight: 0.38 lbs

Click here for a downloadable and printable specification sheet for 45 degree schedule 40S weld on 316 Stainless Steel elbowsProducts specifications

Attribute name

Attribute value

Product Type

45 degree elbow, 45 degree elbow, Weld on Elbows, Weld on Elbows

Size

1-1/4", 1-1/4"

Schedule

40, 40

Material

316 Stainless Steel, 316 Stainless Steel

Country of Origin

Import

ID Type

Pipe

By

Full Description

45 deg elbow type: weld on 45 deg elbow, Material: ASTM SA-234 Grade B, Dimensions conform to ASME B16.9, Nominal Pipe Size: 1 ½ inch, Outside Diameter: 1.9 inch, Inside Diameter: 1.61 inch, Wall Thickness: 0.145 inch, Center to Center A: 1.12 inch, Approx Weight: 0.43 LBS

Click here for a downloadable and printable specification sheet on carbon steel 45 degree butt weld elbows
Products specifications

Attribute name

Attribute value

Product Type

45 degree elbow, Weld on Elbows

Country of Origin

Import

Material

Carbon Steel

ID Type

Pipe

Schedule

40

Size

1-1/2"

Keyword: butt weld elbow

By

Full Description

Elbow type: weld on long radius 90 degree elbow, Material: 304 Stainless Steel per ASTM A403, Dimensions conform to ASME B16.9, Nominal Pipe Size: 1 ½ inch, Outside Diameter: 1.9 inch, Inside Diameter: 1.61 inch, Wall Thickness: 0.145 inch, Center to Center A: 2.25 inch, Approx Weight: 0.8 LBS

Click here for downloadable and printable specification sheet for 304 stainless steel weld on long radius 90 degree elbowsProducts specifications

Attribute name

Attribute value

Product Type

90 degree long radius elbow, 90 degree long radius elbow, Weld on Elbows, Weld on Elbows

Size

1-1/2", 1-1/2"

Schedule

40, 40

Material

304 Stainless Steel, 304 Stainless Steel

Country of Origin

Import

ID Type

Pipe

Keyword: butt elbow

By

Full Description

Elbow type: weld on long radius 90 degree elbow, Material: 316 Stainless Steel per ASTM A403, Dimensions conform to ASME B16.9, Nominal Pipe Size: 1 ½ inch, Outside Diameter: 1.9 inch, Inside Diameter: 1.61 inch, Wall Thickness: 0.145 inch, Center to Center A: 2.25 inch, Approx Weight: 0.8 LBS

Click here for downloadable and printable specification sheet on 90 degree long radius weld on 316 stainless steel elbowsProducts specifications

Attribute name

Attribute value

Product Type

90 degree long radius elbow, 90 degree long radius elbow, Weld on Elbows, Weld on Elbows

Size

1-1/2", 1-1/2"

Schedule

40, 40

Material

316 Stainless Steel, 316 Stainless Steel

Country of Origin

Import

ID Type

Pipe

By

Full Description

Elbow type: weld on long radius, Material: ASTM SA-234 Grade B, Dimensions conform to ASME B16.9, Nominal Pipe Size: 1 ½ inch, Outside Diameter: 1.9 inch, Inside Diameter: 1.61 inch, Wall Thickness: 0.145 inch, Center to Center A: 2.25 inch, Approx Weight: 0.8 LBS

Click here for downloadable and printable 90 degree long radius weld on carbon steel elbow specification sheetProducts specifications

Attribute name

Attribute value

Product Type

90 degree long radius elbow, Weld on Elbows

Country of Origin

Import

Material

Carbon Steel

ID Type

Pipe

Schedule

40

Size

1-1/2"

Keyword: butt weld elbow

By