ok, i messed around for a bit, really my first time ever editing a php file.
The edit below will allow visitors to see a misformated page but allow register users to view the real page. Not what i wanted at all.
This edit will not allow visitors (if you define it that way in pony gallery) and allow only registered members to see the real thing. Which was my intention in the first place. Replace the portion of your file described below with this:
case 'detail':
if ( $my->gid==0 && $ag_showdetailpage==0) {
echo '<script> alert("'._PONYGALLERY_NO_DETAILS_ALERT.'"); </script>';
// mosRedirect(sefRelToAbs("index.php?option=com_ponygallery&Itemid=".$Itemid), _PONYGALLERY_NO_DETAILS);
die();
} elseif($ag_detailpic_open!=0) {
GalleryHeader();
include( _PONY_FRONTEND_PATH . '/sub_viewdetails.php' );
}
break;