|
Making a simple joomla component |
|
|
|
|
Written by Administrator
|
|
Friday, 27 April 2007 |
My middle project in my 'php application' class is to make a joomla base website for new program in my University. The student can choose 'information system program' or 'multimedia program'. They must add some extension (module, component, or mambots) that match with the characteristics of their website. But, not all the extensions that spread on internet can fullfil the requirement of the system ( one of my request is the website must provide a Final Project Catalogue ).
So, to do this kind of function, they must build their own component. Exactly, not a 'truly' component. cause it have these limitation : - not in zip file - having no interface in admnistrator view - having no interaction with the joomla, except while called by one of menu item in order to run this component.
To built this kind of component is easy enough. - first step is to make a directory with appropriate name and with prefix 'com_' in the components directory. ex : com_fpcatalog - second step is make a php file in theis directory with the same name with the directory but without prefix 'com_' ex : fpcatalog.php - next step, you can add php codes in this file. But remember, the working directory in this file is not the directory where this file was placed, but in the joomla directory. In example, if we have our website directory in www/joomla and in this php file we are accessing image with 'images/myfoto.jpg', it mean the image is on www/joomla/images/myfoto.jpg not in www/joomla/components/com_fpcatalog/images/myfoto.jpg. - the last step is to make link to this component. make new menu item which have target 'url link'. fill in the url with: index.php?option=com_fpcatalog
that's it. the component will act just like another 'real' components.
One of my own component can be seen in this website on the menu 'family album'. this component will show directories where our images placed. and automatically generate thumbnails images.
|
|
Last Updated ( Friday, 27 April 2007 )
|
Kuliah TKI - Blog da...
mm Apparently, 21,000 boots imported by
Clas-class php yang ...
mm Apparently, 21,000 boots imported by
Kuliah TK Internet :...
mm Apparently, 21,000 boots imported by
The Power of GIS - U...
mm Apparently, 21,000 boots imported by
Kuliah TK Internet :...
mm Apparently, 21,000 boots imported by
JPGraph - membuat gr...
timberland - mm Apparently, 21,000 bo...
Kuliah TKI : Ajax - ...
mm Apparently, 21,000 boots imported by
Banner spesial untuk...
mm Apparently, 21,000 boots imported by