Questions tagged [joomla-api]

This tag is for questions related to the Joomla-API, both Joomla CMS and Joomla Framework.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

Joomla carousel that gets its content dynamically from an external json file

I am wondering if there is a carousel module for Joomla that can consume an api's json response to update carrousel database, at some interval, and generate the visual result. The idea is to generate ...
0
votes
1answer
37 views

Does Joomla CMS or Joomla Framework provide any Class for making POST request to an external API?

I came across this page in Joomla's documentation and this page, are they the same thing? And are these capable of sending POST requests to an external API?
1
vote
1answer
32 views

HTMLHelper::isRegistered what is it used for?

In Joomla's profile plugin, I came across these lines of code if (!HTMLHelper::isRegistered('users.url')) { HTMLHelper::register('users.url', array(__CLASS__, 'url')); } ...
0
votes
0answers
67 views

Joomla custom SSO plugin

I need to create a custom SSO plugin. The way it should work is: User authenticates on 3rd party application 3rd party application calls a Joomla URL via POST request The URL that has been hit deals ...
0
votes
0answers
11 views

create Custom Integration to Sp Page Builder editor

i have created a portfolio component and i want integrate it with sp page builder to create better items when i checked the \administrator\components\com_sppagebuilder\helpers/integrations.php i see ...
1
vote
0answers
16 views

Upload and attachement for phpmailer

hello i starting an code to allow sending file via a form i create an input file field <input type="file" name="'.$field_name.'[]" accept="'.$values_field[0].'" id="'.$field_id.'" '.$placeholder.' ...
0
votes
1answer
56 views

Joomla post requests

I'm trying to make an android application and so i want to connect it directly to my Joomla website, i want to send some post requests but they are getting denied, I'm not asking for any help ...
2
votes
2answers
80 views

Why are Joomla url query strings commonly delimited with “&amp;” instead of “&”?

I often see Joomla url querystrings with &amp; delimiters between key-value pairs instead of the standard &. In a previous question, How to make my Editor plugin (type: editors-xtd) survive ...
4
votes
1answer
165 views

What is the correct way to programmatically delete a joomla user and their data?

I want to remove a set of users by id from a Joomla 3.x database. I am trying to figure out from the documentation if this is possible without having to write my own SQL for each database table. ...
0
votes
0answers
41 views

Change default backend language programmatically

I have a component installed which doesn't provide multilingual support. If I import data via the API, I can't import in a different language, only in the default backend language. Unfortunately, ...
2
votes
1answer
81 views

Crawling Joomla websites without parsing website's html

Nowadays many crawlers are using the REST Api features of most CMSs, to be able to crawl websites fast. WordPress and Drupal have their own REST interfaces so indexing any WordPress website is a ...
0
votes
0answers
41 views

API to read and write http headers?

I am wondering what is the best way to read and write http headers in Joomla? What do I need to achieve? I want to read all requests headers I want to add response headers I want to control optional ...
2
votes
1answer
74 views

How to measure server performance in joomla (not from outside)?

I am wondering if where is a option to measure the joomla performance on the api level. something like this (afaik it is profiling) Time: 56.14 ms / 56.14 ms Memory: 0.593 MB / 0.81 MB ...
0
votes
1answer
78 views

How to get the canonical SEF URL of an article in PHP?

Is there any way to get from the article it's SEF URL? <?php $id = JFactory::getApplication()->input->getInt('id'); $article = JTable::getInstance("content"); ?> searching ...
0
votes
1answer
77 views

get intro-image from article?

I do not get the images out of my article. The article var is initialized, but the images and pictures vars seem to be empty. Any hints what I do wrong here? <?php $id = JFactory::...
4
votes
1answer
102 views

Get form input in custom field

I'm currently working on a custom field, where I manually add a checkbox to a file upload field. PDF Upload field In onContentBeforeSave I want to read this checkbox to decide what to do with the ...
2
votes
1answer
59 views

Adding redirect to redirect component from custom component

Is it possible to add a redirect to the redirect manager from my custom components controller or model? I want my custom component to add a redirect to the redirect manager on deletion of an item. I ...
4
votes
3answers
1k views

Is there a way to add rel='preload' using addScript/addStyleSheet?

I want to display some of the styles and scripts using rel='preload' to make my pages load faster - referring to the Google Lighthouse. <link rel="preload" href="style.css" as="style"> <link ...
2
votes
1answer
58 views

Number parsing and formatting, according to the user locale

I'm wondering if there is J-API way to parse and format numbers (like JDate). When you convert decimal numbers into different locales, the user can enter numbers in this way "1.234.567,891" and ...
1
vote
1answer
138 views

Admin side login template override, extra field on login

I want to add an extra field onto the admin login page. I already have the front end login override sorted, just having trouble with the admin side. I copied file. administrator/components/com_login/...
0
votes
1answer
138 views

Joomla component cron [closed]

I am developing component for Joomla and I do not know how to make cron. I can not use linux commands because it is complicated for users. Thanks.
1
vote
2answers
69 views

What are the differences of Joomla modules vs components vs plugins?

A very basic question probably... But what are the differences in Joomla terms between: module components plugins If I am a developer for Joomla what and why should I name it a module, component, ...
3
votes
4answers
113 views

Joomla API for identifying if new visitor?

Is there a API or possiblity to identify in joomla if the user is a new visitor, who visits the page the first time or a defined period passed? To be specific, the user is not registered joomla user, ...
3
votes
1answer
2k views

How to get URL parameter via Joomla api with decoded strings?

