PDA

Click to See Complete Forum and Search --> : [RESOLVED] Codebox width


_powerade_
Nov 5th, 2009, 11:05 AM
It it possible somehow to make the codeboxes (and maybe other boxes, like quotes??) to fill more to the right?

It is a lot of free space on a widescreen monitor, and the codes are easier to read if we don't need to scroll.

dee-u
Nov 5th, 2009, 07:48 PM
I'm with you on this request, let's just hope the webmasters here will take appropriate action. =)

gep13
Nov 6th, 2009, 04:52 AM
Hey,

Sounds like a good idea to me.

All depends how much of a change is required though, and whether it would need to be repeated on each release of vBulletion.

Gary

JPnyc
Nov 6th, 2009, 09:19 AM
unfortunately no. We've tried it and people with smaller resolutions complained.

gep13
Nov 6th, 2009, 11:23 AM
Hey,

Is there no way to have it's width as a percentage, rather than a fixed width? i.e. dynamic based on the width of the page?

What control do you have over this so as to not to add something that has to get repeated each time there is an upgrade?

Gary

_powerade_
Nov 6th, 2009, 01:11 PM
Is there no way to have it's width as a percentage, rather than a fixed width? i.e. dynamic based on the width of the page?


Yeah, I see that when we quote, the width changes dynamically. I guess it won't be a big deal to apply this to codebox when it works with quotes...

RobDog888
Nov 6th, 2009, 01:22 PM
To change it dynamically or make it a setting would require code changes to the underlying templates and code files. This makes upgrades difficult as the code is wiped out and requires to be reapplied. We rarely modify the code for this reason.

visualAd
Nov 8th, 2009, 04:57 PM
If you have Firefox, the following Geasemonkey script will set all the code blocks back to 100% for you:

// ==UserScript==
// @name Fix Code Listing Length
// @namespace VBF
// @description Sets code listing lengths to 100%
// @include http://www.vbforums.com/showthread.php
// ==/UserScript==
//
//

var p, div

var pres = document.getElementsByTagName('pre');

for (x = 0; x < pres.length; x++)
{
p = pres[x];

if (p.className=='alt2') {

p.style.width = '100%';
}
}

var divs = document.getElementsByTagName('div');


for (x = 0; x < divs.length; x++)
{
div = divs[x];

if (div.className=='alt2') {

div.style.width = '100%';
}
}

RobDog888
Nov 8th, 2009, 05:30 PM
You need one for showpost.php too. :)

_powerade_
Nov 8th, 2009, 05:41 PM
@visualAd: Didn't work :(

gep13
Nov 9th, 2009, 02:17 AM
Hey,

I am new to GreaseMonkey, didn't even know you could do things like this, but I couldn't get the above script to work for me either. What am I doing wrong?

Gary

visualAd
Nov 9th, 2009, 02:19 AM
You need one for showpost.php too. :)
I have only ever used it for threads :D

visualAd
Nov 9th, 2009, 02:24 AM
@visualAd: Didn't work :(
Its always worked fine for me. :wave:

Make sure your include in greasemonkey includes a wildcard at the end of the URL.


http://www.vbforums.com/showthread.php*

gep13
Nov 9th, 2009, 02:28 AM
Its always worked fine for me. :wave:

Make sure your include in greasemonkey includes a wildcard at the end of the URL.


http://www.vbforums.com/showthread.php*

Ah, that was it!!

Thanks for that!!

Very helpful!

Gary

_powerade_
Nov 9th, 2009, 04:32 AM
Make sure your include in greasemonkey includes a wildcard at the end of the URL.
http://www.vbforums.com/showthread.php*

It works now, thank you for your help visualAd. This will make my life a whole lot easier ;)

visualAd
Nov 9th, 2009, 06:05 AM
No problem; I wish all of lifes problems were this easy to solve. :D