Developing components for Joomla 1.0.xx

For Joomla! 1.0 Coding related discussions.
Locked
User avatar
active_innovation
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jul 23, 2006 10:09 am
Location: Manchester, UK
Contact:

Developing components for Joomla 1.0.xx

Post by active_innovation » Thu Dec 14, 2006 12:27 am

Apologise 1st and foremost if I am in the wrong forum section.  Please move if necessary.

I am in the process of learning php and would like to learn to develop a Joomla component and some modules to go with the component.  There is a particular open source php script thatI would like to make compatible with Joomla.  Practically this script exists and works outside of joomla.  I want to bring it into Joomla.  Can someone steer me in the right direction?  Some tutorial on converting a php script to joomla would be nice.  Please do note that this is not a request for PHP tutorial.

Thank you
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65

User avatar
active_innovation
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jul 23, 2006 10:09 am
Location: Manchester, UK
Contact:

Re: Developing components for Joomla 1.0.xx

Post by active_innovation » Thu Dec 14, 2006 1:25 pm

May I also add whether the application available at joomlatwork.com 'PHP Development Studio Pro v2.0' will assist in fulling what I want to do.

Incidentally if someone is wondering what I want to achieve, it is an ajax forum that already exists in php that I want to convert in to a joomla component.
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 21997
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, The Netherlands
Contact:

Re: Developing components for Joomla 1.0.xx

Post by pe7er » Thu Dec 14, 2006 1:32 pm

active_innovation wrote:There is a particular open source php script thatI would like to make compatible with Joomla.  Practically this script exists and works outside of joomla.  I want to bring it into Joomla.  Can someone steer me in the right direction?  Some tutorial on converting a php script to joomla would be nice.
http://www.jlleblanc.com/joomla/Tutoria ... _Tutorial/
and
http://help.joomla.org/content/section/12/125/

Furthermore I recommend analyzing Joomla's default components, as those can learn you a lot about Joomla components and built in functions/classes.
I haven't found an API for 1.0.x, but Mambo's API http://help.mamboserver.com/api/ is very similar.

If you want to develop components for 1.5 then this might be a good reference: http://api.joomla.org/
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
Co-founder of data2.eu GDPR Tool https://data2.eu/en/gdpr-tool

User avatar
Robin
Joomla! Master
Joomla! Master
Posts: 15753
Joined: Thu Aug 18, 2005 10:41 am

Re: Developing components for Joomla 1.0.xx

Post by Robin » Thu Dec 14, 2006 1:37 pm

Here's a Joomla 1.0.x API http://help.joomla.org/api/

Not sure how up-to-date that is.

User avatar
active_innovation
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jul 23, 2006 10:09 am
Location: Manchester, UK
Contact:

Re: Developing components for Joomla 1.0.xx

Post by active_innovation » Thu Dec 14, 2006 1:39 pm

Thanks Peter, I will dwell into this later today.
Incidentally it was mentioned to me that the joomla 1.5 framework is a completely different ball game, therefore a component or php script would need to be written back from scratch to work properly.  is this the case?
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 21997
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, The Netherlands
Contact:

Re: Developing components for Joomla 1.0.xx

Post by pe7er » Thu Dec 14, 2006 1:46 pm

active_innovation wrote:Incidentally it was mentioned to me that the joomla 1.5 framework is a completely different ball game, therefore a component or php script would need to be written back from scratch to work properly.  is this the case?
Yes it is.
1.5 uses an MVC pattern (Model View Controller) which give a better seperation of the procedures, model, and screen output
(so developers will hopefully build their Components in a more structured manner).
See: http://dev.joomla.org/component/option, ... omponents/
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
Co-founder of data2.eu GDPR Tool https://data2.eu/en/gdpr-tool

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 21997
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, The Netherlands
Contact:

Re: Developing components for Joomla 1.0.xx

Post by pe7er » Thu Dec 14, 2006 1:53 pm

RobInk wrote:Here's a Joomla 1.0.x API http://help.joomla.org/api/

Not sure how up-to-date that is.
I did not know that API site. Thanks Robin!

