Questions tagged [custom-module]
Ok, this tag has been used for questions related to developing custom modules, but also for question about the Joomla Custom html module.
115 questions
0
votes
1
answer
27
views
Password Field in Custom Module (encrypt before save)
For a Custom Module which loads some data from NextCloud i need to store the credentials of the given user (only users with an account can access the calendar on NextCloud). There is no "real&...
0
votes
1
answer
20
views
Can a module calling an API post to the database?
If I create a module, by standard, it doesn't have database fields.
If I use this module to call an API it works, but what if the API is down then my module shows blank. Plus there's the downside of ...
0
votes
0
answers
58
views
Call to a member function get() on bool
I'm facing an issue with a Call to a member function get() on bool error message. I've already enabled the debug status and I will present that in this post.
Let me explain what happened:
I've tried ...
0
votes
1
answer
51
views
Module Class doesn't add the class to the site module
Nothing is happening when I modify the Module Class value in a custom side module:
Not sure why it matters, but Module Style is left at default value:
I tried both with and without a space before ...
0
votes
0
answers
26
views
Add Custom Layout to core fields only to be used in module parameters
For my Joomla5 Module Blueprint Project i would like to show how we can use own layouts for core fields in our modules. The way I see it, this should be easily possible if you create a "layouts&...
0
votes
1
answer
15
views
Is there a way to autoload Forms / Fields in Custom J5 Module?
If I want to add a Subform to my Module I need to specify the "formsource" (path to xml) into my fieldsettings. But is there a way to use The Autoloader and "simply" use the Form ...
0
votes
1
answer
26
views
Custom Field Type that stores multiple field value as json gets manipulated on form load
I try to create a Custom Form Field that solves the problem where you have to much (visible) fields in a section. For example: a cards module where you have sections for the csard header, body, footer,...
0
votes
1
answer
53
views
What should I use to escape a module parameter in Joomla 5?
I have a custom module I have created.
When writing the code Chat GPT suggested that I use this code.
use Joomla\CMS\Utilities\Utility;
~
echo "<p><strong>" . Utility::escape($...
0
votes
1
answer
62
views
Joomla 4 / 5 Module Layouts naming
When using the following field in my module xml:
<field
name="layout"
type="modulelayout"
label="...
0
votes
0
answers
8
views
Joomla 4 / 5 Module Layouts naming [duplicate]
When using the following field in my module xml:
<field
name="layout"
type="modulelayout"
label="...
0
votes
0
answers
41
views
Prevent multiple times loading stylesheet module
I have made a couple of modules that loads their own stylesheet. Why I do that is because then I can optimize my website furhter and only load the stylesheet data when the module is actually on the ...
0
votes
1
answer
71
views
How to use component's joomla.asset.json file in module?
I have a module in which I would like to add a stylesheet and a script. I am creating a lot of modules for this project, and I would like to use a centralized json file for my scripts and styles, ...
0
votes
2
answers
680
views
How to display order data with simple SQL query?
I am trying to run a simple query in Joomla 4 to retrieve order data to display in a module.
Testing the query with phpMyAdmin works fine, but despite generating no errors (set to Maximum) the below ...
1
vote
1
answer
48
views
Dynamic Title Module Control
I'm using PHP to creata dynamic page title based on the menu item using Sourcer and the following PHP:
<?php
$active = JFactory::getApplication()->getMenu()->getActive();
echo $active->...
3
votes
3
answers
494
views
Migrating custom module to Joomla 4
I have a Joomla 3.x module which calls the category name from the database and then shows this in the module position.
It does this with:
$db = &JFactory::getDBO();
$id = JRequest::...
1
vote
1
answer
120
views
How to know the Joomla article ID for customization
I have a demo installation of J 3.10.9 with protostar template (https://joomla4.extrowebsite.com/).
The menu item "Home" -> blog category - has N articles.
The article "Welcome to ...
2
votes
1
answer
200
views
HTMLHelper call a custom class in a module
In the xml file for a module, I call a custom field class:
<config>
<fields name="params">
<fieldset name="basic" addfieldprefix="Myextension\Name\...
1
vote
0
answers
74
views
Delete Thumbnails Button Created as Joomla Custom Form Field Throws Me Out
I am developing a Joomla 4 Content Slider Module and it creates thumbnails in the mysite.com/cache/mymodule/ folder. I am trying to add a delete-thumbnails button. I am using a custom form field for ...
1
vote
2
answers
103
views
Can a module used in an article have parameters?
Im quite new to joomla. As far as I understood, modules can be used in an article like building blocks. Example:
{loadmoduleid 117}
Goal
I would like to give article authors a simple method to add ...
1
vote
1
answer
273
views
Use Text-Editor in UIkit Modal (Module Backend)
For a new Project i would like to have an editor instance inside a modal popup (click on an object to add / edit details). I have my Custom Field that loads an editor like so:
$editor = JEditor::...
1
vote
1
answer
41
views
Show 'menuitem' field name in frontend of module
I have the following XML in my module params:
<field name="menulink" type="menuitem" default="45" label="Select a menu item to show" description="Select ...
1
vote
1
answer
277
views
Joomla 4 - Module Backend Subform subform-row-add "row" not available
while updating one of my modules for J4 i recently noticed that the repeatable subform field no longer provides the added "row" in JS. Working JS for J!3.x:
$(document).on('subform-row-add', ...
0
votes
1
answer
88
views
Undefined property: stdClass::$showtitle in custom module [closed]
I currently have a problem that is driving me crazy.
My module shows the following error in the frontend in the DEV environment:
Undefined property: stdClass::$showtitle
.../joomla3/templates/system/...
3
votes
1
answer
155
views
Unable to get (site) template params from my module's backend
Someone at stackoverflow recommend I ask the question here, apologies if this is considered cross-posting...
OVERVIEW
I am developing a set of custom templates and a set of custom modules.
The ...
1
vote
2
answers
721
views
What is the proper way to use content.prepare?
I am trying to put a module inside another component. According to https://www.joomlashack.com/blog/joomla-how-to/module-position-component/ I can put
<?php echo JHtml::_('content.prepare', '{...
0
votes
0
answers
133
views
How to add base64 string to email as an attachment in Joomla?
I am getting data in the following format through post request.
"data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/...
0
votes
1
answer
699
views
Where do I define custom global variables in my Joomla project?
I'm using Joomla 3.9.18 and I've got a project including a component and a couple of modules. I've got a couple of variables that are the same throughout the whole project (like some prefixes and a ...
0
votes
2
answers
216
views
How to build a podcasting site?
I am new to Joomla so I want to know if it is possible to build a podcasting site with user registration on Joomla.
I want guests to be able to subscribe to an individual user's podcast (not ...
1
vote
1
answer
677
views
Getting module parameters in AJAX call using module id
I have set up an AJAX call in my module which works fine. I want to get the module parameters when I make the ajax call. So I'm doing this
$app = JFactory::getApplication();
$module = JModuleHelper::...
2
votes
1
answer
292
views
How do I pass _JEXEC to a php file?
I have a form in my Joomla! site. Once completed, the form should send an e-mail but only if some conditions have been met.
Not having been able to use standard, commercially available mailers while ...
0
votes
2
answers
57
views
What directory should contain GPL scripts from external source? Best practice?
I am making a custom gallery module using Light Gallery. In most cases, I would just place all my JS files inside /assets/js directory. But I wonder if this is good practice when using an external ...
1
vote
2
answers
357
views
Use addScriptOptions for multiple modules on same page
I am passing some params to JS in my custom module using the addScriptOptions provided by Joomla:
$document->addScriptOptions("mod_mymodule", $params));
This works fine, as long as there ...
1
vote
1
answer
2k
views
Pass PHP variables to CSS?
I want to pass some variables to my css, without using inline styles. During some research I found different sources pointing to the same solution. For example here on the Joomla forum.
Basicly they ...
0
votes
1
answer
743
views
Owl Carousel not working in Joomla, why?
I am making a custom module using Owl Carousel 2. For some reason it just doesn't work in Joomla. The html structure is there in frontend, but the owl carousel is not displayed.
Unfortunatly, there ...
0
votes
2
answers
407
views
Custom module best practices. JS inside template file or not?
I am building a custom module for Joomla. Let's call the module "mod_mygallery".
Inside the module I have a the files mod_mygallery.php, helper.php and mod_mygallery.xml.
And off course I also have ...
0
votes
1
answer
702
views
Insert custom field into modules .xml file
I have currently created a Joomla Module, and i would like to make it a bit more advanced now. I have created a Custom field, and i have tried to add it to the mod_NAMEOFMODULE.xml file. To use it ...
0
votes
1
answer
573
views
Display the component view or layout into a module
I've built my own component com_mycomp and in the component there is form in a layout and the path to this layout is:
com_mycomp/site/layouts/subscription/form.php
so I want to show this layout (form)...
1
vote
1
answer
153
views
Connecting module with com_ajax triggers request on menu item one level up
I've got a custom module which makes use of com_ajax to return values without refreshing the page.
In my helper file I'm struggling to get the module parameters within the AJAX request and it looks ...
2
votes
2
answers
744
views
How can I display the first name of the currently logged in user in content
Matthew Murphy asks the following on the Joomla Facebook Group:
Anyone know of an extension for content that replaces the name with the person who's logged in?
For example I have been working on a ...
0
votes
1
answer
248
views
how to get value for search in joomla module
how to get value for search in joomla module.
Does anyone know how to get the value for the search field? my problem is that after i search for specific data it still shows everything
In my helper....
1
vote
0
answers
150
views
Error coming from T3-framework while updating Joomla
I am trying to update the Joomla version and T3-Framework version of our website and there seems to be a bug somewhere.
Current JOOMLA version: 3.7.4
Current T3-FRAMEWORK version: 2.4.1
I first ...
2
votes
1
answer
68
views
Create a new folder in 'images' when installing module
I'm working on a basic module to display an image carousel. The module itself works well, but what I want to do now is create a new folder called 'carousel' within the root 'images' folder when the ...
1
vote
2
answers
38
views
Add Options to {loadedmoduleid ID}
I want to create a module that implements animated icons into my articles. For this I want to use the following icon-pack: https://github.com/icons8/titanic
Then I want to somehow write in my ...
1
vote
2
answers
433
views
Call com_ajax from module backend
To create thumbnails & cache files, I have to access my already created Ajax Functions inside my helper.php file.
I'm already able to call the functions within the frontend (button that is ...
0
votes
2
answers
39
views
How to prevent the modification of a customized module?
Is it possible to prevent the modification of a customized module by another administrator?
If so, how can I implement such a restriction?
4
votes
1
answer
147
views
Getting CSS style to vary with different module instances
Edit: see the Update below for the current status of the problem.
I have a module that has to display a variable number of rows, based on how the user configures it in the back-end, and several ...
1
vote
0
answers
39
views
Make Search bar dynamically appear at top of body
One of our clients would like to have a search icon in their Main menu, which when clicked causes a search bar to appear at the top of the website's body. An example of this behaviour is at https://...
0
votes
1
answer
87
views
Custom module doesn't work, messing up all page, messing up editor
I am using Joomla! 3.7.5 and JA Builder. I'm trying to create a block with custom module. Once I create it, paste code and assign position, then in page editor add block with widget - position and ...
3
votes
1
answer
2k
views
How to use HTMLHelper to add to the document head
In this post: How to add CSS/JS/an Image to a module backend @lodder shows me how to use HTMLHelper to add CSS and JavaScript.
Previously I had followed the Joomla! documentation https://docs.joomla....
5
votes
3
answers
2k
views
How to create a custom script to force the download of a .csv file that is generated in real time?
So I've been handed a custom administrator module which simply displays database table data in an HTML table. My task is to create a clickable button on the module that will generate the csv data on ...