how can I get the full url parameter with the url-encoded values ?myParam=dummy%C3%B6%C3%A4%C3%BC this is the decoded url: ?myParam=dummyöäü if I use $myText = urldecode(JFactory::getApplication(...
2
votes
1answer
64 views

Load language file in view constructor

I'm trying to break up my translation strings into several files and avoid parsing them all on every request. I know base language files are loaded at Joomla! application initialization. From the API ...
0
votes
1answer
35 views

Where is `getParent()` method on `$parent` in installer class coming from?

The Joomla! MVC development docs for writing an intall script gives an example com_helloWorldInstallerScript. That class has an install() method, with this example: $parent->getParent()->...
1
vote
1answer
136 views

JFile::makeSafe does not convert file name

I need to rename and save a file upload when saving an item in a custom component. The problem is that the JFile::makeSafe function seems like is not converting the filename as you can see below. So ...
1
vote
1answer
175 views

Error! Could not find a Joomla! XML setup file in the package

I'm looking for an extension to serve my Joomla 1.5 websites contents as REST, after some search I've found https://extensions.joomla.org/extension/rest-api/ component, but there is no specification ...
2
votes
0answers
83 views

Why calling addIncludePath from self has different results than from JModelLegacy

I'm trying to get an instance of a com_menus model from within my component. The following code works: JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_menus/models/'); $model = ...
3
votes
1answer
98 views

What is the prefered method for sharing code and SQL queries in joomla 3.9+?

I'm developing a component that is targeting Joomla 3.9+. The code is not using the legacy classes and is instead using the new namespaces. The component will duplicate much of the functionality from ...
4
votes
1answer
2k views

How to Use IN Clause in Joomla Query

I am trying to select records where a column is in a suggested list if values using the IN clause. I have tried the query below but the system is not working. $db = JFactory::getDbo(); $...
0
votes
1answer
95 views

converting component from Joomla 2.5 to 3.x [duplicate]

I'm trying to convert a component from Joomla 2.5 to 3.x. I can't figure out what I'm doing wrong. The admin component controller has: class PatientinvoicesModelPatientinvoices extends JModelLegacy ...
2
votes
1answer
753 views

How to get the right URL for an article?

I'm developing a module for displaying list of articles. In order to find the URL of an article I use ContentHelperRoute::getArticleRoute($item->slug, $item->catid). By default, it returns the article ...
1
vote
1answer
55 views

looping thru an array, trying to select a unique row

I am following along the helloworld videos/tutorials on the joomla site and figured I would try displaying a table of numbers. I have been successful displaying the table as a whole but I would like ...
1
vote
1answer
431 views

Making Joomla 2.5 component compatible with Joomla 3

I have component in Joomla 2.5. I am trying to make it to compatible with Joomla 3.x. After few changes in the code, I get an error: Cannot extend from interface JController Then I change the ...
1
vote
0answers
20 views

JToolbarHelper contents disappearing when cache is enabled

I've setup my custom component using JToolbarHelper for navigation, following the standard set by base Joomla components. Each view contains some variation of the following: JToolbarHelper::title(...
1
vote
2answers
435 views

Do I Use the JDate correctly?

Actually I encounter a problem with usage of JDate. Joomla has a class JDate for managing dates. I tested the following code: $date = new JDate('2017-07-28 00:00:00'); $timestamp_jdate = $date->...
1
vote
1answer
290 views

Joomla Search Result Article Text Length: Text is truncated in strange places

I am using the Joomla Search module with a Menu Item pointed to '/search'. When a search is performed, the results list a linked title, a snippet, category and the created date. The snippet is ...
3
votes
2answers
1k 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 ...
1
vote
1answer
60 views

Running install script on Module Installation: How can I set a module chrome programatically?

I have created a custom module and I want to change the module chrome to "none". This can be achieved in the back end, but I would like it as the default behaviour in case others use the module. I ...
2
votes
2answers
628 views

Replacement of deprecated enqueueMessage() from JApplication

I have noticied that method enqueueMessage() from JApplication has been marked as deprecated, but what is the replacement method for that ? Thanks by advance
1
vote
1answer
178 views

Replacement of deprecated setUserState() and getUserState()

I have just noticed that methods setUserState() and getUserState() from JApplication are marked as deprecated. But what are the replacements for these two methods ? Thanks by advance
0
votes
1answer
152 views

Extend the JRoute API?

there is a helper coded: JRoute::_(ContentHelperRoute::getCategoryRoute($item->id, $item->language)) It does precisely what I want it to do, but I need the same functionality for the "Featured" View....
0
votes
1answer
74 views

I want to create a module that shows the content of an article

I want to create a custom module that shows the content of an article, I need to know two things: 1) What form field should I use in order to select the article that I want to use from the backend?. ...
1
vote
2answers
407 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) ...
4
votes
2answers
401 views

How to define Joomla permissions programmatically?

Preface Let me preface this post by saying that though I have considerable experience with PHP, I am not familiar with Joomla in any meaningful sense. What follows is based on assumptions about how ...
1
vote
1answer
246 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 ...
3
votes
1answer
87 views

How to use MVC in joomla-platform

Where to find examples of both on the basis of joomla paltform to write an app using MVC. How to use the controllers? How to use models? How to use views? Please do not confuse this issue with ...
2
votes
2answers
174 views

Get rid of 404 Errors after removing K2

I want to explain the issue so hopefully any body can help me I had a website that use to contain K2 Component on it for different reasons that website got destroy so I had it to redo the whole ...
2
votes
2answers
123 views

How to get latest Joomla version from Joomla API into custom component

Ok, so I've created a custom component that should provide a dashboard to users of the site. A critical piece of information on it, is the latest Joomla version according to Joomla. So if I would ...