However it appears to be for 1.0.3 and some links don't work (e.g. in topbar: Joomla > in left screen: mosMainFrame, http://help.joomla.org/api/Joomla/mosMainFrame.html seems to be missing)
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
Co-founder of data2.eu GDPR Tool https://data2.eu/en/gdpr-tool

User avatar
active_innovation
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jul 23, 2006 10:09 am
Location: Manchester, UK
Contact:

Re: Developing components for Joomla 1.0.xx

Post by active_innovation » Thu Dec 14, 2006 1:54 pm

back to the drawing board then!  ;)
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65

User avatar
Chris Davenport
Joomla! Ace
Joomla! Ace
Posts: 1385
Joined: Thu Aug 18, 2005 8:57 am
Location: Shrewsbury, Shropshire, United Kingdom

Re: Developing components for Joomla 1.0.xx

Post by Chris Davenport » Thu Dec 14, 2006 2:19 pm

pe7er wrote: However it appears to be for 1.0.3 and some links don't work (e.g. in topbar: Joomla > in left screen: mosMainFrame, http://help.joomla.org/api/Joomla/mosMainFrame.html seems to be missing)
The "missing" pages are there, but there's a problem with case sensitivity.  You need to change "Joomla" to "joomla" in the URLs.  eg. http://help.joomla.org/api/joomla/mosMainFrame.html.

Regards,
Chris.
Chris Davenport

Davenport Technology Services http://www.davenporttechnology.com/
Lion Coppice http://www.lioncoppice.org/

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 21997
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, The Netherlands
Contact:

Re: Developing components for Joomla 1.0.xx

Post by pe7er » Thu Dec 14, 2006 3:49 pm

ok! cheers Chris!
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
Co-founder of data2.eu GDPR Tool https://data2.eu/en/gdpr-tool

gopinathan
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Mon Sep 18, 2006 2:10 pm

Re: Developing components for Joomla 1.0.xx

Post by gopinathan » Thu Dec 21, 2006 10:04 am

Hi

i installed the component . i learn some new things here .. i try to insert one new field but its not working out for me

can you tell me where i touch the code for inserting the field and what are files


please give me a solution

thanks

gopinathan

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Developing components for Joomla 1.0.xx

Post by ianmac » Thu Dec 21, 2006 9:42 pm

Just to tie up and update a few things here:

@gopinathan
gopinathan wrote: i installed the component . i learn some new things here .. i try to insert one new field but its not working out for me

can you tell me where i touch the code for inserting the field and what are files
an
that's pretty vague...  the fields that are stored in a database file are generally specified in the class.php file.  i.e. look at com_banners/banners.class.php.  But not sure which component you are talking about, and what you are trying to do.

RobInk wrote:Here's a Joomla 1.0.x API http://help.joomla.org/api/

Not sure how up-to-date that is.
The API reference can now be found at api.joomla.org.  While this is targeted towards 1.5, you can find the legacy 1.0 classes in the Joomla-Legacy package.

pe7er wrote:
active_innovation wrote:Incidentally it was mentioned to me that the joomla 1.5 framework is a completely different ball game, therefore a component or php script would need to be written back from scratch to work properly.  is this the case?
Yes it is.
1.5 uses an MVC pattern (Model View Controller) which give a better seperation of the procedures, model, and screen output
(so developers will hopefully build their Components in a more structured manner).
See: http://dev.joomla.org/component/option, ... omponents/
Not entirely true...  you can develop a 1.5 component that does not use the MVC pattern that works perfectly fine.  Implementing the MVC pattern is not a requirement, it is just a good way to organize a component and makes future modifications and changes easier.  In fact, 1.5 is 80% backward compatible to 1.0.

There are many changes that should be made to 1.5 component so that the new framework is used (as many classes and methods are going to be deprecated - in 1.5, every class starts with J - i.e. JApplication).  Using these new classes and methods requires much less that a full rewrite from scratch.  It is recommended that you use the API where possible rather than writing, for example, custom database scripts, because using the API will increase security in some instances and will allow scripts to survive better into the future.

