Ejemplo n.º 1
0
         $place_name = strip_tags(smarty_function_place(array('place' => $place)));
         $smarty->assign('meta_description', "Geograph currently has {$square->imagecount} photos in {$square->grid_reference}, {$place_name}");
     }
 }
 $smarty->assign('mode', 'normal');
 if ($grid_ok && !empty($CONF['sphinx_host']) && (isset($_GET['takenfrom']) || isset($_GET['mentioning']))) {
     $sphinx = new sphinxwrapper();
     $sphinx->pageSize = 15;
     if (isset($_GET['takenfrom'])) {
         $ids = $sphinx->returnIdsViewpoint($square->getNatEastings(), $square->getNatNorthings(), $square->reference_index, $square->grid_reference);
         $smarty->assign('viewpoint_query', $sphinx->q);
         $viewpoint_count = 0;
         //set this to zero to suppress the prompt!
         $smarty->assign('mode', 'takenfrom');
     } else {
         $sphinx->prepareQuery("{$square->grid_reference} -grid_reference:{$square->grid_reference}");
         $ids = $sphinx->returnIds(1, "_images");
         $smarty->assign('mode', 'mentioning');
         $mention_count = 0;
         //set this to zero to suppress the prompt!
     }
     if (!empty($ids) && count($ids)) {
         $images = new ImageList();
         $images->getImagesByIdList($ids);
         $square->totalimagecount = $sphinx->resultCount;
         //otherwise, lets gether the info we need to display some thumbs
         if ($square->totalimagecount) {
             $smarty->assign_by_ref('images', $images->images);
         }
         $smarty->assign('totalimagecount', $sphinx->resultCount);
         $smarty->assign('imagecount', $sphinx->resultCount);