Lodder
  • Member for 7 years, 9 months
  • Last seen this week
How to check what component is being used on current page?
Accepted answer
24 votes

For Joomla 3.x While the code from the other answer will work, JRequest is deprecated, therefore you should use the following: $jinput = JFactory::getApplication()->input; echo $jinput->get('...

View answer
What are possible filters in Joomla form fields?
Accepted answer
21 votes

The possible filters are: rules (Access Control Rules) unset (Do nothing, thus leaving the return value as null) raw (No filter) int_array (Filter the input as an array of integers) safehtml (Filter ...

View answer
Where is $this->baseurl defined in joomla?
Accepted answer
18 votes

$this->baseurl; is basically the shortcut for JUri::base(). It gets the URL you have specified as the live_site variable in your configuration.php file. If this has no value, then it will use some ...

View answer
Form field "showon" with multiple fields
Accepted answer
17 votes

You can chain the attribute values of showon, using [AND], like so: showon="field1:1[AND]field2:1" Adding more fields to the chain is also allowed. On a side note, you can use an [OR] clause in the ...

View answer
File upload using JInput! possible?
Accepted answer
16 votes

In addition to @Bakual's answer, let's assume you a simple form like so: <form name="upload" method="post" enctype="multipart/form-data"> <input type="file" name="file_upload"> </...

View answer
What tools can I use to help assist me with Joomla development?
16 votes

Environments: Wamp (Windows) WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. Alongside, PhpMyAdmin allows you to ...

View answer
How to get joomla version by http?
16 votes

Ok so this is what I was writing yesterday. For Joomla 2.5 and 3.x only Check if the http:// prefix is missing from the URL. If it is, then it adds it. Note that In this case I have not taken https://...

View answer
Do 'disabled' extensions slow down Joomla! site performance?
Accepted answer
16 votes

Actually it does slow the site down in the slightest by having them disabled rather than uninstalled, as when loading a plugin, it checks the ones that are enabled and runs them. If you have 100 ...

View answer
How to let users delete their account from the frontend?
Accepted answer
14 votes

Take a look at this extension called Delete My Account: http://extensions.joomla.org/extensions/clients-a-communities/user-management/26011 It allows users to delete their own account via the ...

View answer
Custom Component - Need to verify if user is logged in
Accepted answer
14 votes

You can use Joomla's user object for this. $user = JFactory::getUser(); // Get the user object $app = JFactory::getApplication(); // Get the application if ($user->id != 0) { // you ...

View answer
Which is the best Certification course offered in Joomla for Professional Web Designing and development?
Accepted answer
13 votes

Certifications prove nothing as @Brian has already mentioned. I have absolutely zero qualifications in computer science or development and believe it or not, I actually failed I.T (computers) at A-...

View answer
Migrating component from 2.5 to 3.3
12 votes

Even the link you have provided in your question does not provide everything single thing that need to be change when migrating an extension. There are always fairly big API differences between each ...

View answer
How to conditionally show fields in module xml?
Accepted answer
11 votes

You can use Joomla's showon attribute in your field. Here's an exmaple: <field name="first" type="list" label="Select Something"> <option value="1">Option 1</option> <...

View answer
JUser: :_load: Unable to load user with ID: 16635
Accepted answer
11 votes

This sometimes happens when a specific user has been deleted that was the author of an article or any other content. When trying to load that content, it also tries to get the username based on the ID,...

View answer
Error 0 Cannot open file for writing log while updating
Accepted answer
11 votes

Sounds like a permissions issue. In the Joomla backend, go to: System (top menu) >> System Information >> Directory Permissions Make sure all files and folders apart from the global configuration....

View answer
Add JavaScript with $doc->addScript with async="true"
Accepted answer
11 votes

If you have a look at the Joomla addScript function, it shows the following: public function addScript($url, $type = "text/javascript", $defer = false, $async = false) { $this->_scripts[$url]['...

View answer
How to know which usergroup/specific access level user belongs to
Accepted answer
10 votes

To get an array of groups the currently logged in user belong to, you can use the following: $user = JFactory::getUser(); $groups = JAccess::getGroupsByUser($user->id); var_dump($groups); To ...

View answer
Joomla 3.6.0 to 3.6.1 results in a "invalid security token" error
Accepted answer
10 votes

If you don't have Akeeba Backup installed: Go back to the Joomla Update page Upload and install the Joomla 3.6.1 Update Package using the "Upload & Update" tab Go to Extensions >> ...

View answer
How to redirect user with system message in Joomla 3
Accepted answer
10 votes

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 = ...

View answer
Get user ID from username
Accepted answer
10 votes

Simple, you can use JUserHelper to achieve this: $username = 'jophanpw'; $userId = JUserHelper::getUserId($username); echo $userId; All the code above does is run the following database query: ...

View answer
Is it possible to redirect a admin user to a specific component after login?
10 votes

You could create a small plugin to perform the redirect. Here's something I've quickly mocked up: class plgSystemMYPLUGIN extends JPlugin { public function onUserAfterLogin() { $app =...

View answer
How do I apply JHtmlSidebar to add a sidebar to my admin view?
Accepted answer
10 votes

You firstly need to create a helper file, for example: administrator/components/com_helloworld/helpers/helloworld.php and in this file, add the following: class HelloWorldHelper extends ...

View answer
How to print a single-row result set as a html table?
Accepted answer
10 votes

Try this: $rows = $db->loadrow(); echo '<table>'; echo '<tr>'; foreach($rows as $row) { // display your results here } echo '</tr>'; echo '</table>'; You ...

View answer
How to use LIMIT in getQuery
Accepted answer
9 votes

Both J2.5 and 3.x will vary. Joomla 2.5: $db->setQuery($query, 0, 5); where 0 is the start/offset and 5 is the limit Joomla 3.x $query->setLimit(5); This also accepts a 2nd argument which is ...

View answer
Akeeba BackUp: Is it safe to be used?
9 votes

Well for starters, Akeeba Backup does not appear to be in the VEL (Vulnerable Extensions List) on the Joomla Extensions Directory. These people have slagged Akeeba Backup for it insecurity, however: ...

View answer
How can I print out a Joomla query?
9 votes

You can also use Joomla's replacePrefix function which dumps out the query in a format that can be inserted straight into the likes of PhpMyAdmin. Here's an example: $db = JFactory::getDbo(); $...

View answer
Joomla Registration: Remove unneeded fields
9 votes

Ok so I was thinking about an approach without having to core hack anything or install any 3rd party extensions. My method will involve a Template Override which you will need to make for the ...

View answer
Virtual host for Joomla
Accepted answer
9 votes

In this I will explain how to set this up for Wampserver 2.5 with Apache 2.4+. Once you have downloaded, installed and started Wampserver, go to the following directory on your computer and created a ...

View answer
Where can I find Joomla usage statistics?
Accepted answer
9 votes

This is the only resource I could find that had report that are updated daily: http://w3techs.com/technologies/details/cm-joomla/all/all It also shows the percentages of different versions used too ...

View answer
Making Custom HTML User Profile Page by using Joomla Variables
Accepted answer
9 votes

Ok for starters, you can't use a .html site to display user information, instead you will require a .php file. Once created, you will need to import the Joomla CMS like so: define( '_JEXEC', 1 ); ...

View answer
1
2 3 4 5
26