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
20 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
26 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
11 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
67 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
25 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
24 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
19 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::...
0
votes
2answers
56 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
29 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 ...
1
vote
1answer
18 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
47 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 ...
1
vote
1answer
107 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
33 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
102 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
vote
0answers
41 views

How to count total queries with limit for pagination in Joomla getDbo

I am trying to build an author page with the lists of your articles in com_contact (this option exists but it cannot paginate). I need it to be paginated. So I am creating arbitrarily without ...
2
votes
0answers
35 views

Access Joomla article content from PHP-script with “file_get_contents”

I'm using php-script to export Joomla article to PDF-file with mPDF. The script is shortly the following: define('_JEXEC', 1); define('JPATH_BASE', realpath(dirname(__FILE__) . '/..')); ...
1
vote
1answer
93 views

Ajax post request with pure javascript, no jquery

I'm using fabrik to develop some applications, it's great. However I have the need to use ajax with it now, I know how to use it and I already have everything set up, but I need to fix the javascript ...
0
votes
1answer
23 views

Looking for a portfolio module?

I am looking for a specific module for Joomla, open source or paid does not matter, most importantly it has the options I need. What I am looking for is a portfolio module where each photographer can ...
1
vote
0answers
28 views

Using Ajax in Joomla articles to immediately work with input values in PHP

I'm trying to create a simple calendar utilizing my knowledge in PHP and MySQL, but I want to have it as instant as possible. I'm using an article and the plugin sourcerer. At first I created a simple ...
0
votes
1answer
54 views

Router, keep only item alias in SEF URL

For a particular reason, I need to keep in the SEF URL only the alias of the item to have a URL like this www.mywebsite.com/**myItemAlias** but of course without creating a direct menu to the item ...
0
votes
3answers
118 views

Problem with K2 Plugins - Joomla - Warning: count(): Parameter must be an array

Warning: count(): Parameter must be an array or an object that implements Countable in /home/......./archi/html/com_k2/templates/default/item.php on line 398 396 <!-- K2 Plugins: ...
3
votes
1answer
38 views

Unable to get (site) template params from my module's backend

Someone at stackoverflow recommend I ask the question here, apologies if this is considered cross-posting... OVERVIEW I am developing a set of custom templates and a set of custom modules. The ...
2
votes
2answers
128 views

How to get access to image metadata from PHP?

I am in the proces of writing a Joomla extension that utilizes metadata embedded in image files in IPTC, EXIF and XMP chunks. In particular, I want to gain access to "Title", "Tags"...
0
votes
0answers
24 views

CLI to create and add tags to an existing Joomla article

I want to create one or more new tags, add them to Joomla tag table and associate them with an existing article with a given ID. e.g article ID is 28 and tags are named "Firsttag", "...
0
votes
0answers
42 views

What is the proper way to use content.prepare?

I am trying to put a module inside another component. According to https://www.joomlashack.com/blog/joomla-how-to/module-position-component/ I can put <?php echo JHtml::_('content.prepare', '{...
0
votes
0answers
8 views

show payment method in site

i create Joomla site i build some shop with hikashop module and costume it in Cart if i go tab 3 ( for payment method ) i cant added more payment method can anyone help me why i cant do that ? for ...
1
vote
0answers
39 views

Homepage gives me a 403 resource error but still loads

I have a Joomla site using K2. If I open my site in a browser (https://www.niederlausitz-aktuell.de), everything loads as intended, but in my client-side console I get the following error: Failed to ...
0
votes
1answer
104 views

How can I generate a stubs file for Joomla?

I'd like to develop Joomla components with VS Code. With PHP Intelephense enabled, all my file show errors because I use Joomla classes and functions. (And it would also be convenient to have auto ...
0
votes
0answers
81 views

How to change first week day from sunday to monday

I have a website where I have a calendar with opening hours in the bottom of the page, it looks like this: The issue is, I want "Mandag" (monday) to be the first week day and not "...
1
vote
3answers
55 views

How to show dynamic article to non-registered users?

I have a dynamic article in Joomla. The article information is extracted from fabrik when the user is logged in. But when the user is not logged.. I can not see the information. The idea is to create ...
0
votes
2answers
79 views

Leaflet markers in joomla are not removed

I am working on a project and I want to remove the markers from a leaflet map that were added to the map previously. The problem is that when I want to remove the markers that were added to the map, ...
0
votes
0answers
29 views

Assign a template to a category with a plugin system and onAfterInitialise event

I would like to assign a specific template for a certain category, I have tried with this code in a plugin system but without success (this code does not include the condition for the category I will ...
0
votes
0answers
81 views

Set article attribs on-the-fly via JTable

I am using a CCK (Seblod) that extends com_content and allows adding complex fields, like PHP code to be run on onBeforeRender event. I need to change the values of some attribs of an article in the ...
1
vote
0answers
52 views

SqueezeBox in Joomla plugin

I'm just starting with Joomla. There is not much documentation about SqueezeBox to use modals. I noticed when I installed a plugin, it created a css file in this directory \joomla\media\system\css\...
1
vote
2answers
245 views

Selecting data from two tables and make a ranking in an HTML table

I want take the result from scheda_atleta table for every player and make an HTML table with the best result. I've two tables: first named: at +----+----------------+ | id | nome_e_cognome | +----+----...
0
votes
1answer
34 views

Get SEF path of an article from external script using articleID

I am practically new to Joomla and I need to get the SEF path of an article from an external php script. I feel like I'm close, but something is not working for me. The preliminary code I have as an ...
0
votes
0answers
40 views

Joomla - PHP session in joomla disappears

I am programming a little component and module in Joomla. My component and module reads a variable from the php session (this variable is set before for external php script). External php script: ...
1
vote
1answer
27 views

Why do the default PHP Joomla! files get restored without asking?

I edited \components\com_content\views\article\tmpl\default.php file to suit my needs, and to output a customized string instead of the default H1 header. The site was running all OK, but when I ...
0
votes
2answers
55 views

Using isset or is not set PHP variable with extra fields?

I have an issue with setting up variables - if the custom field is filled then it should be shown, if it's empty - then date (+1 month from today's date) is shown. However, it doesn't work properly. ...
1
vote
2answers
48 views

Fields component media field using absolute url instead of relative

I use the Fields component and I have a field "Media". You can choose an image this way. But this spits out a full tag. This should be no problem but in my case I need it to be a full ...
2
votes
0answers
46 views

Generating a module instance from PHP

I am trying to render a mod_login module - on the fly - from inside a system plugin. So far, there is no existing mod_login instance in the website nor the database. I am just trying to create a new ...
0
votes
0answers
6 views

how to fix array error on spgenries.php of sp movie database for joomla

This is my first time using sp movie database on joomla. I am getting an error on spgenries, please help with this.... Warning: count(): Parameter must be an array or an object that implements ...
2
votes
1answer
48 views

Using hooks in Joomla to add a Single Sign-On link in main page of Joomla

I have implemented SSO (Single Sign-On) in Joomla using OKTA and now my goal is to add a link in the main login page of Joomla using hooks. To do this, I have added one checkbox in the service ...
2
votes
3answers
79 views

Cannot Connect To MSSQL Server

I am using php 7 and trying to connect to mssql server. I have this code: <?php $serverName = "server"; //serverName\instanceName $connectionInfo = array( "Database"=>"...
2
votes
1answer
62 views

How do I pass _JEXEC to a php file?

I have a form in my Joomla! site. Once completed, the form should send an e-mail but only if some conditions have been met. Not having been able to use standard, commercially available mailers while ...
1
vote
2answers
63 views

Deleting rows in two different tables

I'm trying to make function (task) and deleting rows in two tables. But I don't get this sql query working, I only got this error: 1064 - An error has occurred. You have an error in your SQL syntax; ...
0
votes
1answer
43 views

Photo size validation

I use the Fox Contact component on my website, and through that component users send me photos (as an attachment) I had to make a few modifications in the upload form itself and make filters for file ...

1
2 3 4 5
14