MyBB Community Forums

Full Version: Shadowbox.js Plugin for MyBB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Hmm, do you have a customised header include? What I did I made it so it only fires on showthread - I edited the plugin file to do it. It did work right out of the box on my test board though.

What this plugin is looking for is the attachment.php line. It then does a preg_replace to add that shadowbox code.

Have you tried this:

Upload an attachment (don't link - use the attachment code). Then insert the image into the post. Use the insert into post button. Post. Refresh page. Click on the attachment image.

I added a couple of tests to my test area.

I cant get the code to add the "rel="shadowbox[pid..." bit to attachment links Sad

Is anybody using Shadowbox with v1.6?
(2011-01-31, 11:11 AM)RArch Wrote: [ -> ]Is anybody using Shadowbox with v1.6?

Shadowbox.js for MyBB is designed to run with MyBB 1.4
To make it compatible with MyBB 1.6 is not on my do to list... (next time)
Anyway to make this open external media recources? Would be nice for when people post thumbnails that have the link to the full size image the link is opened with Shadowbox.

It can do it now if you turn on "Open external web recources" but I don't want it to open all out links as Shadowbox window, just for the images. Like what fancyzoom can do.

Anyway awesome plugin. Haven't had any problems running it on MyBB 1.6.1

Edit#

Would it at all be possible to be able to have a link in the title to the full size image? Some images are just to large and they look smudged when using Shadowbox, would be nice to have a link to the original image.
(2011-01-31, 11:51 AM)querschlaeger Wrote: [ -> ]
(2011-01-31, 11:11 AM)RArch Wrote: [ -> ]Is anybody using Shadowbox with v1.6?

Shadowbox.js for MyBB is designed to run with MyBB 1.4
To make it compatible with MyBB 1.6 is not on my do to list... (next time)

I am using shadowbox on a mybb1.6.1 installation - I have no problems, all runs fine. But I UPLOADED my files to RArch's test forum - and it still did not work. Even on a vanilla mybb installation - yet for me - no probs at all.

That does seem rather strange :/



looking at the java code for fancyzoom it looks like its this bit of code to make outside image URLs open with fancyzoom.

// Zoom: Inject Javascript functions into hrefs pointing to images, one by one!
// Skip any href that contains a rel="nozoom" tag.
// This is done at page load time via an onLoad() handler.

function prepZooms() {
	if (! document.getElementsByTagName) {
		return;
	}
	var links = document.getElementsByTagName("a");
	for (i = 0; i < links.length; i++) {
		if (links[i].getAttribute("href")) {
			if (links[i].getAttribute("href").search(/(.*)\.(jpg|jpeg|gif|png|bmp|tif|tiff)/gi) != -1) {
				if (links[i].getAttribute("rel") != "nozoom") {
					links[i].onclick = function (event) { return zoomClick(this, event); };
					links[i].onmouseover = function () { zoomPreload(this); };
				}
			}
			if (links[i].getAttribute("href").search(/(.*)\.(php)/gi) != -1) {
				if (links[i].getAttribute("rel") == "shadowbox;player") {
					links[i].onclick = function (event) { return zoomClick(this, event); };
					links[i].onmouseover = function () { zoomPreload(this); };
				}
			}
		}
	}
}

Anyway of editing this to use in the Shadowbox.js Plugin?
Hmm, this looks interesting - especially handy for the shadowbox player for NOT opening every sig link if you don't want it to. Maybe the answer is to get the nozoom changed to noshadowbox, and then put that link code around the sigs? I'm assuming it is sigs that is the biggest issue?
none of the lightbox or similar-kind plugin are working for 1.6!!
and all looks to be from same developer Smile
Is this still supported?
try FancyZoom (1.2) plugin
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15