Welcome, Guest
Username: Password: Remember me

TOPIC: Extracting data from Joomla

Extracting data from Joomla 4 years 3 months ago #7186

  • PtrNrs
  • PtrNrs's Avatar
  • Offline
  • Junior Boarder
  • Posts: 31
  • Thank you received: 5
I want to exchange data between a Joomla 2.5 site and a Moodle site.

Does Joomla have an API (using SOAP, REST or whatever) which permits an external website, under user/password control, to read & update data.

If so:-
- how much customisation does it require?
- can you direct me to some documentation?

Thanks,

Pete
Pete Nurse
Searching for somewhere to upload my avatar.
Green with envy at those of you who have found it!
The administrator has disabled public write access.

Extracting data from Joomla 4 years 3 months ago #7187

  • neilforrester
  • neilforrester's Avatar
  • Offline
  • Senior Boarder
  • Posts: 72
  • Thank you received: 14
Hi Peter,

I wouldn't know where to start with this type of work but I do know a very good developer who can help you achieve what you need to. The guy I know (James) is a genius with databases etc. If you want his contact details please email me at This email address is being protected from spambots. You need JavaScript enabled to view it. and I'll give them to you.

Thanks,
Neil.
Neil Forrester
www.pixelfire.com.au
The administrator has disabled public write access.

Extracting data from Joomla 4 years 3 months ago #7188

  • rsearle
  • rsearle's Avatar
  • Offline
  • Moderator
  • I build and integrate serious business web applications using the best free open source platforms
  • Posts: 140
  • Thank you received: 25
Hi Pete,

Your first option would be Joomdle.

I've also done work with both systems, and as you know, I specialise in systems integration work. Feel free to let me know if you need a hand.

Joomla! does have a number of experimental APIs for various flavours of external access, including XML-RPC, web services and REST. All of these would require custom development of interface functions, because the interface is specific to the data. There are also a number of SSO options, but they don't tend to appear in the JED.

If you need a generalised solution you may need to look at an ESB or EAI option, but this would probably be out of your scope.

Cheers,

Russell
Psicom
Last Edit: 4 years 3 months ago by rsearle.
The administrator has disabled public write access.

Extracting data from Joomla 4 years 3 months ago #7189

  • MaxTech
  • MaxTech's Avatar
  • Offline
  • Gold Boarder
  • Posts: 222
  • Thank you received: 23
Hi Pete,

We wrote some custom php scripts that embed within Joomla, which is running on a 2.5 site, that should be able to do what you are after .... but require hard coding to customise, as it was a custom application.

Otherwise, if you are wanting to enter data in Joomla (eg. form) and have it go directly into an external database (as long as they are both SQL) then you could use RS Forms.

Not aware of anything that works out of the box as you describe - sorry.

Hope you are doing well :)
Founder & CEO @ molehill.com.au & successeng.in
Partner @ joostrap.com - Joomla! Website Templates & Responsive Web Design
The administrator has disabled public write access.

Extracting data from Joomla 4 years 3 months ago #7190

  • PtrNrs
  • PtrNrs's Avatar
  • Offline
  • Junior Boarder
  • Posts: 31
  • Thank you received: 5
Thanks to all you faithful Forum-heads.

Neil: Thanks for the suggestion. I'll keep your contact in mind. For the moment I'm trying to achieve something myself.

Russell: The Moodle train left the station long ago, so Joomdle is not on. I had noted the Joomla Web Services Working Group: looks like it's J3.X and isn't there yet, so I'll set that aside.

Max: Your custom scripts sound interesting - I'll get in touch.

Pete
Pete Nurse
Searching for somewhere to upload my avatar.
Green with envy at those of you who have found it!
Last Edit: 4 years 3 months ago by PtrNrs.
The administrator has disabled public write access.

Extracting data from Joomla 4 years 3 months ago #7191

  • PtrNrs
  • PtrNrs's Avatar
  • Offline
  • Junior Boarder
  • Posts: 31
  • Thank you received: 5
We've come up with a solution that satisfies us quite well.

Fabrik has a neat code module that allows you to present just the text echoed from a PHP function*.

The code is;
function ylcGetData()
{
  $db =& JFactory::getDBO();
  $cond = JRequest::getVar('cond', 0);
  $cond = str_replace('\\', '', $cond);
  $SQL = "SELECT bkgID, bkgNameLast, bkgNameFirst, bkgDOB, crsName  FROM #__ace_booking";
  if($cond) {
    $SQL .= " " . "WHERE (" . $cond . ")";
  }
  $db->setQuery ($SQL); 
  echo json_encode($db->loadObjectList());
}

This function returns the specified data, filtered as requested as a JSON string.

You can see the code at work in the following URLs:-
- return all table data;
- return one record;
- return multiple records.

Security is afforded by:-
- protecting the PHP file its folder to be available only to specified IP(s) (thanks, Max!);
- accessing mySQL through a user with minimum access rights (eg read only access to one table).

* I assume that Joomla has the same capability but I don't what and where it is.
Pete Nurse
Searching for somewhere to upload my avatar.
Green with envy at those of you who have found it!
The administrator has disabled public write access.
Time to create page: 0.049 seconds
Powered by Kunena Forum