I have seen that most people are doing this using the frontend, but if you have hundreds or thousands of sites, you might want to do this programmatically. I will not go in to creating the webpart itself, just listing it in the webpart gallery.
Create a new feature "MyCompanysCoolWebpart". Paste the following in the the feature.xml file.
Nothing out of the ordinary here. We are just creating a feature that will be at the site level. Next create an elements.xml file and add the following:
Now, lets see what we did in the elements.xml file. First we pointed the module URL attribute to "_catalogs/wp" since that is the location of the webpart gallery and we set RootWebOnly to TRUE since we only need this feature at the Root Web level. We then set two properties "Group" and "QuickAddGroups".
Group is going to be the name of the group your webpart will be categorized under in the "Add Web Parts" dialog.
QuickAddGroups will display your webpart at the top of the "Add Web Parts" dialog as "Suggested Web Parts for yourZone". The value(s) of the QuickAddGroups attribute must be separated by ";#" (semicolon hash, without the quotes, of course). If your webpart's Quick Add Group is Top and you click "Add a Web Part" in the Top zone (like follows)
You will then see your webpart is suggested for that zone.
One thing to keep in mind is that the QuickAddGroups is not the name of the webpart zone, but the value of the QuickAdd-GroupName attribute of the WebPartZone of your page layout.
To deploy this feature you can put it together with your webpart in a solution, install this feature using stsadm commands, call the feature from within a custom site definition or staple this to a site definition.




