Within ShowItem.inc there's code that increments an album's view count when the album is viewed. To ignore views made by anyone with admin privileges, you need to:
This is how it is done (around line 106, v2.1 and line 120, v.2.2):
/* Is the user an admin? */ list ($ret, $isAdmin) = GalleryCoreApi::isUserInSiteAdminGroup(); if ($ret) { return array($ret->wrap(__FILE__, __LINE__), null); } /* Increment the view count */ if (!$isAdmin) { $ret = GalleryCoreApi::incrementItemViewCount($item->getId()); if ($ret) { return array($ret->wrap(__FILE__, __LINE__), null); } }
This is how it is done (around line 106, v2.0.x):
/* Is the user an admin? */ list ($ret, $isAdmin) = GalleryCoreApi::isUserInSiteAdminGroup(); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } /* Increment the view count */ if (!$isAdmin) { $ret = GalleryCoreApi::incrementItemViewCount($item->getId()); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } }