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
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 ...
6
votes
1answer
789 views

Database query where() value is a number

As we know, any values that are defined in a database query should always be escaped in Joomla using $db->quote($value). When defining numbers as a variable, one would normally use (int) to set ...
2
votes
2answers
742 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 ...
3
votes
1answer
235 views

HTTPS and Force_SSL backend login problem

I recently upgraded my Joomla site to 3.3.1 from 3.2.2, upgraded the PHP version on my server from 5.3 to 5.5.14 and installed NGINX. The upgrade went fine, a couple of minor styling and extension ...
2
votes
1answer
715 views

Jquery marquee script not working in joomla?

I want to marquee some content divs with continues scrolling. I create a module then added the jQuery from this url: https://github.com/aamirafridi/jQuery. This code is working successfully in our ...
1
vote
2answers
1k views

Tag page: remove links on image when they are in introtext

I am trying to remove the link on my image on the Tag page (where all the artcile with the same tag are displayed). The image is placed with the <img> tag in introtext, it's not an intro image. ...
0
votes
2answers
194 views

Can I use Joomla's community builder as a form component?

I was developing a website that allows people to enter records. At the time, Community Builder was the best component for the job. The client was not clear if the records were a one-time thing or not, ...
6
votes
1answer
1k views

Using checkToken() to secure form posts

I am building a web app using the Jooma Framework and the Framework App as a template. I have getFormToken() working as described in this post and am now submitting the token with my form but I cannot ...
1
vote
1answer
404 views

Joomla 1.5 to 2.5 : JLIB_APPLICATION_ERROR_VIEW_NOT_FOUND

I migrated from Joomla 1.5 to Joomla 2.5 with jUpgrade. Re-installed several components with 2.5 versions, migrated Joomfish, etc... At first I had troubles getting the rewriting to work (SEF and ...
2
votes
1answer
393 views

Joomla 3 LDAP username won't allow required special character

When using LDAP login authentication domain\username is the format that we need to use but Joomla will not allow this. When trying to save these users in Joomla backend the format is rejected due to ...
1
vote
2answers
174 views

how to exclude a script written in the index.php (only) in the frontend

My "share this" button is written in the index.php and thus appear also in frontend straight into my editor. How could I disable it (only) when I use frontend editing? in my template/index.php : <...
3
votes
2answers
456 views

User group in joomla 3.2.1

Please help me. I have a problem about user group in joomla 3.2.1. I created a new user group(name: Hoa Si) then i create a new user(abc) for Hoa Si group. But i can not login with new user(abc) on ...
0
votes
2answers
229 views

Error while migrating a Joomla website from version 1.5 to 2.5

I have tried to migrate a website in Joomla from version 1.5 to 2.5 using jUpgrade but I received an "undefined migrating" error: Fatal error: Uncaught exception 'Exception' with message 'Unknown ...
1
vote
1answer
778 views

When accessing Joomla from an external script when should you include ('libraries/joomla/factory.php');?

I've been reading up on how to access Joomla from external php scripts and I've noticed that there tends to be 2 flavours of code- external scripts that use require('libraries/joomla/factory.php'); ...
3
votes
1answer
2k views

Undefined index: view with external url menu

I am using Joomla 3.3.1 with SEO links on, and after changing a menu type to external menu (which points to a PDF), I am getting the following PHP notice: PHP Notice: Undefined index: view in /...
-2
votes
1answer
1k views

Difficulties in calling ajax from joomla 2.5 module

Hi i am having problem to call another file by ajax from module.As i don't want to make a component to call it for ajax from module, so what i am thinking is calling index.php file from ajax passing a ...
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. <?...
1
vote
1answer
386 views

Attributing Itemid to article when opened from a “Tagged Items” pages

I am struggling with the tag component. 1) When I click on the title of an article from the component/tags/tag/MyTag page, then I am redirected to a page with the home itemid. This is a big issues ...
0
votes
1answer
344 views

How to send the value via url to helper.php when i click a href link in the default.php?

