Stack Exchange Network

Stack Exchange network consists of 174 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
1answer
18 views

How to include processed Joomla material?

I need to include article by ID via PHP. Not only intro- or fulltext, I need to load article, but processed with plugins and etc. For example, if article has uploaded attachments (via special ...
-1
votes
2answers
33 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 ...
0
votes
1answer
16 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\...
2
votes
1answer
39 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> ...
1
vote
1answer
30 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
1answer
251 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
441 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 (...
-1
votes
0answers
13 views

Post variables not working properly in form

I have some very simple code is executed via Sourcerer: <form action="" method="GET"> <input type="text" name="ALL"> <input type="submit" value = "Search"> </form> <...
0
votes
2answers
1k 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
23 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
221 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
93 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
103 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
47 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
33 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
111 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
12 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
16 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
119 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
93 views

Select retrieve records with different value

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. ...
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
168 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
214 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
77 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
279 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
3k 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
513 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
529 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&...
2
votes
1answer
27 views

I cant access all my joomla admin menus and menu labels have weired symbols, How can i resolve this?

I am from migrating a joomla website from server A to my server B but i other parts of the website work fine but my administrator side or backend has the following issues. I am not able to access all ...
2
votes
1answer
317 views

Joomla registration emails and PHP mail() taking hours to deliver

UPDATE UPDATE UPDATE: Okay so all the emails ended up arriving, but they took anywhere from 30 minutes to 9 hours. Here's the raw message of one maybe osmeone can decipher it for me. Delivered-To: my....
-1
votes
1answer
187 views

Problems When I change my PHP version to 7.2(Error 0 Using $this when not in object context )

I have my website in production now, The site works very good with PHP 5.6 and 7.0 but When I try to change the PHP version to 7.2 the website doesn't work. It shows me an error message like this: I'...
-1
votes
1answer
31 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: ...
3
votes
2answers
532 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 ...
1
vote
1answer
36 views

Custom header content depend on article

I am wondering is it possible to have different headers depending on the different articles? e.g article ID 1 shows header A and article ID 2 shows header B. Currently I have modified the template ...
-1
votes
1answer
46 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 ...
3
votes
1answer
85 views

What is the prefered method for sharing code and SQL queries in joomla 3.9+?

I'm developing a component that is targeting Joomla 3.9+. The code is not using the legacy classes and is instead using the new namespaces. The component will duplicate much of the functionality from ...
3
votes
2answers
36 views

I would like to add a string after 'script' at JHtml::_('script', $file, true, true);

Inside the recaptcha.php file of the Recaptcha Plugin on Joomla 3.6, I have the following code: case '2.0': $theme = $this->params->get('theme2', 'light'); $file = '...
1
vote
2answers
661 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, ...
1
vote
2answers
84 views

How to check if specific table names exist in a database?

All I want to do is check if a table exists or not and I can't figure it out. I've tried: for ($r = 0; $r < count($tableArray); $r++) { $db = JFactory::getDbo(); $query = $db->getQuery(...
1
vote
1answer
40 views

Showing a module only on first page of Category Blog

I am using this code to show a module inside blog.php: <?php echo JHtml::_('content.prepare', '{loadposition myModule}'); ?> How can I show it only on the first page of the category blog? I ...
1
vote
0answers
19 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 ...
2
votes
2answers
59 views

How to query certain rows from a table based on other associated rows in the same table?

I'm trying to query my jos_rsform_submission_values table for FieldValue data in rows with a FieldName of Container# which shares a SubmissionId with another row where the FieldValue is "Pending" and ...
1
vote
1answer
23 views

Joomla table DESCRIBE

I'm trying to DESCRIBE a table in joomla 3.x I want to get the column names and the associated details (type etc) into an array. I want to get Name Type Collation Attributes Null ...
1
vote
1answer
141 views

Joomla 3.8 PDF view using DomPDF

I was searching a way to save a layout of my custom component as PDF. I tried various libraries JS / PHP. What I wanted was utf-8 support, tables, images to be properly saved in the pdf file. I ...
-1
votes
1answer
29 views

How to write a conditional check on a column value with a mysql query?

I am trying to setup a simple default statement on the results page of a testing system. This seems like it would be relatively simple, but I cannot get my if statement to process properly. The ...
1
vote
1answer
71 views

Solidres Data Report for Joomla Admin

I am pretty new to Joomla & PHP so this is a broad question. My client is looking for some custom reports for Admin login on data prepared by Solidres as that Solidres doesn't have those reports....
2
votes
2answers
34 views

How to solve include_once() Warnings in tmp directory after migration?

After Joomla migration, I'm left with a few errors like: Warning: include_once(menu.php): failed to open stream: No such file or directory in /www/doc/www.elody.cz/www/tmp/htmlpaUI9p on line 1 ...
1
vote
2answers
62 views

How to write a query with a WHERE clause with two conditions?

I cannot seem to get this select statement to work with the WHERE conditions. Depending how it loads the data, I either get the first test result or all of the test results and not the user_id-...