[bbcodet]Description:[/bbcodet] FancyBox displays images, html content and multi-media iin a sort of "lightbox"
[bbcodet]Author(s)/or Link:[/bbcodet] bbcode created by me cisco thanks to fancybox
Request?: no
this next bbcode is just for a single image! you can post multiple, but they will only be able to open up one at a time!
first download the attached folder and extract, and upload entire fancybox folder to root of forum!
then install as follows:
[i_i]open: this is for prosilver your style might be similar
Code: Select all
styles/prosilver/template/overall_header.html
[i_i]Find:
Code: Select all
</head>
[i_i]Add before:
Code: Select all
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="fancybox/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="fancybox/jquery.fancybox.pack.js"></script>
<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox.css" media="screen" />
<script type="text/javascript" src="fancybox/document.js"></script>
NOTE:
if you already have a jquery-xxx.js file in your header do not add this on, to avoid conflicts! if you don't plan on using the mousewheel to scroll through the pictures on a gallery (which is the next bbcode i will be posting) then don't add the edit for the jquery.mousewheel-3.0.6.pack.js, the others you do need!
also once again, like i've stated in other bbcodes, if they still conflict just remove all the overall_header edits except the jquery edit and add it to the begining of the html replacement, but remove the {ROOT_PATH}
[i_i]BBcode usage:
Code: Select all
[fancybox]{URL}[/fancybox]
[i_i]HTML replacement:
Code: Select all
<a href="{URL}" id="image" title=""><img src="{URL}" style="width:25%;height:25%;" alt="" /></a>
[i_i]Helpline:
Code: Select all
[fancybox]image url[/fancybox]
[i_i]Example:
Code: Select all
[fancybox]http://farm5.static.flickr.com/4058/4252054277_f0fa91e026.jpg[/fancybox]
[bbcodet]DEMO:[/bbcodet]
[fancybox]http://farm5.static.flickr.com/4058/425 ... 91e026.jpg[/fancybox]
[bbcodet]UPDATE #1: added support for Youtube videos[/bbcodet]
[bbcodet]UPDATE #2: Fancybox was updated to version 2x[/bbcodet]
FAQ's
- how to use for youtube videos?
[spoiler]this is how to do it!
*NOTE: again depending on how you ended up adding the js edit this might look differently from yours!
[i_i]BBcode usage:[/i_i]Code: Select all
[fancyboxyt]http://www.youtube.com/watch?v={IDENTIFIER}[/fancyboxyt]
[i_i]HTML replacement:[/i_i]Code: Select all
<script type="text/javascript" src="fancybox/jquery.mousewheel-3.0.6.pack.js"></script> <script type="text/javascript" src="fancybox/jquery.fancybox.pack.js"></script> <link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox.css" media="screen" /> <script type="text/javascript" src="fancybox/document.js"></script> <a href="http://www.youtube.com/watch?v={IDENTIFIER}&fs=1" id="youtube" title="Youtube Video"><img style="width: 130px; height: 97px; border:1px solid black;" alt="YouTube Video " src="http://i.ytimg.com/vi/{IDENTIFIER}/default.jpg" /></a>
[i_i]Helpline:[/i_i]Code: Select all
[fancyboxyt]full clean youtube url[/fancyboxyt]
[i_i]Example:[/i_i]Code: Select all
[fancyboxyt]http://www.youtube.com/watch?v=071KqJu7WVo[/fancyboxyt]
[bbcodet]DEMO:[/bbcodet]
[fancyboxyt]http://www.youtube.com/watch?v=071KqJu7WVo[/fancyboxyt]
extract and upload to fancybox folder overwriting existing one!
[rapidshare]http://rapidshare.com/files/1455203/fancybox.zip[/rapidshare]
right click on image and save on your computer, then upload to your forums images folder NOT your styles/theme/images folder but the images folder in the root of your forum!
[/spoiler]
[download=http://rapidshare.com/files/1769004846/ ... v2.1.4.zip]fancybox,2-04-13,delete old folder, extract and upload new folder to root![/download]