Piero Marsilio
  • Member for 7 years, 8 months
  • Last seen this week
How can I print out a Joomla query?
Accepted answer
22 votes

you need to echo __toString() echo($query->__toString()); you can fing more info here https://docs.joomla.org/API16:JDatabaseQuery/_toString Hope it helps

View answer
How to call a model method from a system plugin?
Accepted answer
5 votes

This will work with ease in Joomla 3.x //load model JModelLegacy::addIncludePath(JPATH_SITE . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_foo' . DIRECTORY_SEPARATOR . 'models'); /...

View answer
Language tags in article content
Accepted answer
5 votes

You can use this language plugin: http://extensions.joomla.org/extension/easy-language Once installed in your article you can do: {lang en}Monday{/lang}{lang es}Lunes{/lang} It will display the ...

View answer
What's the common practice for debugging?
5 votes

I am far from being a sophisticated developer and I also do debugging in online sites. I use this marbelous tool http://extensions.joomla.org/extension/j-dump It have a lot of advantages over a ...

View answer
Add custom language to content language
Accepted answer
5 votes

Hope this can help you. You need to create a Languaje Content entry for your language. Go to Extensions->Language Manage -> Content And create a new record as shown in the picture In order to get ...

View answer
How can I use JPaginator without database?
5 votes

I think it is posible. althoug I have not done if before. The pagination uses as parameters the total number of records that in your case is the array count, the limitstart (index where to start), ...

View answer
language switcher opens only the home page
Accepted answer
4 votes

When you are in a inner page you have to be sure that that menu item has an association in the other language. Otherwise you'll go to home page.

View answer
Automatic login after they complete the registration form Joomla 3.4
4 votes

I did a plugin to do that some time ago. You can download it from here: http://www.webemus.com/en/37-productos/extensiones-joomla/303-joomla-autologin-plugin It is necesary to set "New User Account ...

View answer
How to use joomla getUserState and setUserState to keep form field values
3 votes

This is the way I do it, I hope it helps you. in you view.html.php (view file) $app = JFactory::getApplication(); $this->data = $app->getUserStateFromRequest('com_yourcomponent.yourform....

View answer
Enable HTML for the user registration e-mail
3 votes

I recommend you to use Acymailing. They have included a functionality that allows you to use your own HTML email for any of the Joomla standard emails.

View answer
Set article title as page title
3 votes

You can create a plugin for this event: onContentPrepare and code something like: $doc = JFactory::getDocument(); $doc->setTitle( $article->title); I can give you a more elaborated code if ...

View answer
Show preview of positions
Accepted answer
3 votes

You can see them from adminitration doing this steps: In the top menu, click Extensions and then click Template Manager In the tabs at the top of the page, click the Options tab Under the Templates ...

View answer
Module coming on all pages
Accepted answer
3 votes

I recommend you to do this: Create a menu called: Hidden Menu Do not assign this menu to any menu module Create a menu element for each of the links you want to display in home page That way, they ...

View answer
How to call K2 currently viewed item's title / creation date on my template index.php?
3 votes

You can do something similar like: $app = JFactory::getApplication(); $jinput = $app->input; $option = $jinput->getCmd('option'); $view = $jinput->getCmd('view'); if ($option=="com_k2"...

View answer
Fatal error: require_once(): Failed opening | Use of undefined constant DS - assumed 'DS'
3 votes

I recommend you to use this plugin: http://extensions.joomla.org/extension/ds-constant it will reintroduce the deprecated DS constant to ease the migration for 2.5.x sites whose extensions still use ...

View answer
Get Timestamp from Database
Accepted answer
3 votes

You need to add this in your code, after $db->setQuery( $query); $db->setQuery( $query); $var1= $db->loadResult(); $timestamp = strtotime($var1); Hope this help

View answer
How to properly get an array from jInput?
Accepted answer
3 votes

Try this: $app = JFactory::getApplication(); $jinput = $app->input; $filter = $jinput->getVar('filter',array()); Hope it works for you

View answer
How to override a component's controller
Accepted answer
3 votes

Overwrite a controller is something that I don´t dare to do, even it is possible. I recommend you try to use another approach Option 1 – Modifying the controller to add an event trigger and ask the ...

View answer
I want to hide a menu item to registered users
Accepted answer
2 votes

Please check that in User->Manage->Options that the value of the field Guest User Group is set to Guest.

View answer
Hide a value or data on table
Accepted answer
2 votes

The way to do it is by overriding the view template. 1 - First you have to understand how to create an override of a component view. This tutorial may help you: https://www.ostraining.com/blog/...

View answer
Create Numbered List of Tagged Articles
2 votes

Hi you can use these CSS properties: counter-reset, counter-increment. for instance: .tag-category table { counter-reset: section; } .tag-category table tr{ counter-increment: section; } ....

View answer
How to develop a survey extension which prevents respondents from taking a survey more than once?
2 votes

Some more ideas: Save a cookie in the user's browser. Get users IP address and store in BD.

View answer
How did hackers manage to create a new user while "allow user registration" is set to "NO"?
2 votes

There are many possible ways that the hacker has broken into your web, I recommend you see these documents: https://docs.joomla.org/Security As to your question I would bet that the hacker could ...

View answer
How to add multiple models to a JView?
2 votes

You may try to do this in your view $othermodel = JModelLegacy::getInstance('othermodel ','yourcomponentModel'); $othermodel->otherModelFunction();

View answer
redirect component in joomla doesn't work
2 votes

Please ensure that the system redirect plugin is activated

View answer
Refreshing module/div on form submit [without page reload]
2 votes

To achieve what you want, you can not submit the form. You have to use an ajax call. see jQuery.ajax documentation Get a response and modify the DOM in order to reflect that response. There is a ...

View answer
Are there any alternatives to Fabrik for building a database application (ERM/CRM)?
2 votes

I will advise you to make your own component using Joomla MVC and framework. The learning curve may be big but then you will have absolute freedom to make any change or development you may need. I ...

View answer
Save, Save & Close and other functions not working after moving site
2 votes

Check the file: configuration.php at root level. This file has some paths to tmp and log subdirectories. You have to manually update the path to the new location.

View answer
Component loads in localhost but gives internal server error on live
2 votes

In the .htaccess file uncomment this line: #RewriteBase / Make it : RewriteBase / It have worked for me before on the same error

View answer
Redirect to a menu item from controller
2 votes

I do it this way (providing you know the Itemid) $app = JFactory::getApplication(); $menu = $app->getMenu(); $item = $menu->getItem($Itemid); $params = $item->params; ...

View answer