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
...
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 ...
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'...
6
votes
Accepted
Why are Joomla url query strings commonly delimited with "&" 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 ...
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 ...
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 ...
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 ...
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 ...
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/...
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 :...
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;
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 ...
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 ...
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 ...
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 ...
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'
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')
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 =...
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 ...
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.
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
2
votes
How to get the intro image of a joomla article
I had the same problem on twitter. I was trying to add my link picture just as facebook does automatically but had to investigate the CARD Validator here https://cards-dev.twitter.com/validator ......
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/[...
2
votes
Extending joomla registeration with a plugin
User plugin's onUserAfterSave function does not return any value, means there will be no action taken by calling function based on result of this function.
In core registration, the user will be ...
2
votes
Accepted
Extending joomla registeration with a plugin
I don't know the plugin and am not entirely sure I can think what you might have in mind that concerns you about a possible failure of this.
But my logic says that if a function fails under any ...
2
votes
Can Joomla with MySql manage 500,000 users and records
Our experience is different with SiteGround, and I'm not sure I can recommend it the same way it is recommend it by others. In fact, we don't recommend any of the mainstream hosting providers to our ...
2
votes
What would be the best approach to modify multiple articles' content programatically?
You can edit the K2 articles directly from the database using phpMyAdmin. That shouldn't be a problem. Just make sure you clear your Joomla and your browser cache in order to see the updated data. ...
2
votes
How can I set the Page Heading via the Joomla API?
Joomla Dynamic page title
$document = JFactory::getDocument();
$document->setTitle('your title');
2
votes
How to get latest Joomla version from Joomla API into custom component
Recently we launched a public API on the Joomla Downloads site for things like this. Take a look at https://downloads.joomla.org/api-docs/ for information on all of the available endpoints. ...
2
votes
How to define Joomla permissions programmatically?
I realise that this is a bit late but …
Yes, it is possible for extensions to define their own permissions, as really the "permissions" are fundamentally just strings. However, the standard method ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
joomla-api × 228joomla-3.x × 93
development × 34
joomla-4.x × 28
php × 27
component × 20
joomla-2.5 × 17
plugin × 16
restful-api × 15
module × 11
ajax × 10
user × 8
database × 8
joomla-framework-1.x × 8
mysql × 7
custom-component × 7
joomla-3.3.x × 6
mvc × 6
joomla-3.4 × 5
javascript × 5
custom-field × 5
joomla-1.5 × 5
articles × 4
login × 4
url × 4