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
8
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 ...
1
vote
2answers
108 views

Extending joomla registeration with a plugin

I have found a plugin that extends joomla's core registration by adding a new field named User group selector. There is a trigger method in this plugin named onUserAfterSave that save the custom field ...
2
votes
1answer
437 views

Create user with PHP with “Receive System Emails” set to no

I am creating a new user using this data: jimport('joomla.application.component.helper'); $params = 'com_users'; $usersParams = JComponentHelper::getParams($params); $new_user = JFactory::getUser(0); ...
0
votes
1answer
158 views

Displaying a filelist field from php

I am creating a custom form field inside a module that generates groups of fields according to total number of records in a database table. Inside the groups of fields there are text fields but also ...
3
votes
4answers
395 views

Can Joomla with MySql manage 500,000 users and records

I am developing a mobile which will be managed by Joomla as a backend. I am expecting about 500,000 monthly return users by 6 months after launch. What I want to know if Joomla on a shared hosting ...
1
vote
1answer
35 views

How do I make Doc Changes for the Joomal API?

I'm looking at JCache->setLifeTime(), and after having it not work as expected, and digging through things and looking at the file storage adapter, what I found is that the interval for setLifeTime() ...
1
vote
1answer
296 views

JFactory::getSession() in module, produces a 500 error

I am trying to get the JSession inside my module php file. But every time I wrote this code: $session = JFactory::getSession(); Joomla responds with a 500 error for the page that my module is ...
2
votes
1answer
5k 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('...
8
votes
2answers
6k views

How to redirect user with system message in Joomla 3

I know that you can achieve this by doing: JFactory::getApplication->redirect(url, message, type) but the documentation at JFactory::getApplication says it is deprecated and suggest to use ...
2
votes
1answer
306 views

{emailcloak=off} any way to do this programmatically?

I'm writing a plugin, and the auto-email cloaking functionality is breaking my output. For example: I'll write some output: <script type="text/javascript"> $var={ "content" : "text with ...
1
vote
1answer
126 views

How to SET “lastvisitDate” for a Joomla user

I am developing a mobile app which uses Joomla as the backend. So far I am able to get the user object through $user = JFactory::getUser($id); However, each time a user visits the app, I want it to ...
0
votes
1answer
874 views

Which API joomla 3 return menus and submenu for site that created by admin?

I want to create a Joomla menu from scratch myself! I studied a bit about the Joomla API, I know I should use Jmenu,but when I use: <?php $M=Jmenu::load(); echo $M;?> it returns some ...
0
votes
2answers
488 views

When I use a redirect() function in my code before the php mail() function, will the mail be sent? am using joomla v1.5

I am using Joomla 1.5 and I would like to know if my mail will be sent if I run the function after redirect(); My code is as below: $callback = new stdClass(); $callback->LeaveID = $leaveid;...
0
votes
1answer
282 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 (...
0
votes
1answer
117 views

How do I add an extra field in joomla 1.5 user registration details during save?

I am registering users via csv file. I get user details, then save them in the usual users table using the JUser class. What is not working are extra columns I have. I've created them in the db ...
1
vote
1answer
41 views

Object based Joomla API method for duplication check

I need to check one value in database which is duplicated or not. I don't know in Joomla object based method is available for this check. I used object based Joomla api method for insert and update ...
0
votes
1answer
113 views

Two reversed conditions in one onAfterDispatch() plugin function

In my system plugin, I use the following condition class PlgSystemMyPlugin extends JPlugin { public function onAfterDispatch() { $uri = JFactory::getURI(); $current_url = $uri-...
5
votes
2answers
1k views

What does $context parameter of content plugin mean?

I've read that $context parameter is: "The context of the content being passed to the plugin - this is the component name and view - or name of module (e.g. com_content.article)" https://docs....
3
votes
1answer
1k views

Post data using com_ajax joomla 3

My Jquery code is jQuery(".loginbtn").click(function(e) { var value = JSON.stringify(jQuery(jQuery('#form-login input[class!="noAjax"]'), jQuery('#form-login')).serialize()); ...
5
votes
2answers
528 views

Apply the same code on PHP to content of component and each module

I have some code on PHP something like: $oldstring = ...; ... $pattern = ...; $newstring = preg_replace_callback($pattern, ... {...}, $oldstring); echo $newstring; I need to apply this code (maybe ...
2
votes
1answer
420 views

Login into the joomla using facebook

I'm implementing Facebook login into the Joomla login module. I took code from Facebook SDK site and I'm able to authenticate using Facebook. After authentication I am getting user data also like ...
1
vote
1answer
787 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,...
0
votes
1answer
307 views

Need altering sql-query with group_concat and two inner joins [closed]

I have the following two tables: #__records: id name 1 Child1 2 Parent1 3 Parent2 4 Child2 5 Parent3 6 Child3 #__parents: id child parent 1 1 2 2 1 3 3 ...
0
votes
1answer
1k views

How to get User's Username from ID?

This is the part of the code <td> <span class="info_label"> <?php echo JText::_( "JFORMS_FIELD_CREATED_BY_USERNAME" ); ?> </span>:<br /> ...
0
votes
1answer
774 views

API to publish articles on Joomla [duplicate]

Does Joomla provide any kind of APIs to publish articles? I have Ruby on Rails application for content authoring and need to publish articles to different site which runs on Joomla
1
vote
0answers
92 views

SSO Login for two joomla websites [duplicate]

Can anyone advise on an extension or custom code to sinchronize two joomla 3 websites users access credentials? I have two sites on the same host and I'd like the users to be able to login in one of ...
5
votes
2answers
4k 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?! ...
0
votes
1answer
62 views

The best way of storing products and categories in own component

I'm creating my own shopping cart component and I can't choose what way of storing products and categories would be the best. There are the following few options: 1. A fully independent component ...
0
votes
2answers
660 views

Get current language and DB Query to select content by language

I'm trying to select data from content table in Joomla (3.4) filtered by language field. When I pass a value, it doesn't change in the SQL statement Here is my code: public function articlesar() { ...
6
votes
3answers
663 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.
9
votes
2answers
3k views

Joomla/PHP how to add <meta property> instead of a <meta name> tags to the the header?

Dear Joomla community, I'm working on a little system plugin to inject Facebook Open Graph properties into an article. Therefore I've been using $document->setMetaData(). But now I discovered that ...
3
votes
1answer
1k views

Joomla/PHP: How to inject the content (body) of an other article into an article?

Dear Joomla Community, I'm working on a little Joomla (3.4.1) system plugin that injects some meta tags into an article. It's working fine so far. Now I'd like to extend the plugin to copy the ...
1
vote
2answers
265 views

Storing data in a single column of a table OR as the part of json

I'm creating my own component for storing products (shopping cart). The most of products usually have their prices and other attributes. What way of storing these attributes in the DB is easier and ...
2
votes
1answer
4k views

How to add meta tags to a page header based on an url parameter?

Hello Joomla community, I'm forced to write a minimum Joomla (3.4.1) plugin that injects custom meta tags based on an URL parameter. It will be used to serve localized Facebook Open Graph stories. ...
1
vote
3answers
568 views

Upload a file from custom component folder when installing the component

I know how to upload file given from jform if a component is already installed. But how to upload a file from my admin/assets/ folder of my component when installing the component? In my script.php I ...
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 ...
1
vote
1answer
395 views

Two left joins and multiple parents for a single record

This issue is extending of the question(s) by the link joomla.stackexchange.com/a/9836/4042 but with condition when child record has not only ONE parent (parent record) but MANY. With two left joins ...
1
vote
2answers
226 views

Joomla API for lightbox?

Does Joomla 3.4 has any standard API for showing a lightbox container. The idea is to show a view inside a lightbox container on a button click.
4
votes
2answers
1k views

RESTful API to manage article

We have an application which collaboratively collects data from authors. We want to upload curated content to different joomla powered sites. The current application is built on Ruby on Rails. Does ...
0
votes
2answers
735 views

JSON-DATA: Display input in the com_ back-end and save data in the DB

I'm developing my custom component for storing some records in the DB. In my #__records DB table there is the column attribs where I want to store some data in json-format like: {"field1":"value1","...
0
votes
2answers
123 views

Looping items in category view of component with condition from plugin

If we have some list of items in category view of some component (no matter what component — interesting in general solution) how can we loop only the items with some condition that is given from some ...
0
votes
1answer
76 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 ...
2
votes
1answer
5k views

What is the correct url for calling task in the backend controller

I'm developing my custom component and I need to call some task from back-end controller during editing a single record. The url of my record edit page in the back-end is: .../administrator/index.php?...
3
votes
1answer
235 views

How to create a custom profile plugin

I want to write my own custom profile plugin, but the problem is that the available tutorials (here and here) are a little outdated. Right now I'm looking at the setFieldAttribute(), the last ...
5
votes
2answers
2k views

Two left join in one query to Joomla database

I have two tables: #__records and #__parents. In the first table some records may have parent records that are stored in the same table but relations between childs and parents are stored in the ...
1
vote
1answer
238 views

Update quantity of the same item in the session instead of adding new one

I use the following code in my controller for adding product items to the session: $app = JFactory::getApplication(); $input = $app->input; $itemid = $input->get('itemid'); $quan = $input->...
2
votes
2answers
537 views

Join data from session with sql-query and display in module

I'm developing a module for displaying products that are added to Joomla session. The products are being added to the session by using the code: $app = JFactory::getApplication(); $input = $app->...
2
votes
1answer
611 views

How to pass an array to Joomla session correctly

I use the following code to pass an array to session: $app = JFactory::getApplication(); $input = $app->input; $itemid = $input->get('id'); $quan = $input->get('quan'); $session = JFactory::...
2
votes
1answer
99 views

How functions arguments of model automatically populated

hello all just now i create getinfo($id=null){ return $xyz; } function in model calling above function using $this->xyz=$this->get('info'); in view.html.php file so will be used by info layout now ...
0
votes
2answers
543 views

How to update the latest row in MySQL table

The table #__virtuemart_order_histories stores the orders with their virtuemart_order_ids and every order has the records with their own virtuemart_order_history_ids. I need to update the latest ...