Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
18 views

Should Joomla! tend to become an unopiniated headless CMS maybe in Joomla 4.5 or even Joomla 5? What do you think fellow developers? [on hold]

I more or less recently stumbled upon the "headless CMS" thing where the actual content is completely separated from the actions one can do to "manipulate" or "act on" the content using an API. I know ...
0
votes
2answers
37 views

Is there any one to use the mod_menu as we please? *Modifying the backend*

so I've been asked to make a special menu for a website.I'm using the default module that is mod_menu. The issue is I want to modify the HTML Structure to that module. But I heard modify the default ...
1
vote
1answer
50 views

How can I use joomla 3 user group access level code under public static function

Currently I am trying to use group access level code under public static function. File is belong to 3rd part component and stays under the administrator folder. 3rd part component has own custom ...
-1
votes
1answer
100 views

Simple plugin to check folder contents on component update

I'm wanting to make a very simple plugin. All it needs to do is On installation of the plugin, copy a folder to a particular component's library folder. When a particular component library is ...
1
vote
4answers
2k views

Display a Value from a Specific DB Field

I'm trying to figure out what I've got going on here thats not working - I'm using RsTicketsPro and I'm trying to pull a specific value from their custom fields section in the database. I reached out ...
0
votes
1answer
55 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
2answers
142 views

How to refactor two select queries on RSForm submission data?

I was wondering if anyone could help me JOIN multiple queries into one query. Currently, these 2 blocks of code retrieve information from the DB. I am using the "Sourcerer" plugin to add custom PHP ...
2
votes
2answers
134 views

How to retrieve RSForm submission data grouped by SubmissionId?

I have a table with 3 columns: SubmissionId, FieldName and FieldValue. 1) SubmissionId keeps ID submission. 2) FieldName stores field name of a form. 3) FieldValue stores field value of form field. ...
3
votes
2answers
453 views

Make CodeMirror highlight PHP syntax

CodeMirror by default only highlights mixed-html syntax (i.e html, css and javascript) in Joomla. Many of us use custom plugins to run PHP inside modules and articles but CodeMirror doesn't highlight ...
2
votes
1answer
43 views

create user and set its frontend language via php-script

The code below (modified from another post) works fine for me to create a user. But how do you set the new user's frontend language? In the code below, the lines 'frontend-language'=>'de-DE', '...
8
votes
2answers
1k views

What is the Joomla Execution Flow, after a request reach to index.php till the final output on the browser?

Based on this question: How Templates work and load css/js files? Website building process with Purity III Quote: .... I have to present my website tomorrow and i may get asked "where does the ...
0
votes
2answers
54 views

PHP7.2 Undefined variable: option in … index.php with Dj-Business004 template

