Advertisement:

Author Topic: FancyBox 4 SMF  (Read 41430 times)

Offline Arskrigitsioniets

  • Semi-Newbie
  • *
  • Posts: 78
Re: FancyBox 4 SMF
« Reply #80 on: December 25, 2018, 07:50:59 AM »
Yes I did it.
It's strange because I have this bug even on clean version of SMF.

Offline d3vcho();

  • Sempiterno
  • Lead Localizer
  • SMF Hero
  • *
  • Posts: 3,873
  • Gender: Male
    • frandominguez03 on GitHub
Re: FancyBox 4 SMF
« Reply #81 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.

edit: Sorry it just appeared.

"Greeting Death as an old friend, they departed this life as equals."

Offline Arskrigitsioniets

  • Semi-Newbie
  • *
  • Posts: 78
Re: FancyBox 4 SMF
« Reply #82 on: December 25, 2018, 07:53:24 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?

Offline d3vcho();

  • Sempiterno
  • Lead Localizer
  • SMF Hero
  • *
  • Posts: 3,873
  • Gender: Male
    • frandominguez03 on GitHub
Re: FancyBox 4 SMF
« Reply #83 on: December 25, 2018, 07:54:56 AM »
I'm using PHP 7.1.25. Go to Class-FancyBox.php and change:

This line:
Code: [Select]
public function settings()
to

Code: [Select]
public static function settings()
It should solve the error.

"Greeting Death as an old friend, they departed this life as equals."

Offline Arskrigitsioniets

  • Semi-Newbie
  • *
  • Posts: 78
Re: FancyBox 4 SMF
« Reply #84 on: December 25, 2018, 08:02:50 AM »
Go to Class-FancyBox.php and change:

This line:
Code: [Select]
public function settings()
to

Code: [Select]
public static function settings()
It should solve the error.

It works, thanks.

Quote
I'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.

Offline Arskrigitsioniets

  • Semi-Newbie
  • *
  • Posts: 78
Re: FancyBox 4 SMF
« Reply #85 on: December 25, 2018, 09:15:05 AM »
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.

Offline Arskrigitsioniets

  • Semi-Newbie
  • *
  • Posts: 78
Re: FancyBox 4 SMF
« Reply #86 on: December 25, 2018, 11:06:29 AM »
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:

Code: [Select]
/* 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?

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,537
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: FancyBox 4 SMF
« Reply #87 on: December 25, 2018, 10:41:40 PM »
Update the mod and use /Themes/default/css/jquery.fancybox.custom.css for own CSS.

Offline Arskrigitsioniets

  • Semi-Newbie
  • *
  • Posts: 78
Re: FancyBox 4 SMF
« Reply #88 on: December 26, 2018, 12:05:27 AM »
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.

Offline Arskrigitsioniets

  • Semi-Newbie
  • *
  • Posts: 78
Re: FancyBox 4 SMF
« Reply #89 on: December 26, 2018, 12:14:55 AM »
But unfortunately, I can't adapt my code about that I said above

Code: [Select]
/* 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.

Offline Au{R}oN

  • Newbie
  • *
  • Posts: 3
Re: FancyBox 4 SMF
« Reply #90 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 :)

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,537
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: FancyBox 4 SMF
« Reply #91 on: January 21, 2019, 12:01:30 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

Offline Au{R}oN

  • Newbie
  • *
  • Posts: 3
Re: FancyBox 4 SMF
« Reply #92 on: January 22, 2019, 03:36:47 PM »
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.
Code: [Select]
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
« Last Edit: January 22, 2019, 04:21:02 PM by Au{R}oN »