0

I have read up on doing this, and actually implemented this, for v1.5 but will like some help on v1.6+.

v1.5 samples: http://forum.joomla.org/viewtopic.php?p=1559295

This is a follow on to my query here: Joomla 1.6 External PHP Interaction Issue which got no response ... maybe a bit too long and rambling.

Thanks for any help given.

Community
  • 1
  • 1
Dayo
  • 12,413
  • 5
  • 52
  • 67

1 Answers1

0

Starting with Joomla 1.6 the CMS is separated from the underlying Joomla platform, therefore you should look into using the Joomla platform to be able to use for example the database connector.

Here are some examples: How to create a stand-alone application using the Joomla! Platform

hbit
  • 959
  • 2
  • 13
  • 33
  • Thank you very much for your response which gives me a few insights. In my case however, I need to externally access the Joomla CMS and not the underlying platform as I need to determine user login status etc. I believe this should be possible similar to my v1.5 example in the other post. I suspect it may have something to do with the $app scope in my function but not sure. Thanks again as i was despairing after getting no answers again and hope this sets things running. – Dayo Aug 29 '11 at 15:15
  • You should not post in multiple questions - better edit your post and provide it with the needed information. Regarding the problem: the failure place indicates it is trying to render the component. This is, as in your 1.5 part, done with accessing the "option" request parameter. Are you sure that this is correctly initialized? – hbit Aug 29 '11 at 16:01
  • Pardon my faux pas on the multiple question. I think your suspicion is correct as reviewing the code, the option is initialised outside the function but as I used "private function" it is probably invisible to the v1.6 bit. The v1.5 bit would work because it has "$GLOBALS['option'] = JRequest::getCmd('option');" before the dispatch function. I'll edit the v1.6 bit as appropriate and test. Something like $app->dispatch(JRequest::getCmd('option'));" perhaps. I gave up and removed the code in the intervening weeks so I need to reconstruct and will report back when done. – Dayo Aug 29 '11 at 18:21
  • Hi. The code still crashes at the same point with a "Call to a member function on a non-object" error from the parent application (I am writing a bridge). For some reason, the "ob_start" in function renderComponent in /libraries/joomla/application/component/helper.php results in a call to a method in an unrelated class in the parent app. Now really scratching my head but I believe this is not Joomla per se and accepting the answer given for the specific issue of me not properly sorting out the option variable. Thanks – Dayo Aug 29 '11 at 22:46