News:

Wondering if this will always be free?  See why free is better.

Main Menu

FancyBox 4 SMF

Started by Bugo, January 12, 2012, 04:28:36 PM

Previous topic - Next topic

Arskrigitsioniets

Quote from: d3vcho(); on December 25, 2018, 07:49:46 AM
Yes I did it.
It's strange because I have this bug even on clean version of SMF.

d3vcho

I have also just set up a clean 2.0.15 install and still don't get the error.

edit: Sorry it just appeared.
"Greeting Death as an old friend, they departed this life as equals"

Arskrigitsioniets

Quote from: d3vcho(); on December 25, 2018, 07:52:42 AM
I have also just set up a clean 2.0.15 install and still don't get the error.
I've tried to back my PHP version to 5.6 and now I don't have the error. What version of PHP do you use?

d3vcho

I'm using PHP 7.1.25. Go to Class-FancyBox.php and change:

This line:
public function settings()

to

public static function settings()

It should solve the error.
"Greeting Death as an old friend, they departed this life as equals"

Arskrigitsioniets

Quote from: d3vcho(); on December 25, 2018, 07:54:56 AM
Go to Class-FancyBox.php and change:

This line:
public function settings()

to

public static function settings()

It should solve the error.

It works, thanks.

QuoteI'm using PHP 7.1.25.
On clean SMF on PHP 7.1 I still have that error. But your change in the code is solving it.

Arskrigitsioniets

This mod breaks Quick Spoiler mod  :( http://custom.simplemachines.org/mods/index.php?mod=2940

With this mod I can't open any spoilers.

UPD:
I've updated Quick Spoiler, now it works correctly.

Arskrigitsioniets

Is there any way to set max width for non-opened images in this mod? Images get out of the screen in small screens (smartphone, for example). In my forum I have a CSS style special for that:

/* Auto resizing of images in posts and personal messages. */
/* Change sizing to suit your own preferences. */
.bbc_img {
height: auto;
width: auto;
/* This is just to keep images to a handy size, even on large screens. */
max-height: 640px;
/* This prevents images breaking out of the post on small screens. */
max-width: 95%;
}


But FancyBox 4 neutralizes this code. Can I by some way to set max-width in percents for FancyBox 4 like I've showed in the example above?

Bugo

Update the mod and use /Themes/default/css/jquery.fancybox.custom.css for own CSS.

Arskrigitsioniets

Quote from: Bugo on December 25, 2018, 10:41:40 PM
Update the mod and use /Themes/default/css/jquery.fancybox.custom.css for own CSS.
Thanks for operative support!

And now, I've discovered one thing. Always when I install FancyBox, QuickSpoiler mod breaks (is impossible to open spoilers). But if I deactivate and re-activate QuickSpoiler, it begins to work correctly. Maybe this info will be useful for you.

Arskrigitsioniets

But unfortunately, I can't adapt my code about that I said above

/* Auto resizing of images in posts and personal messages. */
/* Change sizing to suit your own preferences. */
.bbc_img {
height: auto;
width: auto;
/* This is just to keep images to a handy size, even on large screens. */
max-height: 640px;
/* This prevents images breaking out of the post on small screens. */
max-width: 95%;
}


to custom CSS in FancyBox. If I just paste it in /Themes/default/css/jquery.fancybox.custom.css, it doesn't work – images are still cut on small screens (screen 1). How it should look see on the screen 2.

Au{R}oN

Hi Bugo, i have a 'bug' with that mod.

It works fine with registered users, but, when topic is viewed by guests user, it's like if the img width set in the post is ignored, and users see full-size images. Disable Processing of images that inserted with img tag fix the issue, but of course the mod no longer works.

Any suggestion? Thanks :)

Bugo

Quote from: Au{R}oN on January 20, 2019, 11:55:06 AM
Hi Bugo, i have a 'bug' with that mod.

It works fine with registered users, but, when topic is viewed by guests user, it's like if the img width set in the post is ignored, and users see full-size images. Disable Processing of images that inserted with img tag fix the issue, but of course the mod no longer works.

Any suggestion? Thanks :)
Try to replace /Sources/Class-FancyBox.php

Au{R}oN

#92
Hi Bugo,

thanks for your help, with this version the problem is present with both registered and guest users :(

edit:

I fixed it by myself... what i did is actually a part of what you suggested.

I just commented these 3 lines.

if ($user_info['is_guest'])
       $hiwi = '';
else


and now both guest and registered users see the images correctly resized.

There is still one problem related to the thumbnails bar, that for some reason is placed on the right of the screen.. but beside that your mod is really awesome!
Thanks

woolly bugger

can't get this mod to work on SMF2.1/compare/967b680...release-2.1


installed mods attached...

kokkieblanda

Using 2.1RC2

it works perfectly with attached images but not with external urls within the [img] tags. Processing of images that inserted with img tag box is ticked. Hovering with the mouse on the photo the hand shows but no click and no box.

How can i fix this?

Bugo

I recommend updating to v0.7.1

kokkieblanda

thank you, the updated file did the trick

gevv

Hello,

FancyBox does not work when activated minimize the css and javascript files
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

gorbi

Fancybox does not work on smartphone


Advertisement: