15 years on The Web
miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /   

File and Image Attachments

Page  Page 14 of 14:  « Previous  1  2  3  ...  12  13  14  
Author Bluesplayer
#196 | Posted: 26 Jul 2014 10:43 | Edited by: Moderator 
This attachment mod gave me an idea when I used SMF on a new site of mine. There was a mod available that implemented Fancybox when viewing attachment uploaded images. I also added a php file that autosizes images if they go beyond a certain size - as minibb attachment mod can do, along with altering the css settings etc.

The point I'm trying to make is the minibb attachment mod would be greatly enhanced with the addition of Fancybox along with the abilty to move through the images manually and also by offering a slide show - see example below.

I will be trying to do this so any help would be greatly appreciated.


My example gallery


Author Bluesplayer
#197 | Posted: 26 Jul 2014 13:04 | Edited by: Moderator 
I've done it Paul and it wasn't that hard to do. I will post how I did it very soon. Not only does it work on a particular post but it displays ALL attachments within the thread.

See it in action here ...


Author kuopassa
#198 | Posted: 27 Jul 2014 01:09 
^ Good stuff, Bluesplayer!

Author Bluesplayer
#199 | Posted: 27 Jul 2014 11:45 | Edited by: Moderator 
I haven't tidied the code up yet - place in js files etc - and I wanted to see how to do this quickly so I did this ...

Downloaded Fancybox from here ...


Then I uploaded all the files to a directory on my website, complete with demo to help work it all out

Added this code to the templates main_header.html file (will clean this up later)

And lastly just altered this line in bb_plugins.php


to this ...

That was all there was to it.

Author Paul
Lead Developer
#200 | Posted: 12 Apr 2017 12:53 | Edited by: Paul 
I've finally got my hands on the FancyBox solution described above, and I must say, it's a bit expired. Now there's a 3rd version of FancyBox available, they say the 2nd version is deprecated and it could not be downloaded. But still, FancyBox could be easily plugged in with miniBB's File Uploads add-on.

Here's what I did:

- downloaded the latest version of Fancybox (currently 3.0), extracted the packaged and copied it under [forums folder]/[fancybox] folder

- in bb_plugins.php, before the /* File upload addon */ code, pasted this:

/* FancyBox */


/* --FancyBox */

i.e. this code enables extra JS and CSS only on vthread pages i.e. where the pictures actually appear.

- in templates/main_header.html, before the closing tag pasted this:


- Modified the further code for /* File upload addon */, the place to locate is to search by `if($spec==4`, this is the code inside of the parseMessage function and the code which is responsible for displaying images; actually it's the same code described by Bluesplayer above, and the first and only appearance of $a1 var should be changed to this:


That's all to work on. About 10 minutes of implementation and it appears to work.

Page  Page 14 of 14:  « Previous  1  2  3  ...  12  13  14 
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions / File and Image Attachments Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB