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
1
vote
1answer
1k views

How to get specific values from query array, using arguments [closed]

I am probably over thinking this. I am building a module that should get values from the content table. Currently (I have tried many different variations) I am using: <?php class getIt { //...
1
vote
1answer
740 views

Return to previous page menu item

I'm wondering if someone can help me, or maybe point out a good plugin/extension. I need a return to previous page button, but I need to insert it as a menu item, does anyone know of a way to achieve ...
1
vote
4answers
5k views

Administration area keeps redirecting to homepage

I'm having a problem with accessing the administrator site... I googled too much and tried every suggestion that is mentioned in those websites.. but none of them working :S.. After going to mysite....
1
vote
1answer
522 views

Let JForm-Fields be dependent on eachother

I would like to solve this problem: I got some Fields in my Form. Some are Combo-Boxes, Radio Buttons, Text-Inputs and so on. Now I would like to do the following: If Radio-Button 1 has value 1, ...
1
vote
1answer
356 views

Delete items of database via CLI

I would like to delete some items with state "trashed" via CLI. Is it possible to call the delete-method of JTable from CLI? Thanks for your help :-)
1
vote
2answers
84 views

Check extensions vendor

Is there a way to check if in a Joomla! installation there are extensions from a specific vendor? In a plugin that i have i need to apply different procedures if a specific vendor products are present....
3
votes
2answers
664 views

Call controller's publish-function from “outside”

