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
0answers
6 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
26 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
51 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
60 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
31 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
54 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
17 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
28 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
29 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
26 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
25 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
34 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
31 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
49 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
93 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
23 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
50 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
25 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
23 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
28 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
63 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
39 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
22 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
38 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
29 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
34 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
31 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
30 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
34 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
22 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
21 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
vote
1answer
117 views

Failed opening required JPATH_LIBRARIES.'/joomla/document/html/renderer/head.php

I update my Joomla version from 3.9.13 to 3.9.25 then I received this error: Warning: require_once(/home/MYHOST/public_html/MYSITE/libraries/joomla/document/html/renderer/head.php): failed to open ...
1
vote
1answer
38 views

How to add GET parameter to CSS filename in plugin JCH Optimize (Joomla)

I cannot find an answer to for several weeks. Perhaps my experience in development is not so great :) One site uses the JCH Optimize plugin and I noticed that after clearing the old memory (cache), ...
0
votes
0answers
32 views

1146 Error when creating custom table

I have created a secondary user table to store other information in the Joomla database. However, when I try to insert information into that table, I get this error. 1146 Table 'database.#__vvuser' ...
1
vote
2answers
77 views

Insert multiple rows into a database table using a loop

I am trying to insert post data inside a Joomla table. So within a loop I populate the query with the values of a decoded json but all the time I get this error: Column count doesn't match value ...
0
votes
0answers
11 views

Joomla 3.6.4 get field value without com_fields

I'm trying to add additional functionality to old service, which runs without com_fields. I need to get value of form field value, to check whether it has been written or is default and depending on ...
0
votes
0answers
29 views

Running a command in the background (php)

How to run command execution in the background. For example, there is a comment component and subscribed users should receive notifications about a new comment immediately after posting a new comment. ...
0
votes
2answers
28 views

Which content is generated first? component or module?

I have a page with modules and components from the same extension. I made some customizations to the component's template file so when the page loads it gets the current user's avatar from some ...
0
votes
0answers
60 views

Helix Ultimate Template: Error "500 icon::print_popup not found." when clicking on a blog article

I am currently using Joomla 4 Beta 7 with Helix Ultimate 2 Alpha 5 and PHP 7.2. When I go to my website's homepage > Blog and then click on any article, I get the following error: 500 icon::...
1
vote
2answers
102 views

How to show multidimensional data in my CanvasJS chart?

<?php $db->setQuery("SELECT MartabehName, COUNT(MartabehCode) FROM `#__dimteacher` GROUP BY MartabehName"); $countMartabehName = $db->loadObjectList(); foreach($countMartabehName ...
1
vote
0answers
32 views

Want to dynamically create users via database, how do I encrypt password?

I'm handling two websites a main one with a huge database and a secondary one, I want that when a user is created in the main one that it also creates it for the secondary one, I already connected the ...
0
votes
1answer
36 views

How to conditionally add filters to my query of the rsform_submission_values table?

$FormId=23; $qustioan1=qka1; <form method="post" action="#"> <select name="state" onChange="irancitylist(this.value);"> <option ...
2
votes
1answer
22 views

How can I add an attribute to a direct link menu item?

I would like, ideally in the php file of a menu override, to add role="menu-item" i.e. direct links to another location, in a Joomla 3x (and 4x) menu. Is this possible, or do I need to use ...
1
vote
2answers
58 views

How to count aggregate data from RSForm submission values with Joomla's query building methods?

user SubmissionId FormId FieldName FieldValue bob 2 16 state mystate1 bob 2 16 qda myqad1 bob 2 16 city mycity1 rob 3 16 state mystate2 rob 3 16 qda myqad1 rob 3 16 city mycity1 jac 4 16 state ...
2
votes
1answer
145 views

How to add pagination in joomla custom php code?

Please help me to add pagination (getLimitBox) to my table result. I have for example 100 rows in my table and I want to show 10 page. <?php $formid=23; $db = JFactory::getDbo(); $query = $db->...
1
vote
1answer
85 views

Error “500 behavior::tabstate not found.” when trying to access SP Page Builder

I am currently using Joomla 4.0.0 Beta 6 with Helix Ultimate 2.0.0 Alpha 3 and PHP 7.2. My website runs on LiteSpeed Web Server, NOT Apache. When I go to The Joomla administrator panel > SP Page ...
0
votes
1answer
28 views

Interaction between two different components

I am building an online forum with EasyDiscuss. In a social login component, I am able to get user avatars from Facebook/Google. Now I want to save these avatars to EasyDiscuss users. EasyDiscuss has ...
1
vote
2answers
195 views

How to dynamically reload admin-form-fields in Joomla

In a custom component, I'm developing an admin form with 2 fields, a combo-box for jobTitles and checkboxes for technologies. Both fields are loaded from a database table. The values of the checkbox ...

1
2 3 4 5
14