Build a Joomla Admin Chat Module
Learn to code a Joomla Administrator module that will allow your customers to chat with you from within the Joomla Admin. Never ask them to leave Joomla for help ever again, instead allow them to ask for help there and then just where they need it.
The things we made:
Free download Admin WhatsApp Click to chat button
Free download Admin chat with Tawk.to
Catch it again on YouTube:
A summary of our discussion
The team discussed and implemented various features for a chat functionality module in Joomla, including integration with different chat platforms, placement options, and user interface elements. They worked on updating an outdated module to current Joomla standards, debugging code issues, and adding new features such as country code selection and pre-filled text options. The group also shared personal anecdotes and discussed potential future projects, including integrations with platforms like Zapier.
More detailed coverage of what we discussed
Admin Chat Module Placement Discussion
Eoin proposes creating an admin module for a chat functionality that can use Talk.2, WhatsApp, or Facebook Messenger. The group discusses various placement options, including a floating button, the side menu, or the top menu bar. They consider screen size limitations and mobile usability. After deliberation, they decide to place the module in the menu position of the admin sidebar, either above or below the existing menu items, as it provides flexibility without conflicting with other elements.
Building Chat Modules for Different Systems
The group discusses how to approach building modules for different chat systems. They decide to each tackle one system: Adam will work on Talk, Mark will try Crisp, and Eoin will handle WhatsApp and possibly Facebook Messenger. Emmanuel will observe and learn. Eoin offers to share his screen and walk Emmanuel through the process. The team encounters some initial setup challenges with Git and repository initialization. Mark quickly builds and installs a module for Crisp but faces a domain-related error, which Emmanuel suggests can be resolved by adding the domain in Crisp's settings.
Updating Joomla Module to Current Format
Eoin and the team discuss updating an outdated Joomla module to the current format. Mark advises on the correct file structure and namespace changes needed. They review and modify the XML file, provider, and dispatcher to ensure compatibility with Joomla 5 standards. The team also discusses language file placement and the creation of a new admin module for chat functionality. Adam mentions he's working on a similar module with a dropdown select for different chat options. Eoin begins implementing the changes, committing the initial setup to Git, and starts working on the module's menu item creation.
Strategy Game and Coding Discussion
Emmanuel shares that he recently became the number one player in a strategy game he's been playing for about three weeks. Eoin relates a story about impressing a date with his Minesweeper skills from his teenage years. The conversation then shifts to coding, where Eoin is working on adding a WhatsApp link to a menu item. Mark and Adam provide guidance on how to implement this feature, suggesting to add it as HTML rather than a menu item. They discuss how to properly set up the parameters and variables in the module's dispatcher file. Adam also mentions that he modified Mark's module to include slots for multiple chat options. The team then troubleshoots some errors in Eoin's code, focusing on properly setting up the dispatcher file and handling the phone number parameter.
Joomla Module Debugging and WhatsApp Chat Button
The team works on debugging and improving a Joomla module for adding a WhatsApp chat button. They identify and fix issues with phone number formatting and variable handling in the dispatcher file. The module now successfully displays a WhatsApp chat button with the correct phone number, but still needs adjustments to meet WhatsApp's requirements for international phone number formatting. The team discusses using PHP string replacement functions instead of regex for simpler operations and considers adding a function to handle phone number formatting.
Country Code Selection for Phone Numbers
The team discusses implementing a country code selection feature for phone numbers in their application. They decide to create a separate custom field for country codes, using a dropdown menu populated with international phone country codes. They remove the "+" symbol from the country code values to comply with WhatsApp's requirements. The team also adds error handling to ensure both country code and phone number are provided. They implement a check to remove leading zeros from UK phone numbers. Finally, they add a pre-filled text option for WhatsApp messages, which is URL encoded before being added to the link.
Implementing Site Name in Contact Form
The group discusses a technical discussion about coding. Adam and Eoin work on implementing a feature that incorporates the site name into a pre-filled text field for a contact form. They debate the best approach, ultimately deciding to use language strings for better localization. The code is modified to include the site name and pre-filled text in a way that can be easily translated. They test the implementation and discuss making further improvements to ensure consistency in using language strings throughout the code.
Implementing Account Type Feature in Extension
Eoin and Adam discuss implementing a feature that requires a business account. They decide to add a note in the XML file and create a radio switch for users to select their account type (business or personal). They then work on modifying the code to display different content based on the account type selection. The implementation becomes more complex as they consider various user scenarios and try to make the extension user-friendly for others. They also discuss proper syntax and formatting of the PHP code within the HTML template.
Code Structure and Joomla Integration
Eoin and Adam discuss the code structure of their project, debating the merits of different approaches. They agree that the current implementation is more beginner-friendly, though not the most efficient. They add comments to improve code readability. The group then tests the code and discovers a minor issue, which they quickly resolve. Eoin mentions he needs to leave for a family birthday dinner. Emmanuel expresses interest in building Joomla modules for integration platforms like Zapier, highlighting the lack of comprehensive Joomla support in these services. The group discusses the potential for creating such integrations in future coding sessions.
AI-generated content may be inaccurate or misleading. We don't check it for accuracy, watch the video if unsure.
Registering your attendance will set up automatic reminders for attending.