I want send the value via URL when i click a href tag and get the file(pdf/docs) from the database and how to fetch the file in the database.my default.php code : <?php foreach($view_docs as $...
6
votes
1answer
449 views

Implement CSRF anti-spoofing using the Joomla Framework

I have used the methods described on this page in Joomla many times before: http://docs.joomla.org/How_to_add_CSRF_anti-spoofing_to_forms Now I want to implement the same mechanism using the Joomla ...
5
votes
2answers
2k views

Using caching for module or component independently

Is it true that even if i enable module caching from module setting, module caching not works unless system cache plugin turned on? I want to use cache per module/component from their settings not ...
0
votes
2answers
2k views

Multiple File Upload Using JInput?

FORM HTML : <form name="upload" method="post" action="send.php" enctype="multipart/form-data"> File #1 : <input type="file" name="one" /> File #2 : <input type="file" name="two" /> ...
6
votes
2answers
6k views

File upload using JInput! possible?

i use a html form on one of my articles, i am successful in getting the values from the form using JInput! $input = JFactory::getApplication()->input; But now i need to add a file upload input ...
21
votes
6answers
20k views

How to detect if user is Super User?

To determine whether the visitor is a guest, we use something like this : if ($user->guest) { echo 'Hello, guest!'; } Now, if i want to determine whether the visitor is a registered SuperUser (...
1
vote
1answer
688 views

Where can I change the message “Error displaying the error page: Application Instantiation Error” in Joomla?

When MySQL stops responding or is not running, my Joomla site displays this error: Error displaying the error page: Application Instantiation Error I need to change this description. Which file can ...
0
votes
2answers
5k views

How to override/customize pagination links?

In my component, I am using Joomla default pagination calling $this->pagination->getPagesLinks() in the view template file. Say, my component url is like this at a certain point: http://...
11
votes
1answer
10k views

Displaying a Joomla module using PHP?

Can i display a Joomla module using PHP? What would be the script to achieve this? (If it's possible!)
-2
votes
1answer
1k views

PHP code to display Registered Date & Last Visited Date?

How can I make a PHP script that displays a users Registered Date and Last Visited Date as it appears in the core Joomla profile page?
7
votes
1answer
930 views

Joomla Article Multilingual Associations

I am confused. I have a Joomla 3 multilingual website. I managed to associate menu items and everything else, but I have a page where there is an article and below the article I put Joomla Article ...
0
votes
1answer
527 views

Blank page when executing a database query?

What's wrong with this code? I'm getting a blank page for this? <?php define( '_JEXEC', 1 ); define('JPATH_BASE', __DIR__); require_once ( JPATH_BASE .'/includes/defines.php' ); require_once ( ...
1
vote
1answer
772 views

Add a URL Param to Chronoforms5

I am trying to add a parameter to the chronoforms submit url. Currently it looks like: ?chronoform=contact&event=submit I need it to look like: chronoform=contact&event=submit&scroll=5 ...
6
votes
3answers
366 views

One time form for Joomla Users?

I want to place a custom html/php form for my registered Joomla users but I want it to be submitted by the user only once, i mean if a user has submitted the form , the next time he'll open that form ...
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" ...
9
votes
3answers
14k views

Remove Article ID from Joomla 3 url

I am trying to remove the article id from a Joomla 3 URL. I searched around and the response is in components\com_content\router.php change 0 to 1 in $advanced = $params->get('sef_advanced_link', ...
3
votes
1answer
95 views

Records in log file

In my site logs folder when i open error.php, i see lots of records per line as one is look like this - 2014-04-03 22:35:54 INFO 2.61.174.50 Joomla FAILURE: Username and password do not ...
5
votes
2answers
1k views

Seblod template: How to use fields/markup.php to override field markup?

I have created a new template by copying the seb_one template and then making my adjustments to index.php. I have also used fields/markup.php by copying it to fields/contenttype/markup.php in order to ...
3
votes
3answers
2k views

Retrieve joomla session from within a module

I'm setting a session variable from external file using ajax: define( '_JEXEC', 1); define( 'DS', DIRECTORY_SEPARATOR ); define( 'JPATH_BASE', realpath(dirname(__FILE__) .'/' ) ); require_once ( ...
1
vote
2answers
585 views

Text with space entered via tinymce editor showing unexpected behaviour at front end

in one of my component record entry form i placed a editor which use tinymce from joomla configuration. i save record by entering some texts for a description field like "description description ...
6
votes
2answers
1k views

Adding a numerical value to each submenu in Joomla

<?php /** * @package Joomla.Site * @subpackage mod_menu * * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License ...
11
votes
4answers
15k views

How to build a RESTful API with Joomla

I have been building Joomla extensions since v1 but I soon need to take an API live that I have built and have been using for a while. Currently I am using Joomla 2.5 and have written plugins for this ...
3
votes
2answers
2k views

Error: 404 Category not found error with custom PHP script

For some time now I have been working with Joomla, and now I am working with a version 3.1.5. I often make my own PHP scripts to use for AJAX callbacks and other things. I put them in a folder ...
0
votes
1answer
481 views

Upgrade Joomla 1.7.3 to 2.5.0 failed

I need to migrate my joomla 1.7.3 site to joomla 3. So, I first upgraded it to joomla 1.7.4 and 1.7.5 successfully. In the next step I am going to upgrade it to 2.5.0. So I downloaded the update ...
1
vote
1answer
760 views

Hide past items based on date inside foreach loop

I have a custom component that displays "coming soon" items based on dates. I am trying to hide all those items that are past today's date. However if there is no future items it does not display the ...
0
votes
2answers
527 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
vote
1answer
356 views

Adding all form parameters in a custom item of the component

I prepared a component and i have to add different categories and custom items with lots of fields in my component.But What i want is to display all the joomla's fields for adding a new item in my new ...
1
vote
2answers
81 views

Show products based on my custom attributes to second addon domain site

I'm using virtuemart 2.0 and joomla 2.5 with a commercial template mowebso_ecommerce - Default. I want to show some products on my first website eg. firstsite.com and some products on second site eg. ...
2
votes
3answers
2k views

Plugin development - parse error: syntax error, unexpected 's' (T_STRING)

I'm having a shot at developing my first plugin for Joomla, its just a simple plugin which places some javascript just before the close of the body. The javascript works fine if I place it directly in ...
3
votes
3answers
895 views

Security: best practices for disabled_functions and classes

Because Joomla uses so much third party components and such, what are some safe functions and classes to add to the php.ini for disabled_classes and disabled_functions? The reason I ask this is for ...
12
votes
1answer
169 views

Docs use assign by reference (=&) but is this necessary with PHP 5?

I've noticed in the Joomla documentation, such as for JFactory/getSession, that the examples use assign-by-reference (=&), rather than a simple assignment (=). $session =& JFactory::...
3
votes
1answer
679 views

Correct way to verify if the logged in user is super user

As my question implies what i want, i used google to search through the web to get correct answer though simple about how to verify if current logged in user is super user or not in both joomla 2.5 ...