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
2
votes
3answers
76 views

Change existing template in Joomla 2.5

My live website is not user-friendly, and I'm considering to use a new template. I bought a template, but how can I use the new template for the same content with some modification? If I use new ...
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
3answers
407 views

Help chaining a query?

i am struggling to get the correct syntax for my query. The query is: $query = "SELECT product_sku FROM #__virtuemart_products WHERE created_on <= NOW();"; I currently have: $query ->...
2
votes
1answer
357 views

Converting PHP site to Joomla. Is it possible? [closed]

Alright so we have a client who has a site that he'd like to be able to turn into a Joomla site so that he can make changes to his products. Only problem is, the site is php. Is it possible to convert ...
2
votes
4answers
751 views

Hover effect on svg image doesn't works on pages linked with Single Articles

I have social icons in the Footer of my site and those images are in svg format. Now I need to change my images on hovering. I have applied the following jquery, which works fine on the home page. ...
2
votes
2answers
87 views

Latest articles structured data markup

I have added microdata into every article manually and it works fine. Now I want to insert them into the latest articles module. To override the module in my template and I added: <li itemscope ...
2
votes
2answers
40 views

How to stop Joomla 2.5 from disabling PHP

I need to stop Joomla from converting PHP code to a comment (or otherwise disabling it). I copied a working page with a basic [directory listing] function, and the duplicate wouldn't work. I am ...
2
votes
2answers
360 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 ...
2
votes
2answers
2k 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/. ...
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 ...
2
votes
1answer
626 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
2answers
1k views

How to share Joomla Article through Whatsapp?

This is my sample article..How can I share this article through Whatsapp? Your answers will be appreciated..thanks!
2
votes
1answer
71 views

First Attempt PHP Plugin

New to php and plugin building. I am a front end guy but need to learn templates building in Joomla. I have a small one working that gives you the ability to insert and change some text in the ...
2
votes
1answer
249 views

Problem to get cookies at the remote server

Does anyone know why I cant get cookies from the remote server with the code below? <?php $inputCookie = JFactory::getApplication()->input->cookie; $value = $...
2
votes
2answers
2k views

Show intro image in Category List

I added this line in my custom template to display the image: <?php echo $article->images; ?> And I got this as a result: {"image_intro":"images\/articles\/liang2.jpg","float_intro":""} ...
2
votes
1answer
265 views

Submit a view instead of redirect to another view

I have 2 views namely students and student. The students view will list all the students and student view is to show the details of the student. These 2 views are accessible for all staffs in the ...
2
votes
1answer
395 views

Joomla Timezone

I would like to check the time within a sub controller's method. The calendar field in my JForm saves the datetime to sql and uses UTC. So now we have 15:11h in Germany and in the database would be ...
2
votes
2answers
2k views

Read more (Introtext, Fulltext) functionaltiy in category page in Joomla 3.x

As we all know in Joomla Article page, a read more functionality is always possible <hr id="system-readmore"> to show the article in introtext/fulltext format. But in Category description page ...
2
votes
1answer
175 views

Change PHP code for Joomla Module

I am slowly getting my head around PHP but being self taught, it is taking a while :p Anyway... I have installed the SP Weather module but have come across a problem. I would like to display the wind ...
2
votes
1answer
656 views

How to set html5 property within template.php

Apologize for my bad php knowledge, how to set html5 flag for the current document? Something like: $document->setHtml5(true); This to be executed in template.php where we do not have $document. ...
2
votes
2answers
408 views

How to remove the suffix .html in Joomla 3

How I can remove the suffix .html in joomla 3 in my menu link even if I turn on Add URLs suffix. I want to remove in one specific article/page only. Thank you for help.
2
votes
1answer
781 views

Refreshing a part of the page after Dropdown list selection

How can I refresh a part of the page when I select from a dropdown list using the onchange in HTML? I have a Reports dropdown list. Once I select a Report, a list refreshes only displaying those that ...
2
votes
1answer
120 views

How to add pagination in joomla custom php code?

Please help me to add pagination (getLimitBox) to my table result. I have for example 100 rows in my table and I want to show 10 page. <?php $formid=23; $db = JFactory::getDbo(); $query = $db->...
2
votes
1answer
79 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', '...
2
votes
2answers
249 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
1answer
516 views

PHP: Check if a module is displayed on the current page

I'm having some issues with checking if a module is displayed on the current page. I tried out different approaches with JModuleHelper methods, eg isEnabled, but it only works with module types not ...
2
votes
2answers
77 views

Errors with PHP code — please advise a complete beginner

I'm managing a Joomla website that uses DJ Classifieds as the main component; the 'ads' are actually resumes, and employers buy a subscription to access an ad's details. In the past, users who didn't ...
2
votes
2answers
1k views

Connect two databases with one Joomla site

