Gossamer Forum
Home : Products : Gossamer Links : Discussions :

how to fill in missing thumbshots??

Quote Reply
how to fill in missing thumbshots??
I am using images from thumshots.org in my directory, but many of the new sites that are added do not have an images in the thumbshots database. Can anybody tell me how to write some code that will call the thumbshots image as the default, but also give me the option to pull an image from my own server if I need to?

Right now I'm using this code to pull the thumbshots images:
Code:

<img src="http://open.thumbshots.org/image.pxf?url=<%if
URL%><%URL%><%endif%>" hspace="10" vspace="0"
border="1">

I have tried adding a field in my database with the thumbshot image URL code as the default entry, but the % and < > signs make it break when it's published. Anybody have an idea for a work around?

Thanks,

Rich
http://www.HawaiianRainbow.com/Maui/
Quote Reply
Re: [richonmaui] how to fill in missing thumbshots?? In reply to
bump
Quote Reply
Re: [richonmaui] how to fill in missing thumbshots?? In reply to
Hi,

I have a script that does that, actually, does the reverse. It calls the image from your server, and if it's not there, calls the dmoz image. It caches the dmoz image, and stores the images on your server. This prevents changes from occurring, and losing your images. It uses a 60 day cache, and I *think* I have override code, so if the fetched OTP image is under 100 bytes, it does *not* update the cache, but again pulls the old image. My feeling, is better use an old/out of date image, than a blank. Have someone report the link as "bad" rather than a "hole".

We also have two different ways to generate missing thumbshots.

The scripts are still in "hack" stage, so I'd need to install it on your system. (it's not a plugin, just a script). It's the script that's working on http://origami.net, http://debtcure.com, http://bartendersforhire.com, etc.

We are still working on the auto generation of thumbshots, but it requires access to server features that create security problems (no way around that, really), so we are also looking at our original idea of offering the service of creating the thumbshots, using a dedicated server, who's only function is taking a URL and creating an image of it. You "post" your URL, and then "HTTP" the result as a .png or .jpg, which should effectively prevent any problems, but means additional hardware costs.

We *CAN* provide this service to anyone who needs it, but start up costs are a bit high, and we'd need a reasonable contract, or a bunch of people who want this service. GT has said they can set up this back-end server for us, as part of UltraNerds, but it has a cost/overhead for everyone.

As another project, I have some domain names that would make a great "central" directory, or dmoz clone. It would be based on Links SQL, allow XML feed downloads for registered links users, (one free import with your Links SQL purchase) and subscription services to update your sites based on KEYWORDS (not categories). Loads of other Links SQL friendly features too, but this is a big project. Andy and I have 90% of the code written for this already, and we've discussed ways making it happen, and integrating better image upload/managment code for using OTP, generating our own thumbnails, allowing logo overrides,etc.

We need a few "investors" to make this happen though, as it would require a massive amount of upfront time, and several servers, etc. But, the results would be pretty awesome :) Everyone would benefit greatly from this, and it would be a great "perk" for links users.

It would be a fine-tuned version of the DMOZ importer or wizard, geared to Links SQL users, and it would be an unbelievable site generator.

We've tried to generate the funds from other sources to keep working on this, but it's going to take direct funding.

Go to http://ultranerds.com/forum for more. I'll put a post up today.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] how to fill in missing thumbshots?? In reply to
Ok, I have answered my own question:

This works for me in both detail.html and link.html

First I added a field to the links table called "thumb_image". Then this code added to the page:

<%if thumb_image%>
<img src="<%build_root_url%>/thumbs/<%thumb_image%>" hspace="10" vspace="0" alt=" " border="1">
<%else%>
<img src="http://open.thumbshots.org/image.pxf?url=<%if URL%><%URL%><%endif%>" hspace="10" vspace="0" alt=" " border="1">
<%endif%>


Then modify any link to include the image name in the field. Now when someone adds a link to my site that is not in the thumbshots.org database, I can grab a screen shot and use it for the new entry.

Good luck,

Rich
Quote Reply
Re: [richonmaui] how to fill in missing thumbshots?? In reply to
richonmaui, I'll post how I'm doing it in case it is of interest.

I use Thumbshots where they exist. I have a field in the links database called Thumbs. If this field is empty then the if statement uses a Thumbshot. If it is '1' then it uses one of my screenshots, and the <img> source is <%ID%>.jpg (I save each link's screenshot as ID.jpg).

If Thumbs equals '2' I have a generic image saying 'Screen shot unavailable'. This is useful to assign to sites where there are temporary connection problems etc.

Out of interest, I have a pretty quick method for taking my own screenshots. I have a JavaScript bookmarklet that resizes the browser window to 800x600. I capture the screen as a TIFF file (naming it ID.tiff), and then drag them in batches into Photoshop. I have an action recorded that trims the browser sidebars, menus etc, resizes the image to 120x90 and then saves it as ID.jpg for web format. I press 'Play' on the action and the new image is saved in about a second Cool. I upload them via FTP after the link is approved.

As part of adding new links I think this is a manageable extra job that makes the directory look a bit nicer.