$mosaic->pixels_per_km = 40; $mosaic->image_w /= 2; $mosaic->image_h /= 2; } //get token, we'll use it as a cache id $token = $mosaic->getToken(); //regenerate html? $cacheid = 'mapbrowse|' . $token; $smarty->cache_lifetime = 3600 * 24; //24hr cache if (isset($_GET['gridref_from']) && preg_match('/^[a-zA-Z]{1,3}\\d{4}$/', $_GET['gridref_from'])) { $smarty->assign('gridref_from', $_GET['gridref_from']); } //regenerate? if (!$smarty->is_cached($template, $cacheid)) { $overview->setPreset('overview'); //assign overview to smarty if ($mosaic->type_or_user > 0) { $profile = new GeographUser($mosaic->type_or_user); if (count($profile->stats) == 0) { $profile->getStats(); } //the map is only useful for people with images! if (!empty($profile->stats['images'])) { $smarty->assign('realname', $profile->realname); $smarty->assign('nickname', $profile->nickname); $smarty->assign('user_id', $mosaic->type_or_user); $overview->type_or_user = $mosaic->type_or_user; } else { $mosaic->type_or_user = 0; }