I have two Joomla sites with different databases. I want to share all data from one site to another site. For example, when I register a user in one website then it's updated on the second site's ...
2
votes
1answer
991 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 ...
2
votes
1answer
637 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....
2
votes
2answers
377 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. ...
2
votes
1answer
522 views

Use of $_SERVER variables in custom plugin

In my Joomla application, I have functionality where I use server variables, like request_uri and query parameters for parsing url string. This function is used in many modules. So, I wanted to ...
2
votes
1answer
509 views

Joomla 3.5 com_ajax not found

I have update my Joomla from V3.4 to V3.5 and below error is showing. "NetworkError: 404 Component not found. - http://example.com/administrator/index.php?option=com_ajax&group=system&...
2
votes
1answer
615 views

Importing Joomla CMS to custom PHP script (outside root folder)

I am trying to import Joomla CMS to a custom PHP script by this : define( '_JEXEC', 1 ); define( 'JPATH_BASE', realpath(dirname(__FILE__).'/' )); require_once ( JPATH_BASE .'/includes/defines.php' );...
2
votes
1answer
148 views

Which file are actually taking care of “Logout” process? (killing sessions)

I am learning the basic concept of how to manage login process and sessions. I take it that to logout a user, you need to destroy the session created for him. I was trying to find out how joomla 3.4 ...
2
votes
1answer
108 views

Installing a PHP based sig. banner generator

I have a PHP based signature banner generator (a 'proud X for N years N Months, N days' type of deal) that I need to include in a site served via Joomla, but am a bit confused as to how to do that. ...
2
votes
1answer
66 views

How do I make a 3rd party livehelp autofill with Joomla users' names and email when logged in?

I'm trying to get a 3rd party livehelp to autofill with Joomla users name and email when logged in. This is the js code to autofill: LHCChatOptionsPage.attr_prefill = new Array(); LHCChatOptionsPage....
2
votes
2answers
912 views

Login automatically from mobile App to website without need to re-insert credentials

The mobile App has been designed by myself (easy to manipulate). However, the website was designed by an outsourced developer (Joomla) and he is not available anymore. What I need to add is link the ...
2
votes
1answer
612 views

RokSprocket automate Load More

for people that have used Joomla for a while you are probably familiar with RokSprocket - a content module from RocketTheme, very useful. It has a 'Load More' button, that can load the next bit of ...
2
votes
1answer
1k views

Function getLanguage() does not return current language?

I'm trying to get the current selected language. Here is the part of my code: define('_JEXEC', 1); define('DS', DIRECTORY_SEPARATOR); if (file_exists(dirname(__FILE__) . '/defines.php')) { ...
2
votes
2answers
665 views

2.5 template/css issues: article links not working in Chrome, link colors locked globally to white and email cloaking

I'm a Joomla, CSS and php newbie. I was tasked with creating a site for the school I just started working for based on its already hacked-up Joomla 2.5 template. I hacked it some more to get the ...
2
votes
2answers
666 views

No more than one module in position

I was just wondering if there was some PHP that I could add to my template index.php that would ensure only one module is loaded in a particular position. I know there are other options available ...
2
votes
2answers
745 views

Remove all <img> tag except the first one change image size - Tag component

Context: On the Tag page (the Tag page I am talking about is the page I get to when I click on a tag just below the title of an article), I want to display only one image per article so: if there is ...
2
votes
1answer
4k views

Language condition with Php if… elseif

I would like to modify a core component of joomla by setting up a condition based on the language the website is displaying. My edit don't seems to work and I can't get what I am doing wrong. <?...
2
votes
3answers
1k views

Joomla 3.3 specific menu item nofollow

I want to add rel="nofollow" to certain menu items in Joomla menu. I do not want to change Joomla core files. What I want is to put in menu options nofollow for "Link Type" tab "Link Title Attribute" ...
2
votes
1answer
19 views

How can I add an attribute to a direct link menu item?

I would like, ideally in the php file of a menu override, to add role="menu-item" i.e. direct links to another location, in a Joomla 3x (and 4x) menu. Is this possible, or do I need to use ...
2
votes
2answers
233 views

How to get access to image metadata from PHP?

I am in the proces of writing a Joomla extension that utilizes metadata embedded in image files in IPTC, EXIF and XMP chunks. In particular, I want to gain access to "Title", "Tags"...
2
votes
2answers
81 views

Deleting rows in two different tables

I'm trying to make function (task) and deleting rows in two tables. But I don't get this sql query working, I only got this error: 1064 - An error has occurred. You have an error in your SQL syntax; ...
2
votes
2answers
70 views

Language Constant Not Displaying in External Script

Joomla 3.9.14 I have an external application that uses the script below, allowing users to register as a user on my Joomla site. It all appears to be working apart from error displaying. My code is ...

1 2 3
4
5
14