Valentin Despa
  • Member for 7 years, 9 months
  • Last seen more than 1 year ago
What is the proper way to make an AJAX call in component?
Accepted answer
48 votes

PLEASE NOTE THAT THIS ANSWER is already a few years old and was not updated. Feel free to edit / comment if you think something is no longer exact. Abstract There is almost no really official way ...

View answer
Can I use PostgreSQL with Joomla 3.3
Accepted answer
18 votes

You can use it, but I would not recommend it especially if you are not familiar with Joomla's codebase and specific PostgreSQL particularities. In the last couple of months I looked into a couple of ...

View answer
Add a custom button to a core backend component
Accepted answer
11 votes

Here is a draft idea using a plugin: You need to create a system plugin (I am not getting into that) and to use the event onBeforeRender. Inside you get an instance of your Toolbar and append the ...

View answer
How to effectively distinguish test and production site?
Accepted answer
10 votes

This is a rather very tech solution as it requires some experience in configuring Apache. The advantage is that you don't have to hack any files in the Joomla! installation itself. Basically what I ...

View answer
How can we get involved in Joomla! CMS Testing?
Accepted answer
10 votes

First of all, this is the best way I know to learn new skills and to understand how Joomla works. You are not giving back, but getting back a lot as well. Disclosure: I am a Joomla Bug Squad (JBS) ...

View answer
Input filtering an array of integers, words
Accepted answer
8 votes

OK, so let us look at what options are available. The examples below are using JInput and have been tested in Joomla 3.3. I am POSTing the following data at Joomla: stuff[abc]=1 stuff[def]=75 stuff[...

View answer
What does the view.html.php and default.php file do in the view section?
7 votes

It is just a best practice used in many frameworks. The idea is to keep your HTML code in files which are as simple as possible (meaning almost no PHP code) so that they are easy to maintain / reuse. ...

View answer
How to develop safe Joomla extension?
7 votes

Following the official documentation, here are some steps on the topic Secure coding guidelines: Validate any data you get from the request (POST, GET, COOKIES, etc.). Don't trust the user and be as ...

View answer
Load css file using absolute path for my component?
Accepted answer
7 votes

To load CSS and Javascript files, you want to use JUri::base() instead of JPATH_COMPONENT_ADMINISTRATOR. Also have a look at a more advanced loading mechanism, JHtml. Adding JavaScript and CSS to ...

View answer
Tutorial for setting up PhpStorm to work with Joomla
Accepted answer
7 votes

I must admit that switching from Eclipse to PhpStorm is not the easiest (as the whole IDE is quite different) thing but it's worth the effort. You cannot have multiple projects opened in the same IDE ...

View answer
Is there a good component to prevent dos attack or hacking for 3.X branch of Joomla?
Accepted answer
6 votes

A component cannot prevent a DOS or DDOS attack. Actually it is a good practice to make a separation of concerns. You website (or let us call it web application) has the role of providing business ...

View answer
What is the best place to store downloadable PDF invoices?
6 votes

This may not answer your question directly, but I wanted to give another point of view on this question. I would try to avoid as much as possible storing documents that you can generate. Reason: you ...

View answer
Any Joomla & PHP podcasts from which I can learn?
Accepted answer
6 votes

This is a community wiki. Feel free to contribute in a constructive manner. Joomla Podcasts Joomla Beat Podcast by Peter Bui This is a general podcast about Joomla. Lots of interesting interviews, ...

View answer
How to test a Joomla 2.5 component
6 votes

Sorry if my answer does not directly addresses your issue, but it is important to understand what unit testing is and how to use it, no matter if we are talking about Joomla or not. You have addressed ...

View answer
Unable to create external link to javascript:void();
Accepted answer
6 votes

It was actually a bug that it worked (or to be more specific a security issue). The current behaviour is correct. References: Menu item type of External URL can not be saved with javascript:void() ...

View answer
JDatabaseDriver->replacePrefix( ) Allowed memory size of ... bytes exhausted
Accepted answer
6 votes

There is basically nothing wrong with replacePrefix(). What actually happens is that you are sending to MySQL a string which is too large for a predefined setting (max_allowed_packet) and is ...

View answer
What differences (if any) are there between Joomla sessions and php sessions?
Accepted answer
6 votes

JSession is based on the standard PHP session handling mechanism but I would not say they are interchangeable, as Joomla is directly "talking" to JSession and not to the super global. In backend you ...

View answer
Mootools-more.js conflicting with Bootstrap Button dropdowns
Accepted answer
5 votes

This is the only workaround I've found so far (opened for review): // MooTools window.addEvent('domready',function() { Element.prototype.hide = function() { alert('Intercepted'); ...

View answer
JInput->get() , how does it work?
Accepted answer
5 votes

Source of foo are the PHP superglobals such as $_POST or $_GET. So it's data what the user submits via a form, URL or cookie to your component. So you are receiving in a safe way a parameter that was ...

View answer
Is there a roadmap for Joomla development?
5 votes

As of 25 April 2014 the PLT has published a new sort of a "roadmap" or a Development Strategy for Joomla! basically announcing a new release cycle. Joomla! Development Strategy - here is the whole ...

View answer
Question/Advice about PHP code development in Joomla!
4 votes

*First of all, it is generally a bad idea not to use HTTPS when dealing with sensitive data. Also storing the data itself in the database without any encryption may later lead to a leak. You should be ...

View answer
Testing Joomla site speed
4 votes

There are some tools used in the industry for "stressing" websites. They are rather complex tools and NOT appropriate for small websites or shared host environments. Apache JMeter™ Gatling To do ...

View answer
Run a snippet of code in PHP using Joomla
Accepted answer
4 votes

While not clearly explained, this actually looks like a script that does not need to run in Joomla, in the sense that is not a typical MVC extension. So you don't need to edit com_content or anything ...

View answer
Add html in menu title field
4 votes

No, you don't need to add HTML to a menu item. Sometimes when Joomla removes stuff for you is because you should not do it like that (even if it was much simpler). What you need is a template ...

View answer
How to add conditional comments for IE when including CSS / JS?
4 votes

It looks like JDocument (actually JDocumentHTML) has a hidden method: addCustomTag. $customTag = <<<CUSTOM <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --...

View answer
Joomla Framework : Getting Started Guide
4 votes

Tutorials Creating a Stand-alone Application, from Joomla! Documentation How to develop a web app with Joomla framework, by escope.cz Project examples David Hurley has created a sample app running ...

View answer
How to do SQL exception / error handling compatible with 2.5 and 3.x?
4 votes

Watch out for exposing too much info! Please note that by throwing SQL errors into the wild, you may expose your database structure or other sensitive information. I would throw SQL errors only in ...

View answer
Module XML with SQL field (JFormFieldSQL) - Custom Form Field - Check if table exists
Accepted answer
3 votes

Your concern is justified. Indeed, if there is an SQL error, the backend of the module will crash. If this is a must have for you, I would look into extending the JFormFieldSQL with a custom ...

View answer
Where is the right place to check for ACL / Session expired / permissions?
Accepted answer
3 votes

Session and ACL are two separate concepts, even though they are coupled, so it good to understand the distinction between them. I also assimilate the term permissions with ACL. Session Since you are ...

View answer
How to load Joomla session from external AJAX call
3 votes

To load the session you need to get it from JFactory. $session = JFactory::getSession(); Read more on How to access session variables set by an external script.

View answer