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.

69 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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
0answers
38 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__) . '/..')); ...
2
votes
0answers
47 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 ...
1
vote
1answer
30 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), ...
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 ...
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
0answers
58 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 ...
1
vote
1answer
114 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 ...
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 ...
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 ...
1
vote
0answers
54 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
141 views

Use custom fields in index.php template file

For some reason i need tu use articles custom fields in index.php file template, i try this code without success : This after defined('_JEXEC') or die('Restricted access'); JLoader::register('...
1
vote
0answers
76 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 ...
1
vote
1answer
47 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 ...
1
vote
1answer
169 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 /...
1
vote
0answers
94 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 ...
1
vote
0answers
67 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 ...
1
vote
1answer
86 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 ...
1
vote
0answers
177 views

How to configure PHP basedir for Joomla running on IIS shared hosting

I have the following setup: IIS 10 with Plesk Onyx 17.8.11. Joomla 3.8.13/PHP 7.2.10. The website is hosted in shared hosting provider. After installing Gantry 5 I get the following warning on the ...
1
vote
2answers
92 views

Individual user fine grained ACL is it possible in Joomla! 3.x

I was wondering if it was possible in Joomla! 3.x to have permissions down to individual user level. Eg: user A can see item X but not user B even if user B is in the same group or have the same ...
1
vote
0answers
374 views

joomla make a ajax request for another php file

Excuse me for my English. I'm a newbie in joomla. I make a phone book component and i wanna add a Ajax pagination. I've got Jquery function load_data where i put a url to my php page. And this is ...
1
vote
0answers
258 views

How to upload an image using Ajax?

I need to upload an image to the server via AJAX, but the server comes back to the page with request, although server doesn't send anything. ajax: function uploadServer($el) { var fileUpload = $...
1
vote
0answers
566 views

Saving custom field parameter value from module settings

I know well how to create custom form field in joomla module settings as written in the accepted answer of this question which is basically extending JFormField class. Now what i want to do is ...
1
vote
0answers
450 views

RSForms - Change the items of a radio group based on a selection of a drop down

I need to change the items of a radio group based on a drop-down selection in RSForm pro. Right now I'm using the Conditional Fields feature to show different radio group field and that caused too ...
1
vote
0answers
474 views

Retrieving data from Joomla! Subform form field type

I'm trying to retrieving data from Joomla! Subform form field type, Here what I have: <fieldset name="item_lists" label="Item List"> <field name="ilist" type="subform" ...
1
vote
0answers
267 views

Why use ob_start and eval instead of using a simple include in this Joomla Plugin?

I was looking at the code of a Plugin for Joomla! CMS for a functionality I need: the possibility to run custom PHP scripts when a Joomla! Plugin/Events is fired. I wanted to learn the mechanism used ...
1
vote
3answers
326 views

How to iterate over the “params” of an item ZOO Joomla?

The item of my interest is in the __zoo_item table. My query: $query ->select($db->quoteName(array('params'))) ->from($db->quoteName('#__zoo_item')); $db->setQuery($query); $...
1
vote
0answers
91 views

Joomla Checking out items does not work correctly

I would like to check out items, that are edited by user XYZ. Well, it works so far: If somebody opens an item, the default-view shows the "lock" icon. But: If I click the link to the checked out ...
1
vote
0answers
784 views

Send data from custom field to database - Joomla 2.5

I've created a custom field for a module which gets some information from the database. I need to add the functionality to update the information in database if I make some changes. Here is the code ...
1
vote
1answer
291 views

Search in custom component

How can I improve the Search component in joomla 2.5 to set search by my custom component? Can't find, where I can modify the search request to database. UPDATE: With help of Rene Korss I solve the ...
0
votes
1answer
27 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
17 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
19 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
0
votes
0answers
14 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' ...
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
0answers
23 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
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 ...
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
43 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
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 "...
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 ...
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
0answers
42 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: ...
0
votes
2answers
60 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. ...
0
votes
1answer
46 views

Controller Joomla - Output Class construct for color css style

thanks to you i'm learning a lot about php and Joomla Develop! Many thanks! Now i'm trying to understand php class into joomla and construct output i've created this class into my controller.php ...
0
votes
1answer
40 views

How to cancel a mandatory (required) field in Virtuemart form submission process?

I want to free my future site's visitors from having to fill out the form before submitting their name, e-mail and a phone No. Basically, in most cases it won't be needed for them to also add more ...
0
votes
0answers
38 views

Converting to JS

Hello i am still learning but was wondering if anyone here could help i have the two function be low i would like to convert them to JS to store in an external file then be able to call one of the ...
0
votes
2answers
81 views

Jooma Article content to load from mysql based on ID in url?

On my old website, built in php i had a link on a page, wich picked an ID based on what line it was. <td width=124><a href="tp/package.php?ID=<?php echo $row[0];?>">Package</a>...