When I update PHP from PHP7 to PHP7.2 the website gives this error: 500 Internal Server Error This is in the Log file: [Thu Jan 24 04:44:56.061781 2019] [proxy_fcgi:error] [pid 30185:tid ...
1
vote
3answers
825 views

When calling sendMail, how do I get the error if the mail isn't sent?

I'm sending email using the following code: $mail =& JFactory::getMailer(); $email_sent = $mail->sendMail( $from_email, $from_name, $to_email, $subject, ...
2
votes
1answer
428 views

Update from 2.5.28 to 3.5.1 then to 3.6 on PHP 5.6 everything works except joomla update or database fix cause these errors

clicking joomla update button in backend end gives this error: 1054 Unknown column 'a.extra_query' in 'field list' SQL= SELECT DISTINCT a.update_site_id, a.type, a.location, a....
1
vote
3answers
1k views

Retrieving multiple results from the database

I don't have much Joomla or PHP experience so I'm probably missing something really simple. I'm trying to load a certain list of user IDs into an array. This code works except it only loads one result....
0
votes
1answer
32 views

Using a custom field with different names

I want to use a flexible field name for a field across different forms thru my extension. My custom example field looks like this: defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\...
1
vote
2answers
128 views

How to refactor my iterated sequence of queries?

I'm building a component which is about to be finalized, but there is a bit of code that I want to refactor. I think this code can be completed in one statement and I used more than 3 statements. $db ...
1
vote
1answer
74 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 &...
0
votes
3answers
80 views

Convert PHP code to Jooma PHP syntax?

I'm running a query on phpmyadmin which has the "IN" function included. It is to extract data from the same column for different fields' (Waybill1, Waybill2 etc.) I shall post the SQL query below: ...
30
votes
4answers
4k views

Method for creating a subquery using JDatabase

At http://docs.joomla.org/Selecting_data_using_JDatabase, there isn't a documented method for writing a subquery using JDatabase. https://gist.github.com/gunjanpatel/8663333 exemplifies one way of ...
1
vote
2answers
172 views

Database query outputting twice

I have the following database query: $database = JFactory::getDBO(); $database->setQuery("SELECT items.headline, items.image, items.copy, items.source FROM ...
0
votes
2answers
784 views

How to run delete sql query with multiple values in Joomla?

I would like to run a delete sql query with multiple values in it in my joomla site. But I am unable to do so. So I need your help on this. In controller.php page: function deleteFiles() { ...
3
votes
1answer
1k views

Populate multi select data into the custom list field of form inside user management

I am trying to populate multi selected data on to the user management form below the name field of the user. Here is what I have added inside the form, in order to display multi selected data from db....
1
vote
0answers
18 views

Add multiple recipient email addresses Joomla Page Builder

I am using Joomla and SP Page Builder. I have back-end side and front-end side. I would like to add multiple recipients for sent emails from my contact form. I have found related codes for sending ...
3
votes
2answers
265 views

Check if INSERT query was successful or failed because of a duplicate UNIQUE KEY

I have a db-table called league where the mail column is the unique id: |name |mail | |Bryan|bryan@hotmail.com | I have a frontend where users can sign up and then I have this for ...
-1
votes
2answers
37 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 ...
2
votes
1answer
41 views

adding curent item to pagenavigation

I want to modify: /plugins/content/pagenavigation/tmpl/default.php. There are 2 <li> tags, one for "next" and one for "previous". I want to display the current article's title in a <li> ...
0
votes
1answer
260 views

Implement Joomla 3 registration field with jquery autocomplete

I want to implement a field with jquery autocomplete the code: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title></title> <link rel="...
0
votes
2answers
449 views

onUserAfterSave called twice because of addUserToGroup

The process of registration is taking way too long (22 secs) so I've been profiling the plugin execution to see what is happening. My registration process is something I do with a custom component (...
0
votes
2answers
2k views

MySQLi PHP Warning

I am getting the following errors (in this order) thousands of times in my error log: [08-Jun-2016 13:11:05 America/Detroit] PHP Warning: mysqli::stat(): Couldn't fetch mysqli in {...}/libraries/...
1
vote
1answer
32 views

Can I set the directory that Joomla cache will store data in for my module?

Joomla has a nice "Clear Cache" page that lists cached content and lets you delete it. I'd like to allow cached content from my module to be deleted from there. I'm using Joomla's built-in cache ...
1
vote
3answers
234 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); $...
0
votes
2answers
172 views

Use one pdo connection across multiple modules?

I have multiple modules on the same page that are individually connecting to the same external database through pdo connections. The website is getting slower since I added more modules. My guess is ...
0
votes
1answer
112 views

Parsing Error Javascript in php include page on the test server

We're getting this error in our test environment: Parse error: syntax error, unexpected 'var' (T_VAR) in /home/usaspo5/public_html/dev/usgnew/components/com_usg_programs/tmpls/default.php We have ...
0
votes
1answer
50 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 ...
0
votes
1answer
35 views

How can I prevent Joomla from removing octothorpe/pound from URL post login?

For example, I would like to send the following links in an email to users: https://www.example.com/#foo https://www.example.com/deep-link/#foo When clicked on, I get the following results: https://...
2
votes
3answers
115 views

Is there a file that defines error messages?

I would like to catch some exceptions to inspect the error code and determine if I should re-throw it with a more user friendly message. This would probably be most beneficial with MySQL errors. Is ...
1
vote
0answers
16 views

mklink and JFolder: :folder: Path is not a folder [due to is_dir()]

Joomla is on Win2012 R2, XAMPP, Fabrik. I created a symlink like so: C:\Users\Administrator>mklink /D "C:\xampp\htdocs\pdf" "Z:\" symbolic link created for C:\xampp\htdocs\pdf <<===>> ...
0
votes
1answer
1k views

Joomla: Filter items (show items between 2 dates)

I would like to improve my filter in my custom joomla-component. I would like to create a filter that shows all items which have been created between 2 dates (MySQL-Table: creationdate). At the ...
0
votes
1answer
24 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' );?> ...
2
votes
1answer
131 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
2answers
2k views

Check if items from an array exists in table and if not insert them into new records?

I have an array of image file names which i want to compare against a table in my DB, if the filename is not present then i want to insert it. I have started work on the insert statement, so i will ...
0
votes
2answers
3k views

403 Forbidden Access, when accessing custom html/php files directly

I am trying to open html and php pages directly, but it shows : 403 Forbidden Access to this resource on the server is denied! When I try www.mysite.com/dir/ index page shows up, error ...
1
vote
2answers
178 views

Possible php time outs causing 500 server error?

I was hoping for some advice regarding what I think is a time out error? My problem is that on the first few loads my pages can fail to load and show a 500 error, but if I continue to refresh, or ...
0
votes
2answers
222 views

Joomla! 3.6.2 Template Purity III Layout Glossary - second alphabet ordering

I'm on Joomla! 3.6.2 with Purity III template (JA). I try to use the glossary layout with Cyrillic alphabet but the php doesn't check the language and puts the articles in alphabet order only in ...
2
votes
1answer
126 views

0 - Using $this when not in object content

I moved a website from server (PHP 5.6.38) to localhost (PHP 7.2.10). And I receive this error in the page title (in the chrome tab): 0 - Using $this when not in object content While searching ...
3
votes
3answers
311 views

Joomla site content not loading

I recently shifted Joomla 1.6 site from one server to another. The site template is showing, but the articles and components are not loading. I tried the SEO friendly URL option, but turning it on ...
1
vote
2answers
4k views

Run UPDATE query on SELECT query result

I want to run an UPDATE query on a record after selecting it. $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(true); $query ->select(array('p.*', 'u.id', 'u....
3
votes
2answers
656 views

how to set tmp path and log pat

I am trying to set tem directory path and logs dir path in my joomla site . my site folder path is this "/httpdocs/example.com/online" and my site url this http://dev.maindomain.com/example/online/. ...
3
votes
1answer
593 views

Send array from javascript to php by POST in Joomla 3.x

im trying to send an array from javascript to Joomla 3.x php file. var options = ['foo', 'bar']; $.post('index.php?option=component&view=componentview&Itemid=123&tmpl=component&...