Difference between revisions of "explain xkcd:Community portal/Design"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(Displaying Comics: new section)
 
(36 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<noinclude>__NEWSECTIONLINK__
+
#Redirect [[Explain XKCD:Community portal/Proposals]]
{{Community portal}}</noinclude>
 
 
 
== Header template ==
 
 
 
Hi, I've created a template called [[Template:ComicHeader]], which might make things easier when creating comic pages (and also provide better consistency between the pages). I've used it on the [[Internal monologue]] page, to display the comic number and the date it was published. The template also adds the page to the [[:Category:Comics|Comics]] category.
 
 
 
You just need to add:
 
<pre>{{ComicHeader|1089|August 1, 2012}}</pre>
 
…to the start of the page (replacing the comic number and date).
 
 
 
I'll try to make the template look a bit nicer, but the great thing about templates of course, is that once they're updated, the changes are reflected on all the pages that include that template. --[[User:Yirba|Yirba]] ([[User talk:Yirba|talk]]) 18:46, 1 August 2012 (EDT)
 
 
 
:By the way, I'm thinking of maybe programming something that would allow you to easily import the comic image and alt text from xkcd without having to upload the images manually and the like. You'd just have to host a single PHP file on your server and make a few changes to the MediaWiki configuration. Of course, you'd be able to see source code and everything to make sure I'm not trying to do something fishy. :-P Let me know what you think. :-) --[[User:Yirba|Yirba]] ([[User talk:Yirba|talk]]) 18:54, 1 August 2012 (EDT)
 
::Yirba - I like the idea.  My email is [email protected] - send me what you put together and we can sort it out. --[[User:Jeff|Jeff]] ([[User talk:Jeff|talk]]) 19:37, 1 August 2012 (EDT)
 
