Page 1 of 1
How to create include joomla sessions on other pages
Posted: Fri Nov 23, 2007 6:19 pm
by timgerr
Hey all I am creating a page that I want to include within joomla. I need to keep this page separate from joomla so I am unable to make it a component. I would like to have the joomla sessions included within this page so If I log into joomla and then go to this page the user variables will work. Also I might not want to have joomla open, so If I go to this page (the new one) and log in their (the new page) I can access all the user variable without having to open joomla. Can this be done; I have seen something like this done with some of the forum bridges.
Is there any documentation on how to do this?
Thank you,
timgerr
Re: How to create include joomla sessions on other pages
Posted: Fri Nov 23, 2007 8:02 pm
by ianmac
It can be done...
It isn't simple, and I've yet to find any good reason why something should not be a component. If you want to access Joomla! data the best option is to write for Joomla!
Ian
Re: How to create include joomla sessions on other pages
Posted: Sat Nov 24, 2007 3:46 pm
by timgerr
I have created some AJAX front end that I am unable to make into a componenet. I would like to have a sign in to this front page that uses the jooma sessions stuff. Thinking now I might be able to make it a component.
timgerr
Re: How to create include joomla sessions on other pages
Posted: Sat Nov 24, 2007 8:35 pm
by ianmac
It is certainly possible to integrate AJAX into Joomla! You need to use the RAW document type, which will allow you to suppress the extra output.
You can make that page your front page too by creating an essentially blank template (so your component produces the entire HTML body.
I don't have time right now, but if you need help doing AJAX in Joomla! let me know.
Ian
Re: How to create include joomla sessions on other pages
Posted: Mon Nov 26, 2007 11:43 pm
by thecancerus
hi ianmac,
"You need to use the RAW document type, which will allow you to suppress the extra output".. How to do this?
if i go joomla component(1.0.x) way it will load the template data as well that i don't need, it will also load many extra files that i don't need to process in my ajax request... it seems like big overhead to me for an ajax request.
so how should i go about it?
thanks,
Re: How to create include joomla sessions on other pages
Posted: Tue Nov 27, 2007 12:27 am
by ianmac
You never specified what version you were developing for. As 101 is geared towards getting people developing for 1.5, this is what we tend to focus on.
But for 1.0, did you try a URL like:
http://127.0.0.1/j10/index2.php?option= ... ml=1 ?
This seems to be what you are after, IIUC.
As for overhead, yes there is overhead involved in grabbing the Joomla! session and user information.
Ian
Re: How to create include joomla sessions on other pages
Posted: Tue Nov 27, 2007 12:48 am
by thecancerus
hi Ianmac,
i am currently developing for joomla 1.0.13, i did not know anything about "no_html=1".
i just looked into it's usage to see how it works... i simply added the no_html=1 to my current setup to what happens, well template was loaded..
so i think i am still missing something.. in index2.php their is a variable $no_html which does exactly what i am looking into but, do i need to do that in my templates.. as that variable in index file makes no difference.
also where can i get bit more information about such settings in joomla 1.0.x ?
thanks,
Re: How to create include joomla sessions on other pages
Posted: Tue Nov 27, 2007 1:03 am
by ianmac
You also need to use index2.php instead of index.php.
This applies to 1.0.13, not 1.5.
Ian
Re: How to create include joomla sessions on other pages
Posted: Tue Nov 27, 2007 1:17 am
by thecancerus
oops.. sorry i should have seen you url properly..
thanks,
just one last request if you have some time can you outline the purpose of these two files(index.php and index2.php) and which one does what..
thanks anyways