FancyBox extension beta
[deleted]
MikeJones that's correct.
Does this allow you to resize uploaded images?
- Edited
malago working for me both with [img] and [upl-image-preview url=XXX.jpg]
just having to refresh the page
A big plus if fof formatting add this option (fancybox) for both contents it can manage (images, youtube video, etc)
But, for now, it's just awesome having this extension working in beta 15. Thx @malago for this
Amarok I'm glad to see it working!
So it has to be some other problem if it works for you with the upload extension
I didn't have time to debug it yet though...
Also, if I have more time (I have a lot to learn about Flarum extensions) I can try to improve the extension. I have to see if fancybox can also work with videos, but it might not be possible.
[deleted]
- Edited
I've created a basic extension for this, where a loop is created over all <img> tags, and data-fancybox
is added as an attribute. It is also 100% compatible with fof/upload
It's clean, and works in my instance. See a demo over at https://metabullet.com
I will be extending this so that Youtube and other videos can take advantage of the same thing.
EDIT: Uploaded
It's basic, but functional. Further development to follow
To install
composer require phenomlab/fancybox
To update
composer update phenomlab/fancybox
To remove
composer remove phenomlab/fancybox
[deleted]
- Edited
Amarok really ? Can you provide a bit more detail ? I can't replicate that here. Are you using the latest version 0.1.2 ?
Also, can you give me your forum URL so I can have a look ?
I see the same behaviour, after viewing the image is no longer displayed in the original post. The issue is related to CSS that gets applied to the image, after viewing in the fancybox the main image gets set to style="display: none"
[deleted]
- Edited
@ctml @Amarok I've checked the link @Amarok provided in three browsers, and cannot replicate this issue at all. @ctml I also cannot replicate your issue either.
This extension does not add or alter any CSS - all it does in fact is add data-fancybox
as an attribute. Do either of you have the other "fancybox" extension installed and activated ?
@ctml - can you send me a link please so I can test this ?
@Amarok - also, I do not even see the data-fancybox
attribute being added
Is the extension enabled ?
- Edited
[deleted] I deactivated it during this morning on this website.. sorry :S
But you can check it on this other one : https://elyon-air.net/forum/d/33
Promise, i will don't touch him ^^
Don't know why, but whith the latest update of fof/moderator notes the @malago 's version didn't work anymore hum
[deleted]
Amarok Are you using "Login2See" ? I think there is a conflict there.
[deleted]
- Edited
Amarok This is the issue. If you look at the HTML, you'll see that the image after clicking is in fact still there
The issue is that there is an inline display: none;
which is being set by the Login2See extension, and not by my extension. You can test this by disabling the Login2See extension to see if this resolves the issue.
EDIT: I could fix this by adding an inline style display: inherit
. What may be happening here is that the CSS called by the extension is the stock from Fancybox itself, and that may have some bearing. However, I cannot replicate this on my own forums, and do not use Login2See, so I really do not think that is it.
I may add a note on the extension itself to note that there is an issue with Login2See, but I'd appreciate if you could disable this extension (Login2See) and let me know if it's still an issue, or if it disappears.
[deleted]
ctml Can you send me a link ?