::Ditto on the Template.  Up-vote.  Any thought on harvesting the pre-wiki content from ExplainXKCD with some sort of a Python, Perl, or PHP script?  (That sounds more like a 'bot than something that would have to be hosted, though.) [[User:IronyChef|IronyChef]] ([[User talk:IronyChef|talk]]) 01:52, 2 August 2012 (EDT)
 
 
 
::: I was thinking of putting it into a infobox, please [[#Idea|see above]]. I also intended to automatically extract data from xkcd, which would lack descriptions, but at least we would have data like title, image and transcripts. Also, there are some other data like links (e.g. 832), news (which are displayed in xkcd's header, e.g. 739) and titles which contain HTML (259 and 472). I also extracted all those data. When we agree on a page layout, I could begin programming a bot. --[[User:SlashMe|SlashMe]] ([[User talk:SlashMe|talk]]) 06:54, 2 August 2012 (EDT)
 
 
 
::::Hmmm… an infobox may be a good idea. And a bot that imports data from xkcd might be handy. Anyway, here's something I programmed that would allow for access to the xkcd API from the wiki itself. Essentially, you'd put this xkcdinfo.php ([http://gist.github.com/3239432 source], [http://github.com/downloads/Yirba/yirba.github.com/xkcdinfo.php download]) file somewhere on the server (e.g. at http://www.explainxkcd.com/xkcdinfo.php) and [http://www.mediawiki.org/wiki/Manual:Interwiki#Adding_a_new_website_for_interwiki_linking include it in MediaWiki's interwiki table] (ensuring iw_trans == 1):
 
<pre>INSERT INTO interwiki (iw_prefix, iw_url, iw_local, iw_trans) VALUES ('xkcdinfo', 'http://www.explainxkcd.com/xkcdinfo.php?input=$1', 0, 1);</pre>
 
::::After [http://www.mediawiki.org/wiki/Manual:$wgEnableScaryTranscluding enabling scary transclusion] in LocalSettings.php, you'd then be able to send queries to the xkcd JSON API via this file. In other words, <code><nowiki>{{xkcdinfo:32-title}}</nowiki></code> would make comic 32's title appear. <code><nowiki>{{xkcdinfo:55-alt}}</nowiki></code> would make comic 55's image text appear. I've also set it so you could enter <code><nowiki>{{xkcdinfo:100-embed}}</nowiki></code>, and it would make the comic 100 image appear on the wiki page. Feel free to use it however you want (if at all), and modify the code should you wish. (Hint: Using the number 0 for the comic number will query the most recent comic, so <code><nowiki>{{xkcdinfo:0-num}}</nowiki></code> will return the current comic number. Also, adding "raw:" before "xkcdinfo:" might be more useful in some instances. E.g.: <code><nowiki>{{raw:xkcdinfo:555-title}}</nowiki></code>)--[[User:Yirba|Yirba]] ([[User talk:Yirba|talk]]) 14:50, 2 August 2012 (EDT)
 
 
 
::::: Nice idea, altough this would mean to load all data from xkcd whenever a page is <del>viewed</del><ins>edited</ins> (I think this is the way MediaWiki caches the data). This is a lot of traffic for little data. I'd say to include the metadata statically, but linking the external image seems a good thing to me. Again, it'd be great if you gave me feedback for [[User:SlashMe/Testpage|my idea]]. --[[User:SlashMe|SlashMe]] ([[User talk:SlashMe|talk]]) 15:54, 2 August 2012 (EDT)
 
 
 
::::::Yes, the data would be loaded from xkcd for each edit. You can, however, substitute (subst) the template for data that is unlikely to change. And therefore the data would indeed be stored statically. I like the layout you've come up with. It could perhaps do with a bit of tweaking here and there, but the general idea is good. --[[User:Yirba|Yirba]] ([[User talk:Yirba|talk]]) 17:16, 2 August 2012 (EDT)
 
 
 
::::::: What kind of tweaking do you mean? I know the code is a bit messy, if you have a better idea, please tell me (or do it yourself - hey, it's a wiki!). The CSS should be placed in an external file, but for now, it's ok. --[[User:SlashMe|SlashMe]] ([[User talk:SlashMe|talk]]) 17:51, 2 August 2012 (EDT)
 
 
 
Looks like there is another/newer template called [[Template:Comic]] that includes prev/next buttons as well.
 
You add it with:
 
<pre>{{comic
 
| number    = 1
 
| date      = September 30, 2005
 
| title    = {{PAGENAME}}
 
| image    = barrel_cropped_(1).jpg
 
| imagesize =
 
| alttext  = Don't we all.
 
}}
 
==Description==
 
xxxxxxxxxxx
 
</pre>
 
No need to include the alt text separately, as the template does it for you.  It also includes the comic category, but only if the first 4 fields are filled out.
 
--[[User:Bpothier|B. P.]] ([[User talk:Bpothier|talk]]) 18:47, 3 August 2012 (EDT)
 
 
 
: Yes, but that is not necessarily an advantage. My template only creates the infobox, so you are still able to create an introductory text or other sections, for special comics that need a more detailed description. I can also add categories if needed. --[[User:SlashMe|SlashMe]] ([[User talk:SlashMe|talk]]) 19:02, 3 August 2012 (EDT)
 
 
 
::I think it is a major advantage to make the thing easier to use and more consistant site-wide.
 
 
 
::As the creator of the new one, I'm obviously biased, but I created it because I think it's better. Not putting your work down, it was a great piece of code that I put to work in my template. But I think if there's need for pre-text of any kind (not sure there is, as the articles probably should all open with the comic itself as presented on XKCD), a pre-comment can be added into the template, but I'm not sure what that would be. Perhaps there would be a requirement for special circumstances like the comic a few weeks ago where there were a million iterations depending on locality, browser, etc. But that's the rarity. I think the new one simplifies it for users. They need only one template to post the comic, alt text title and nav buttons. What could be easier? [[User:TheHYPO|TheHYPO]] ([[User talk:TheHYPO|talk]]) 19:08, 3 August 2012 (EDT)
 
 
 
::: As the creator of the other one, I'm equally biased. What about a "main template", which then calls one or two other templates (e.g. one for the infobox, another for image and alt text? For most comics, this main template could be used, but if absolutely needed, it would still be possible to use the underlying templates with custom sections/text. --[[User:SlashMe|SlashMe]] ([[User talk:SlashMe|talk]]) 19:15, 3 August 2012 (EDT)
 
 
 
::::I just now saw your request for feedback on your new comic page with the sidebar. I honestly am not sure which format is better. I kind of like my format for the fact that it basically presents the comic as it was originally posted, but your infobox does provide some additional stuff like 3D link (not sure what "news" is, of where the "link" comes from but...) Perhaps we could integrate the two. I like that the comic is visble right away on my template, but on your page it's down below the first header. I don't think the comic itself needs an "image" heading. No disrespect, but I think your sidebar, esp. because of the "news" field is a bit chunky - too wide for most of its content.
 
 
 
::::I think we could easily add things like a "3d" link into {{tl|comic}} as part of the next/prev bar where a "3D" field in the template is non-blank. Similarly, original title could read something like (Originally titled: xxxxx) below the primary title in a smaller font. Other than the "link" and "news" fields (which again, I'm not sure what they are), I think that would inclde all the same info as your infobox into my template. Thoughts?
 
 
 
::::As to your other comment about compartmentalizing the template, I have nothing against that, but which parts of the template would you want to be able to use separately (and can you suggest an example where that might be necessary?) Subdividing the template can always be done later if it becomes needed; just trying to get an idea of what you have in mind by compartmentalizing it. Cheers [[User:TheHYPO|TheHYPO]] ([[User talk:TheHYPO|talk]]) 19:43, 3 August 2012 (EDT)
 
 
 
== Main Image ==
 
 
 
The main image (top left) is not the best image ever. You really need to update it.
 
 
 
Maybe:
 
[[File:wiki.png]]
 
 
 
Just an idea, because that text looks weird, or at least please add a transparent background instead of white for the logo (and center the text). --[[User:Grep|Grep]] ([[User talk:Grep|talk]]) 21:39, 1 August 2012 (EDT)
 
 
 
: I like it.  What does everyone else think?  (PS - don't forget to sign your entries on this page!) --[[User:Jeff|Jeff]] ([[User talk:Jeff|talk]]) 21:18, 1 August 2012 (EDT)
 
: I could go with that.  Had been kicking around some ideas, and if I had any artistic aptitude, it might have looked very much like that: the black-hat retort; alternately: the lowercase blue '''xkcd''' that RM uses (sans comic figure watermark) with a "Explain" in a hand-written typeface in some other color splashed across the top left part of those letters.  And yes, definitely with transparency.  Just thoughts... ultimately, whatever the consensus is... [[User:IronyChef|IronyChef]] ([[User talk:IronyChef|talk]]) 01:51, 2 August 2012 (EDT)
 
:: Something like one of the following?
 
::[[File:wiki2.png]][[File:wiki3.png]][[File:wiki4.png]]
 
:: --[[User:Grep|Grep]] ([[User talk:Grep|talk]]) 12:40, 2 August 2012 (EDT)
 
:I like that first one - [[:File:wiki.png]]. And perhaps use that same text for the [[#Robots.txt|Tagline]]? --''[[User:Philosopher|Philosopher]]''&nbsp;<sup>[[User talk:Philosopher|Let us reason together.]]</sup> 19:50, 2 August 2012 (EDT)
 
:Yeah, the first one captures what I was thinking.  I thought I'd download it to tweak it a bit, and quickly proved to myself how unartistic I am.  I was thinking the xkcd pretty much overwhelming the bottom (touching all three sides) and the explain (first typeface) in tight, maybe at a 5 degree angle over the x and k.  Of course envisioning it is one thing, realizing it another (it may be totally unrealistic...) but I toss that out for further consideration. -- [[User:IronyChef|IronyChef]] ([[User talk:IronyChef|talk]]) 00:25, 3 August 2012 (EDT)
 
::Hmmm, rereading Philosopher's comment, I think he and I may have been talking about two different images.  Ooops.  Anyway, was just chatting with a buddy who is more artistic than I am, and he created this mashup.  He suggested: "Establish some vocabulary.  First, xkcd needs to be bigger; it defies describing, and refuses to be pidgeon-holed into a box, so the xkcd needs to be so big that it doesn't fit entirely in-frame ... the Explain part has got to be casual, to represent the wiki and informal nature of contributing to it, and you gotta have it in close, because the contributors are going to get as close as they can to the truth.  And keep it simple."  (I broke with that, and tried to add the black hat; in doing so, I think I trashed transparency, tough)  Anybody think that's worth taking a run with it? -- [[User:IronyChef|IronyChef]] ([[User talk:IronyChef|talk]]) 01:04, 3 August 2012 (EDT)
 
[[File:Explainxkcd-concept.PNG]]
 
<pre>
 
  y
 
  o
 
  u
 
  '
 
w r
 
ei e
 
xkcd
 
piau
 
l um
 
a sb
 
i e
 
n
 
</pre>
 
 
 
== Displaying Comics ==
 
 
 
For the home page, I think the comic and explanation should be displayed instead of a link to the comic.
 
 
 
For reasons unknown to me, I decided to create [[Template:Comicbox]] and [[Template:Comicbox2]]. Looks nice, as long as you use the correct one for the comic.
 
 
 
Go to [[User:Grep/comicbox]] and [[User:Grep/comicbox2]] for examples. --[[User:Grep|Grep]] ([[User talk:Grep|talk]]) 21:03, 2 August 2012 (EDT)
 
:Those're wonderful!  And should probably be on the main page.  If you wanted, we could probably incorporate them (and maybe a third?) into a single template with a "square/vertical or horizontal" switch. --''[[User:Philosopher|Philosopher]]''&nbsp;<sup>[[User talk:Philosopher|Let us reason together.]]</sup> 21:36, 2 August 2012 (EDT)
 
::Also, you used "comicbox" for the class.  Is that a class that's defined somewhere?  (And if so, where?) --''[[User:Philosopher|Philosopher]]''&nbsp;<sup>[[User talk:Philosopher|Let us reason together.]]</sup> 21:36, 2 August 2012 (EDT)
 
:::Good point. Removed. And merging them sounds wonderful. --[[User:Grep|Grep]] ([[User talk:Grep|talk]]) 21:47, 2 August 2012 (EDT)
 
::::Maybe merging them into [[Template:comicbox]]? --[[User:Grep|Grep]] ([[User talk:Grep|talk]]) 21:49, 2 August 2012 (EDT)
 
:::::I think classes are defined at [[MediaWiki:Common.css]], so if you really wanted to define the class....  And [[Template:Comicbox]] would probably be best.  Did you want to merge them or should I take a look at it? --''[[User:Philosopher|Philosopher]]''&nbsp;<sup>[[User talk:Philosopher|Let us reason together.]]</sup> 22:25, 2 August 2012 (EDT)
 
::::::ParserFunctions and any sort of non-XMLish markup is weird. I would rather you look at it. --[[User:Grep|Grep]] ([[User talk:Grep|talk]]) 22:42, 2 August 2012 (EDT)
 
:::::::Okay, I've moved your templates to {{tl|Comicbox square or vertical}} and {{tl|Comicbox horizontal}} so I can work on {{tl|Comicbox}} as the main one.  It may take a while - I like to think of myself as a "[[wikipedia:Category:User template coder|master of all known wikimarkup]]," but I don't actually use those skills that often. --''[[User:Philosopher|Philosopher]]''&nbsp;<sup>[[User talk:Philosopher|Let us reason together.]]</sup> 23:08, 2 August 2012 (EDT)
 
::::::::Thanks. --[[User:Grep|Grep]] ([[User talk:Grep|talk]]) 23:42, 2 August 2012 (EDT)
 
:::::::::I've made it at {{tl|Comicbox}}.  This actually leaves {{tl|Comicbox square or vertical}} and {{tl|Comicbox horizontal}} unused, though I credited you (and them) in a comment at the top of the template.  --''[[User:Philosopher|Philosopher]]''&nbsp;<sup>[[User talk:Philosopher|Let us reason together.]]</sup> 00:21, 3 August 2012 (EDT)
 
::::::::::I think that the explanation should be on the right because it just looks weird as is... --[[User:Grep|Grep]] ([[User talk:Grep|talk]]) 07:42, 3 August 2012 (EDT)
 
{{outdent}} Sure.  But right now they both look like they're on the bottom?  --''[[User:Philosopher|Philosopher]]''&nbsp;<sup>[[User talk:Philosopher|Let us reason together.]]</sup> 20:02, 3 August 2012 (EDT)
 
===Sans-serif typeface===
 
::::::::I like these, too, but the roman typeface... how do folks feel about sticking with a sans-serif typeface throughout the site?  [[User:IronyChef|IronyChef]] ([[User talk:IronyChef|talk]]) 00:13, 3 August 2012 (EDT)
 
:::::::::We should be able to change that wiki-wide through [[MediaWiki:Common.css]], I think.  Unfortunately, I don't know enough CSS to do it. --''[[User:Philosopher|Philosopher]]''&nbsp;<sup>[[User talk:Philosopher|Let us reason together.]]</sup> 00:23, 3 August 2012 (EDT)
 
:::::::::: I believe sans serif is already the default wiki-wide. Those specific instances were deliberately coded to use a serif font. It's just a matter of removing <code>font-family: 'Times New Roman';</code> from the template. --[[User:Waldir|Waldir]] ([[User talk:Waldir|talk]]) 17:01, 3 August 2012 (EDT)
 
::::::::::: Oh, I'd missed that.  I removed it. --''[[User:Philosopher|Philosopher]]''&nbsp;<sup>[[User talk:Philosopher|Let us reason together.]]</sup> 22:14, 3 August 2012 (EDT)
 

Latest revision as of 10:31, 6 August 2012