gallery.php (and consequently, plogger_functions.php) is not being properly included; if it were, the function would be defined. Therefore, check that your include_once() statement points in the right direction. Change it to require_once() for PHP to tell you what's wrong.