Knowledgebase: 3rd Party Plugins
Instructions for PHPLD Version 5.0+
Posted by on 05 December 2013 01:28 PM

We have funded the development of a phpLD Widget and a Smarty plugin to help integrate the ShrinkTheWeb service into your "PHP Link Directory."

DOWNLOAD: ShrinkTheWeb phpLD Widget + Smarty3 plugin

Check out the homepage & listings page (uses smarty {stwthumb} block)
Also check out the detail pages (uses the widget with full-length previews)

ShrinkTheWeb Widget: Simply upload this widget to phpLD and then enable it. You will then be able to update the widget settings to enter your credentials and set various options.*

Upload the "ShrinkTheWeb" folder and contents to /application/widgets/ on your server.

This widget will display a Screenshot on the selected Zones. We recommend the "LINK_DETAIL" zone. Then, we recommend going to Widgets -> Zones -> "View Widgets" (for the Zone you selected) -> click to order the ShrinkTheWeb Widget above the main content.

This is the only functionality of the Widget and is provided for ease of use. The real value of the Widget is providing an easy way to manage the settings for the Widget and/or Smarty plugin.

If you prefer to use only the Smarty plugin, simply follow these directions and then disable the output of the Widget by setting "Display widget content" to "NO"

Smarty plugin: Simply upload this plugin to your Smarty template plugins directory. It will automatically be enabled but nothing will output unless you place the new {stwthumb} tags in your template (see below for helpful tips).

Upload the "block.stwthumb.php" file into the /libs/Smarty3/plugins/ folder on your server.


Smarty Block Tips
Placement of the smarty block {stwthumb} is important in order to output the screenshots where you want them to show. Here is a phpLD-specific example:

Show screenshots beside search results and listings (link.tpl):
Search for:

{if $smarty.const.SHOW_PAGERANK}
      {include file="pagerank.tpl" pr=$link.PAGERANK}

Immediately AFTER, place this code:
<td><a href="{$link.URL|escape|trim}" title="{$link.TITLE|escape|trim}" {if $link.NOFOLLOW} rel="nofollow"{/if} target="_blank">{stwthumb Size=sm SizeCustom=0 FullSizeCapture=false Alt=$link.TITLE Style="clear:left;float:left;margin:0 5px 0 0;border:1px solid #999999"}{$link.URL|trim}{/stwthumb}</a></td>

NOTE: The reason that the Smarty code uses {$link.URL|trim} instead of {$link.URL|escape|trim} is because some characters get improperly modified by the Smarty "escape" routine and will break certain types of links (typically affiliate links). So we do not use the "escape" on our directory, but you are welcome to do so if it does not cause issues. Since manual approval of links is done on most directories, we feel this is OK.

(1 vote(s))
Not helpful

Contact Us | PagePix Benefits | Learn More | STW Forums | Our Partners | Privacy Policy | Terms of Use

©2016 ShrinkTheWeb. All rights reserved. ShrinkTheWeb is a registered trademark of ShrinkTheWeb.