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
votes
1answer
57 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
516 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: {...
3
votes
1answer
1k 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
375 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
53 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 ...
3
votes
2answers
2k 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
40 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
3answers
2k 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
1answer
79 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
330 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
430 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
vote
1answer
880 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
37 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
636 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
557 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
2k 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
288 views

MySQL SELECT query with LIMIT to show a maximum of 3 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
542 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
958 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
117 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
587 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
239 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
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 ...
3
votes
1answer
132 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 ...
2
votes
1answer
440 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
129 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
451 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
315 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
978 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
118 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
529 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
251 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
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
1answer
189 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
55 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 ...
2
votes
1answer
326 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
2k 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
5k 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
51 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
507 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
563 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
399 views

Select+Checkboxes fields = query a Database [closed]

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
1k 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,$...
2
votes
1answer
616 views

Publish/Unpublish module on a schedule

I look after a website which is run by a church and every 1st sunday of the month they have a slightly different service schedule. The site uses an image slider which rotates advising of the services ...
2
votes
1answer
632 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....
3
votes
2answers
4k views

Save data to cookie

I want to save temporary data (id and name) from product page to cart via Ajax. The problem is to record new variables in cookie, using outstanding from Joomla file. I tried: $inputCookie = JFactory:...
0
votes
2answers
257 views

Debugging methods- How can I determine the source of the error - “0 Class 'ContentHelperRoute'”?

My question is what are some alternative methods of determining or tracing the source of an error in Joomla when the source of error isn't shown by normal debugging means? By normal debug methods, I ...
1
vote
2answers
426 views

Add extra fields to article

I'm trying to create a simple plugin that adds 4 textfields to the article options. But I'm not getting it to work. This is my plugin structure: extrafields.xml extrafields.php These are the ...
2
votes
1answer
2k views

Joomla administrator error Call to a member function isAdmin() on null

I' m trying to login in Joomla Administrator (Joomla 3.5) and I am getting this error: Fatal error: Call to a member function isAdmin() on null in /var/www/html/plugins/system/stats/stats.php on ...

1
3 4
5
6 7
14