Questions tagged [development]
This tag is for question about the development of features or extensions in Joomla.
391
questions
6
votes
4
answers
7k
views
Date/time picker in component
In my custom component, I need to enter date and time.
Joomla's standard calendar-element supports a date picker - but no time picker.
Can anyone help me and point me to an alternative date and time ...
8
votes
2
answers
5k
views
Display system messages inside component instead of in the template
By default Joomla 3 system messages (messages, notices, warnings) are displayed in a certain position of the template using
<jdoc:include type="message" />
Would it be possible getting more ...
1
vote
1
answer
527
views
How can I add custom user field values to an article?
I have created a custom user field named "Gender".
How can I show this field in an article?
I can only manage to show: username, name, email and User Id
Here is my current Sourcerer code to access ...
3
votes
1
answer
3k
views
How to write a query with GROUP BY and ORDER BY using Joomla's query methods?
I have the following query that I need to convert to Joomla using JDatabase. This query executes as intended in the phpMyAdmin.
SELECT `id`, DATE_FORMAT(`estEventDate`, '%b %Y') AS estDate, COUNT(`id`...
2
votes
1
answer
105
views
Set plugin order when installing
During plugin installation, is it possible to set it to be always the last one in its group?
Thanks
2
votes
1
answer
72
views
MVC what stage sets a task if none provided
I am trying to understand Joomla's MVC logic. please help me figure out the processing of the task
Unedited code from a Joomla package has the front end article edit form with the task field, but its ...
1
vote
1
answer
504
views
in Joomla 3.8 default search tools do not respond in my own component and cannot set and get state of the filters
I try to get some help from you to spot what I am doing wrong (what I am missing) on applying search tools and filters in the admin of Joomla 3.8 in my own component.
I am pulling my hairs out since ...
1
vote
2
answers
780
views
Change user default language programmatically
In a custom component I'm making, I need the user, in his private area, to choose the default language for the web.
It is a custom form, and I already render the language selector, but I don´t know ...
0
votes
1
answer
52
views
How do you start new project design implementation? [closed]
You choose the framework and extension for your new website project and actually all is set. The designer sends you some Photohop files with new design.
I tried to find online some instruction what ...
1
vote
1
answer
136
views
Get whole POST with JREQUEST_ALLOWHTML
In order to get the whole POST I do
$app = JFactory::getApplication();
$jinput = $app->input;
$data = $jinput->getArray($_POST);
that works ok.
But I want to apply the filter ...
2
votes
3
answers
2k
views
How to launch an asynchronous php process
I am developing an ecommerce component.
I have noticed that when the user makes the purchase, the process takes between 18 and 20 seconds, which is quite unacceptable.
Following up the code, I have ...
6
votes
1
answer
459
views
Abandonware user self-registration procedure in Joomla core
Joomla 3.6 has two different controllers intended to create a new user:
UsersControllerRegistration::register()
defined in components/com_users/controllers/registration.php and
UsersControllerUser::...
2
votes
1
answer
591
views
Reload admin form after save field in database
In a custom component I need the user in the edit view of an item to be able to load a field in the editor field through modal and ajax.
The case is the user can fill an editor field from a text ...
1
vote
1
answer
638
views
file upload in admin backend - custom component
In my custom component/admin, in the item edit template I am trying to let the user upload a file.
The problem is that the file is not being passed in my save function. There is not even in the array ...
1
vote
1
answer
900
views
Get com_contacts item by id?
I need to get a com_contacts item the same way Joomla does (so I can re-use a template for example). I know I can get the item by querying the database directly, but that won't prepare things the same ...
1
vote
1
answer
213
views
Why does the truncateTable() method create an empty string for a query and fail to delete rows?
I have the following code attempting to truncate a table. The Joomla documentation makes me believe this will work, but it does not. What am I missing?
$db = JFactory::getDbo();
truncate_query = $db-&...
3
votes
3
answers
821
views
Active tab changes after save in Joomla administrator
I have created a new component. At the administrator backend, the active tab goes back to the first tab (which was declared in edit.php) when I click on 'save' after I have modified a field in another ...
4
votes
1
answer
53
views
How is the relationship between template styles and menus stored in Joomla 3.x?
I'm working on a tool that imports content for a new language. As part of that process, I'm creating a copy of a template style specific to the new language. After making a copy of the template style ...
7
votes
2
answers
225
views
Errors de-crypting libsodium encrypted values from database
I've been implementing some encryption at rest in one of our Joomla components, but keep getting a couple of errors when de-crypting the values when they're written and read from a database.
So I ...
3
votes
4
answers
730
views
Check if a string is an URL
just need to check if a given string is an URL or something else.
Can I use something like the following or Jomlla already has something to deal with it:
$url = "http://www.my_url.com";
if (!...
3
votes
1
answer
120
views
Component Development PHP Version Check
I've been developing a component, and have been trying to find some information, to no avail, of having my component perform a check of the PHP version before install. If PHP is greater than 7, then ...
1
vote
1
answer
36
views
Using a non-numeric ID in a backend component
In a backend component, I have one table that does not have numeric ID numbers. It is instead indexed on a unique alphanumeric value (think like a list of U.S. territories indexed on abbreviation, e.g....
2
votes
2
answers
773
views
Call Controller's Publish-Method from CLI or Helper
I would like to call the publishing-method I defined in my item's controller from a CLI-script or a helper (which is included in the CLI).
The best case would be to call it like this:
$...
2
votes
1
answer
2k
views
Does anyone know where JFactory::getApplication()->getParams() is declared?
I'm working on my MVSC implementation. I'm planning on adding a function called getParams() to my base view, so that I don't have to keep merging item, menu, and component params before rendering the ...
1
vote
2
answers
1k
views
What is wrong with this XML Package Installation file? Joomla cant find XML on Package
I am following everything on: https://docs.joomla.org/Package
And still got the error: JInstaller: :Install: Can't find Joomla XML setup file.
The XML file has the correct name.
The package zip ...
5
votes
2
answers
3k
views
What is best approach to show the component page in popup-modal window without header and footer?
I have developed a custom component that displays some information. I want to show the same information in modal popup window without header and footer information. what should be best approach to ...
5
votes
2
answers
3k
views
How can I can get the new record ID after saving data with JModel?
We need to create a new usergroup for the installation of our component, and the below code saves the data just as expected. However, retrieving the ID of the Usergroup for later use "isn't working". ...
13
votes
3
answers
4k
views
Best method to check if a component is installed/enabled?
Between joomla 2.5 and 3.x what is the best way to check if another component is installed and/or enabled? There exist a helper class called JComponentHelper but I believe the isEnabled function will ...
2
votes
1
answer
102
views
Change 'Help' button url inside plugin
Is it possible to change the 'help' button url inside a plugin (that I am developing) to get the documentation from my site?
I managed to add not replace, with JToolbarHelper::help()
4
votes
1
answer
1k
views
Using external library with a component
My component is using phpExcel library; I put it into /libraries/phpexcel/Classes. This is an independent (and quite big) library, so I thought, that it would be wise to tell the admin where to put it ...
2
votes
2
answers
143
views
Natively override core extension classes from templates?
Is there any way to do this natively yet (ie. without using a plugin)? I'm hoping there's native support similar to the way the old MVC Override plugin allowed class overrides using a /code folder in ...
0
votes
1
answer
52
views
Advice on a manager/employee area
Hi this is most a request for help and advice than a question. I hope this is fine with the policies of this site as I think the answers can be useful for more users.
I developed a custom component ...
5
votes
2
answers
225
views
How to reverse-engineer a 3rd party Joomla extension to clone it and to be able to make modifications to it?
I have a template from a provider in which they've included a new content type and a com_content override. The template is a quick install.
I'd like to find out
- what files have been added by ...
1
vote
1
answer
80
views
What is the difference between onAfterGetMenuTypeOptions and onBeforeRenderMenuItems plugin triggers
Both of these plugin triggers have been mentioned by @Craig in his reply to another question, but what they actually do is not so clear.
In /administrator/components/com_menus/models/menutypes.php ...
1
vote
2
answers
474
views
Set Prefered Template with parent:display()?
I have a site that uses 2 template styles for 2 different domain names running on the same Joomla installation. (Both have the same root template.)
I'm creating a custom component and a specific task ...
1
vote
1
answer
70
views
Localhost causing issues with external websites, joomla components
I have recently come across an issue where my Localhost Apache server (and/or MySQL server) will interfere with some random websites.
Most recently I discovered the localhost was causing issues on a ...
2
votes
4
answers
2k
views
How to retrieve data from the Joomla DB via jQuery.ajax without controller
I need to retrieve some data from #__virtuemart_order_histories in templates/active_tmpl/html/com_virtuemart/orders/details_history.php via jQuery.ajax. I know that I can do it with a new &task= ...
0
votes
2
answers
39
views
Joomla learning extension
I am looking for an independent platform, or an "extension" for joomla, that has or allows to develop the following characteristics:
Role 'Student' - This has a personal page where you will be ...
5
votes
3
answers
5k
views
Migrating component from 2.5 to 3.3
This documentation: Adapting a Joomla 1.5 extension to Joomla 2.5
http://docs.joomla.org/Adapting_a_Joomla_1.5_extension_to_Joomla_1.6#Renamed_events
Really helped me when I migrated my component to ...
1
vote
2
answers
2k
views
Login to Joomla website from mobile App
Background
I have Joomla website and mobile App that's running on different server (programmed using JavaScript). Both belong to the same party, and the users have similar accounts on both with ...
40
votes
6
answers
34k
views
What is the proper way to make an AJAX call in component?
I am developing a custom component for Joomla! 3.x and want to make an AJAX call inside it to retrieve some data. What is the proper way to do it?
1
vote
0
answers
17
views
Desktop application for macOS to generate components, plugins and modules
I would like to know if there's a desktop application to easy generate components, plugins and modules for Joomla.
I have tested this two generators:
https://www.npmjs.com/package/generator-joomla3
...
2
votes
1
answer
5k
views
How to add meta tags to a page header based on an url parameter?
Hello Joomla community,
I'm forced to write a minimum Joomla (3.4.1) plugin that injects custom meta tags based on an URL parameter. It will be used to serve localized Facebook Open Graph stories.
...
2
votes
3
answers
904
views
joomla loadFormData
I am new in Joomla component development. I have used this document to develop the component. In this document there is a function loadFormData in Helloworld model as below:
protected function ...
1
vote
0
answers
432
views
How to dynamically add extra input fields in k2 item form
Problem
I'm currently working on a form which has to implement a way to create a schedule for a single day. It should use a time for when an event starts, and a description about the events.
The ...
1
vote
1
answer
67
views
JRegister::merge does not give correct results
I am developing a component. At the site part model, inside getItem($pk)
I am using:
$params = new JRegistry;
$params->loadString($this->item->params, 'JSON')...
1
vote
1
answer
165
views
pdf protecting with joomla extension
I'm developing a Joomla site.
There are 3 features needed:
- file management, to grant access to an user to certain PDF files
- PDF edit to insert the user's name
- PDF edit to protect the pdf with ...
1
vote
2
answers
315
views
Plugin to change incoming url
I am creating a component but need to redirect all incoming requests to the new component. The URL looks like this currently: index.php?option=com_component&view=xxx and when this comes in I want ...
2
votes
1
answer
674
views
com_ajax and JFactory::getUser()
I'm using com_ajax for requests, and I've run into a problem.
I'm trying to determine if the user making an AJAX request is logged in. When I call JFactory::getUser(), it's returning a guest user, ID=...
5
votes
1
answer
314
views
Redirecting to component when using SEF
Im trying to perform a redirect to a component's view
<form role="form" action="<?php echo JRoute::_('index.php?option=com_rouf&view=front'); ?>">
Because SEF is enabled im getting ...