This board needs improvement. (Incl. Greasemonkey script)

Talk about anything

Moderator: Site Mods

Tuxman
Platinum Member
Platinum Member
Posts: 1610
Joined: 2009 Aug 19, 07:49

This board needs improvement. (Incl. Greasemonkey script)

Post by Tuxman »

OK, let's talk seriously: This board is ugly.
Barely ugly.

Why is it in our world of SXGA screens that some weirdo says "hey, let's make the page extra-narrow and put some large bars on its top"? OK, 650 pixels are a fine size, but why not make it 100% which is - on very. very bad resolutions - also 650 pixels, most likely more?

What's with the weather bar on top of this board? And why do we need the (%/§)& date as an extra line?

And as I am a smart guy, I decided to solve all of these problems. (Also because some other board user asked me for the code.) All you need is Mozilla Firefox and the latest Greasemonkey extension.

Then copy this code into some text file and install it as a user script (name it netez.user.js or smth - the .user.js part is important! - and drag&drop it into the Firefox window to do this):

Code: Select all

// ==UserScript==
// @name          enlarge netez.com board
// @description   does what its description says
// @include       http://forum.zabkat.com/*
// @include       http://forum.zabkat.com/*
// ==/UserScript==

function XPath(Params) { return document.evaluate(Params, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); }

var checkRegex = /topicreview/;
var checkFid = checkRegex.exec(window.location);

if (checkFid) {
    // don't do it in the review frame!
}
else {

// make that 650px table wider first, don't forget that we also should enlarge the post fields
if (XPath("//table[@width='650']").snapshotLength>0) {
    XPath("//table[@width='650']").snapshotItem(0).style.width="100%";
    // and while we're at it:
    if (XPath("//textarea").snapshotLength>0) {
        XPath("//textarea").snapshotItem(0).style.border="1px solid black";
        XPath("//textarea").snapshotItem(0).style.width="150%"; // yay...
        XPath("//textarea").snapshotItem(0).style.height="300px";
        XPath("//textarea").snapshotItem(0).style.fontFamily="Consolas,Verdana,Arial,Helvetica,sans-serif"; // looks way better :)
        XPath("//textarea").snapshotItem(0).style.fontSize="12px"; // now that there is more space...
    }
}

// we know the current date, we don't visit the board to learn about it
XPath("//table").snapshotItem(0).style.display="none";

// we also know that we're on netez.com, so ...
XPath("//table").snapshotItem(2).style.display="none";

// the Google logo is ugly as hell
XPath("//img[@width='97']").snapshotItem(0).style.display="none";

// haha, you really think someone is actually using the search thingy for WWW?!
for (i = 0; i < XPath("//input[@name='sitesearch']").snapshotLength; i++)
    XPath("//input[@name='sitesearch']").snapshotItem(i).style.display="none";
XPath("//input[@name='btnG']").snapshotItem(0).value="search netez.com";

// also remove the radio buttons' text fields
for (i = 0; i < XPath("//font").snapshotLength; i++)
    XPath("//font").snapshotItem(i).style.display="none";

// "copyright", yadda yadda, phpBB, alright, so what?
for (i = 0; i < XPath("//span[@class='copyright']").snapshotLength; i++)
    XPath("//span[@class='copyright']").snapshotItem(i).style.display="none";
    
} // end checkFid
Very, very "quick and dirty", but I thought it would be a good idea if you actually knew what I'm doing here, so ...

I hope you'll like it.
Last edited by Tuxman on 2011 Jun 26, 17:42, edited 1 time in total.
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

@ why ...

It's a long-time gift to nikos at from host/owner Sal Pileggi.
( note the last line under Credits in x2help.htm )

If you are volunteering to host and administer a new forum, talk to nikos.   8)
Last edited by fgagnon on 2010 Aug 06, 18:46, edited 1 time in total.
Tuxman
Platinum Member
Platinum Member
Posts: 1610
Joined: 2009 Aug 19, 07:49

Post by Tuxman »

The "why hosted" is not the point here; the "why so ugly" is.
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

so you would look a gift horse in the mouth?  :shock:
Tuxman
Platinum Member
Platinum Member
Posts: 1610
Joined: 2009 Aug 19, 07:49

Post by Tuxman »

I would not ride a decrepit horse, no matter how cheap it was.
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

At the risk ofImage I applaud the eliminations and remunerations of histoire, and bid the superfluous 'javii' a happy flight in the aether...

Thanks to the German Contingent of Esoterica... :wink:

(And Fred, while we're discussing previous generations, what's the story with the Horse Boards?  Was it in our distant past that equines knew the secrets of x2, and have now ascended, forsakening us poor humans to the remnants of stabled knowledge?  I do know a thing or two about shovelling shite - human, equine, canine, and bovine.  Some verbal, too, as is my Irish wont. :D)
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

...and the previous addition of Reply box expansion:

Code: Select all

if (XPath("//textarea[@name='message']").snapshotLength>0) {
   XPath("//textarea[@name='message']").snapshotItem(0).style.width="<EnterNewWidthHere>";
}
...finds a home, too, though "Consolas,Verdana,Arial,Helvetica,sans-serif" is rather old-skool.  'Segoe UI semibold' suits all needs, if not as technically effete, aesthetically in a widescreen world...
Tuxman
Platinum Member
Platinum Member
Posts: 1610
Joined: 2009 Aug 19, 07:49

Post by Tuxman »

Well, I did the above script "from scratch", not everything is taken from our personal conversation. Anyway, the fine thing here is that you see what does what and can change it to make it suit your personal needs even without a clue about userscripting.

8)
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

Tuxman wrote:...you see what does what and can change it to make it suit your personal needs even without a clue about userscripting.
True, and at play in the fields of the Lord am I. :D  (That said, the second page of the emoticons seems to have gone AWOL...)

If only I could eradicate... <src="/bbs/templates/BlueMist/pics/logo.gif"> too...
Tuxman
Platinum Member
Platinum Member
Posts: 1610
Joined: 2009 Aug 19, 07:49

Post by Tuxman »

I rarely use any special built-in emoticons anyway. I prefer the SmileyXtra extension. :)

(OK, except :) and :D and such, of course.)
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

Kilmatead wrote:If only I could eradicate... <src="/bbs/templates/BlueMist/pics/logo.gif"> too...
Hmm, less than elegant, but a quick adblock sends it to the fishes... :D
User avatar
horsemad64
Member
Member
Posts: 64
Joined: 2010 Jan 11, 17:58
Location: UK, London

Post by horsemad64 »

We need more users. Were getting Less popular as the day draws on :(!
When you are in the saddle, time becomes a never ending thing. A thing that may as well not matter.
User avatar
horsemad64
Member
Member
Posts: 64
Joined: 2010 Jan 11, 17:58
Location: UK, London

Post by horsemad64 »

We could always advertise. I mean, spread the word to everyone, and we could all try to visit more often and make loads of improvments on the boards. That way, the board would look better and be popular.
When you are in the saddle, time becomes a never ending thing. A thing that may as well not matter.
Tuxman
Platinum Member
Platinum Member
Posts: 1610
Joined: 2009 Aug 19, 07:49

Post by Tuxman »

I doubt that it matters how many users are here. :)
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
Tuxman
Platinum Member
Platinum Member
Posts: 1610
Joined: 2009 Aug 19, 07:49

Post by Tuxman »

Updated. Those who did own modifications: Remove the "related links" and "weather bar" lines, and all is fine again.
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
Post Reply