Questions tagged [joomla-3.x]
For question regarding Joomla 3.x of the Content Management System. This includes versions 3.0 up to 3.8.
2,999
questions
40
votes
6answers
33k views
What is the proper way to make an AJAX call in component?
I am developing a custom component for Joomla! 3.x and want to make an AJAX call inside it to retrieve some data. What is the proper way to do it?
27
votes
10answers
3k views
What tools can I use to help assist me with Joomla development?
I'm new to Joomla development and I would like to know what tools and/or software can assist me in in developing both the backend and frontend of a Joomla site. This would also include any future ...
24
votes
1answer
8k views
How to save Custom Fields in Core components
I'm trying to add a single, simple field to each #__content item, and I've very carefully followed the tutorial at Adding Custom Fields to Core Components, substituting "content" for "contact". I now ...
21
votes
6answers
20k views
How to detect if user is Super User?
To determine whether the visitor is a guest, we use something like this :
if ($user->guest) {
echo 'Hello, guest!';
}
Now, if i want to determine whether the visitor is a registered SuperUser (...
20
votes
2answers
2k views
How to let users delete their account from the frontend?
How can i let my registered users delete their own account from the front-end?
17
votes
4answers
8k views
Joomla Registration: Remove unneeded fields
First, I am aware of this question:
https://stackoverflow.com/questions/14799733/remove-name-field-from-joomla-registration-form
But the link in it's answer is dead, and the file path mentioned ...
17
votes
4answers
33k views
Adding custom CSS styling on some of my pages
I would like to add custom CSS styling to some of my pages to give them a unique style, and override the default template styling.
How can I achieve this in Joomla?
17
votes
3answers
12k views
Joomla tmp directory - What is it for and can I delete its content?
My Joomla website currently uses about 100 MB of storage. I checked my folders and found out that the tmp folder is about 30MB and contains a number of files and folders named like "...
16
votes
6answers
24k views
How can I print out a Joomla query?
Suppose you have constructed a query with Joomla.
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select all records from the ...
16
votes
6answers
7k views
Change Super User account password
I have forgotten my super admin password.
How can I reset the super admin account password?
I have access to both FTP and phpMyadmin how can I change the Super User account password?
My table ...
15
votes
2answers
38k views
Where is $this->baseurl defined in joomla?
I asked this question on stackoverflow.com first (question here). In the comments you can read that it would be better if I ask that question here.
On my joomla website I'm using echo $this->...
15
votes
7answers
10k views
Upgrade from 2.5 to 3.x overview
This is something I have been curious on for some time considering a few things.
How well is the "one click" upgrade going to improve prior to the EoL of Joomla! 2.5?
Right now we have a very low ...
14
votes
9answers
6k views
How can a module be disabled based on device or viewport size in Joomla 3 to optimize performance for mobile devices?
I'm a proponent of Responsive Web Design in conjunction with Adaptive Web Design (i.e. - one design that adjusts display for all devices and provides content based on view port size) as opposed to ...
14
votes
5answers
20k views
Direct logout link
I know I can display the login/logout form with the following link:
http://example.com/index.php?option=com_users&view=login
But once logged in, this link will redirect the user to a page with a ...
14
votes
4answers
10k views
How to check what component is being used on current page?
I want to set up my template so it will display different layout depending on what component is being used on current page. How to check for this?
14
votes
4answers
6k views
How to manage multiple Joomla sites and their updates
I have a number of Joomla 3.x sites, which I want to manage centrally, however they are all for different clients, so I cannot share any information between them.
What I want to achieve is to ...
13
votes
8answers
15k views
How to display module in component area
I often need to create a menu item that displays a module in the component area, without any other content.
The way I solve this is to create a new article, and add only {loadposition mymodule} in ...
13
votes
2answers
2k views
How can I programmatically get the Joomla database prefix using php?
I sometimes access the Joomla DB via external scripts. The problem I have is that if I ever need to change the prefix, I'll need to edit my scripts again too.
Is there a way to programmatically ...
13
votes
1answer
3k views
Adding drag-n-drop ordering in component
I've developed a small component based on the Joomla Hello World tutorial, and now I would like to implement the same drag-n-drop reordering that many other Joomla components include:
By sorting by ...
12
votes
6answers
1k views
Joomla Component Tool or Scaffold?
I have created a couple of plugins for Joomla 3.2 and have recently started on a component to manage apartment rentals. I was wondering if there is a framework out there that had the basic file/folder ...
12
votes
5answers
14k views
How to setup a new multi-language website?
One of my old clients want to turn to Joomla instead of a static HTML5/CSS3 responsive Multi-languages website.
I'm a newbie to Joomla, and my biggest challenge is how to make a multi-languages Joomla ...
12
votes
3answers
3k views
Best method to check if a component is installed/enabled?
Between joomla 2.5 and 3.x what is the best way to check if another component is installed and/or enabled? There exist a helper class called JComponentHelper but I believe the isEnabled function will ...
11
votes
5answers
5k views
Joomla 3.6.0 to 3.6.1 results in a “invalid security token” error
I've just tried to update my site from Joomla 3.6.0 to 3.6.1 and I get the following error message:
The most recent request was denied because it contained an invalid security token. Please refresh ...
11
votes
3answers
23k views
How to get joomla version by http?
I have seen screenshots of a solution, there the Joomla version is getting detected by only accessing the page via http.
E.g. the solution displayed all 3 digits of a version of Joomla. e.g. 2.5.28, ...
11
votes
2answers
4k views
Create categories, subcategories and articles using php
Is it possible to dynamically create Joomla categories, subcategories and articles using PHP scripts?
Is there any example link?
11
votes
4answers
4k views
Change Login to Logout
I have a website using Joomla 3.5 and I currently have a 'Login' main menu item. Once a User logs in, there are some sub-menu items that appear under the 'Login' menu item.
What I want to do is to ...
11
votes
6answers
10k views
Jhtml::script order - how to postpone until jQuery has been loaded?
I use JHtml::script to add scripts to my pages in a custom-developed module. However, these scripts are injected into the head before J3 adds in jQuery - for example:
<!-- my module js -->
<...
11
votes
1answer
11k views
Can I use PostgreSQL with Joomla 3.3
Can I use PostgreSQL with Joomla a 3.3 production site (not for testing) and if so is there anything I should be aware of?
I would appreciate some feedback from someone who has actual installed and ...
11
votes
3answers
2k views
How to restrict access to custom component views?
In my custom component, I'd like to be able to restrict specific views to only certain usergroups. If I create a menu item for one of my views, that's pretty easy to do: I just select the access level ...
11
votes
2answers
4k views
Add a custom button to a core backend component
Is it possible to add a custom button (with a custom action, of course) to the JToolbar of a standard Joomla 3 component (com_contents) without modifying the original source code?
Background: I need ...
11
votes
6answers
10k views
Show/hide module title not working
I'm trying to hide the title of a module.
I have changed the admin setting but the title is still displayed in the front end. In the database, the showtitle field is set to 0.
11
votes
1answer
10k views
Displaying a Joomla module using PHP?
Can i display a Joomla module using PHP? What would be the script to achieve this? (If it's possible!)
11
votes
2answers
9k views
Catching exception/error in database transaction
I am using the following way in joomla 2.5 and 3 to execute database query -
$database = JFactory::getDBO();
$database->setQuery
$database->execute();
but how do I catch errors/exceptions if ...
11
votes
2answers
4k views
Module as menu item
I need to insert the search module as a menu item (default menu module).
I need this output :
<ul>
<li>menu item</li>
<li>menu item</li>
<li>SEARCH ...
11
votes
3answers
1k views
Custom canonical urls using sh404SEF
Currently my site is using the sh404SEF plugin (Joomla 3.2) to add canonical urls to every page. This is working, however on the index page its outputting:
www.example.com/?view=home
instead of
...
10
votes
4answers
2k views
How to develop a Joomla module?
I've looked far and wide for a tutorial on this, but can't seem to find anything satisfactory. How do you make a new module for joomla?
Right now I'm using custom HTML modules all over my code, and ...
10
votes
5answers
7k views
How to remove the 'index.php' from URL's?
I was wondering if it is possible to remove the 'index.php' that is shown in every URL.
10
votes
2answers
3k views
Joomla browser detection
Can we create a thorough question/answers post with the core methods that allow browser detection in Joomla 2.5 and 3 ?
After a quick research in the web, I feel that there is not sufficient ...
10
votes
2answers
9k views
Fix the “Invalid Address” error, after upgrading to Joomla 3.5.1
After upgrading to Joomla 3.5.1, I get an Invalid Address error in some of my extensions that use PHPMailer (the Joomla Mailing system).
How can I fix this?
10
votes
2answers
4k views
Adding joomla's default toolbar in a component view page
I am developing a mvc component for both joomla 2.5 and 3.In many components i saw they added joomla's default command buttons like new, edit, publish, trash, options at top of their settings page in ...
10
votes
1answer
5k views
How to set a component's param dynamically?
To retreive a param I use:
$myparam = JComponentHelper::getParams('com_mycomponent')->get('myparam');
But what is the right method to store a component's param?
10
votes
1answer
4k views
Form field “showon” with multiple fields
I have 3 fields defined in my XML file like so:
<field name="field1" type="radio" label="Field 1" class="btn-group" default="1">
<option value="1">JYES</option>
<option ...
10
votes
2answers
9k views
How to redirect user with system message in Joomla 3
I know that you can achieve this by doing:
JFactory::getApplication->redirect(url, message, type)
but the documentation at
JFactory::getApplication
says it is deprecated and suggest to use ...
10
votes
5answers
6k views
Generate menu structure from categories
I have a Joomla site with a fairly complex system of categories and sub-categories. My main menu uses the same structure, in such a way that each menu item lists articles within the corresponding ...
10
votes
1answer
9k views
Add JavaScript with $doc->addScript with async=“true”
is it possible to use the addScript with async="true"?
I found a hack that uses some clever quoting to trick the embed function, but it seems as if this could be a native feature:
$doc->addScript(...
10
votes
3answers
4k views
How to add separate admin menu for custom component
By default the custom component can be seen under 'Extensions' menu at admin side. But how can I create my own menu at the top near to 'Extensions' menu like 'My Component' and show sub menu links ...
10
votes
3answers
1k views
Prevent error message from showing SQL
In my table I have created an index on 'col1' to prevent duplicate entries which works well but the resulting error message displayed to a user when they attempt to add a duplicate entry seems to to ...
10
votes
2answers
3k views
How to render System Message from AJAX call
I would like to display a system message when I got back my ajax request.
The ajax request returns the right message. I can test it with an alert.
alert(result.message);
Joomla.renderMessages(result....
10
votes
2answers
756 views
How to add com_content extra fields to Smart Search Index
Where I can find any tutorial or instructions to build a plugin which handles "onPrepareFinderContent" ?
I've added some extra fields to com_content articles and I would like them to be indexed by ...
10
votes
1answer
404 views
Adding Tags Functionality To Existing Component
I'm looking to get tags working inside of an extension. I saw this and have gotten the field to appear in the edit view, but of course it doesn't save anywhere.
Looking at com_content article tag ...