People who code: we want your input. Take the Survey

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
3
votes
1answer
2k views

Display Joomla article contents and title using PHP

I have a component and module built by an external company, they have hardcoded content into the component - I want to change it so the content is called from the Joomla Article Manager. The ...
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 ...
1
vote
3answers
2k 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....
2
votes
1answer
654 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. ...
1
vote
1answer
257 views

Set column width based on number of modules in position

I have 4 module positions, which based on the number of modules I'd like to resize the column width. I've written the following, but it's only setting them all to col-md-12. Any ideas where I'm going ...
1
vote
1answer
253 views

Click button and select menu programmatically

This question is based on previous question here where I managed to populate username from the opener/source to the destination window, using the following code in the destination window using ...
3
votes
1answer
262 views

Where to catch Post event?

I use the following JavaScript to open new window in which Joomla login page displayed: window.open('https://URL', '_blank', 'location=yes'); The new window opens is as follows: I need to ...
0
votes
1answer
589 views

Sublime Text 3: Joomla coding standard (PHP Code Sniffer) is not executed

2 years ago I installed Joomla coding standard definition for PHP Codesniffer (https://github.com/joomla/coding-standards) for Sublime Text and everything worked well. I just moved to a new laptop ...
0
votes
1answer
526 views

Use jQuery to name the Accordion panels

I'm creating an Accordion Module (using Bootstrap) with the latest forum posts from Kunena. I have written the following, which is displaying the posts correctly, but I need to somehow use jQuery to ...
1
vote
1answer
2k views

Joomla 3.x admin login error

I've moved my joomla site from subdomain to main domain and from then I cannot login to my admin panel. The following error message given: Fatal error: Call to a member function isAdmin() on a non-...
2
votes
1answer
264 views

Netbeans code formatting comment blocks

I use Netbeans for Joomla extensions development, I want to stick to Joomla coding standards but I have a problem with the first phpdoc comment block. I know this is an stupid question but it's ...
3
votes
1answer
292 views

Joomla content next and prev content's images

How can I use PHP echo to get the next or prev page article title or image in current page? I tried change some code in article/default.php like: <div class="pull-<?php echo htmlspecialchars($...
1
vote
2answers
1k views

Login to Joomla website from mobile App

Background I have Joomla website and mobile App that's running on different server (programmed using JavaScript). Both belong to the same party, and the users have similar accounts on both with ...
1
vote
3answers
126 views

Running Joomla Locally

We are trying to run our Joomla site locally but are having issues with paths to things like images etc. We copied our site/database down from SiteGround and set it up locally in folder xampp/htdocs/...
5
votes
2answers
1k views

Rapid Ajax calls causing some MySQL queries to be ignored

I am currently working on a Joomla website on a Unix server. There are no users connected at the moment because I'm the only one who can access it (so no heavy traffic). During testing, I proceed to ...
0
votes
1answer
82 views

Using PHP in Joomla 2.5, is there a decent way to create groups without going through the menu or SQL?

I have been working on a custom component but now hit on an issue where I need to set up groups for ACL reasons. However, I cannot seem to find a valid method - I've crashed things so far. The group ...
0
votes
1answer
2k views

How to write php code inside the article in Joomla?

I have a Joomla article and I need to implement "@include ...." in the article source code, so it loads a PHP page from external link, but only this article should display the PHP page. I searched in ...
3
votes
3answers
1k views

Errors after upgrading PHP to 5.4 in Joomla 1.5.25 dispatcher.php and event.php

I have a Joomla website and I had to upgrade webhosting to PHP 5.4. Now I see these errors on my website: Warning: Parameter 1 to plgContentMultiAds::onPrepareContent() expected to be a reference, ...
0
votes
1answer
50 views

Custom module: JSession brokes the site

I am making custom shop module for my website and my script breakes all pages where it is. The command what breaks it is: $session =& JFactory::getSession(); (Code putted in default.php). I cant ...
3
votes
3answers
1k views

Joomla! - Give Blog Categories Classes

First off, I'm a PHP noob :/ just to get that out of the way My goal is to give each Joomla! category a class, so I can pre-style layouts for my client, and when they choose a Category, they would ...
5
votes
2answers
911 views

Get access to php variable in Joomlas addscriptdeclaration for Javascript

How do I get access to php variables in Joomlas approach to integrate Javascripts with addScriptDeclaration? $document = JFactory::getDocument(); $variable = "test"; $document->...
0
votes
2answers
218 views

Change Profile Display Upon Initial Login

I am using a membership extension to manage the users on my site along with the native Joomla login module. They sign up using the membership extension and the initial time that they login they are ...
-2
votes
1answer
278 views

How can I link my PHP file to the HTML of a module?

I have this newsletter module in joomla with this code <form method="POST" name="contactform" action="prova.php"> <div class="tm-block-bottom-b tm-block-padding tm-block-primary-dark tm-...
1
vote
1answer
776 views

PHP Info Missing

Having some (phpmailer) mail issues today with my site so I though of checking System > System Info > Php Info and it's blank. No info at all. Although there is info on each of the other tabs (PHP ...
-3
votes
3answers
135 views

Puting script labels in a module problems

I'm trying to put a jQuery pluin in a module which I have developed. When I do it, it doesn't work. The code where I put this labels is this: <?php // no direct access defined('_JEXEC') or ...
1
vote
2answers
1k views

How to extract Joomla image PHP for Opengraph

I have been trying to develop my own opengraph. I found some codes online and try to merge them but to no avail. I wonder if I have done it wrong. // Try to find image in article $img = 0; ...
1
vote
0answers
784 views

Send data from custom field to database - Joomla 2.5

I've created a custom field for a module which gets some information from the database. I need to add the functionality to update the information in database if I make some changes. Here is the code ...
3
votes
1answer
470 views

Is it possible to grab a variable from a component inside another component?

Im sure the title sound a bit complex or lame. Im trying to develop a component that will keep the count of users that Added a product in the cart but didnt finish with a checkout ( canceled the order ...
5
votes
1answer
1k views

How can I change a SEF URL to display another template?

I am using Joomla 3.3 and K2 v2.6.9. I have a category view with several items, namely books. The URL looks like this: http://localhost/index.php?option=com_k2&view=itemlist&task=category&...
0
votes
3answers
471 views

Problems with sourcerer and a table

Why if I try to generate a table in a custom html it doesn't show a table?, it appears everything in the same line and I don't know why. This is the code: {source} <?php $db =& JFactory::...
2
votes
1answer
608 views

Customising the Virtuemart confirmation e-mail?

I am using Joomla 1.5 and Virtuemart 1. With the order confirmation e-mail sent to the seller, is it possible to not show attributes that have the default option selected? (not changed) For example ...
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 ...
0
votes
1answer
112 views

Only display Published items in <li>

I have written a component that outputs a list in ul format. Currently the UL is built with the following: <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1"> <?php ...
2
votes
1answer
9k views

Inserting php in a custom html module

I'm trying to introduce a simple php in a custom html module and it doesn't let me do it.Why? This is the code: <p> </p> < ? php echo " Hello World" . "\n"; ?>
0
votes
0answers
185 views

User Extended Fields Problem

I'm new with PHP and I'm developing a website with joomla 3. I have a module which is k2 users where I show all k2 users, well, I want to add to this module some fields from the User Extended Fields ...
6
votes
1answer
2k views

JLoader::import vs JLoader::register

Can You Please Answer What Is The Difference Between the following functions: JLoader::import and JLoader::register which belong in the loader.php file?
0
votes
1answer
1k views

Connecting API with Joomla 3 using PHP

I have mobile unlock code remote api which allows user to search for mobile unlock code using dropdown, so I want to attach it to my existing Joomla website. It uses curl to address the remote server ...
1
vote
1answer
1k views

Submit external data to RSForms MySQL table

I have a form on a non-Joomla website which has the following fields: Full Name Email Address Work In A Pub (Tick box) Supplier (Tick box) Over 18 I have the following code to send from the external ...
1
vote
1answer
2k views

RSForm check if email is in database before submitting form

I have an RSForm which has the following fields: Full Name Email Address I only want to capture new data, how can I use the $_POST script to check if the email address submitted is already in the ...
0
votes
3answers
2k views

Getting session value without refreshing in Joomla

I made a Joomla module which contains a form element select box. On selecting, it submits the form and the value of selected item is stored in a session variable. <?php defined('_JEXEC') or die; $...
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 ...
4
votes
2answers
11k views

All directories listed as unwritable

Previous title: Can't install extensions: Error: Archive does not exist I removed and reinstalled Joomla 3.3.6 on my CentOS 6.5 server. Wanted to install some backup utilities and a CCK. However i'm ...
7
votes
2answers
2k views

Get Value of Repeatable Field from Joomla XML manifest

repeatable - How to get values from this field type ? I am coding a Free module with a repeatable field. <field name="star_slides" type="Repeatable" icon="list" description="" label="Edit Your ...
1
vote
1answer
215 views

Configuration of open web analytics locally

I try to run the openwebanalytics software locally under wampserver and joomla using the instructions of this video. I have created the db. I have insert the owa file under the joomla site. I type ...
2
votes
3answers
228 views

PHP get each line of textarea in jform

I am building a joomla 3 component. I have a text area set up in my xml document where the user can add additional JavaScripts (one per line). I then have some php which takes each line and adds the ...
0
votes
2answers
164 views

Change styling for specific pages in Joomla 3.x

I want to create a specific page (e.g. On_Line_App.html), where the Javascript (Three.js) editor will run and show the WebGL content to the end user. If I place it into a module then its rendering ...
1
vote
1answer
3k views

How to Access User-Profile Component Data via PHP [duplicate]

I am using Joomla! v3.3.3 and I have just enabled the "User-Profile" component. How can I access and/or echo the "User-Profile" component data via PHP, such as: address1, city, website, etc? I ...
0
votes
2answers
94 views

Javascript in custom content plugin output

I want to use javascript in my custom Joomla content plugin, but I can't get my custom text when type text in my input by using getElementById. My code is: <?php $output = ' <input ...
0
votes
3answers
3k views

PHP version not updated when installing Joomla 3.3.6

Why isn't my PHP version updated, although I updated to the latest Joomla 3.3.6?
1
vote
2answers
8k views

Strict Standards error after PHP upgrade

I am using Joomla 3.3.6 site on VPS, yesterday my hosting provider upgraded from PHP 5.3.29 to PHP 5.4 and now i am getting following errors on my live site: We asked them to revert back to php 5.3....