==README for Vimeo BB code add-on for miniBB==
Release date: October 17, 2011.
Latest update: November 25, 2025.
miniBB version: 3.3+
Author: Paul Puzyrev (minibb.com)

This plug-in adds possibility to embed Vimeo videos in forum postings. Works like any regular BB code with the button provided. Click the button - enter Vimeo URL video - post a message; embed-codes are supported as well.


==INSTALLATION==

* Copy the button image img/button_vimeo.svg under /img/ folder of your forum

* Modify the file bb_codes.php file adding the codes provided under bb_codes.encode.txt and bb_codes.decode.txt. The code under bb_codes.encode.txt should be pasted in the function enCodeBB before the line which says

$msg=preg_replace($pattern, $replacement, $msg);

The code under bb_codes.decode.txt should be pasted in the function deCodeBB before the aforementioned line.

* Open the templates/main_post_form.html template and paste the following in the position where other BB buttons are placed (the code for a BB-button):

{$button_vimeo}

* Your language pack (lang/eng.php or any other) needs to contain the variable from lang/eng.code.txt (or related language pack).

* Modify bb_plugins.php and, if you use the Preview add-on, BEFORE the code for the Preview add-on; or most likely anywhere else paste the code located under bb_plugins.code.txt. If you already have the /* Responsive videos */ code coming from another videos-embedding add-on (for example, Youtube), you don't have to paste it. I.e. have it pasted only once for all similar add-ons.

* If you have Preview add-on installed, open templates/addon_preview.html and paste before the closing </head>:

{$responsiveMediaBlock}

* Open templates/form.js and in the function called `insertAtCursor`, before the line which says

`//MOZILLA/NETSCAPE/OPERA support`

paste the code provided under "form_js.code.txt" - it will avoid `[vimeo=null]` insertion in the message, if Vimeo BB code button is cancelled.



==USAGE==

Each Vimeo video has its own URL tag, consisting of digital ID only; check browser's URL field for that. Select and copy URL to the memory buffer (press Ctrl + C or on Windows right mouse button - Copy). Go to the miniBB message area, click Vimeo button and you will be offered to enter Vimeo URL. Press Ctrl + V or right mouse button - Paste. The URL you copied should be pasted in JS window. Afterall, click OK, and your Vimeo code in the message area should be transformed into something like [vimeo=http://vimeo.com/7161429]. Vimeo video should appear in the body of your text after you post the message. The video will be inserted with 400x225 size by default. This could be changed in bb_codes.php -> encodeBB function.

Use Vimeo's Embed code to paste videos with the proper width and height.

==NOTES==

This add-on was developed and released by request and the kind sponsorship of Galmoer Audio Visual Design, www.galmoer.eu.

==FINALLY==
Questions? Suggestions? Improvements? Post them quickly on our support forums:
http://www.minibb.com/forums/
