-
TA wrote on 2010-10-07 18:06
Is there any implementation of spoiler tags currently available on the site?
Also... I really don't like the method currently used to resize images and to view larger images. Ideally clicking on the image would resize it to the image's full size in-line. Right now, it's a bit of a hassle to have to click on the little bar and be taken to a new tab with the full image (away from the current page, so it's very annoying when trying to view more than one at a time).
-
Skye wrote on 2010-10-07 18:15
I feel like there's a way to attach an image to a post so it pops up in a black box...
No spoiler tags, but there is white text.
-
Osayidan wrote on 2010-10-07 18:29
spoiler tags have ben discussed ever since before we moved here and we're probably not getting them. People put all kinds of crap in them in sigs, and even if you don't click to open the tag, all its content is still downloaded.
The current image resize is the only decent one that was available for vbulletin when I opened the site. There's one that pops up images and darkens the screen around it, but it does it to -all- images, including those smaller than needed, and sigs, which is ridiculously annoying and unacceptable. If that's been fixed I'd implement it but last time I checked it wasn't.
-
TA wrote on 2010-10-07 18:37
Quote from Skye;178370:
I feel like there's a way to attach an image to a post so it pops up in a black box...
Attached images using highslider js or something probably?
Quote from Skye;178370:
No spoiler tags, but there is white text.
Well, it's more importantly used for images and such than just text. It's really super easy to implement.
(adding what I described for the image resize is also super easy... I've done it myself, honestly most "common" things people usually want are always super easy to add and only take like 1-5 mins)
Here... right from my IPB3...
[CODE]<div class='bbc_spoiler'>
<span>Spoiler</span> <input type='button' class='bbc_spoiler_show' value='Show' />
<div class='bbc_spoiler_wrapper'><div class='bbc_spoiler_content' style="display:none;">{content}</div></div>
</div>[/CODE]
The image stuff is done in configuration, so I don't have that available for easy copy/paste, but I remember I had something similar to the way IPB does it for phpBB, so it should be pretty easy to add for vB... This maybe?:
Image resizer - vBulletin.org Forum
Dunno what version we're running here.
Quote from Osayidan;178377:
spoiler tags have ben discussed ever since before we moved here and we're probably not getting them. People put all kinds of crap in them in sigs, and even if you don't click to open the tag, all its content is still downloaded.
You could just make a rule about it and enforce it with moderation, and you can always limit character limit and total images in sigs to prevent that as well. Just about every site now days has spoiler tags.
Quote from Osayidan;178377:
The current image resize is the only decent one that was available for vbulletin when I opened the site. There's one that pops up images and darkens the screen around it, but it does it to -all- images, including those smaller than needed, and sigs, which is ridiculously annoying and unacceptable. If that's been fixed I'd implement it but last time I checked it wasn't.
It's certainly not the only decent one now. ;)
-
Osayidan wrote on 2010-10-07 19:05
This is the one I tested before implementing the one we have now:
BBR - Resize Images with lytebox v3.22 - vBulletin.org Forum
It's pretty much the same as the one you linked, except for VB 4.x, which is what's needed. Problem with that one like I said is it takes effect on all images on the page including sigs or images smaller then you specify. So let's say you have a screenshot thread, someone will click the first SS and can click a next button to see them all one by one, when they get to your sig it'll also show up in the series of images then go on to the next post if it has images in it too. To make it even worst, it doesn't work on the home page, only the forums and blog, which isn't even used on nation.
There's another one I tried that has the same problem, except it does work on the home page. I tried to work with the developer of that one to get him to fix these things but he doesn't speak English so that led to an endless downwards spiral of google translate failures which ended in him trying to say he didn't have time.
Now you made me feel like checking if any of these have been fixed since I last checked (end of July). This is what I originally wanted but the way it functioned wasn't acceptable.
-
TA wrote on 2010-10-07 20:32
Lytebox is trash. I've always thought that...
I'll see if I can't ask a couple old vB admins I know and see what ones they use/ed.
-
Aravan wrote on 2010-10-07 21:37
Er, just put the spoiler in white so you have to highlight it?
That seems easiest to me?
-
TA wrote on 2010-10-07 22:26
Quote from Aravan;178488:
Er, just put the spoiler in white so you have to highlight it?
That seems easiest to me?
Well obviously it seems the easiest to you or you wouldn't have just said that it seems easiest to you. :XD:
Spoiler tags are far superior though. I don't think you really grasp what the spoiler tags do exactly from that comment though. They aren't just for hiding text. They can hide
anything in it. Full formatting... Quotes, code boxes, pictures, you name it. It can make something that would otherwise be huge and take up a massive amount of space (white text or not, which is not applicable for anything other than text anyways), take up only a very small amount of space.
I use it quite a lot as I feel it helps me organize posts better by grouping content into spoiler tags so long posts will appear smaller and can be extended depending on what someone feels like reading/seeing.
---
Osayidan try this... (put this in postbit_display_complete)
[code]$post['message'] = str_replace('<img', '<img style="max-width: 600px; cursor: pointer;" onclick="window.open(this.src)" ', $post['message']);[/code]
Should do what you're wanting, no? Maybe try on a sandbox first, but it should work. Only problem is that it'd do it to smilies and stuff in posts too (so they'd be clickable, which imo isn't a huge problem), but you could also check the image size with getimagesize() and only replace the img tags when it's larger than whatever, but it could slow down your loads doing it that way depending on your hosting... So, I'd probably not bother with setting a min value. It should work with everything though.
If you want to wait, I hear 4.0.4 will have something similar by default (800px default, changeable in admincp).
-
Osayidan wrote on 2010-10-07 22:55
4.0.7 is out so if 4.0.4 has it then I'll see it when I upgrade. Before upgrading I need to find time to finish a new layout and to fix up some things. Time which I don't really have.
-
Phunkie wrote on 2010-10-08 02:57
I'm down for spoiler tags. Really, we should have 'em.
But we should make it against the rules to spam images in them.
-
TA wrote on 2010-10-25 12:43
Soo... Osay... Are you any good with coding?
[code]<html>
<title>resize test#2</title>
<head>
<style type="text/css">
element.style {
cursor:pointer;
height:512px;
width:505px;
}
.resized_img img {
border-color:#777777;
border-style:solid;
border-width:3px 3px 6px;
margin-bottom:5px;
}
img.resized {
display:block;
}
img, .input_check, .input_radio {
vertical-align:middle;
}
fieldset, img {
border:0 none;
}
.resized_img span {
background:none repeat scroll 0 0 #777777;
color:#FFFFFF;
font-size:11px;
padding:4px 8px;
}
.post_body .post {
line-height:150%;
}
body {
color:#F1F1F1;
font:13px arial,verdana,tahoma,sans-serif;
}
</style>
<body>
<font size="50" color="#000000">From this:</font><br /><br />
<div class="resized_img">
<span>Resized to 80% (was 632 x 641) - Click image to enlarge</span>
<img width="505" height="512" class="bbc_img resized" alt="Posted Image" src="http://img408.imageshack.us/img408/2421/servererrorfailxon.png" style="width: 505px; height: 512px; cursor: pointer;" origwidth="632" origheight="641" shrunk="1" newwidth="505" newheight="512" handled="1">
</div>
<!---- changes:
shrunk="1"
to
shrunk="0"
style="width: 505px; height: 512px; cursor: pointer;"
to
style="width: 632px; height: 641px; cursor: pointer;
-->
<br /><br /><font size="50" color="#000000">To this:</font><br /><br />
<div class="resized_img">
<span>Resized to 80% (was 632 x 641) - Click image to enlarge</span>
<img width="505" height="512" class="bbc_img resized" alt="Posted Image" src="http://img408.imageshack.us/img408/2421/servererrorfailxon.png" style="width: 632px; height: 641px; cursor: pointer;" origwidth="632" origheight="641" shrunk="0" newwidth="505" newheight="512" handled="1">
</div>
</body>
</html>[/code]
[code]initImageResize:function()
{var dims=document.viewport.getDimensions();ipb.global.screen_w=dims.width;ipb.global.screen_h=dims.height;ipb.global.max_w=Math.ceil(ipb.global.screen_w*(ipb.vars['image_resize']/100));},findImgs:function(wrapper)
{if(!$(wrapper)){return;}
if(!ipb.vars['image_resize']){return;}
Event.observe(window,'load',function(){$(wrapper).select('img.bbc_img').each(function(elem){if(!ipb.global.screensize)
{ipb.global.initImageResize();}
ipb.global.resizeImage(elem);});});},resizeImage:function(elem)
{if(elem.tagName!='IMG'){return;}
if(elem.readAttribute('handled')){return;}
var dims=elem.getDimensions();if(dims.width>ipb.global.max_w)
{elem.width=ipb.global.max_w;var percent=Math.ceil((ipb.global.max_w/dims.width)*100);if(percent<100)
{elem.height=dims.height*(percent/100);}
var temp=ipb.templates['resized_img'];var wrap=$(elem).wrap('div').addClassName('resized_img');$(elem).insert({before:temp.evaluate({percent:percent,width:dims.width,height:dims.height})});$(elem).addClassName('resized').setStyle('cursor: pointer;');$(elem).writeAttribute('origWidth',dims.width).writeAttribute('origHeight',dims.height).writeAttribute('shrunk',1);$(elem).writeAttribute('newWidth',elem.width).writeAttribute('newHeight',elem.height).writeAttribute('handled',1);$(elem).observe('click',ipb.global.enlargeImage);}},enlargeImage:function(e)
{var elem=Event.element(e);if(!elem.hasClassName('resized')){elem=Event.findElement(e,'.resized');}
var img=elem;if(!img){return;}
if($(img).readAttribute('shrunk')==1)
{$(img).setStyle('width: '+img.readAttribute('origWidth')+'px; height: '+img.readAttribute('origHeight')+'px; cursor: pointer');$(img).writeAttribute('shrunk',0);}
else
{$(img).setStyle('width: '+img.readAttribute('newWidth')+'px; height: '+img.readAttribute('newHeight')+'px; cursor: pointer');$(img).writeAttribute('shrunk',1);}},registerPageJump:function(source,options)
{if(!source||!options){return;}
[/code]
That's as far as I've been able to figure out how IPB does it.
-
TA wrote on 2010-10-29 18:52
So, uh... bump for a spoiler tag!
-
Okitaru wrote on 2010-10-30 03:05
Bumpity bumps!
I really wanted spoiler tags =|
-
Taycat wrote on 2010-10-30 06:13
As do I.
I see no reason why we don't.
-
TA wrote on 2010-10-31 17:35
Bump for justice.