Results 1 to 3 of 3

Thread: Thumbnail Preview Images - How I did it.

  1. #1

    Default Thumbnail Preview Images - How I did it.

    My way of giving back to this community

    Although I just recently migrated my respective site to vBulletin/vBadvanced, thumnail images of the respective web sites in my links directory was something I had been doing for some time.

    It started when wrote a small bit of PHP code and integrated Thumbshots into my site. The experience was nice, but previews only appeared when the respective URL was in the DMOZ directory. I could have switched over to the commercial version and started paying for the service, but even back then there were enough pageviews to make it an expensive proposition.

    Thumbshots updates it's information frequently, but I wouldn't call it truly dynamic. So it would be reasonable that thumbnail previews don't necessarily need to be updated frequently, they just give the user an idea of what the respective link looks like.

    I found a software product called PageVisualize, that is titled as a "Website Image Capture SDK". The free version is limited, but after discovering it's power and capabilities I didn't hesitate to pay the $135.00 license cost. It is a Windows Application, but it will run on practically any version of Windows.

    The Windows GUI is nice and useful for quick image retrievals and testing. However, the it is the command line where one can automate the creation of all of your thumbnail images in your Links Directory.

    Whenever I need to update my thumbnails:
    • Upload a single self-made php script on my server, that outputs a correctly formatted configuration that includes the URLs and Link IDs from the database. I copy the text to a file and save it on my PC, and remove my script from the server.
    • With PageVisualize installed on my PC, I just double-click the saved config file and a Command Line Window opens. Whatever directory the file is in, Jpeg image files start appearing as PageVisualize creates them.
    • After it's completed, I remove the config file and an output log file. Then upload the thumbnail images to a special directory on my server.
    • I don't believe that one should have to create any special fields in vBadvanced Links Directory and manually upload these images into the database; too time consuming. What I do is have my PHP Script and PageVisualize name the image files as $linkid.jpg. For example, if a respective linkid is 960, then it's respective thumbnail image is 960.jpg. What this does is create something that can be referenced using existing database information.
    Then I modify two vbalinks files and add the code below (the path would need to be updated to whatever your server config is):

    /* Thumbnail Mod */
    $thumbfilename = $link['linkid'].'.jpg';
    $thumbsimg = '/var/www/doc/root/images/wl/'.$thumbfilename;
    if (file_exists($thumbsimg)) {
    $link['wlthumbnail'] = $thumbfilename;
    } else {
    $link['wlthumbnail'] = 'tmbnotavail.jpg';
    /* End Thumbnail Mod */
    Then I modify two vbalinks templates and add the $link[wlthumbnail] within the proper image tags.

    You can see it in action at my Triumph Motorcycle Site: TriumphRat.Net

    There will probably be some mild formatting changes, I'm still using the thumbnail image size and PageVisual configuration I created two years ago.

    PageVisualize has gotten better about handling sites with Flash Content, but some sites still won't appear if they are 100% Flash. Thumbshots has the benefit on this issue, but for me it's not enough to shell out hundreds per month. I could manually create the Flash Site's Thumbnails and skip them during the automated process. Pagevisualize also does better with sites on slower servers/networks, but the more forgiving you make it, the longer it takes to create thumbnails. In other words, this doesn't please everyone, but users love it and it's easy to manage.

    It's also nice to run an update, then browse the links on my site and see who has shutdown. While link validation is available in vbalinks, there are many reasons why a link would be transitioned to something different than what was intended.

    I could put up my complete code and scripts, but one has to purchase PageVisualize to make this work. I don't represent the company, if you want try this out you would need to go to them to purchase a license.

    There may be other image-creation programs out there as well. The key is that it names the image files as "linkid.jpg" so that they can be referenced with a few lines of code.

    Hope this helps,
    Last edited by motowebmaster; 08-05-2007 at 10:43 PM.

  2. #2

    Default Re: Thumbnail Preview Images - How I did it.

    Which files do you edit?

  3. #3

    Default Re: Thumbnail Preview Images - How I did it.

    Just want to say thanks to 'motowebmaster' for making this thread and giving me a good start on getting this to work.

    After reading this post I started to do some research on thumbnails and automating them. I took a look at PageVisualize and after downloading the demo I settled on this same software.

    I did my hack a little different and I'll explain.

    See for some code I used in my templates to show the thumbnail when it became available (since then it has been changed some). I also used some PHP supplied by 'motowebmaster' that I modified for my site to generate the new links list. Instead of going to the web site and manually browsing to the page like motowebmaster to generate the list I set up a cron job that runs automatically. The PHP file I made only outputs new links for the last 24 hours since I process new links every hour and create the thumbs (explained below).

    I also created a program that runs on my home PC for these links. It FTP's into my server every half hour and gets the list of links, creates a script file for PageVisualise, calls the PageVisualize DLL and creates thumbs, large screen captures and very small thumbs, then puts the new images on the server via FTP.

    The program alternates the puts and gets so no matter when a link is added there will be no longer then 60 minutes before a thumbnail is available. I create thumbnail for 24 hours so even if the linked site is down I will most likely get a screen capture.

    I also edited the templates so that once a full size image is available you have the option of viewing a large screen capture via the DHTML menu or the view link detail page.

    I am in now way even close to being done with modifying my site templates (need to add CMPS) but the thumbs are working if anyone would like to look.

    Refresh the page once and the large guest message goes away.
    Last edited by PhilMcKrackon; 05-13-2008 at 07:33 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Thumbnail images for links
    By Ohiosweetheart in forum Troubleshooting & Problems
    Replies: 16
    Last Post: 05-04-2008, 08:24 PM
  2. Request: Thumbnail Module
    By ntock in forum Module & Modification Discussion & Requests
    Replies: 2
    Last Post: 01-26-2007, 02:22 PM
  3. Display only one thumbnail with your news
    By Lionel in forum Modifications (version 3.x & 2.x)
    Replies: 6
    Last Post: 09-19-2005, 02:55 PM
  4. Add a Topic Thumbnail
    By interfx in forum Troubleshooting / "How do I..." Questions
    Replies: 1
    Last Post: 11-12-2004, 11:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts