PDA

View Full Version : Automatic site link images


purg
02-01-2007, 03:39 PM
Just added a very quick and simple mod to display images of any link location

demo (hover over any link)
http://www.forumlinkexchange.com/computers/internet/


3 step required changes.
This will be for 1.5 but should be the same for all versions

1.
First get yourself the free snap anywhere preview code
http://www.snap.com/about/spa1B.php


2.
(default template location)
/...../templates/SunnyDay/header.tpl

<meta name="description" content="{$description}" />
<meta name="keywords" content="{$keywords}" />
</head>


Add the script from step 1

<meta name="description" content="{$description}" />
<meta name="keywords" content="{$keywords}" />
<script defer="defer" id="snap_preview_anywhere" type="text/javascript" src="http://spa.snap.com/snap_preview_anywhere.js?ap=1&amp;key=37632ce970dcb5b1 a3df18e4d87eed4d&amp;sb=0&amp;domain=www.forumlinkexchange .com"></script>
</head>




3.
/...../templates/SunnyDay/link-display.tpl

<!-- END ALEXA THUMBNAILS DISPLAY -->
<td {if not $config.alexa_thumbs}colspan="2"{else}style="padding-left: 10px;"{/if} class="link">
<div class="title"><a href="{$link.url}" class="title snap_preview" id="l{$link.id}" {if $config.new_window}target="_blank"{/if}>{$link.title}</a> {section name=star loop=$link.rank}<img src="{$img}star.png" alt="" />{/section} </div>
<div class="description">{text_to_html aText=$link.description aParagraph=true}</div>
<div class="url">{$link.url}</div>


This has one change, which changes the class

<!-- END ALEXA THUMBNAILS DISPLAY -->
<td {if not $config.alexa_thumbs}colspan="2"{else}style="padding-left: 10px;"{/if} class="link">
<div class="title"><a href="{$link.url}" class="title snap_preview" id="l{$link.id}" {if $config.new_window}target="_blank"{/if}>{$link.title}</a> {section name=star loop=$link.rank}<img src="{$img}star.png" alt="" />{/section} </div>
<div class="description">{text_to_html aText=$link.description aParagraph=true}</div>
<div class="url">{$link.url}</div>



from the above example your able to have the images displayed on the clickable address ot the URL diplsyaed at the bottom. Just move the class snap_preview to the class="url" line.

Hope this is helpful




(could this be moved to template mod's.... opps)

Dave Baker
02-01-2007, 03:53 PM
It's well done and looks cool :good:

lsabaut
02-01-2007, 04:09 PM
Hello purg,
It look great, But
I have no idea about :
1.
First get yourself the free span anywhere preview code : ( How?)

thanks

lsabaut
02-01-2007, 04:10 PM
Ok find it http://www.snap.com/about/spa1B.php

purg
02-01-2007, 04:28 PM
lol thanks lsabaut
ive edited the front post, I almost got it right first time :p

Paul69
02-14-2007, 08:18 PM
I love the mod awsome looks good

please advise if this will work on 2.1 or if they are the same code or different

Shunny
02-14-2007, 09:23 PM
Hey guys...I am using 2.1 Skystars...the files look a bit different in 2.1 but the same principal...works fine on my site...I just put it there....I put a ticket in for this mod a couple of days ago cause I wanted a link rollover on my site...so thanks purg...it just goes to show you if you hang around this forum long enough all your mods come true.