Blog

Add extra cURL options in HttpTransport

| Joomla

The HttpFactory can be used to instantiate a transport driver. One of the drivers that can be used is cURL and is usually specified as first driver to use. cURL takes a number of options that can be set and how to add extra cURL options in HttpTransport is explained in this article.

Read more ...

Post credentials using HttpTransport

| Joomla

Using Joomla may involve retrieving data from an external source. This can be achieved in Joomla by using the HttpTransport class as explained in the Making external calls using HttpFactory article. It may be needed to provide some sort of authorization on the external call, this explains how to post credentials using HttpTransport.

Read more ...

Customizing the Joomla result messages per view

| Joomla

Whenever you publish, unpublish, trash, archive, or delete an item a message is shown like 1 item published. This message is informative but general as well. When you are in the article view this message will read 1 article published. This is already more specific, this tells us exactly that 1 article has published and not just an item. Most components have more than 1 view and each view will display the same message 1 item published like the Smart Search in Joomla. That can be done better.

Read more ...

Making external calls using HttpFactory

| Joomla

Usually when we want to make an external call we use cURL to make this call. Setting up the cURL instance is quite cumbersome and in general hard to remember all the things you need to setup. There are also servers that do not support cURL which means your code won't work. Building a fallback is required in those cases.

Read more ...

Adding stylesheets, scripts, and images

| Joomla

There are many ways in which you can add media files to your site. You can add files using relative URLs or absolute URLs, of course you can include them inline as well. In reality what happens is that we mix all these different ways and it becomes a bit of a mess. A better way would be to use one way for all these cases and Joomla! actually offers that through the HTMLHelper class.

Using the HTMLHelper class you make all your links consistent and it is easy to manage them.

Read more ...