I modified the publish-function of my sub-controller as follows /** * publish function. * * @access public * @return void */ public function publish() { $...
5
votes
1answer
509 views

Extend publishing in controller?

I would like to extend the (un)publish-function in a sub controller. I thought it would be enough to write something like that to my sub controller items.php: public function unpublish() { ...
2
votes
2answers
2k views

Get ID of deleted database-entry

I would like to create a delete-method, which deletes an entry in a table AND the attached entries in a second table. This is my source so far: // Delete entry in users_handles $db = ...
0
votes
2answers
324 views

Populate field form with array data based on field choice

In a Joomla 3.x plugin I need to populate some plugin parameters with array data based on dropdown field choice value. $presets = array( "preset_A" => array ( "parameter_A" =&...
2
votes
1answer
394 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 ...
0
votes
1answer
86 views

CLI: Can not fetch members of specific groups

on my Joomla-CLI-Script I would like to fetch all user-ids which belong to a specific group. My script so far: // $groups = groups that are set in global params if(!empty($groups)); { ...
3
votes
2answers
1k views

Filter strings before saving them in the database

I just created a script witch fetches mails from IMAP and stores the title and content in the database. Of course I don't want to save these information without a check; I'm a bit paranoid but I ...
0
votes
3answers
1k views

Store data to other table and get the id

I'm using a method to store information in another table. This is how I'm doing that: public static function CreateMail($userid, $title, $state = 1) { $maildata['userid'] = $userid; ...
2
votes
1answer
1k views

How to load and use external libraries in a component?

I am wondering how to load "external" php-libraries into my component. I would like to fetch mail via imap. To get this working, I would like to use a lib which is able to handle smime-encoded mails. ...
0
votes
1answer
188 views

Hide text if viewing page on phone (not tablet)

We've just been editing the index.php file of a Joomla template to add some content to a page, where a module position does not exist. This is fine however I would like to hide the text if the page ...
4
votes
3answers
2k views

Pass var to jQuery script

I need to pass a php var to a jQuery script. They are in separate files, one file to php code and another file to jQuery scripts. Is there a way of doing it? I am using Joomla 3.4.1. I just need to ...
1
vote
2answers
836 views

Add a different class to each foreach item

Using the mod_articles_categories module. I am writing an override but want to add a class to each li within foreach(). I have the following code: foreach ($list as $item) : ?> <li> How ...
1
vote
2answers
951 views

How can I display a system message from a custom HTML module

I would like to display a system message from a custom HTML module. I have sourcerer installed which is allowing me to add php code into the module and this seems to be running fine. However, it ...
3
votes
1answer
331 views

Display values of JFormFieldRepeatable

I am using a J3.x Plugin called Aixeena CCK http://extensions.joomla.org/extensions/extension/authoring-a-content/content-construction/aixeena-cck which adds extra fields to articles using standard ...
3
votes
2answers
1k views

Recaptcha 2.0 Joomla 3 - Validation failed - PHP

I use Joomla 3.4.1 and Recaptcha v 2.0. I can't validate the captcha, i'm sure i've the good PHP code.. This is the code in plugin file, recaptcha.php : function onCheckAnswer($code = null)[...] ...
3
votes
3answers
2k views

How to get database information from Joomla category

I know how I can retrieve all information from a article in the database. I am trying to do the same thing for a category. And just for clarification, I am talking about when view is equal to category ...
2
votes
4answers
746 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. ...
0
votes
2answers
112 views

Plugin development, add content directly in body on every page?

I have to develop a simple plugin that add simple a text directly in body and on every page, the problem is i see this content only on content pages, but don't on pages like: flexicontent & ...
0
votes
1answer
388 views

Joomla, Falang integrate component… Fatal error: Call to a member function getTable() on null

Hello I am having some issues for integrate a custom component of joomla in Falang for multilanguage website Debugging I got null: Fatal error: Call to a member function getTable() on null ...
2
votes
3answers
1k views

How to launch an asynchronous php process

I am developing an ecommerce component. I have noticed that when the user makes the purchase, the process takes between 18 and 20 seconds, which is quite unacceptable. Following up the code, I have ...
1
vote
1answer
3k views

Get current script's and its parent folder path

Is there any Joomla way to return the path or parent's folder path of a current script? So far when needed, I am using the Joomla Constants and building manually the remaining of the path. It's also ...
0
votes
0answers
96 views

Joomla 1.5 creating or editing back end user

I have a website in joomla , the problem is that when i am creating new back end user (administrator/super user) from joomla user manager it makes an entry in the users table after that it deleted it ...
2
votes
1answer
750 views

Load a module between modules in the same position

I'm not as expert in php, so sorry in advance (i'm using Joomla! 3.3.6 in Italian). What I want to do / get is: - create and enable an HTML module into Joomla, with position "position-x" (which does ...
1
vote
1answer
315 views

Need to pass currency code in geoplugin class as variable

I am making a module displaying google map and retrieving the data in the marker info box from database. It is a hotel booking website. The currency stored in the database is Hotel's default currency ...
-1
votes
1answer
284 views

Why are Fabrik packages not installing in joomla after packaging? [closed]

I just installed fabrik cck, which is good by the way, I then packaged my forms created in the localhost so as to reuse them in the live site. When I try to install, I get a blank page on this ...
3
votes
2answers
1k views

Menu getActive() returns “Trying to get property of non-object” in Search Component

To identify the pages am using the following code if($menu->getActive()->id == 203){} // some actions this line returns error in search page. Search url goes like this http://localhost/...
3
votes
2answers
2k views

Access ZOO item id in an element template file

Am trying in yootheme ZOO app to enable the rating element ONLY when the date element passed the today date but i cant find a way to get the item_id. If I try for example 277 everything is working, ...
3
votes
4answers
2k views

How to write my MySQL query with JOIN logic using JDatabase methods?

I'm having a difficult time translating this SQL script to JDatabase methods because I can't find the AND query method. SELECT user.firstname, user.lastname, leadership.leadname, leadership.lead_des ...
4
votes
3answers
2k views

Get module parameters using loop

I'm creating a module for a website, and to get the module parameters I do something like this: //-- Get a parameter from the module's configuration $company1_enable = $params->get('...
1
vote
2answers
749 views

Click login button programmatically

For testing purposes on joomla default login file here: (/templates/theme718/html/com_users/login/default_login.php), I run the following successfully to generate the username and change the language ...
3
votes
2answers
460 views

Joomla and PHP versions

I work on a number of Joomla sites for clients, across multiple (differing) hosting environments. This can be a pain when troubleshooting as some of the hosts are running old versions of PHP (5.2) and ...
1
vote
1answer
991 views

Joomla3.x component curl JHttpTransportCurl

I'm developing a component require to use a management software api, which is using curl to accessing the data in that software. However, it seems joomla restrict the curl access, because the api ...
2
votes
0answers
200 views

Joomla component include php library, not working [closed]

i'm trying to include a php library into my component front-end, however, when i try to declare a object, it shows error: class not found. here is some code: (in model) require_once(...
1
vote
1answer
95 views

Nooku Request Problem

I am using Nooku framework and Joomla CMS and MySQL database to create an application , and I need to retrieve a certain data from another table into the dropdownmenu of my table , using Nooku ...
3
votes
2answers
1k views

Trying to count the number of articles in a category but give wrong number

I'm trying to use some PHP I found on here to count all the articles in a specific category (10), the PHP is working but only showing 20 articles, when a manual count shows 28. $model = JModelLegacy:...
1
vote
2answers
171 views

Loading time is slow in Joomla PHP [closed]

I am creating an application with PHP ; Joomla 3 , Nooku and MySql Database , and I am interacting with the database to get datas from a table , i get over 64400 rows to 5 columns , but the problem is ...
1
vote
1answer
120 views

Get installation-date of Joomla and/or of a component?

I would like to get the installation-date of my joomla-installation and/or of any component by writing a new method in a model of my component. How could I solve this?
0
votes
2answers
140 views

Jquery Design Problem

I'm working with Jquery and Joomla3 and Nooku framework and I need to add CSS style to my page which I'm using the following for: JFactory::getDocument()->addCustomTag("<script type='text/...
0
votes
2answers
2k views

Enable html in email output in Joomla

I am trying to set html on the output of the email send by Joomla. Here is the code: class MailtoController extends JControllerLegacy { /** * Show the form so that the user can send the link to ...
2
votes
2answers
229 views

Component upgrade 2.5 to 3.0 getting error

I am trying to upgrade a component from 2.5 to 3.x. But while doing so I am getting error from controller.php file. Error message is like the following: Fatal error: Call to a member function get() ...
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 ...
0
votes
0answers
143 views

T3 Framework extrafields error retrieving Values

i am using the T3 Framework for my template and did everything as described in the forum. Everything is working in the backend but i am not able to retrieve the values in the frontend. I am getting a ...
1
vote
2answers
137 views

How to refactor my iterated sequence of queries?

I'm building a component which is about to be finalized, but there is a bit of code that I want to refactor. I think this code can be completed in one statement and I used more than 3 statements. $db ...
1
vote
1answer
75 views

Show Subsribed Kunena Threads based on logged in User ID

I am trying to show all subscribed Kunena threads based on the current logged in user. Kunena stores the subscribed threads in the '#__kunena_user_topics' table, I've written the following but it's ...

1
8 9
10
11 12
14