Welcome! Log In Create A New Profile

Advanced

Screenshots next to Search Results

Posted by TIERRAhosting 
Screenshots next to Search Results
January 29, 2008 04:01PM
I realize that there is a MOD already about Google linked images and such, but I found a really easy way to have current screenshots show up next to your search results!

I simply modified the templates/standard/search_results.php and added an image tag with a link to an offsite thumbnail provider as such:

------------------------------------------------------------------------

<!-- results listing -->

<?php foreach ($qry_results as $_key => $_row){
$last_domain = $domain_name;
extract($_row);
if ($show_query_scores == 0) {
$weight = '';
} else {
$weight = "[$weight%]";
}
?>
<?php if ($domain_name==$last_domain && $merge_site_results == 1 && $domain == ""winking smiley {?>
<div class="idented">
<?php }?>
<table cellspacing='0' cellpadding='0'>
<tr>
<td width='150' valign='middle' rowspan='3'>


<img src='http://www.artviper.net/screenshots/screener.php?url=<?php print $url?>&w=100&h=100' width='100' height='100' alt='<?php print $url?>' />


</td>
<td width='80%'><b><?php print $num?>.</b> <?php print $weight?>
<a href="<?php print $url?>" class="title"> <?php print ($title?$title:$sph_messages['Untitled'])?></a>
</td>
</tr>
<tr>
<td>
<div class="description"><?php print $fulltxt?></div>
</td>
</tr>
<tr>
<td>
<div class="url"><?php print $url2?> - <?php print $page_size?></div>
</td>
</tr>
</table>
<?php if ($domain_name==$last_domain && $merge_site_results == 1 && $domain == ""winking smiley {?>
[ <a href="<?php print 'search.php?query='.quote_replace(addmarks($query)).'&search=1&results='.$results_per_page.'&domain='.$domain_name?>">More results from <?php print $domain_name?></a> ]
</div class="idented">
<?php }?>
<br/>
<?php }?>
</div>
<?php }?>

<!-- links to other result pages-->

------------------------------------------------------------------------

A preview of the thumbnails(screenshots) in action:

http://img135.imageshack.us/img135/8774/screenshotcw6.jpg

or a link to my search: http://www.tierrahosting.com/search/search.php

. . . . . . .

I realize this is not a major modification as I'm only adding an offsite image link to the search engine, but I think it looks pretty nice!

Hope someone finds this useful,
TIERRAhosting
Re: Screenshots next to Search Results
April 21, 2008 03:57AM
Thanks. This code works real good.
Re: Screenshots next to Search Results
April 22, 2008 05:58PM
Hi

How do i add this code?

I tried to replace this code with the one in the search_results.php
but then it doesnt work

Can you please advise me how and where to enter the code

Thanks
Tiekie
Re: Screenshots next to Search Results
April 22, 2008 10:51PM
I figure it out .... Cheers

Great addon !

I notice that some pages doesnt have a thumbnail generated ... will they get automatically updated ?
Re: Screenshots next to Search Results
April 27, 2008 06:48AM
I am not sure. I think after the 1st time it loads the site will save an snap shot. I am not to sure. I know all images are on their sever. I hope this helps a little bit.
Re: Screenshots next to Search Results
April 27, 2008 07:16AM
dude i've had that forever... you guys are so slow tongue sticking out smiley
Re: Screenshots next to Search Results
May 12, 2008 10:10PM
Yes, the images are created and hosted by artviper.net and if the page hasn't been visited in your search yet, there should be a 'Image being generated' in it's place.

To be honest, I'm not certain as to how deep their image grabber goes, but after a couple of searches, it seems that everything had thumbnails.

Hope this works for you. I really liked it.
Sorry, only registered users may post in this forum.

Click here to login