pagename

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search
Forums: Index > Village Dump > "title-ALIGN" template to "title(pipe)align" idea
Note: This topic has been unedited for 6461 days. It is considered archived - the discussion is over.


Okay. Here is an idea/question. Why do we need all {{title-left}}, {{title-center}} and {{title-right}}? Wouldn't it be easier to replace them all with a generic {{title}} template with alignment variable {{{2|left}}} and delete the {{title-ALIGN}} templates? ~ Ghelæ talkcontribs 10:31, 1 July 2006 (UTC)

Works for me. - Sir Real Hamster {la} {talk} {contribs} 18:17, 1 July 2006 (UTC)

i think its some kind of MediaWiki thing, but I may be wrong. --Atomsk.gif Kaizer the Bjorn takkun Nya? (nya nya) (1961 model!) Check out T61! 23:36, 1 July 2006 (UTC)

Wait for the upgrade to 1.7 trunk (the final upgrade, not just a test (that is, an upgrade to trunk that lasts more than a week)), when we'll have proper parser functions ({{switch}} isn't as sweet as {{#switch:}}). As for why we have them, at the time they were made we probably didn't even have {{switch}}. If we switch now, we'd just have to rebuild them a second time when we do get parser functions. --Splaka 05:31, 2 July 2006 (UTC)
So when will that be? ~ Ghelæ talkcontribs 13:22, 2 August 2006 (UTC)
Ok, trying it now. --Splaka 07:35, 3 August 2006 (UTC)
Ok, I've done it, maybe. Check out {{Title}}. I changed all occurances of {{Title-right}} and deleted it. Someone should do the same for {{Title-center}}. {{Title-left}} is a bit over used, so should probalby be changed to a redirect or {{title|align=left|{{{1}}}}}.
I've also been investigating a way for it to be used when a sitenotice is up. This is rather complex. My train of exploration has involved embedding the sitenotice (with appropriate css styling) into the offset div as an invisible element to become the offset of itself. Also I tried putting in the sitenotice as a visible element, basically replacing the old sitenotice, thus allowing perfect alignment. But, it is giving me a headache now. Here is where I left off:

{{#ifeq:{{Mediawiki:Sitenotice}}|-|<div id="titlehack" class="firstHeading" style="display:inline; font-size:188%; padding-top:0.5em; padding-bottom:0.17em; text-align:{{#switch:{{{align}}}|right=right|middle|center=center|left|#default=left}}; position:absolute; left:0.5em; top:0%; width:98%; background-color:#FFFFFF">{{{1|{{PAGENAME}}}}}</div>|<div id="titlehack" class="firstHeading" style="display:inline; font-size:188%; padding-top:0.5em; padding-bottom:0.17em; text-align:{{#switch:{{{align}}}|right=right|middle|center=center|left|#default=left}}; position:absolute; left:0.5em; top:0%; width:98%; background-color:#FFFFFF"><div style="font-size:56%"><div id="siteNotice"><p>{{MediaWiki:Sitenotice}}</p></div></div>{{{1|{{PAGENAME}}}}}</div>}}

Someone else can try to perfect this. I've decided it isn't worth it at this point ^_^. --Splaka 08:24, 3 August 2006 (UTC)
Ok, I found an almost perfect method:

<div id="titlehack" style="display:none; padding-top:0; padding-bottom:0; text-align:{{#switch:{{{align}}}|right=right|middle|center=center|left|#default=left}}; position:absolute; left:0.95em; top:0%; width:98%; background-color:transparent"> {{#switch:{{MediaWiki:Sitenotice}}|-|=|#default=<div id="siteNotice" style="visibility:hidden"><p>{{MediaWiki:Sitenotice}}</p></div>}} <h1 class="firstHeading" style="background-color:#FFFFFF">{{{1|{{PAGENAME}}}}}</h1> </div>

Except that puts an [edit] link by the title. Arg. SO:

<div id="titlehack" style="display:none; padding-top:0; padding-bottom:0; text-align:{{#switch:{{{align}}}|right=right|middle|center=center|left|#default=left}}; position:absolute; left:0.95em; top:0%; width:98%; background-color:transparent"> {{#switch:{{MediaWiki:Sitenotice}}|-|=|#default=<div id="siteNotice" style="visibility:hidden"><p>{{MediaWiki:Sitenotice}}</p></div>}} <div style="margin-bottom: 0; color: black; background-color: #FFFFFF; font-weight: normal; padding-top: .5em; padding-bottom: .17em; font-size: 188%;border-bottom: 1px solid #aaaaaa;">{{{1|{{PAGENAME}}}}}</div> </div>

...seems to do it ok. Please triple check that it is now sitenotice compatable. But be careful, some asshole might block you for testing it. --Splaka 23:43, 3 August 2006 (UTC)

Talk about making life difficult...

On UnMeta, we just use {{DISPLAYTITLE:pagename}} and the rest takes care of itself (at least for the left-justified version), no template required. Supported as of MediaWiki 1.7 and I don't think the MediaWiki:Sitenotice breaks it, either. I suppose fails here, though... yup, darn. --Carlb 04:46, 7 August 2006 (UTC)

That is a magic word that is disabled by default (is set via $wgAllowDisplayTitle). However, last time I asked Brion and Tim about it, it was mostly broken and didn't even work on test.wikipedia.org (about a month ago, sorta works now), so it probably won't work until we upgrade to 1.8 (or a later 1.7). Also, the acutal page title is displayed under the H1 firstHeading (into contentSub, which makes it pretty ugly), eg: test. Even if it did work, and was enabled, it would still not be fully desirable (globally hiding contentStub is not an option, base pages and redirects show there IIRC). I would personally love to dispose of {{title}} and all the others, but people enjoy using them too much here, so I do my best to minimize damage control and make it not look like crap on sitenotices and other skins. --Splaka 05:46, 7 August 2006 (UTC)
The "link to this page as [[oldpagename]]" subtitle (displayed under the firstHeading) can be removed by blanking the MediaWiki:Displaytitle message. Pretty trivial. Only odd thing I've seen happening is that DISPLAYTITLE on the same page as extension DynamicPageList2 doesn't mix. Based on MediaWiki 1.8alpha, (as much of uncyclomedia.org has already upgraded) mixing these two on the same page yields odd UNIQ23432569081534165-QINU text appearing in the extension text output. I haven't tried to determine what's causing the two tags to not co-exist nicely.
The {{title}} that we had been using on this site prints the new title over top of the original. Ugly. Even without a site notice active, it looks worse than the {{DISPLAYTITLE:pagename}} tag (where available). No need to globally hide contentSub to make DISPLAYTITLE do what we need. --Carlb 13:07, 7 August 2006 (UTC)
Blanking MediaWiki:Displaytitle would be even worse, there'd be no way to tell (except by looking at the url) that the page was stealthily retitled, which would be a very handy tool for vandalism (the current titlehack can be easily opted out with css). *If* we do implement DISPLAYTITLE, the message sould be changed to something at least like "retitled from *oldpagename*", in a div with an ID that people could voluntarily hide. --Splaka 21:10, 7 August 2006 (UTC)
Or, of course, you could look at the URL... ~ Ghelæ talkcontribs 12:33, 8 August 2006 (UTC)
Like this? or maybe like this?. Your naivety is entertaining. Can I interest you in the Brooklyn Bridge? --Splaka 22:02, 9 August 2006 (UTC)