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
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
31 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 ...
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
143 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
2answers
4k views

Error “Fatal error: Call to a member function getKeyName() on a non-object”, but without table?

I write a small component to export data from a shop component, this is my first component, i get the error "Fatal error: Call to a member function getKeyName() on a non-object PATH\legacy\model\admin....
1
vote
2answers
623 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 &...
5
votes
2answers
2k views

Joomla PHP does not match host PHP

I'm brand new to web development and I've installed Joomla on my website. For whatever reason I can hardly do anything because my PHP version is only 5.3 according to Joomla. However, using my cpanel ...
2
votes
0answers
39 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__) . '/..')); ...
0
votes
1answer
24 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 ...
2
votes
2answers
233 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"...
1
vote
0answers
29 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
3answers
136 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: ...
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", "...
1
vote
0answers
40 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
119 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
60 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
30 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
2answers
256 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 | +----+----...
1
vote
0answers
60 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\...
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 ...
0
votes
1answer
35 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
43 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
1answer
68 views

CheckToken() error when TinyMCE init

I have a form, which add some data to DataBase. <form> <input type="text" name="mydata" /> <textarea name="mytext"></textarea> <?php echo JHtml::_( 'form.token' );?> ...
1
vote
2answers
58 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
51 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 ...
2
votes
1answer
55 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
102 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"=>"...
4
votes
3answers
1k views

SMTP connect() failed, Cannot send mails

I have a vanilla Joomla installation. I installed RSForm plugin to send emails from Contact Us form. However, when the user fills out the form get the message: SMTP connect() failed I tried to ...
2
votes
2answers
81 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
vote
1answer
587 views

Pass PHP variables to CSS?

I want to pass some variables to my css, without using inline styles. During some research I found different sources pointing to the same solution. For example here on the Joomla forum. Basicly they ...
0
votes
2answers
59 views

How to reference a file locally within my class

I'm trying to use file_get_contents to reference a .json file in my module. My directory structure is as follows my custom field which is trying to reference the json file /models/fields....
0
votes
2answers
163 views

How to change logo's link URL?

I recently bought a new domain and transfered my old site's files to it. It's all nice, but the logo still points to the old site. How can I adjust it? Here's my new site home page and the logo is in ...
0
votes
1answer
64 views

How to extend class on my component class in controller.php

I have created a Basic Joomla Component with Component Creator in order to prepare every single files in less the 1 minute :D (I'm lazy, i know.) I have one view default and one for form edit. I ...
0
votes
1answer
72 views

Show the fieldgroup title on /html/com_content/article/edit.php

We want to move all field groups to the first content tab on the backend and assign individual classes to every field group. Therefore, we've already ignored the fieldsets to avoid the creation of the ...
2
votes
1answer
60 views

is there any workaround for viewing different admin template according to user role

This will work like e.g. If user is having super administrator access level, then user will be redirected on the default Isis administrator template. But if user is having access of administrator ...
0
votes
1answer
60 views

Joomla php function which prints the pagename

Is there a php function to insert in the template which prints the name of the menu item of the displayed page?
0
votes
1answer
83 views

Hikashop, extract text after read more

I want to have the introtext and then the rest of the text in Hikashop product details page. So in the product description I insert the <hr id="system-readmore" /> to separate the introtext and ...
2
votes
3answers
76 views

Change existing template in Joomla 2.5

My live website is not user-friendly, and I'm considering to use a new template. I bought a template, but how can I use the new template for the same content with some modification? If I use new ...
2
votes
2answers
224 views

How can I translate SQL code into something that Joomla will take?

I am in the same case discussed on https://stackoverflow.com/questions/11709043/mysql-update-column-with-value-from-another-table, that is, I need to copy the value of a column from tableA to tableB ...
1
vote
1answer
42 views

Problem accessing database from front end of a component

I am currently working on a component which will display "events", stored in a database, on a map (filterable by location, category, date etc...). My first step is to display a simple report of the ...
1
vote
1answer
210 views

External Login Script and getDbo()

I have a Joomla 3.9.14 site with a subdomain app.example.com. I have a login form, and I want to allow users to login using their Joomla credentials. Everything is working as expected, users are ...
0
votes
1answer
64 views

How to get the currently installed Joomla! Version in PHP

For one of my extensions i need a switch statement if the Joomla! Version is 3.x or 4. (in fact i have to call the Articles Model in different way for J4) - but how can i get the actual installed ...
0
votes
1answer
57 views

Joomla / PHPMyAdmin bug when “select” is in the value

This question was originally asked on StackExchange, and it was recommended by @mickmackusa that I ask it here. Background We recently changed over from one server to a brand new one. Old server: ...
2
votes
2answers
71 views

Language Constant Not Displaying in External Script

Joomla 3.9.14 I have an external application that uses the script below, allowing users to register as a user on my Joomla site. It all appears to be working apart from error displaying. My code is ...
6
votes
3answers
3k views

Joomla! JFactory::getDate wrong

According to the documentation JFactory/getDate $tzOffset default value is 0. However, the following example: $date_default_offset = JFactory::getDate('now'); echo $date_default_offset->toRFC822(...

1
2
3 4 5
14