Goodbye XOOPS.
Depends who you ask...I would do it how evo does it:
In a theme I would define OpenTable, CloseTable functions and use that as a wrapper. For example, the OpenTable function would be the top and left of my block, the CloseTable function would be the right and bottom of my block.
Then any module dev could call those functions and throw their content in the middle and format it generically with .row1 .row2 .even .odd td,tr,hr,div...etc which i would have in my style.css because every module would use those same classes. And the theme would still look how i meant it to look in any module.
@marco theres my contribution
// eXtGallery Hack
$patterns[] = "/[gallery]([0-9]*)[/gallery]/sU";
$replacements[] = '.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\1.jpg" rel="lightbox">.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\1.jpg" alt="" />';
$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '/modules/extgallery/hook-photo.php?id=\3.jpg" rel="lightbox" title="\2" alt="\2">/modules/extgallery/hook-thumb.php?id=\3.jpg" alt="\2" title="\2" />';
$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\3.jpg" rel="lightbox[\2]"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\3.jpg" alt="" />a>';
$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1 title=(['"]?)([ a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '/modules/extgallery/hook-photo.php?id=\5.jpg" rel="lightbox[\2]" title="\4" alt="\4">/modules/extgallery/hook-thumb.php?id=\5.jpg" title="\4" alt="\4" />';
$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1 group=(['"]?)([a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\5.jpg" rel="lightbox[\4]" title="\2" alt="\2">.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\5.jpg" title="\2" alt="\2" />';
// End eXtGallery Hack
// eXtGallery Hack
$patterns[] = "/[gallery]([0-9]*)[/gallery]/sU";
$replacements[] = '.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\1" rel="lightbox">.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\1" alt="" />';
$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '/modules/extgallery/hook-photo.php?id=\3" rel="lightbox" title="\2" alt="\2">/modules/extgallery/hook-thumb.php?id=\3" alt="\2" title="\2" />';
$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\3" rel="lightbox[\2]"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\3" alt="" />a>';
$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1 title=(['"]?)([ a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '/modules/extgallery/hook-photo.php?id=\5" rel="lightbox[\2]" title="\4" alt="\4">/modules/extgallery/hook-thumb.php?id=\5" title="\4" alt="\4" />';
$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1 group=(['"]?)([a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\5" rel="lightbox[\4]" title="\2" alt="\2">.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\5" title="\2" alt="\2" />';
// End eXtGallery Hack
// eXtGallery Hack
$patterns[] = "/[gallery]([0-9]*)[/gallery]/sU";
$replacements[] = '.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\1.jpg" rel="lightbox">.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\1" alt="" />';
$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '/modules/extgallery/hook-photo.php?id=\3.jpg" rel="lightbox" title="\2" alt="\2">/modules/extgallery/hook-thumb.php?id=\3" alt="\2" title="\2" />';
$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\3.jpg" rel="lightbox[\2]"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\3" alt="" />a>';
$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1 title=(['"]?)([ a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '/modules/extgallery/hook-photo.php?id=\5.jpg" rel="lightbox[\2]" title="\4" alt="\4">/modules/extgallery/hook-thumb.php?id=\5" title="\4" alt="\4" />';
$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1 group=(['"]?)([a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\5.jpg" rel="lightbox[\4]" title="\2" alt="\2">.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\5" title="\2" alt="\2" />';
// End eXtGallery Hack