Page 2 of 2

Posted: Sat Dec 16, 2006 11:07 am
by chase
Since my boring old page was losing the votes I went ahead and switched the Main Page. It's a modified verion of jhawthorns page which was a modified version of Wallings page. My changes were to move the navigation/about stuff of the left side.

Posted: Sat Dec 16, 2006 11:11 am
by Walling
Jhawthorn, that is a cool main page! I'm impressed. I understand that mine and your proposal are two different looks, but I really like yours too. You're inspired from enwiki, whereas some of my inspiration was dawiki (Danish). I like them quite equally. Don't know about the poll then... :?

I also feel a bit controversy about my two proposals from the comments and the votes, so maybe it should be discussed more before any final decision is made. Right now my first proposal leads, but it is just less than half the votes, so what about the majority? (don't know if OSDev is a democracy :)) I don't want to offend anyone.
  • Is the welcome box nice? I think most agree on this. Should the quick links be removed or stay?
  • Mine/Jharthorns looks? (Thin/thick boxes? Colors?) Other look?
  • No boxes for the different subjects?
  • No edit links?
Can we all agree on something? I'm reasonably flexible. Just hoping for a more interesting main page with some colors and nice look. (No offence, chase!)

Edit: It seems that chase has taken a decision... :)

Posted: Sat Dec 16, 2006 11:19 am
by Walling
I removed the gab, don't know if it was intended, but I didn't like it. Neither mine and jhawthorns versions have it.

A technical thing... on English Wikipedia, the title is not shown on the mainpage. I thought it was the <div id="mainpage"></div> that did the trick, but it seems it does not. Would it be nice to hide the "Main Page" title on the main page like on enwiki?

Posted: Sat Dec 16, 2006 11:28 am
by chase
Walling wrote:I removed the gab, don't know if it was intended, but I didn't like it. Neither mine and jhawthorns versions have it.

A technical thing... on English Wikipedia, the title is not shown on the mainpage. I thought it was the <div id="mainpage"></div> that did the trick, but it seems it does not. Would it be nice to hide the "Main Page" title on the main page like on enwiki?
Probably just a copy and paste error on my part. Not sure about the title thing, either they have a more up to date version of mediawiki or it's customized.

Posted: Sat Dec 16, 2006 2:10 pm
by Walling
I really like the new main page.

I archived my main page proposals. They can no longer be seen clicking the links in this thread. :)

Posted: Mon Dec 18, 2006 3:34 am
by Steve the Pirate
A technical thing... on English Wikipedia, the title is not shown on the mainpage. I thought it was the <div id="mainpage"></div> that did the trick, but it seems it does not. Would it be nice to hide the "Main Page" title on the main page like on enwiki?

Here's one solution (via http://mail.wikipedia.org/pipermail/med ... 12392.html)
/* Hide the main page title */
function hideMainPageTitle(e)
{
e = (e) ? e : event;
var mainPageTitle = "Main Page";
var headings = document.getElementsByTagName("h1");
var i, done = false;
for (i = 1; ((!done) && (i <= headings.length)); i++)
{
if (headings.className == "firstHeading")
{
done = true;
if ((headings.innerHTML == mainPageTitle) && (document.getElementById("contentSub").innerHTML == ""))
{
headings.style.display = "none";
document.getElementById("siteSub").style.display = "none";
document.getElementById("contentSub").style.display = "none";
}
}
}
}
window.onload = hideMainPageTitle;


It's not a great way of doing it, but it works...

-Stephen

Posted: Mon Dec 18, 2006 4:22 am
by Walling
Steve the Pirate wrote:It's not a great way of doing it, but it works...
It seems that user scripts are disabled.

Posted: Mon Dec 18, 2006 11:36 am
by chase
Walling wrote:
Steve the Pirate wrote:It's not a great way of doing it, but it works...
It seems that user scripts are disabled.
If you want user javascipt and css enabled I can do that. I'd rather figure out how wikipedia is doing it and implement that so everyone gets the same thing for the main page title hiding.

Posted: Mon Dec 18, 2006 4:51 pm
by Walling
chase wrote:
Walling wrote:
Steve the Pirate wrote:It's not a great way of doing it, but it works...
It seems that user scripts are disabled.
If you want user javascipt and css enabled I can do that. I'd rather figure out how wikipedia is doing it and implement that so everyone gets the same thing for the main page title hiding.
I'd use another implementation than javascript as well. I found this, maybe it is useful: http://bugzilla.wikimedia.org/show_bug.cgi?id=6129 There is a patch file attached. I don't know how to apply it. It will hide the main page title for all users, when enabled in the configuration file. I researched a bit on enwiki and they are using a different method, one using javascript, but not the one posted here. They insert this code in the generated site script (don't know where it is generated from). I stripped out the irrelevant parts:

Code: Select all

var mpTitle = "Main Page";
var isMainPage = (/(title=|\/wiki\/)([Tt]alk:|)[Mm]ain[ _][Pp]age/.test(document.location));
var isMainPageFront = (document.title.substr(0, document.title.lastIndexOf(" - ")) == mpTitle);
var isDiff = (document.location.search && (document.location.search.indexOf("diff=") != -1 ||
             document.location.search.indexOf("oldid=") != -1));
 
if (isMainPage) {
  if (isMainPageFront && !isDiff)
  {
    document.write('<style type="text/css">/*<![CDATA[*/ #lastmod, #siteSub, #contentSub, ' +
                   'h1.firstHeading { display: none !important; } /*]]>*/</style>');
  }
}
What it does is to locate the main page (excluding diff views and talk page) and then hides it using dynamically generated css code. It is some kind of a "hack". Look up the code on line 334 of this url.