A library for the Content Management Systems [WebsiteBaker] 1 and [LEPTON CMS] 2 to access the API of WebThumbnail.org to create screenshots of websites.
Uses the [cepa PHP client] 4, this library can additional save the screenshots local and update the saved files from time to time, using a cronjob.
- download the actual [libWebThumbnail_x.xx.zip] 3 installation archive
- in the CMS backend select the file from "Add-ons" -> "Modules" -> "Install module"
- libWebThumbNail will also install the droplet
webthumbnail
-
edit the page where you want to add a Screenshot of a website
-
insert the droplet
webthumbnail
at the right place[[webthumbnail?url=http://phpmanufaktur.de]]
-
the parameter
url
is obligatory, as value type in the address of the website you want to make a screenshot from -
save the page and look at the result, your first WebThumbnail is ready!
-
at the next call libWebThumbnail will use the local saved thumbnail instead of accessing the WebThumbnail service.
There are some parameters you can use with the droplet:
url
- the URL addressbrowser
- the Webbrowser, WebThumbnail should use to make a thumbnail. Allowed values arechrome
(default),firefox
andopera
format
- the image format, allowed values arepng
(default),jpg
andgif
width
- the width of the thumbnail in pixel, default is 196height
- the height of the thumbnail in pixel, default is 196alt
- the content of the alternate tag (used for the image)title
- the content of the title tag (used for the image and the link)class_image
- you can specify an additional class for the image tagclass_link
- you can specify an additional class for the link tagtarget
- specify the target of the link, default is_blank
do_link
- allowed values aretrue
(default) andfalse
, which switch the link ofhtml_strict
- force HTML STRICT (suppresstarget
)
Example:
[[webthumbnail?url=http://phpmanufaktur.de&width=300&height=500&alt=phpManufaktur&format=jpg&browser=firefox]]
This command will create a thumbnail of the phpManufaktur, 300 pixel width, 500 pixel height in JPEG format. WebThumbnail will use Firefox for the screenshot.
If you want to automatically update your thumbnails please use a cronjob and call:
http://yourdomain.tld/modules/lib_webthumbnail/cronjob.php
cronjob.php
will update thumbsnails, which are older than a week. To avoid running out of time, cronjob.php
process only one thumbnail at each call.
Please visit [WebThumbnail] 5 to get more informations about WebThumbnail and join the [Addons Support Group] 6 for technical support.