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
8 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
35 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
66 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
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 ...
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 ...
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
15 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.' ...
6
votes
3answers
3k views

Joomla! JFactory::getDate wrong

According to the documentation JFactory/getDate $tzOffset default value is 0. However, the following example: $date_default_offset = JFactory::getDate('now'); echo $date_default_offset->toRFC822(...
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 ...
5
votes
3answers
5k views

Creating an API for a Joomla extension

I need to create an API so an external client can perform actions on my custom extensions database table. What would be the right approach? Should I use https://api.joomla.org/cms-3/ for this? How?! ...
1
vote
1answer
882 views

Joomla-Development: Set default view

I would like to set up a default view. If my component gets called by using administrator/index.php?option=com_bestia&view= I'm getting the error: 404 View not found [Name, Typ, Präfix]: bestia,...
4
votes
1answer
158 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. ...
6
votes
1answer
416 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 ...
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 ...
2
votes
2answers
767 views

Get access level for a URL

How could I get access level for a given URL? I need to know if a URL is accessible for registered or only guests users.
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
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, ...
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 ...
7
votes
3answers
12k views

How to get the intro image of a joomla article

I am trying to customize the the category list of my website. So I have a menu option that shows the list of all article is a certain category. In this list I would like to show the into image of the ...
2
votes
1answer
77 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 ...
1
vote
1answer
135 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 ...
6
votes
3answers
813 views

Joomla/PHP How can a plugin append a css class to the body section?

Hello Joomla Community, How can a css class be appended to the <body> from inside a system plugin? Any advice is appreciated, Thank you.
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 ...
5
votes
2answers
4k views

How to do SQL exception / error handling compatible with 2.5 and 3.x?

I was trying to develop Joomla 2.5 and 3 component. As many things deprecated between these two versions and the way to throw and catch database and other errors, I could not find ways yet to make ...
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 ...
2
votes
1answer
58 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 ...
1
vote
3answers
1k views

How to retrieve request headers?

I am adding custom header in my request (sent from external app) to Joomla controller with a custom header added. How to retrieve the header in my controller? I tried using below but it gives me null....
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 ...
3
votes
1answer
2k views

Get/set userstate and session variables not working inside for loop

I have a long loading for loop inside a function in one of my model in my Joomla component. In order to gauge the progress, I wanted to make a progress bar using ajax and javascript as the request is ...
1
vote
2answers
1k views

How positioning the calendar popup?

I am programming a component that contains a modal window. In the modal window, there is a calendar field. <?php echo JHTML::_('calendar', null, 'birthdate', 'birthdate'); ?> The position ...
9
votes
2answers
1k views

What is the Joomla Execution Flow, after a request reach to index.php till the final output on the browser?

Based on this question: How Templates work and load css/js files? Website building process with Purity III Quote: .... I have to present my website tomorrow and i may get asked "where does the ...
0
votes
1answer
338 views

Can't clear a cache of Joomla module

I created some Joomla module for my client and he installed it in his backend. After a while I made some edits in the module and my client reinstalled it but my edits don't apply on his website (...
2
votes
1answer
748 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 ...
2
votes
1answer
57 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 ...
0
votes
1answer
78 views

How do I migrate AJAX interface from 1.5 to 3.x for mobile App

I'm updating a website selling online services that has a complimentary App acting as a mobile front end to the Joomla v1.5 CMS. The App communicates via a component (com_mobile) using JSON data ...
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 ...
1
vote
1answer
137 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.
4
votes
1answer
2k views

Joomla 3.4 login api - how to “remember” session

This works great for 3.4 Joomla. How do I keep the user logged in? i.e. "remember"? JPluginHelper::importPlugin('user'); $options = array(); $options['action'] = 'core.login.site'; $response->...
1
vote
2answers
68 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(...
6
votes
1answer
435 views

Abandonware user self-registration procedure in Joomla core

Joomla 3.6 has two different controllers intended to create a new user: UsersControllerRegistration::register() defined in components/com_users/controllers/registration.php and UsersControllerUser::...
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()->...
3
votes
1answer
6k views

Get menu item by ID in Joomla 3

How do I get a menu item by ID in Joomla 3? While converting a site from Joomla 1.5 to Joomla 3, I encountered this code $mainframe = JFactory::getApplication(); $menu = $mainframe->getMenu('...
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://...
1
vote
1answer
173 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 ...