Hope that is informative, and that all my info is correct :)
Ian

gopinathan
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Mon Sep 18, 2006 2:10 pm

Re: Developing components for Joomla 1.0.xx

Post by gopinathan » Fri Dec 22, 2006 4:57 am

hi

i installed the component daily message from here
http://www.jlleblanc.com/joomla/Tutoria ... rial/ 
in that i am tring to installed one additional field but i am not able do that

following codes are touched admin.dailymessage.html.php
database i insert one field called firsttask







Message:
message; ?>" />



Date:
date; ?>">



Published:
published ); ?>


Task:
firsttask; ?>" />



id; ?>" />
" />









Boldbold ); ?>
Italicitalic ); ?>
Underlineunderline ); ?>
Show Dateshowdate ); ?>


" />



configid ?> />









);" />
Message
Date
Published
task



">
" name="cid[]" value="id; ?>" onclick="isChecked(this.checked);" />
','edit')">message; ?>
date); ?>

  published == "1") {
echo "";
} else {
echo "";
}
  ?>

firsttask; ?>





" />








id; ?>" />
" />




my new field is inserting into the database ....

pl give me a solution

its urgent

thanks

ianmac wrote: Just to tie up and update a few things here:

@gopinathan
gopinathan wrote: i installed the component . i learn some new things here .. i try to insert one new field but its not working out for me

can you tell me where i touch the code for inserting the field and what are files
an
that's pretty vague...  the fields that are stored in a database file are generally specified in the class.php file.  i.e. look at com_banners/banners.class.php.  But not sure which component you are talking about, and what you are trying to do.
Last edited by gopinathan on Fri Dec 22, 2006 5:03 am, edited 1 time in total.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Developing components for Joomla 1.0.xx

Post by ianmac » Fri Dec 22, 2006 5:03 am

I would check the admin.dailymessage.php file (which should have a save method, and look for a file that has a class that extends mosDBTable, and add your field to this file.

Ian

gopinathan
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Mon Sep 18, 2006 2:10 pm

Re: Developing components for Joomla 1.0.xx

Post by gopinathan » Fri Dec 22, 2006 5:14 am

hi ian,

many thanks its working for me............................

Merry christmas


gopinathan.A



ianmac wrote: I would check the admin.dailymessage.php file (which should have a save method, and look for a file that has a class that extends mosDBTable, and add your field to this file.

Ian
Last edited by gopinathan on Wed Dec 27, 2006 5:38 am, edited 1 time in total.

gopinathan
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Mon Sep 18, 2006 2:10 pm

Re: Developing components for Joomla 1.0.xx

Post by gopinathan » Wed Dec 27, 2006 5:47 am

i want display the below task to number of types
i used for loop but its doesn't work pl help

admin.dailymessage.html.php



                    Task1
                    " value="task; ?>">
Priority
                   
taskpriority[$t]==1) echo ' selected="selected"'; ?> >High
taskpriority[$t]==2) echo ' selected="selected"'; ?> >Low
taskpriority[$t]==3) echo ' selected="selected"'; ?> >Medium
taskpriority[$t]==4) echo ' selected="selected"'; ?> >Overdue


Status
                   
tasklstatus[$t]==0) echo ' selected="selected"'; ?> >Pending
tasklstatus[$t]==1) echo ' selected="selected"'; ?> >completed


               


how i assign the variable in dailymessage.class.php
mosDBTable('#__joe_dailymessage', 'id', $db);
}
}


ianmac wrote: I would check the admin.dailymessage.php file (which should have a save method, and look for a file that has a class that extends mosDBTable, and add your field to this file.

Ian

User avatar
active_innovation
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sun Jul 23, 2006 10:09 am
Location: Manchester, UK
Contact:

Re: Developing components for Joomla 1.0.xx

Post by active_innovation » Thu Dec 28, 2006 1:54 pm

o Sod it!

I ended up outsourcing one of the work...
maybe I am not php literate  ???
Signature rules: Literal URLs only - http://forum.joomla.org/viewtopic.php?f=8&t=65


Locked

Return to “Joomla! 1.0 Coding”