Page 1 of 1

How do I access Joomla global variables?

Posted: Sat Feb 16, 2008 10:20 pm
by ferrazf
Hey all,

I am running a PC game league website, and I wrote a small php system that allows me to store and display game and player statistics. I want to add some things to it which would require access to some user information, such as the username of the person accessing the page, if he or she is logged in. I wanted to re-make the whole thing using a RAD application like Delphi for PHP.

I do not want to make Joomla component out of it. Judging from a few component-building tutorials I have seen, there would be a great deal of extra work I'd have to do as opposed to running it all inside custom php modules (which is what I am currently doing). The only Joomla component tutorials I found teach me how to physically write the code for each and every object I need, such as spacers, buttons, tables, etc. Example:

Code: Select all

  function helloWorld(){
        mosMenuBar::startTable();
        mosMenuBar::apply( 'polite', 'Be Polite' );
        mosMenuBar::spacer();
        mosMenuBar::help( 'helloworld.html', true );
        mosMenuBar::endTable();


This is simply way too unecessarily over complicated and tedious. Although I am a newb at PHP, I do believe I have what little skill necessary to build this app, however it would be great to make use of an IDE's RAD features and its visual component libraries, while still having access to joomla's global variables.

I have already tried searching for a way to do this, however the few solutions I found were either outdated or way over my head.

If there is any relatively simple way to access joomla's global variables, it would be great if anyone could share it.

Thanks a million

Re: How do I access Joomla global variables?

Posted: Sun Feb 17, 2008 1:18 am
by ferrazf
I found a way around this by donwloading the Jumi extension, very handy. http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1023/Itemid,35/

Thanks

Re: How do I access Joomla global variables?

Posted: Mon Feb 18, 2008 5:39 pm
by Rogue4ngel
Excellent. Glad you found something to suit your needs.