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
1
vote
1answer
32 views

Loading the built-in jQuery in Joomla 4 if it does not exist

Tell me please. How to load jQuery in Joomla 4 if it has not been loaded yet?
1
vote
0answers
18 views

How can I convert a field value to string for use in a custom category blog override?

In Joomla (both 3x and 4x) I am trying to add a php 'if' query to a category blog override so that if the category title is 'X' then it does one thing, but if not, do something else. (I'm having ...
0
votes
1answer
18 views

Application shows session_start(): Failed to read session data: on browser

I have hosted a website using a backup and when I access it through a web browser, it shows me error and I have changed configuration.php file from: public $error_reporting = 'none'; To: public $...
2
votes
1answer
23 views

Can't edit index.php in Joomla 3.10

I am trying to edit my index.php file in my website using the Joomla! extension manager. I have to add the code right before my closing tag however there is no HTML! So I've tried adding some, after ...
0
votes
1answer
32 views

How to create menu item in admin menu Joomla 4 in php+mysql in module, plugin?

How to create menu item in admin menu Joomla 4 in php? From plugin/module for Joomla4?
1
vote
0answers
63 views

Troubles with Implementation of self written Module for Joomla and Auto Suggest function which should be in Javascript

I am trying to find a way to implement either a self written module in Joomla with PHP code of an dictionary or try to use the dictionary by putting the PHP code in a joomla article with sourcerer ...
2
votes
2answers
95 views

Integrate external news content API into com_content articles

My client is looking to integrate news content coming from an external API into their Joomla website. The API is in the JSON format and includes multiple fields like title, summary, date, and full ...
0
votes
0answers
27 views

Dynamic page filled with content depending on the previous page

I am kinda new as a developer and I want to achieve the following in Joomla. The idea is that I have a category->sub category->products. The category and subcategory will be added in joomla and ...
1
vote
0answers
50 views

Use language override to create custom title tags for URL's

I have this piece of code that already runs on the pages I need this done. (The entire Joomla 3.9 site is a Frankenstein of custom code, components, etc. ) $placeholder_country = JText::_('...
0
votes
1answer
49 views

What is the correct PHP to render Subform repeatable custom fields on the front end?

When creating custom layout overrides the PHP code <?php echo $this->item->jcfields[X]->value; ?> Works successfully, but does not function at all when it comes to repeatable subform ...
1
vote
1answer
20 views

php exclusion in a joomla plugin of the xml sitemap page created by OSMAP

I have trouble uploading OSMAP sitemaps to google because of a plugin I am using. That plugin called autoanchor menu creates a menu based on titles in an article. really usefull for long articles. ...
1
vote
1answer
40 views

Show article fields in module

I have two custom fields in my article for longitude and latitude. I'm then trying to build a module to get these two fields from the current article displayed and show in the module. I have the ...
1
vote
1answer
37 views

Where do I add php code to submit an HTML form?

I am new to Joomla, and so far, I used the basics to make a simple website. I decided to try out making a component, using JCB, that has a database of a list of items, and for each item, there is a ...
1
vote
0answers
41 views

J4.x - How to echo content from a specific article into error.php

In Joomla 3 I had a really simple error.php file which pulled in the content from an article with the title '404'. I created an article named 404 and assigned it to a menu item of type 'single article'...
0
votes
1answer
34 views

Get Object Values

I use this code: $currency = new MyCurrency(); print_r($currency); to load/print the following Object: MyCurrency Object ( [currencyCode:protected] => EUR [currencies:protected] => Array ( [USD]...
1
vote
2answers
33 views

How to add specific js and css to a particular page in joomla?

I have added the html code using sp page builder extension also need to add css and js to this particular page in joomla 3. i am using t3 blank template is there any procedure to add this or any ...
0
votes
1answer
72 views

View only showing one row from sql result set

I am creating a component and trying to display a list within a model. The code I have shows the multiple arrays that should be on the list, but when I add echo inside the view table, I am only ...
1
vote
0answers
13 views

Joomla restricted pages are redirected to 301 Moved Permanently after HTTPS redirection

I have Joomla site with a load balancer (AWS). The website is redirected to https, after redirecting home page works correctly. However, on restricted pages after login are giving the error 301 Moved ...
1
vote
1answer
31 views

Ajax call from module default.php file in order to fulfill a sql query

I have a fully working module in Joomla, but I'm struggling with the last piece which is sending a value from Javascript in my default.php file into the helper file, where it will be used in a sql ...
1
vote
2answers
60 views

J4 Get an array of parameters from template/module

The current Joomla implementation looks like $moduleHelper->getParams()->get('paramName'); // don't remember this one perfectly $app->getTemplate(true)->params->get('paramName'); Is ...
2
votes
2answers
143 views

Get site application via Factory::getApplication() in Joomla 4

The documentation for J3 instructs using Factory::getApplication('site') to get the site application, however according to the documentation for J4 doesn't have those method parameters anymore. I'm ...
0
votes
1answer
34 views

No such file or directory while using Vina Dongky template

I am using a template called Vina Dongky for VirtueMart content and I'm getting some errors. Warning: require_once(/home/priskork/public_html/libraries/joomla/document/html/renderer/head.php): failed ...
0
votes
1answer
64 views

Trying to write a custom form field that concatenates <input> and <select> values

I am a novice dabbler in Joomla PHP. I can build custom templates and simple frontend modules. I’m trying to write my first custom form field. I’ve gone over the documentation, reviewed several ...
0
votes
1answer
20 views

Getting object value from form fields

when i do a var dump of ($fields), i get this. i am trying to get the object element => @attributes => article protected 'autofocus' => boolean false protected 'element' => object(...
1
vote
0answers
29 views

Can the Joomla\CMS\Uri\Uri be used to create URL strings with special encode?

I'm looking into ways to minimize/remove JavaScript scripts by providing pre-encoded strings to be used for HTML attributes. Questions: What kind of string encode does the Uri::getInstance('URL')->...
1
vote
0answers
30 views

Add avatar field to user component

Joomla 3.9.28 PHP 7.4.21 I added a field to the "Users" component to let the users have an avatar photo. This field is set to "Media" type. However, in the Administration of the ...
1
vote
1answer
30 views

Show 'menuitem' field name in frontend of module

I have the following XML in my module params: <field name="menulink" type="menuitem" default="45" label="Select a menu item to show" description="Select ...
2
votes
1answer
28 views

subform inside subform in module

I have the following XML in my module: <fieldset name="activities" label="Activity Details"> <field name="image" type="media" directory="...
0
votes
0answers
40 views

Translate sql with nested queries into query builder methods [duplicate]

I have written a SQL query which works fine and output provides all the data that I need: Please see this screenshot: This is the SQL code: SELECT P.name, C.project_id, C.choice_id, C.time_stamp,...
1
vote
0answers
33 views

Using sql field in custom component

I have a custom component, it allows admins to select a related content article from the #__content table using the following: <field name="relatedcontent" type="sql" default=&...
2
votes
0answers
55 views

How to display message on admin from within controller or helper file?

I'm creating a new component. I have a VERY long series of steps that are being processed within a helper file (called by the controller - in the postSavHook function). Within the controller function ...
1
vote
1answer
95 views

How can I get the names of the columns with their corresponding row values as a list to use in a field (select list) of a form in Joomla MySQL

My table '#__boats' is as follows: id category type AIG ALLIANZ LLOYDS 1 0 Motorboats 2 0 Sailingboats 3 0 Jet Ski ...
1
vote
1answer
30 views

Query database and show latest 3 articles from __content

I need to show the latest 3 content items from the database. I want to show the: Intro Image Article title (with a link to the article) Published Date Intro Copy (limited to 100 characters) I have ...
0
votes
1answer
58 views

Joomla JS file Remove on after question mark data

How to Remove after question mark data in JS File? Our JS File was - /media/jui/js/jquery.min.js?74a9f5d23561aa584c363ede5bfbfad6 For Example - Only load in /media/jui/js/jquery.min.js
2
votes
1answer
28 views

Show more than two values from array

I have the following fields in a component: <fieldset name="carousel_container"> <field name="carousel" type="Repeatable" icon="list" description=&...
0
votes
1answer
33 views

php 5.6 to 7.1 and go back

Can I back version php? now I use version 5.6 My goal to 7.0-7.2. I install My site local and choose php 7 or 7.2. It works without issue. if I set ver 7 and find some issue. Can I back ver php to 5.6 ...
1
vote
1answer
32 views

Show images and caption from array as images in carousel

I have the following fields in a component: <fieldset name="carousel_container"> <field name="carousel" type="Repeatable" icon="list" description=&...
0
votes
1answer
125 views

How to Fix PHP Deprecated : Factory::getDocument() is deprecated

How can I fix the following deprecation error generated by my php code? Factory::getDocument() is deprecated $app = Factory::getApplication(); $wa = $app->getDocument()->getWebAssetManager(); ...
2
votes
1answer
46 views

Select articles to display in custom component

I have a custom component where I was to be able to select other articles to show in the frontend. I have thought the best way to do this would be through the SQL field. This is good that it gives me ...
1
vote
1answer
43 views

Customise sorting in User Manager (Backend)

I would like to add another field for sorting users in User Manager. I can't find in google what I need to edit (what files to edit, where fields should be created). I am new to Joomla, so I don't ...
1
vote
0answers
34 views

How to get product id in the article text (j2store)

I want to somehow get the product id from j2store and display the main image of each product in the article section each product. In /templates/namira/html/com_content/article/default.php there are ...
0
votes
1answer
39 views

Seeking an extension that displays "Who visited my profile"

Programming is my weakest point; I searched all possible topics, but haven't found what needed. Joomla 3.9.27 + Easy Profile Pro 2.9.1 I need to add the function to view the visitors of my profile. I ...
0
votes
0answers
34 views

How to get actual code of XML form

I'm working on accessibility. I found some issues while inspecting in Chrome browser but I'm not getting the actual code in VS for XML files.
1
vote
0answers
30 views

How to add custom attachment validation into form?

I have a form that using RSForm Pro to build and I have an issue where the default validation for the attachment only appear after I click submit. And the problem now is my form is using the Joomla ...
0
votes
0answers
35 views

Content approval before publishing in joomla 3

I am currently using joomla 3. I have a scenario where by content has to go through approval before it is published
0
votes
0answers
41 views

Installing Node.JS and Socket.IO in Joomla

I'm trying to develop a simple chat for my website, I tried with ajax first but then I was recommended to develop it using Socket.IO instead, I saw their demo and everything looks great, I have my ...
1
vote
1answer
34 views

Submitting a form in pure JS

How to get the formDate in the controller? my HTML <form id="myform" > <input type="number" name="jform[option][1]"> <input type="number" ...
0
votes
1answer
38 views

Login Error Joomla 2.5

There is some issue on my site when users visit directly http://spcrepsite.com (without www.) it works accurately, But when http://www.spcrepsite.com (include www.) it will show (homepage) that page ...
0
votes
0answers
23 views

When I save form data on a Joomla site to the database, Joomla logs me out

I am trying to make a Joomla-based warranty registration system. Recently, I was able to turn on the possibility of registering new users and logging them in. Only registered/logged-in users will be ...
0
votes
0answers
22 views

Sort Categories for sj_k2_categories_ii Module in Page

i use this sj_k2_categories_ii module in my site i make some menu with this module how i can sort Categories by alphabet in my page Categories sorted by module with k2 item ID thanks

1
2 3 4 5
15