Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jfactory]

The tag has no usage guidance.

2
votes
2answers
98 views

How to query for users that have all tags when searching for multiple tags?

I have this custom module that shows all contacts based on some tags. I can add one or more tags in a field in the module What I want is to add the option in the module to show: all contacts that ...
-1
votes
1answer
51 views

How does JFactory::getApplication->input get the input id

I am trying to get the current itemid of an especific menu which calls a custom component. I had a custom component called on the menu with the url /something. Inside of the site model of my ...
1
vote
1answer
225 views

JFactory::getApplication()->input->post->get() prunes empty sub arrays/objects

I am sending a POST ajax call like this: var request = { option : 'com_ajax', module : 'mod_test', // to target: mod_test method : 'Test', // to target: function TestAjax in ...
3
votes
1answer
656 views

JFactory stopped working in Joomla 3.8, what now?

A client called today lamenting that our automated mail (they fill a form and we mail them a code) is not working. Of course, this is because my code still has the JFactory class and is looking for......
1
vote
1answer
72 views

Why my custom query only returns one result?

$dbwsk = JFactory::getDBO(); $querywsk = "SELECT `title` FROM `#__content` WHERE 1"; $dbwsk->setQuery($querywsk); $rowswsk = $dbwsk->loadResult(); var_dump($rowswsk); I've been working and ...
2
votes
1answer
44 views

Overwrite the global database driver

JFactory has a getDbo method, but no setDbo. Why? It can be useful for unit-testing to be able to overwrite the global database driver. Any other way to do this? EDIT: $database is a public property ...
1
vote
1answer
186 views

Can not get handle to Joomla! application object

I am trying to write a php file to process a form submission. Here is the code I have so far: <?php define('_JEXEC', 1); if (file_exists(dirname(__FILE__) . '/defines.php')) { include_once ...
1
vote
1answer
1k views

set user id as the current user in Joomla

I have a userId - $uid. I wanted to make this user as logged in to the s/m in joomla. I've tried this - $currentUser = new JUser($uid); $mainframe = JFactory::getApplication('site'); $credentials =...
0
votes
1answer
371 views

Get external javascript file to work in joomla

I have a menu using IFrame Wrapper so that I can link to my own coded php page. Inside the php file is just listing down the data on table and I have search box so that user can filter the data ...
1
vote
1answer
618 views

Joomla JFactory::getDBO() - Prefix is wrong?

I am pretty new to Joomla, and I'm stuck! I'm trying to access the Joomla DB from a PHP script, using the JFactory::getDBO(); method. I noticed all my queries were returning '0' results, even though ...
2
votes
1answer
1k views

Load module inside module programatically Joomla 3

I was wondering how can we load a module inside a module, in Joomla 3 programatically. Regards,
2
votes
0answers
439 views

How to access a component variable from a module? [closed]

I want to access a component variable (a simple array) from a module without using session (no persistence across page loads necessary in my case), JRequest/JInput, global, plugin nor model. Is it ...
2
votes
1answer
183 views

Joomla Timezone

I would like to check the time within a sub controller's method. The calendar field in my JForm saves the datetime to sql and uses UTC. So now we have 15:11h in Germany and in the database would be ...
0
votes
1answer
71 views

CLI: Can not fetch members of specific groups

on my Joomla-CLI-Script I would like to fetch all user-ids which belong to a specific group. My script so far: // $groups = groups that are set in global params if(!empty($groups)); { ...
9
votes
4answers
2k views

Why use addStyleSheet or JHtml::stylesheet over just linking a CSS file?

According to the wiki page Adding Javascript and CSS to the Page, you can add a stylesheet with addStyleSheet like this: $document = JFactory::getDocument(); $document->addStyleSheet($url); Or ...
4
votes
4answers
3k views

Getting current language in Joomla 3 in external script seems difficult.. but works fine in J2.5

I´m aware that a similar qustion is asked here: Get current language in external script (Joomla 3.3) but it seems that noone has understood the problem correctly. I´m having the exact same problem, ...
2
votes
1answer
739 views

Empty result when selecting [closed]

Wordpress guy attempting to help out a client with a Joomla project he's stuck on (favor time basically), and I'm hitting a wall. I believe I'm doing my select correctly, and get no "blank page" ...
2
votes
2answers
107 views

_getTab() returns spaces

Why does the following code return two spaces instead of one tab? How can I change this setting easily? $document = JFactory::getDocument(); $tab = $document->_getTab(); reference
9
votes
2answers
374 views

What differences (if any) are there between JFactory::getSession() and $mainframe->getSession()?

As the title states, I'm interested in knowing what differences there are (if any) between JFactory::getSession() and $mainframe->getSession() This question was inspired by Retrieve joomla session ...