*****************************************************************************************************
This is an experimental package. It probably won't destroy the world but it might give you a headache.
****************************************************************************************************
v7.0.2+ This won't work on prior versions and will crash your site.
This package will create a data typed named PMG Url. When added to a document type, it will accept a full URL (ie. http://our.umbraco.com ) and will create a screenshot of the webpage. It has two configuration options:
Cache Timeout: Number indicating the hours to check before regenerating a screenshot
Upload to Media: You can choose a media FOLDER to upload the thumbnails to keep them 100% in umbraco. If you use this option by selecting a folder, the cache component won't be checked.
If the user pastes a full URL into the textbox it will automatically create the screenshot. The data is stored in JSON format:
{
mediaFolder: "1149"
mediaItem: 1164
thumbnailPath: null
url: "http://coasttocoastam.com/"
}
mediaFolder: is the folder id where the item is stored
mediaItem: is the media item id if you are storing them in the media section
url: the url of the thumbnail
Change Log:
* 31-01-2014 Fixed hard coded routing, now uses Umbraco.Sys.ServerVariables to generate api Url and will fix non http:// urls.
* 30-01-2014 Initial Release, Great weather
Notes/Instructions:
You may need to fix the maximum request limit because the package is rather large: http://stackoverflow.com/questions/3853767/maximum-request-length-exceeded & http://support.microsoft.com/default.aspx?scid=kb;EN-US;295626
This package is experimental right now. You probably won't have any problems with it though.
This package may not work on a shared host. If it doesn't, there isn't much I can do. I'm sorry about that.
This package uses the CutyCapt.exe program (stored in App_Data). This is what is generating the thumbnails. If this program causes a crash it may take down your entire site. It doesn't support sites that are flash based or that take a while to load. It won't work on all sites either it just depends but yahoo.com doesn't work very well. It also might take up to 20 seconds to create a thumbnail. If it does generate a blank url and it is uploaded into the media section, you could replace it with something prettier.
This package will create the following folder: /images/pmgurl The cutycapt program will create the thumbnails here. If you choose to upload to the media folder, the temporary images will be deleted.
The folder /images/pmgulr will be created. It must exist for the project to exist
The app_data folder has the executable. This may not run on your host. I'm sorry if this is the case.
The media section is storing the thumbnails with the full url. Different cased urls will create (x) versions which I guess means umbraco is comparing them without case. Just
Credits:
Cuty Capt: http://cutycapt.sourceforge.net/
Icon: https://www.iconfinder.com/icons/81975/screenshot_icon#size=128
Cuty Capt Wrapper: http://nolovelust.com/post/Contribution-to-C-Website-Screenshot-Generator-AKA-Get-Screenshot-of-Webpage-With-Aspnet-C