Skip to main content
Share Your Experience: Take the 2024 Developer Survey
15 votes
Accepted

What is the Joomla Execution Flow, after a request reach to index.php till the final output on the browser?

Answer's ToC 1. Intro for beginners + beginners resources link 2. About Joomla Architecture 3. Joomla Execution Flow - How Joomla Works 4. Supplementary Resources 1. Intro for Beginners ...
FFrewin's user avatar
  • 19.7k
12 votes
Accepted

How to Use IN Clause in Joomla Query

First, the trouble with ->where($db->quoteName('status') .' IN '.$db->quote(1,2,4)) is not only that a syntax error is generated on the query, but also that $db->quote() is treating 1 as ...
mickmackusa's user avatar
  • 4,826
10 votes
Accepted

How to redirect user with system message in Joomla 3

Passing the message via the redirect function is deprecated, but both redirect() and enqueueMessage() are still both fine to use on their own. You simply need to use both together, like so: $app = ...
Lodder's user avatar
  • 26.9k
9 votes

Joomla/PHP how to add <meta property> instead of a <meta name> tags to the the header?

Starting from Joomla 3.6 you can add 'property' attribute using setMetaData $doc = JFactory::getDocument(); $doc->setMetaData('og:image', 'https://cdn.joomla.org/images/Joomla_logo.png', 'property'...
webchun's user avatar
  • 2,418
8 votes
Accepted

Get menu item by ID in Joomla 3

Not a big difference so far for what you are after... $mainframe = JFactory::getApplication(); $menu = $mainframe->getMenu(); // Use this if you want to get all menu items from a certain menu $...
FFrewin's user avatar
  • 19.7k
6 votes
Accepted

Why are Joomla url query strings commonly delimited with "&amp;" instead of "&"?

It is to do with with HTML/XHTML compatibility. Before HTML5 having unencoded ampersands in URLs and in some other contexts was invalid. From XHTML validator: Entity references start with an ...
Sharky's user avatar
  • 11.4k
6 votes
Accepted

Joomla API and Credentials

Routes can be declared public by setting a flag. And it can be set after routes have been registered with the router. So this can be done using a custom web services plugin. It would use the ...
Sharky's user avatar
  • 11.4k
5 votes

Generate static html from the content of the site with Joomla 3.x api

Any Joomla website, by default, will have it's content available in RSS format by just adding format=feed to the end of the URL (mainly on category blog pages). It is relatively easy to parse RSS fees ...
itoctopus's user avatar
  • 3,226
5 votes
Accepted

Is there an event like "OnAfterCompileHead"?

I have to edit my answer, as I think I didn't get right what you are actually want initially. With all the 3 events you can do changes on the head. If you have other plugins that do the same, then you ...
FFrewin's user avatar
  • 19.7k
5 votes
Accepted

Create user with PHP with "Receive System Emails" set to no

In $jdata array you are setting sendEmail to 1 which is activating the "Receive System Emails". Just set sendEmail to 0 and you are done :)
Joomler's user avatar
  • 1,811
5 votes

Can Joomla with MySql manage 500,000 users and records

On shared hosting? Joomla will be able to handle the amount of users, however I don't know a single hosting provider that will allow this amount of server requests on their shared hosting package. I'...
Lodder's user avatar
  • 26.9k
4 votes

How to redirect user with system message in Joomla 3

The best thing to do is to handle all redirects directly in sub controllers where you just need to use $this->setRedirect($url,$msg,$type); and MVC will do the rest of the job. If you need to ...
Kitase88's user avatar
  • 977
4 votes
Accepted

How can I set the Page Heading via the Joomla API?

you can set this variable as so: $this->params->set('page_heading', "garr, I be a page heading"); Make sure you insert this code before the page_header is loaded, as setting it after it has ...
Eoin's user avatar
  • 1,954
4 votes

Replacement of deprecated enqueueMessage() from JApplication

It's not deprecated on JApplicationCms, the best way to call it would be: $app = JFactory::getApplication() $app->enqueueMessage('My Message here', 'success'); See https://api.joomla.org/cms-3/...
Adam M.'s user avatar
  • 447
4 votes

Is there a way to add rel='preload' using addScript/addStyleSheet?

