Snapshot BBCode (Website Thumbnail Previews)

Started by karlbenson, August 12, 2007, 12:50:30 PM

Previous topic - Next topic

karlbenson



SNAPSHOT BBCODE (SHOW WEBSITE THUMBNAIL PREVIEW) v1.1
By Karl Benson



Introduction
A modification for the use of [snapshot][/snapshot] bbcode to enable the showing of previewed links.
Thumbnails provided and taken by http://www.artviper.net/
(Note until a screenshot of the link has been taken, you will get a Soon... image)
Examples


Installation
Simply install the package to install this modification on the Default theme.

This version is for compatible with SMF 1.1.x
and with SMF 2.0 Beta 1 (which is currently available to Charter Members).

Manual edits will be required for non-default themes to add the BBCode button to the Post.template.php (if it has a custom version of the file)

Manual Edit
A Manual edit will be required for non-default themes to add the BBCode button to the Post.template.php (IF the theme has a custom Post.template.php)
FIND
'flash' => array('code' => 'flash',
ADD BEFORE
'snapshot' => array('code' => 'snapshot', 'before' => '[snapshot]', 'after' => '[/snapshot]','description' => $txt['snapshot']),
You will need to add a copy of the snapshot.gif image to EVERY themes images/bbc folder

If your using a language different than the ones supported this mod (listed below), then you will need to add the following to the Modifications.{language}.php for each theme (The language folder can be found eg Themes/{themename}/languages/)
If your using utf8, you may also need to add it to Modifications.{language}-utf8.php

FIND
?>
ADD BEFORE
$txt['snapshot'] = 'SnapShot';

Languages
o Supports by default
- English/English-utf8
- English_British/English_British-utf8

Features
o BBCode Button to Insert [snapshot][/snapshot] bbcode.
o Works with 2 different types of BBCODE
- Works with [snapshot][/snapshot] (Basic bbcode, uses the default sizes 150x120)
- Works with [snapshot=width,height][/snapshot] (With specified sizes)
o Includes size protection
- Prevents users using extremely small or large size (must be between 90px and 600px)

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
1.0 - 10th August 2007
o Initial release
1.1 - 14th November 2007
o Switched thumbshot provider to Artviper
o Added support for English_utf8
o Added support for English_British/English_British-utf8
o Alteration to installer
o Added SIZE support (with Size protection)
o Made to work on SMF 2.0 beta 1


karlbenson

thanks.

Theres very few sites (nevermind free ones) which can take proper screenshots of webpages.
Even then most will only take one of the base domain.

Assistance

~playing poker~

tsmalmbe

In theory, this is an excellent mod. I only get "soon" for several days though, so in practice it is quite useless. Not the authors fault though.
..:: http://www.kontrollrummet.com - Studio och musik ::.. RSS?

karlbenson

Indeed,

Unfortunately, this 'thumbnail' provider site is free and seems to be getting hammered.  Unfortunately this has meant that in practice this mod is quite useless at the moment.

At some point when I get some free time i'll try find an alternative provider for the thumbs.

tsmalmbe

Couldnät the thumbgenerator be run locally? Or isnät there any software at the moment that allows to create thumbnails/snapshots?
..:: http://www.kontrollrummet.com - Studio och musik ::.. RSS?

karlbenson

There is no free software to do that.  And I doubt that most servers would be able to run it even if there was.

I've been looking for a while.  I have another thumbnail provider in mind, but that too keeps going down.

tsmalmbe

You are probably right. I was thinkin something in the ways of having a stand-alone (mozilla-based) rendering-engine and then using wget and and and... but yes, it would probably require lots of configurations not available on shared servers.
..:: http://www.kontrollrummet.com - Studio och musik ::.. RSS?

karlbenson

I doubt it would even work on most bog-standard vps/dedicated servers either.

karlbenson

I've uploaded v1.1.
I have changed the thumbnail provider to one which works, and offers custom sizes.

1.1 - 14th November 2007
o Switched thumbshot provider to Artviper
o Added support for English_utf8
o Added support for English_British/English_British-utf8
o Alteration to installer
o Added SIZE support (with Size protection)
o Made to work on SMF 2.0 beta 1

Stratosmo

#11
I changed a theme, now SnapshotBBCode doesn't work. I tried the default theme and its not working there also.

Update: I tried to uninstall it but it gave error in Modifications.english.php. It seems that maybe another mod has caused this. I will try to see if I can manually uninstall SnapshotBBCode.

karlbenson

I have reuploaded this mod and screenshots for it.

I am in the process of doing it for ALL my other mods aswell.  Please bear with me.

Stratosmo

#13
I have manually uninstalled it, and installed again. The strange thing is that Snapshot images from previous installation are showing but new ones don't, like I encountered before I uninstalled it. It shows a black screen with "Image Captu ..."

Karl, do you have any idea what can cause this?

karlbenson

Its the third party screenshot provider.

That should be a temporary image.  The screenshot should hopefully appear pretty shortly once their service has taken the screenshot.

brygida

Hi karlbenson!

I have a 1.1.4 smf and trying to install your mod.
Just to let you know that hrought the package installer smf does not want to install...
And manual install seems too complicated for me for at the moment.




karlbenson


damnitmike

Hey Karl....

Love your mods...I use many of them....

Here's an excellant Snap Shot provider.....I've used them for a year or so..

http://www.snap.com/snapshots.php

I actually figured out how to include their code into my site ....which I did...works superbly.

It would be nice in the mod format....that way there is no question as to its proper insertion into the coded page....

I put it in the index.template.php file.....

I am trying now, as I have forgotten  about it, to include it to show in the Links (SMF LINKS)......that would be great....I struggle, but I will figure it out.....its part of the learning curve....

Thanks again for your 'extra effort'!

karlbenson


damnitmike

what I really like about the Snap one is, is how it works with YouTube videos....

Just post a link to the video on your site, mouseover it and it opens and will play in the box.....On one site I play with I called it the YouTube Player...

I also like that you can customize it, with your own logo.....colors....

I wasn't sure everyone was aware of these features is why I added them here....

Thanks again..


Advertisement: