I have a website that displays 2 different galleries in the profile tabs. I use the Joomgallery for this and the Joomgallery-Plugin. However, in order to display more than one tab, I have to copy the plugin. That also means any code changes have to be done twice, etc. It would be good if one plugin could provide more than one tab in the profile tabs. I fear that this would require an at least partially backwards incompatible change, but I would propose that tab plugins can either return an object or an array of objects. Each object would be a tab and have the attributes "title", "content". That would allow to later add additional attributes, like maybe "script" or "scriptfile". It would also provide a (clearer) interface for the development of such a plugin.
A backwards compatible way to implement this would be by doing the following:
foreach($tabs as $tab)
{
if (is_object($tab[0]))
{
foreach ($tab as $tabobject)
{
$contents[]='<fieldset><legend>'.$tabobject->title.'</legend>'.$tabobject->content.'</fieldset>';
}
}
else
{
$contents[]='<fieldset><legend>'.$tab[0].'</legend>'.$tab[1].'</fieldset>';
}
}
Would you be interested in adding this? The downside would be, that multiple tabs would always show up next to each other in the order of the plugins. But that would be acceptable for me...
I've recently joined the Joomgallery Project and I will rewrite the Joomgallery Plugin. If you are interested, you could also provide it here, maybe alongside your version, maybe as a replacement.