hey guys,
I have just built the content for my_egallery module, enjoy.
Code:
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ();
}
class seoGallery extends searchmodule {
function seoGallery(){
global $prefix;
$this->name = 'Gallery';
$this->module = 'My_eGallery';
# $this->sql_table_with_prefix = $prefix.'_images';
$this->sql_table_with_prefix = 'nuke_gallery_pictures';
}
function formatGoogleResult($result){
global $url;
return $this->formatGoogleURL($url['scheme'].'://'.$url['host'].'/HE/showfile-'.$result['rid'].'.html');
}
function formatSitemapResult($result)
{
return '<a href="showfile-'.$result['rid'].'.html">'.$result['title'].'</a>';
}
function doquery(){
global $prefix, $tblname, $db;
$q = $this->query[0][1];
foreach ($q as $query){
$db->sql_query('INSERT INTO '.$tblname.'
(`id`, `relevance`, `date`, `title`, `rid`, `desc`, `author`, `searchmodule`)
SELECT CONCAT("Gallery", `pid`) AS `id`, \'1\', \'1\',
`name`, `pid`, `description`, "", "Gallery"
FROM nuke_gallery_pictures
WHERE ((`name` like \'%'.$query.'%\')
OR (`description` like \'%'.$query.'%\'))');
}
}
}
?>
|
P.s links are for googletap. you may need to change it.