Hot answers tagged

6

This was working ok on my instance Joomla 3.9.22 with PHP 7.3.5 (and mysql). Then to test this I selected PHP 7.0.33 instead and it gave me an error: Fatal error: Declaration of MyObserver::createObserver($table, $params = Array) must be compatible with JObserverInterface::createObserver(JObservableInterface $observableObject, $params = Array) in C:\wamp64\...


4

Most form extensions would be sufficient for this job. For example with RSForm (paid extension), you can build almost any kind of forms and render them as a module, using the RSForm module in any module position, or inside any article using the RSForm content plugin. You can setup the form to send emails that you can customise to Admins, Form submission ...


3

You can't. The component looks for the helper like so: $helperFile = JPATH_BASE . '/modules/mod_' . $module . '/helper.php'; where $module is the name of your module. You will have to move the helper.php to modules/mod_modname


3

Note field can be used for this. HTML is supported. <field name="instructions" type="note" label="PLG_SYSTEM_MULTIACCOUNT_FIELD_INSTRUCTIONS_LABEL" description="PLG_SYSTEM_MULTIACCOUNT_FIELD_INSTRUCTIONS_DESCRIPTION" filter="unset" /> Resulting output:


2

Your AJAX URL is relative and ends up pointing to administrator/index.php. You can change that by prepending root path. First, load the required dependencies: JHtml::_('behavior.core'); Then change the URL: url: Joomla.getOptions("system.paths").root + "/index.php?option=com_ajax&module=my_module&method=deleteImages&format=json&...


2

Access the link fields the same way you're accessing other fields, through the main activities field. <?php foreach ((array) $activities as $activity) : ?> <?php foreach ((array) $activity->links as $link) : ?> <?php echo $link->menulink; ?> <?php endforeach; ?> <?php endforeach; ?>


2

How to get the root link of my site Joomla\CMS\Uri\Uri::base(); This prepend the scheme, host and port information But your solution is not good! You are making a http request to the server 2 times - this is not optimal!!! Making request from the php may work incorrectly if the link is closed from unauthorized users, or answer include information related ...


2

What do you exactly mean with "Joomla! native custom module"? Joomla's Custom HTML module? The OWL carousel I found on github uses some JavaScript(JS) + CSS, and some HTML tags with classes that you could put in your Joomla custom HTML module: <div class="owl-carousel owl-theme"> <div> Your Content </div> <div> ...


1

Components aren't really meant to be rendered more than once per request. Your best bet would be to make separate requests. Wrapper component and module can be used to display the page using an iframe. Or you can retrieve the page in PHP using HTTP library. There is Components Anywhere plugin which uses this method https://extensions.joomla.org/extension/...


1

I solved my problem echo JHtml::_('form.csrf'); jimport( 'joomla.html.editor' ); $config = JFactory::getConfig(); $global_editor = $config->get( 'editor' ); $user_editor = JFactory::getUser()->getParam("editor"); if($user_editor && $user_editor !== 'JEditor') { $selected_editor = $...


1

Thanks to those who cooperated on this issue. I had solved this by calling the public url (full url) of the module from the administrator, without letting JPATH_BASE fill in the location. For which modify the url to call by: url: "'.Uri::root().'index.php?option=com_ajax&module=my_module&method=deleteImages&format=json", You must add ...


1

Although the other answer works, it's not very efficient. Instead everything but $query->values() call can be done outside the loop. This way multiple rows are inserted with a single database query: $query = $db->getQuery(true) ->insert($db->quoteName('#__table_name_')) ->columns($db->quoteName($columns)); foreach($arrayDecodedJson ...


1

The solution was simple. Put $query = $db->getQuery(true);, inside the foreach loop. Make an array in order to put inside the arrays values like : $values = array($db->quote($value['value1']),$db->quote($value['value2']),$db->quote($value['value3']),$db->quote($value['value4']) Then you make the query like so inside the foreach loop: ...


1

You can do this with a content plugin quite easily. See this guide for starters. You create the XML in your plugin form/modwhatever.xml. Now you can add whatever fields you wish - you might want to look at the articles form for examples of user, publishing dates etc, which can be located in administrator/components/com_content/models/forms/article.xml. Your ...


1

I am not aware of any ready made multi-user portfolio extension for Joomla and you may need a combination of extensions together with the core Joomla features to achieve all the functionality you require. If you want photographers to be able to manage photo albums from the front-end of the website, this limits your choices quite a bit as there are only a few ...


1

Joomla has at least some of the required functionality such as custom fields and other features can be added using third party extensions. There is at least one extension in the Joomla Extensions Directory, SP Movie Database to make it easy to create a movie database but it may not have all the features you require (e.g. front end access for website visitors ...


1

Zhang, Welcome to Joomla Stack Exchange! It's as simple as \r\n vs \n - text files deal with differently encoded line breaks depending on where you view them. The reverse can happen when you download a file and open it in various programs, and you'll find what was closed up online is double spaced in the editor. Because each OS have different ASCII chars for ...


Only top voted, non community-wiki answers of a minimum length are eligible