Sunday, April 30, 2006

Making sense of components II

There are some confusing things about components. My personal approach to figuring out how a system works without manuals is to poke around the system looking at menus, the database, and source code files looking for patterns and consistencies. Gotta admit it didn't help much this time. Going to dig a little deeper, like right into the guts of the code, I guess. Trying to find patterns, here's what I found:

There are 14 components in the component directory:

com_banners
com_contact
com_content
com_frontpage
com_login
com_messages
com_newsfeeds
com_poll
com_registration
com_rss
com_search
com_user
com_weblinks
com_wrapper

But only 10 of the 14 components are used in the jos_components table:

com_banners
com_weblinks
com_contact
com_frontpage
com_poll
com_newsfeeds
com_login
com_search
com_syndicate
com_massmail

And it is not one row per component as you would expect like it is in the modules table, so how do I know if the component install was successful? Isn't the component officially recorded somewhere in the db at install time?

The even more important question is: what do I do with the component after I install it? Connect it to the main menu would be a reasonable thing to do.

Menu -> Main Menu -> New -> [check component] Next

Gets you to: Add Menu Item :: Component

How do you get your new component to show up in the little list of components on this screen? Only 7 of the 14 components can be found there:

Contacts
FrontPage
Login
News Feeds
Polls
Search
Web Links

It's also worth noting that only x of the 14 components display on the Components menu in Administration:

Banners
Contacts
Mass Mail
News Feeds
Polls
Syndicate
Web Links