Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
LightBox
LightBox
0
This discussion has been closed.
Comments
Is there any particular reason you don't want thumbnails created from images?
@AxelL : I *really* do *need* to have it without thumbnails If you can pass on the code that would be great The lightbox extension is one of my favourites so far.
You can see it in action here* ignore the website name it is SFW Just a forum for wheels. It looks so much neater
so once again: you realize this will stay the same and images will look like crap if you use width and height tags in ?
btw. try using rel=lightbox[postid] or something. or at least rel="lightbox[cars]". just try it and you will see what it does
//edit: add this to the bottom of your page. after all the <img> tags!
now all you have to do is insert your images with <img src="whatever" class="lightbox">
<script> var a = $$('img.lightbox'); a.each(function (s) { Event.observe(s, 'load', function() { // damn bug!? this results in crap // new Insertion.Before(s, "<a href='" + this.src + "' rel='lightbox[cars]'>"); // new Insertion.After(s, "he</a>lalala "); // alright, let's do it this way: s.hide(); new Insertion.After(s, "<a href='" + this.src + "' rel='lightbox[cars]'>" + "<img src='" + this.src + "' width=" + (this.width / 10) + " height=" + (this.height / 10) + ">" + "</a>"); }); }); </script>
new Insertion.Before(s, "<a href='" + this.src + "' rel='lightbox[cars]'>"); new Insertion.After(s, "he</a>lalala ");
with s being the <img> tag, it generates: <a href="..." rel="..."></a><img ...>helalalaThe images are all hotlinked from other sites. I'd need a script that would copy all the hotlinked images onto my server and then thumbnail them, which would use up both server resources in processing and space on my file system, which I tend to like to use for my own galleries and videos (which other people hotlink on their forums). The resizing is only to make for visual neatness, not to eliminate the bandwidth used to grab the picture. This images are going to get posted regardless of original size in extreme cases as badly as this...
Hotlinking works within our community also as other web site owners check their logs and see who is linking images and occasionally pop in and say hi, so for me that is reason enough not to re-host the images on my server.
With the best part of 400,000 posts and over 3,000 members combined with over 10 years of professional web development experience (albeit in asp and .NET not php) I'd like to think I understand the issues at hand.
But this has gone violently off track.
AlexL : It looks like unexpected behaviour to me. Prototypes documentation would imply that it should work how you are expecting it to. Is 's' the id of the object you are passing or a reference to the object itself?
I wonder if it is possible to calculate the "size" of a thread and stick that on the discussions page so people know if a thread is large or not. I know I could do it in Asp.net, but not how to do it php
I think this is really the job for an entirely new extension that could then tie into the fancy effects of Lightbox and Thickbox as InlineImages does (for Thickbox only currently). Perhaps it would be worth putting the reasons for wanting it in a new thread requesting a new extension? As far as I know there isn't an extension which currently does wha tyou're asking for, but it would certainly be nice to have one Could be called Hotlinked Image Resizer or something similar
Again, sorry for misunderstanding your intent.
btw, I'm using s.hide() so it hardly can be just the id ;-)
I've read that the Prototype Insertion routines aren't as efficient as they could be, maybe they are a little buggy too .. as [-Stash-] says, this is probably best discussed in another extension as your Lightbox one works a treat