Implement hook_help()

Created on 12 January 2023, over 1 year ago
Updated 16 July 2024, 2 months ago

Problem/Motivation

hook_help function missing in .module file

📌 Task
Status

Needs work

Version

1.0

Component

Code

Created by

🇮🇳India shubham rathore Jaipur

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    +      $output .= '<h3>' . t('About') . '</h3>';
    +      $output .= '<p>' . t('Provides ajax comments to Drupal sites (commenting like a social networking sites: Facebook, Google+, vk.com etc).') . '</p>';
    

    That is repeating a single line from the README.txt file, which is not much helpful. At least it could show the same links shown in that file.

  • Status changed to RTBC over 1 year ago
  • 🇮🇳India Nupur Badola

    Patch is working and marking it to RTBC.

  • Status changed to Needs review over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The patch could be working, but that does not mean the changes are correct.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Repeating a single sentence from the project page is not sufficient. To start, the word spelling should be corrected; then, the description should make clear in which way AJAX comments are like commenting on social network sites. I know that is reported in the project page, but also the description in the project page should be changed, since it does not make clear what the module does.

  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Patch Failed to Apply
  • Hello Everyone !!
    Created a patch with updated description about the module.
    Can someone please review the patch.

    Thank You.

  • Status changed to Needs work over 1 year ago
  • 🇵🇭Philippines clarkssquared

    Hi thakurnishant_06

    I applied your patch #11 to my local and the patch fails to apply,

    Please look at the screenshot attached for your reference

    Thank you.

    For convenience below are the output that my terminal displayed

    ➜ ajax_comments git:(8.x-1.0-beta5) curl https://www.drupal.org/files/issues/2023-06-12/update%20%2311.patch | git apply -v
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 1800 100 1800 0 0 4843 0 --:--:-- --:--:-- --:--:-- 5157
    Checking patch ajax_comments.module...
    error: while searching for:
    /**
    * Implements hook_help().
    */
    function ajax_comments_help($route_name, RouteMatchInterface $route_match) {
    switch ($route_name) {
    case 'help.page.ajax_comments':
    $output .= '

    ' . t('About') . '

    ';
    $output .= '

    ' . t('Provides ajax comments to Drupal sites (commenting like a social networking sites: Facebook, Google+, vk.com etc).') . '

    ';
    return $output;
    }
    }

    error: patch failed: ajax_comments.module:26
    error: ajax_comments.module: patch does not apply

  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    2 pass
  • 🇮🇳India Raveen Kumar

    Hello Guys, Hope all are doing well.
    I have created an updated patch for the Ajax Comments module having version -8.x-1.x-dev. In the patch, I have added a description that tells about the module's behavior/functionality.
    Someone, please test it. And do let me know if anything further is required in it.
    And Thank You.

  • Status changed to RTBC over 1 year ago
  • Verified and tested the #13 patch on 9.5.8, help() is added with more details. Added screenshots for reference, RTBC++.

  • 🇮🇳India Raveen Kumar

    @Tanuja, Thanks for your Confirmation.

  • 🇺🇸United States erutan

    So the help text in this patch has the following:

    Create a comment form template override: To customize the comment form and add AJAX functionality, you will need to create a template override. Copy the comment form template file (comment.html.twig) from the modi templates directory and place it in your theme templates directory. Rename it if necessary to match the naming conventions of your theme.

    Modify the comment form template: Open the comment form template file in your text editor and make the following modifications:

    a) Add the ajax-comments-form CSS class to the element to identify it for AJAX processing.
    b) Add a submit button with the ajax-submit class to trigger the AJAX submission.
    c) Optionally, you can customize the form markup, fields, and other elements according to your requirements.

    Add JavaScript code: Create a JavaScript file for your custom theme or add to an existing JavaScript file in your theme.

    That is not just install as any other module and you're good to go as per the project description and help file. I assume that "modi templates directory" means /modules/contrib/ajax_comments but there are no templates there to copy into the theme.

    What is required to go in the javascript file?

  • Status changed to Needs work 2 months ago
  • 🇺🇸United States erutan
Production build 0.71.5 2024