INTRODUCTION

This module allows you to easily perform the necessary configuration of
the Live Helper Chat server from the Drupal administration system for the
correct display of the Chat and FAQ modules on our site, thus allowing
you to integrate with the Live Helper Chat server.
The viewing restriction of these modules is allowed for pages, content types
and user roles.

It allows administrators to inject JS into the page output according to
configurable rules. It is useful to add the JS configuration generated in
the Live Helper Chat server.

REQUIREMENTS

This module has no requirements, only to have knowledge of the domain
where your Live Helper Chat server is located.

INSTALLATION

Install as you would normally install a contributed Drupal module. Visit
https://www.drupal.org/node/1897420 for further information. Alternatively use Composer: composer require 'drupal/chat_livehelperchat'.

CONFIGURATION

To configure this module, do the following:

  1. Configure user permissions in Administration » People » Permissions:
    • Administer livehelperchat module
      Permission to change livehelperchat settings. Give to trusted roles only.
    • Use PHP for livehelperchat visibility
      Permission to set PHP conditions to customize livehelperchat visibility on various pages. Give to trusted roles only.
    • Allow JS configuration injection in the page header. Permission to allow JS configuration injection in the header of the page generated in the chat server. Give to trusted roles only.
  2. Add yor configuration LHC in in Administration » Configuration » System » Settings LiveHelperChat
    Go to /admin/config/chat_livehelperchat/livehelperchatformsettings and choose the desired configuration for your site. The configuration allows the option to embed the JS code generated in the Live Chat Helper (LHC) server on our page or visually configure for less advanced users the CHAT or the FAQS module comfortably. It is allowed to select the domain where the LHC is hosted, the subject, height, width, position of the chat and the FAQ, etc. Chat display control and FAQ module are allowed by content types, pages or user roles.
  3. Enjoy!!

TROUBLESHOOTING

If the FAQ module is not displayed, check the following.

  • The page where it should be shown is not excluded from the display?
  • Have you added some sample FAQs to your Live Helper Chat server?
  • Is the FAQ module activated in the configuration section?

Project link

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

Git instructions

git clone --branch 8.x-1.x https://git.drupalcode.org/project/chat_livehelperchat.git

Comments

mmaldonado created an issue. See original summary.

apaderno’s picture

apaderno’s picture

Issue summary: View changes

Thank you for applying! Reviewers will check the project and post comments to list what should be changed.

apaderno’s picture

Issue summary: View changes
klausi’s picture

Status: Needs review » Needs work
Issue tags: -PAreview: single application approval

Thanks for your contribution! I think we have enough code here so that we can perform a normal user approval when ready.

  1. routing file: you are using 'administer site configuration' but you define your own permissions, so this should be replaced here?
  2. config schema is missing, see https://www.drupal.org/docs/8/api/configuration-api/configuration-schema...
  3. permissions: the PHP and admin page permission need to be defined ad "restrict access' => TRUE because admins can execute arbitray JS or PHP code with them.
  4. LiveHelperChatFormSettings: executing arbitrary PHP code from the admin web interface is only allowed if the php module from https://www.drupal.org/project/php is enabled. You need to check if that module is enabled first.
rohit-rajput-sahab’s picture

chat_livehelperchat.module

Function module_exists not found. Line 98
Function php_eval not found. Line 99

These 2 function are not found can you please check it.

rohit-rajput-sahab’s picture

In Drupal 9

When I click on the "Configuration" link. It's showing me an error message.

Page error:-
"The website encountered an unexpected error. Please try again later."

Recent log messages:-
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "entity.manager". in Drupal\Component\DependencyInjection\Container->get() (line 151 of /var/www/html/drupal-9.0.0/core/lib/Drupal/Component/DependencyInjection/Container.php).

Can you please check this an error.

apaderno’s picture

klausi’s picture

@kiamlaluno: can you comment why you think this should be a single application approval? I think we have enough code here so that we can perform a normal user approval when ready.

apaderno’s picture

The users who committed code are two.

mmaldonado’s picture

Hello everyone, thanks for your suggestions and work.
I have fixed the bugs and uploaded to the 8.x-1.x branch.

  1. Adding schema.yml configuration files. Check that the configuration was correct with the module https://www.drupal.org/project/config_inspector.
  2. Checking and checking arrangement of the PHP module installation, for the evaluation of php code.
  3. Definition of configuration permissions to the administration page, and definition of the property "restrict access' => TRUE to the permissions.

Greetings and I await your reviews.

apaderno’s picture

Status: Needs work » Needs review

klausi credited zberges.

klausi’s picture

Status: Needs review » Fixed

Looks good to me now.

I think we could fully approve both users that worked on this module, looks like they both contributed significant parts. Will do a single promotion for now, feel free to get back to use when you have another module to promote.

Thanks for your contribution!

I opted into security coverage for you on the project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

mmaldonado’s picture

Thanks to you for your contributions and good work, I will follow your recommendations and join the group of reviewers.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.