We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [php]

PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Joomla is based on PHP.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

How to change a language constant on the fly with PHP?

In Joomla! (currently 3.9.13) the language constant COM_INSTALLER_TYPE_TYPE_ is not defined. The constant is used in the error message that is displayed if the Joomla extension update system (the 'one-...
0
votes
0answers
8 views

Why am I getting an editors iframe popup in tiny mce editor when I embed a canva button in it

I am trying to embed a canva button in tinymce editor. Everything works fine. The canva url get loaded in a iframe but at the same time an iframe is also loaded in the back with the home url. How to ...
1
vote
0answers
16 views

ob_flush pushes output before Joomla header

I have a module that I've created to test ob_flush buffering off. I need to understand it so I can have some longer modules buffer output to the page as the script goes through long processes. The ...
3
votes
1answer
30 views

JHTML::_('behavior.tooltip') — Set tooltip position

I'm trying to set the position of the tooltip in Joomla 3.9.8. I've used: JHTML::_('behavior.tooltip'); At the top of the document. I then have field set as: <?php echo JHTML::tooltip($...
0
votes
1answer
29 views

I can't install Joomla because Zlib Compression Support no

I'm trying to install Joomla 3 on docker server using php 5.3.29 but I can't because : Zlib Compression Support no In Pre-Installation Check I tried every thing found on internet but still having ...
1
vote
1answer
33 views

How to add userinfo to link in Joomla Page

We have a Joomla site (latest version) with a page that links to another system with a fixed username/pw, so like https://www.othersystem.com/login.php?un=[fixed_un]&pw=[fixed_pw]. Now we need ...
0
votes
0answers
21 views

How to get all tags of articles of specified categories in Joomla?

I want to add a "filter by tags" feature to mixitup in Joomla. I need a list of tags for specified category articles and later for each item to add titles of tags for each item. There was a "...
3
votes
1answer
66 views

Programmatically set article image

I generate/update several articles through a PHP script (in the cli folder) that parses an external data source (custom tables). This works well. Now, if an article has not yet an image, the script ...
2
votes
4answers
76 views

How to use cookies to populate RSForm fields without notices/warnings?

I have used this code to save the RSForm data in a cookie and if the user tries to fill in the same form again, the previously entered data is loaded as default values: Script called on form display: ...
0
votes
3answers
41 views

Joomla 3 call model function inside controller

I want to call a function from model inside controller my model : httpdocs/components/com_storemanager/models/searchmanager.php <?php /** * @version CVS: 1.0.2 * @package ...
1
vote
1answer
53 views

Joomla 3 return view with parameters

I'm using Joomla 3 and I have a controller with the function abc that should call a view with some parameters title & address My controller :components/com_storemanager/controller.php <?php /...
0
votes
1answer
28 views

Joomla 3 database query select with limit [duplicate]

How can I use this query with joomla 3 with limit to 3 SELECT * , (3956 * 2 * ASIN(SQRT( POWER(SIN(( $coorlat - latitude) * pi()/180 / 2), 2) +COS( $coorlat * pi()/180) * COS(latitude * pi()/180) * ...
1
vote
0answers
24 views

Homepage of multilingual site not working anymore after removing index.php (404); all other sites working

So I removed the "index.php" - part from the URL in Joomla in the following way: Change the htaccess.txt - file name to .htaccess via FTP Set the URL-rewrite Option in the Joomla Configuration ...
0
votes
1answer
35 views

Remove css admin template from component

I'm designing a custom component where I am utilising the tmpl=component ability to render the component only rather than displaying the default template. How can I remove the unwanted css files which ...
0
votes
0answers
30 views

How to fix “Application Instantiation Error” caused by “JFactory::getApplication('site')” in docker application?

I am about to move a Joomla application (Joomla! 3.7.3 Stable) into a docker environment. This unfortunately causes the JFactory::getApplication('site') an Application Instantiation Error that I do ...
2
votes
1answer
31 views

TypeError: Form is Null on Button in Admin toolbar

I am receiving TypeError: form is null in the browser console when I select a custom button added to a form using JToolbarHelper. I can insert the button to any other component as is and it will ...
0
votes
0answers
10 views

Customize alternative layout for the K2 Content module in Joomla

I already established an alternative layout php file and it's recognized by the Joomla administrator for the K2 - content modules. What I need to do now is code the layout I want in php, but the ...
1
vote
1answer
18 views

Joomshopping in Joomla - Wrong php-file assigned

I have a website using three languages, and the website includes a webshop via the Joomshopping component. The translation of the products and all worked, but the things controlled by the joomshop - ...
0
votes
0answers
15 views

Joomla 3.9.8 - Virtuemart not save correctly new manufacturer

I have virtuemart updated to version 3.4.2. and I created a new manufacturer in the backend. Finally, I assigned a new manufacturer to a product. The problem is that in my frontend, in the "sort by: ...
3
votes
1answer
80 views

How to separate database results into 2 columns?

I saw the examples of how to do the odd even way, but I want the order to flow from one whole column to the next and not alternating left to right for each alphabetical item. Can this be done? Here ...
1
vote
1answer
64 views

How to query for users from a specific user group?

I want to list only the users with a group_id value of 10. Why doesn't the following query work? $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('a.id, a.name, a....
1
vote
1answer
35 views

Joomla Warning Showing Incorrect PHP Version

Using Joomla 3.9.8 I recently migrated from localhost (PHP 7.1.9) to a live server (PHP 7.2) On localhost my site was installed at localhost/mysote. On my live server it's installed at dev.example....
0
votes
1answer
89 views

How to remove username field from the reset password confirmation form?

Does anybody know how to remove the username field from the reset password confirmation form? I edited the reset_confirm.xml file in /components/com_users/models/forms to remove it from the front end,...
0
votes
3answers
46 views

(Module override/PHP) Checking if a content-item has an image otherwise display a placeholder

I am customising a Joomla module (Override) and it does not seem to accommodate if an image is not selected (just shows a broken image symbol). What I'd like to do is check if there is an image and ...
0
votes
2answers
142 views

Error trying to update above PHP 7.1.27

Trying to update PHP from 7.1.27 to 7.3.3 and can't seem to. Set error reporting to max and after awhile of loading these are the errors I get on top of a white screen (admin also gone) Warning: ...
1
vote
1answer
23 views

How to pass a php array to javascript array/object with non-sequential keys

I'm trying to pass a php array to javascript, but the array has non-sequential keys. Here is a portion of the array: Array ( [1812] => Array ( [RecID] => 1 [...
0
votes
0answers
29 views

com_weblinks Unhandled exception - InvalidArgumentException

Admin Tools is notifying me of a PHP exception that occurs within the Weblinks component on Joomla 3.9.6. I have included the stack trace below for reference. The exception occurs infrequently (about ...
-2
votes
1answer
32 views

What does the line in the code below does? [closed]

$hasContent = empty($this->item->module) || isset($this->item->xml->customContent); line 23 in /administrator/components/com_modules/tmpl/module/edit.php
2
votes
2answers
34 views

How to stop Joomla 2.5 from disabling PHP

I need to stop Joomla from converting PHP code to a comment (or otherwise disabling it). I copied a working page with a basic [directory listing] function, and the duplicate wouldn't work. I am ...
1
vote
1answer
81 views

Generate and render a module on an article with PHP

I want to create a module and add it to an article I can already create the module manually and can add it to the article using php. I can't figure out how to add a module using php. So if I have ...
0
votes
1answer
50 views

Joomla backend not reflecting updated PHP version

I've updated to PHP 7.2.17 through my host's cpanel, but I'm still getting a message in the Joomla backend that my PHP version is not updated. Error We have detected that your server is using ...
0
votes
2answers
128 views

How to add php & js code in the header of a Gantry Helium template?

I want add some PHP code to the head of a template, but I am unsure as to how to achieve this. I've tried adding the following to my index.php but it doesn't work: <?php class __AntiAdBlock_ { ...
1
vote
0answers
35 views

Echo PHP output in a slider effect

I'm fetching data using for loop and echo results on a page. How do I output the results in a slider effect? I have tried a simple CSS slider but can't get the intended result. What I end up getting ...
0
votes
2answers
53 views

Is there any one to use the mod_menu as we please? *Modifying the backend*

so I've been asked to make a special menu for a website.I'm using the default module that is mod_menu. The issue is I want to modify the HTML Structure to that module. But I heard modify the default ...
1
vote
1answer
72 views

How can I use joomla 3 user group access level code under public static function

Currently I am trying to use group access level code under public static function. File is belong to 3rd part component and stays under the administrator folder. 3rd part component has own custom ...
-1
votes
1answer
104 views

Simple plugin to check folder contents on component update

I'm wanting to make a very simple plugin. All it needs to do is On installation of the plugin, copy a folder to a particular component's library folder. When a particular component library is ...
2
votes
1answer
54 views

create user and set its frontend language via php-script

The code below (modified from another post) works fine for me to create a user. But how do you set the new user's frontend language? In the code below, the lines 'frontend-language'=>'de-DE', '...
2
votes
1answer
100 views

Add multiple recipient email addresses Joomla Page Builder

I am using Joomla and SP Page Builder. I have back-end side and front-end side. I would like to add multiple recipients for sent emails from my contact form. I have found related codes for sending ...
0
votes
2answers
284 views

PHP7.2 Undefined variable: option in … index.php with Dj-Business004 template

When I update PHP from PHP7 to PHP7.2 the website gives this error: 500 Internal Server Error This is in the Log file: [Thu Jan 24 04:44:56.061781 2019] [proxy_fcgi:error] [pid 30185:tid ...
0
votes
1answer
59 views

Using a custom field with different names

I want to use a flexible field name for a field across different forms thru my extension. My custom example field looks like this: defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\...
3
votes
1answer
48 views

adding curent item to pagenavigation

I want to modify: /plugins/content/pagenavigation/tmpl/default.php. There are 2 <li> tags, one for "next" and one for "previous". I want to display the current article's title in a <li> ...
1
vote
2answers
223 views

Joomla.submitbutton is not a function at HTMLButtonElement.onclick

I have been facing a problem when I try to update the article from the frontend then it shows this error Joomla.submitbutton is not a function at HTMLButtonElement.onclick Here is my code &...
1
vote
1answer
66 views

Can I set the directory that Joomla cache will store data in for my module?

Joomla has a nice "Clear Cache" page that lists cached content and lets you delete it. I'd like to allow cached content from my module to be deleted from there. I'm using Joomla's built-in cache ...
1
vote
1answer
48 views

mklink and JFolder: :folder: Path is not a folder [due to is_dir()]

Joomla is on Win2012 R2, XAMPP, Fabrik. I created a symlink like so: C:\Users\Administrator>mklink /D "C:\xampp\htdocs\pdf" "Z:\" symbolic link created for C:\xampp\htdocs\pdf <<===>> ...
2
votes
1answer
206 views

0 - Using $this when not in object content

I moved a website from server (PHP 5.6.38) to localhost (PHP 7.2.10). And I receive this error in the page title (in the chrome tab): 0 - Using $this when not in object content While searching ...
2
votes
1answer
34 views

I cant access all my joomla admin menus and menu labels have weired symbols, How can i resolve this?

I am from migrating a joomla website from server A to my server B but i other parts of the website work fine but my administrator side or backend has the following issues. I am not able to access all ...
0
votes
1answer
802 views

Problems When I change my PHP version to 7.2(Error 0 Using $this when not in object context )

I have my website in production now, The site works very good with PHP 5.6 and 7.0 but When I try to change the PHP version to 7.2 the website doesn't work. It shows me an error message like this: I'...
1
vote
1answer
146 views

Custom header content depend on article

I am wondering is it possible to have different headers depending on the different articles? e.g article ID 1 shows header A and article ID 2 shows header B. Currently I have modified the template ...
1
vote
1answer
66 views

Virtuemart 3.4 - products on manufacturer page

Virtuemart 3.4.2, joomla 3.8 i try copy code from category template, but cant fix this errors: at /my_template/html/com_virtuemart/manufacturer/details.php NOW I HAVE Two ERRORS: Call to a member ...
3
votes
2answers
54 views

I would like to add a string after 'script' at JHtml::_('script', $file, true, true);

Inside the recaptcha.php file of the Recaptcha Plugin on Joomla 3.6, I have the following code: case '2.0': $theme = $this->params->get('theme2', 'light'); $file = '...