Page 1 of 1

how to include a php and others file within joomla 1.5

Posted: Fri Dec 07, 2007 7:19 pm
by timgerr
Yes I did a search and SOO many hits came up.. I search for 'include php' and I could not find the correct answer for 1.5.  How can I include a php, css and javascript file into joomla ( a component that I am creating)?

Thanks for the help,
timgerr

Re: how to include a php and others file within joomla 1.5

Posted: Sun Dec 09, 2007 6:29 am
by Opie
To add a javascript file, use addScript from JDocument.

To add a style sheet (css) file, use addStyleSheet from JDocument as well.

Re: how to include a php and others file within joomla 1.5

Posted: Tue Dec 25, 2007 10:03 pm
by jalil
timgerr wrote:Yes I did a search and SOO many hits came up.. I search for 'include php' and I could not find the correct answer for 1.5.  How can I include a php, css and javascript file into joomla ( a component that I am creating)?

Thanks for the help,
timgerr


hi there,

i don't think it works like that.

if you say you are developing a joomla component, then that component need to be within joomla's framework, within joomlas architecture so to speak, and if your compenent is not, then it is *not* a joomla component *by definition*. it maybe be a very large 'component', but not a joomla component however. It will be a joomla component if it runs under PHP under Joomla, and not just under PHP, if you know what i mean. and ... if you are within the joomla framework, then calling all files of all types is at your disposal by virtue of the environment joomla runs on, ie. PHP.

hope this helps...

p/s. that being said, there is an extension called Jumi in version 1.0x that allows you to add PHP/HTML and hence any type of files so if you would like to search if they have a 1,5 version, then you'd have a kind of joomal 'component' with whatever it is that you want to include.