New answers tagged

1

You can use the onUserAfterSave event, which also includes a isnew argument, like so: public function onUserAfterSave($user, $isnew, $success, $msg) { if ($isnew && $success) { // A new user was created and successully stored in the database. // Perform some action } }


0

Finally, by looking at other scripts on other J3 sites, I find that I have to wrap the code like this and it works: window.onload=function() { // original code as above } (although I still have the cross-site cookie notices, but I think that's another issue...)


0

I'm not sure why it would be working in J4, but not J3. That said, you're unecessarily using nested for loops, rather than a single forEach iterator. You can use the following: // Create an array using Array.from(), so that we can filter later on const toggles = Array.from(document.querySelectorAll('.toggle-form')); // Iterate over the array toggles.forEach(...


2

The fatal error will be: "PHP Fatal error: Using $this when not in object context" You need to change return $this->getStores($zip); to return self::getStores($zip);


0

You cant override the controller or models of a component, only the view using https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core But, Joomla ships with a variety of core events, organised into groups where you can manipulate the data who is handle in those models and controls. https://docs.joomla.org/Plugin/Events For example, if you ...


1

To pass data between the client side in the browser and your server side component you need to use either AJAX or Web sockets base to communicate. Via a JS function on your page you make a connection with your server and execute the helper function and then return the data to the JS function that then changes the values on your page. AJAX comes in two ...


-1

This solution helped me to pass xml field data to class in helper.php. public static function xyz(){ $module = JModuleHelper::getModule('mod_name'); $params = new JRegistry(); $params->loadString($module->params); $xyz = $params->get('xyz'); return $xyz; } mod_name -> this is the module name. Please replace this. $params->...


Top 50 recent answers are included