External link status check Drupal custom module

External link status check Drupal custom module

Module Overview: External Link Status Checker

Features

Response Status Detection:

  • Check the status of external links.
  • Displays a popup based on HTTP response status (200 or 500).

Customizable Popup Messages:

Allows backend configuration of messages for both 200 and 500 statuses.

Dynamic Link Checking:

  • Monitor any link on the website.
  • Displays appropriate popups based on the link status.

Functionality

Link Status Check:

  • Implement a function to check the status of an external link using an AJAX request
  • Handle the response and determine if it is a success (200) or an error (500).

Popup Implementation:

Create a pop-up UI component that will display messages.

Provide an admin interface to set custom messages for:

  • 200 Status: (e.g., "The link is working correctly!")
  • 500 Status: (e.g., "The link is broken. Please check again later.")
  • Store these messages in a database or configuration file.

Installation Process

  • Navigate to the configuration settings at /admin/config/status_check.</li>
  • Follow the prompts to complete the installation.

Add Popup HTML:

  • Locate the form fields where you want the popup to appear.
  • Insert your custom HTML code for the popup in the designated fields.
  • Open the external_link_status_check.js file within your module.
  • Find the section where the popup class is defined and change it to match the class name you’ve used in your HTML.

Add Custom CSS:

  • Open the style.css file in your module’s directory.
  • Add your own custom CSS styles to ensure the popup looks the way you want

Module Link

https://www.drupal.org/project/external_link_status_check/



要查看或添加评论,请登录

Dipikarani Swaro的更多文章

社区洞察

其他会员也浏览了