zerosonesfun / flarum-ext-link-previews
A link preview BBcode: [preview=].
Installs: 153
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
Open Issues: 0
Language:JavaScript
Type:flarum-extension
Requires
- flarum/core: >=0.1.0-beta.8 <0.1.0-beta.12
README
This is abandoned. If you use Flarum you are welcome to use this code and make it better. The position of the iframe needs work, and I'm sure this needs many other improvements.
A Flarum extension which adds a new BBCode called preview. This allows you to post a link with a maginifying glass icon to the right of the link. Hover over or tap on the magnifying glass icon and a preview will load via an iframe. Some websites will not load in iframes; they don't allow it. If you run into this, the preview simply will not load and you will see a browser error. This is your signal to edit your post and remove the preview BBCode. Better luck next time. ;)
Here is the BBCode (preview equals the URL):
[preview="https://google.com"]
Installation
composer require zerosonesfun/flarum-ext-link-previews
Updating
composer update zerosonesfun/flarum-ext-link-previews php flarum cache:clear
Also, after updating, deactivate and then reactivate the extension. Clear your browser cache too.