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.

2
votes
1answer
252 views

Custom Module delete from database with AJAX

I have been trying to get my head around Joomla's com_ajax component for some time with a view to using it in my custom module. The module displays data from a component. One of the form fields is of ...
3
votes
1answer
59 views

Impossible to set my joomla site timezone to Pacific/Tahiti (hosted in UTC)

I have exactely the same issue like in this post. For a Joomla site online booking (Joomla + Yootheme + Vik Appointment) I need Pacific/Tahiti default timezone and I still have UTC despite all my ...
1
vote
1answer
902 views

Creating a Joomla user from outside Joomla

For various reasons, I need to create a Joomla user from outside Joomla. Following advice, I'm using passwordhash.php for the hashing so I use something like $t_hasher = new PasswordHash(10, TRUE); $...
-1
votes
1answer
41 views

add text after value that is retrieving from SQL in php [closed]

This is the code that i retrieve data from sql in this case ¨Km¨ is added before value but i will ¨Km¨ after value .. example : now is like this : Km 129.000 but i will 129.000 km $insert1 =" /// ...
1
vote
1answer
328 views

Jquery post request from other url

I have a custom.js with post request function setPrayerTime(cityId) { var request = $.ajax({ url: "http://site.com/mymodule/namaz_mob/prayer.v2.php", type: "POST", data: {...
2
votes
1answer
591 views

How to manage sessions between Joomla and external PHP applications?

I am trying to achieve single sign on behaviors between PHP/PERL applications and Joomla. The main entry point would be Joomla, which would set up the sessions and other cookie variables that would be ...
-1
votes
1answer
247 views

0 String could not be parsed as XML, joomla administrator is not working [closed]

0 String could not be parsed as XML, this error is displaying on my joomla administrator and it is not working.
1
vote
2answers
45 views

Test site not rendering template list php error

Okay, so we have a section of our server portioned off to be a nested test site. However for whatever reason the below template causes an error in Joomla's php handler that it does not on the active ...
0
votes
0answers
50 views

How to remove joomla alert error

I have a plugin that displays custom alert / warning / info messages however if the page uses ajax for instance for my login, the plugin causes a dialog alert pop up box which says "error unable to ...
3
votes
2answers
856 views

Joomla 3.7.x PHP API set value of custom user field

I'm writing a PHP script that goes through the users, and reads and writes some custom user fields. The reading part is done, by the use of the FieldsHelper. It works nicely. However, trying to write ...
2
votes
0answers
3k views

Error displaying the error page [closed]

So I'm attempting to install Joomla on a lemp stack, ubuntu 16.04, php7. I use the same lemp stack for Wordpress sites all the time no hassle. I unzipped the Joomla files into my /html/ directory and ...
2
votes
1answer
36 views

Page titles overrun screen size in mobile view - sustainable solution?

I have built a site in German and some of the page titles are quite long. When viewing the site in a mobile view some of the page titles disappear off to the right hand side of the screen, thus the ...
1
vote
2answers
654 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, ...
0
votes
0answers
72 views

Query params not passed to redirection URL from joomla login “return” varibale

I am using a overide in template for my login module in joomla. I changed return value in the login form to a new redirection URL , which has query parameters along. This was working fine till I ...
0
votes
1answer
55 views

Random token in DB on each login

I'm looking to somehow add a "token" on login and temperately store it in the database (same as table *_users) until next login (important). I have a game of sorts that uses a selected user and ...
1
vote
1answer
231 views

Hostgator nightmare with ERR_EMPTY_RESPONSE

I'm having an absolute nightmare with a clients site and Hostgator. Akeeba backup will not run as well as sporadic the server did not send any data - ERR_EMPTY_RESPONSE (chrome, firefox, safari) and ...
0
votes
1answer
102 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 ...
-1
votes
1answer
42 views

Component - Site Model Question

I've been developing a Real Estate component for several of my clients. I have most everything working, except getting images from a separate table. One example of a site model is City. Within the ...
1
vote
1answer
474 views

Getting latest article from category including subcategories

I am attempting to get the latest article in a category that has a number of subcategories through the Articles ContentModel. If I use $model->setState('filter.category_id', $this->category->...
0
votes
1answer
30 views

Results of gdb on core dump from Joomla Installation - meaning?

I am still working with a resource issue for a Joomla site (currently on 3.7.0 - just upgrading to 3.7.1 as we speak). There were a lot of core dump files appearing in the home folder, thus I ...
2
votes
1answer
267 views

Correct ways to verify update query is successful under conditions

I was trying to find out correct ways to verify db update query is successful but some problems i am fetching. Even if update query($db->execute()) is not done/row does not exists.... but it ...
0
votes
3answers
291 views

Show the language according to the IP

I have a multi-language Joomla 3.4 that at the moment only has 2 languages: my-domain.com/en/ my-domain.com/es/ I want to redirect the visitor to EN/ES according to their IP (with this library). I ...
0
votes
1answer
745 views

Get the full Joomla URL for an image

Currently I am on my local server and the URL I want to create is: http://localhost/cax2017/images/flexicontent/l_thecaxton.jpg /cax2017/images/flexicontent/l_thecaxton.jpg is created by: ...
1
vote
1answer
182 views

MySQL Query to show images

I want to show up to 3 images that are assigned to the logged in user in a database table. I have written the following MySQL query: $db = JFactory::getDBO(); //GET GALLEERY IMAGES $query ...
0
votes
0answers
371 views

Some joomla versions not running in latest xampp environment

Hi I backed up a joomla 3.0 site from production server with database backup too. I was using xampp 1.8 version which is old and everything was fine when i set up that joomla site under xampp(...
3
votes
1answer
526 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&...
3
votes
1answer
85 views

How to insert data properly in Joomla article with content plugin?

I have created a content plugin which adds extra field on Joomla default article editor window and everything working as expected. But the problem is with existing/old articles created before ...
1
vote
1answer
199 views

Backend: Disable Joomla's own way of displaying an error and getting the real PHP error shown?

I am getting an error like this in the backend running my own extension: Call to a member function setQuery() on null And because I am not clairvoyant I do need some more info about where the error ...
1
vote
1answer
119 views

Where can I implement a php code in joomla?

So I'm doing this website with Joomla and I don't have much experience with Joomla. I just want to get the values of some checkboxes and print them into a text area. I have the script already, I just ...
1
vote
0answers
335 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 ...
4
votes
1answer
99 views

SQL syntax error when attempting to filter list view - how to build WHERE clause?

I built a Joomla component for a school using component-creator.com and now I am trying to modify the source files. My current view lists off all parents and students in my database, visible to all ...
3
votes
1answer
360 views

Where query in Joomla component - what file do I edit?

Okay, so I am completely new to Joomla and I am trying to edit the source files of a component I built using component-creator.com. I have a database which stores different data for multiple ...
2
votes
2answers
103 views

How to fix broken link articles after upgraded from 1.5 to 3.6.5 Stable

I upgraded from Joomla 1.5 to 3.6.5 stable and now I have many broken link on articles. I can fix it manually one by one (I'm even fixing it) but my main concern is that the web site is a public one ...
1
vote
2answers
280 views

How do I implement Google Analytics userID feature in Joomla 2.5 for logged in users with PHP?

My Joomla template includes the analyticstracking.php file with the tracking script, which has worked great, however I'd like to implement Google Analytic's userID feature (for cross-device tracking) ...
0
votes
2answers
195 views

Loop Joomla Modules

I have 2 positions and 6 modules for each position. I want to show 1 module of each position in each section. I have the following code: <div class="section"> <div class="block"> ...
2
votes
1answer
552 views

Add url to direct logout link?

I need help with this; I added this line of PHP code in a menu option using sourcerer. <li style="list-style:none;"> <?php $user = JFactory::getUser(); { $userToken = ...
2
votes
1answer
92 views

Joomla backend stopped working suddenly because of PHP version

I'm new to Joomla, my site was working almost fine for many weeks but suddenly i'm getting this error "Your host needs to use PHP 5.3.10 or higher to run this version of Joomla!" so i asked my ...
1
vote
0answers
392 views

Fatal error: Call to undefined method WFEditor::getContext() in …/administrator/components/com_jce/models/model.php on line 128 [closed]

I am unable to login into back end of joomla, i am using joomla 3.6 and when i operate PHP Version 7.0.12 and try login, i get Fatal error: Call to undefined method WFEditor::getContext() in .........
1
vote
1answer
184 views

Can not get handle to Joomla! application object

I am trying to write a php file to process a form submission. Here is the code I have so far: <?php define('_JEXEC', 1); if (file_exists(dirname(__FILE__) . '/defines.php')) { include_once ...
1
vote
0answers
204 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 ...
2
votes
1answer
116 views

Run Stored Procedure From Page Load

I have a html table that has a hyperlink in it, when the hyperlink is pressed 3 parameters are passed to a secondary page. The query that is run is a CTE SQL Server statement, and from my ...
2
votes
1answer
53 views

How does Joomla! URL Re-writing works?

How does Joomla decide which module is supposed to be visible on a particular menu/web-page? I mean we only put the RE-WRITED URL in the browser and it automatically determines which menu it belongs ...
3
votes
1answer
161 views

Module to show selected articles in frontend with links to article page

I am writing a module to allow admins to select upto 3 different articles (taken from Joomla Content) to show in the frontend of a site. I want to show the article title and the intro image, along ...
1
vote
1answer
1k views

Run External PHP File From Joomla Article

I have a php file that will echo results in the end of the file. I want to from an onclick event fire some Javascript that will call this php file and print the results on screen. My javascript ...
1
vote
1answer
3k views

Adding PHP In Article

I am wanting to connect to a SQL Server Instance in my article, and I have the below syntax to do such. My issue is that when I view the article it writes ".$row['book_name']." "; } ?> onto the ...
1
vote
1answer
45 views

Run Code From Joomla Article

Is it possible to run JQuery or JavaScript in a Joomla Article? I ask because I have tried just about every possible option I see on forums/interwebs and the data does not display as I desire.
1
vote
1answer
188 views

Update Joomla without working Backend (PHP version was updated)

My provider recently removed an older PHP version and I forgot to update one of the Joomla installations. Now I'm left with a broken front- and backend that only shows me What now? Is there any ...
0
votes
1answer
366 views

Programmatically update Menu Item in Component

Im creating a component, where among other things, can create and update menus, and i have successfully used this answer to create a new menu item. Programmatically Add Menu Item in Component $...
1
vote
2answers
272 views

Select+Checkboxes fields = query a Database

I want to make a form which contains one select field (dates) and multiple checkbox fields (teams), so when I select a date or choose a team, automatically makes a query a database, filtering by the ...
2
votes
2answers
581 views

Global PHP functions?

How can I make few global php functions which can be called from any Joomla custom module? E.g I wish to make a global function executing a select database query: function select($row,$table_name,$...