If I understand the usage of preload correctly, in 3.x you can add these links manually with addHeadlink(): // Preload resources $mediaVersion = $this->mediaVersion ? '?' . $this->mediaVersion :...
Sharky's user avatar
  • 11.4k
4 votes
Accepted

get intro-image from article?

When developing, error reporting should be enabled. You'll see this: Notice: Undefined property: Joomla\CMS\Table\Content::$item Access the images like this: $images = $article->images;
Sharky's user avatar
  • 11.4k
4 votes
Accepted

What is the correct way to programmatically delete a joomla user and their data?

The documentations has this : https://api.joomla.org/cms-3/classes/Joomla.CMS.User.User.html but it seems that no parameters are passed to user->delete? That's correct. This method works on the user ...
Sharky's user avatar
  • 11.4k
4 votes
Accepted

Is Joomla4 API/Web Service ready for production use?

You can download the full API collection here: https://github.com/alexandreelise/j4x-api-collection thanks to Alexandre Elise. This will import directly into Postman which will enable you to use the ...
Eoin's user avatar
  • 1,954
4 votes

Joomla 4 API Question

Academic explanation of J! 4 webservices route mapping This is an explanation of how Joomla 4 (hereafter referred to as J! 4) webservices route resolution and method finding works. Disclaimer What ...
Joe Hacobian's user avatar
3 votes
Accepted

{emailcloak=off} any way to do this programmatically?

He will distribute it. So he is trying to find a workaround inside the plugin. One solution could be to encrypt the email in base64 on php side and decode it on javascript with Base64.decode(...
Pierre-André Vullioud's user avatar
3 votes

Do I Use the JDate correctly?

$tz is the timezone. After setting it to the default system timezone the 2 timestamps match! By default, the timezone on Joomla is UTC. My system timezone was 'Europe/Berlin'. Hope this helps other ...
quokka-web's user avatar
3 votes
Accepted

Load language file in view constructor

JROOT is not a valid path constant. Change it to JPATH_ROOT. Or use JPATH_ADMINISTRATOR instead of JROOT . DS . 'administrator'
Sharky's user avatar
  • 11.4k
3 votes
Accepted

How to get URL parameter via Joomla api with decoded strings?

Use string filter instead of the default cmd filter: JFactory::getApplication()->input->get('myParam', '', 'string') Or: JFactory::getApplication()->input->getString('myParam')
Sharky's user avatar
  • 11.4k
3 votes

Joomla API for identifying if new visitor?

Assuming you have a database table setup for this, you can use the following code to perform you check: // This function is taken from my own extension public function getIpAddress() { $server =...
Lodder's user avatar
  • 26.9k
3 votes
Accepted

Is there a way to add rel='preload' using addScript/addStyleSheet?

I'll answer this myself too as I've been looking into lazy loading assets recently. preload may seem like it asynchronously loads files but it doesn't. They're still considered render blocking. This ...
Lodder's user avatar
  • 26.9k
3 votes
Accepted

How to measure server performance in joomla (not from outside)?

To show profiling information in Joomla, enable Debug System option in Global Configuration, enable System - Debug plugin and enable Show Profiling option in plugin's configuration.
Sharky's user avatar
  • 11.4k
3 votes
Accepted

How to initialize joomla modal through js

It's simple, I found it possible to use Joomla.initialiseModal( document.getElementById(YOUR_MODAL_ID) ) to initialize the modal
pdutie94's user avatar
2 votes

How to SET "lastvisitDate" for a Joomla user

Answering this based on my comment. lastvisitDate is already stored in the JUser, object so you can access it like so: $id = 1; $user = JFactory::getUser($id); echo $user->lastvisitDate;
Lodder's user avatar
  • 26.9k
2 votes

Can't clear a cache of Joomla module

Perhaps your module has an override in the template used by the website. You can verify this in the template configuration page of the back-office. If that's the case, just delete the /templates/[...
user2067592's user avatar
2 votes

JFactory::getSession() in module, produces a 500 error

I think I found out my mistake that causes the error. I have later in my code a: print_r($session); and this is actually the code that is generating the 500 error. I must use something like: ...
tafvita's user avatar
  • 31

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