Community Central
Community Central
Forums: Index Community Central Forum Italic article titles
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Archive
Note: This topic has been unedited for 4999 days. It is considered archived - the discussion is over. Information in this thread may be out of date. Do not add to unless it really needs a response.


I'm trying to make some of the WikiGardener article titles (specifically the species and genera, particularly of diseases). There is code in Wikipedia here, but having reproduced it in WikiGardener (here) and applied it here it doesn't appear to work. But I can't see that the template calls anything that isn't already built into Wikigardener. Your thoughts? OllieMartin 14:28, August 4, 2010 (UTC)

You didn't copy "Template:Italic title/doc" from Wikipedia. Now you gotta copy some more templates, sorry! --Jeffwang16 (Talk) (Contributions) (Email me!) 14:49, August 4, 2010 (UTC)
Missing the String templates. If when you preview after copying awikipedia (or other template you have red template linked at the bottom of the page it is calling them as well.
Be careful with wikipedia docs as they often call lots of stuff that IS NOT Needed as well by the actual template they are linked with. I found this out the 'hard way' copying an ever increasing number of templates and not fixing the real problem one. Disable the doc one temporarily in the main template (comment its link out) then add the missing templates needed by the actual template. - BulldozerD11 15:00, August 4, 2010 (UTC)

Okay, scrap that plan. New idea: Does anyone know how to make article titles italic WITHOUT copying 16,000,000 templates from Wikipedia? I'd do it, but as BulldozerD11 said, I'm copying template after template after template and only getting to dead-ends.OllieMartin 16:05, August 4, 2010 (UTC)

We have a template here that causes the first letter of an article to be lowercase if needs be. I don't know if you could use it as a starting point for the italics. Hope that helps. ---- Willie - HtS 16:01, August 4, 2010 (UTC)
That template looks so simple, but I can't understand why this doesn't work: {{DISPLAYTITLE:{{#if:{{NAMESPACE}}|{{NAMESPACE}}:|}} ''{{PAGENAME}}'' }} OllieMartin 16:19, August 4, 2010 (UTC)



option 1
I have some really simple js.
If you put this in your MediaWiki:Common.js:
if ( document.getElementById('TitleItalic') ) {
$('.firstHeading').css('font-style','italic');
}
Then create a template with the following:
<div id=TitleItalic"></div>
You'd just have to call that template on whatever page whose title you want to make italic (that js is based off my title rewrite js found here.
Of course though, the possibilities don't end there.
option two
If you want more functionality in this, you want to be able to give the article other styling or even rewrite their titles to be something they're not, the section of our wiki's common.js with the title rewrite bit would be more apt for you to copy. If you choose this route, which gives you even more features than just italics, then see w:c:avatar:template:title.
option three
Or, if you only want to apply italics to a couple pages, or all pages on the wiki in the main namespace or all namespaces, then pure CSS would be the best solution. Depending on how many pages you'd want it to affect, the css selector would be different.
In mediawiki:common.css:
for all pages:
.firstheading { font-style:italic; }
for just the pages called "Flower" and "Gnome":
.page-Flower .firstheading, .page-Gnome .firstheading { font-style:italic; }
all pages in the main namespace:
.ns-0 .firstheading { font-style:italic; }

(I'm not sure how fluent in css you are, if you understand how to determine selectors you'll be ok)

option four
the display title thing you're trying to do was disabled by wikia by default. this perhaps is the most optimal solution: simply send a request to Wikia and ask that they enable your usage of displaytitle at your wiki and explain why, etc. You will then be able to use it if they enable it.
Those are a few option for you to choose from. If you only want italics to apply to random pages, then I suggest the first option. The second option is good if you maybe want to be able to have some more features later. The third is best if you are only doing it to a certain amount of pages, and that you don't need to regularly add new ones. The template is best if you need to be able to add italics to a lot of pages. Good luck, talk page me if you need help with any of the above or if anything wasn't clear. Of course, the last one is usually a good choice. Cheers :) Joey (talk) 16:42, August 4, 2010 (UTC)
Thanks for the solutions, a pretty all-encompassing response there! I do need to add it to a few pages, but I think option one looks like it'll have the best effect for effort. Appreciate your help. OllieMartin 21:34, August 4, 2010 (UTC)

(Edit conflict) Ollie I'm was just 'infoming you' its not just one template & often the Doc page calls a lot of others (i'm not saying dont try it). I dont know of a way of finding out how many are linked. some such as template wrap (which was in red in the doc page) are used by many other templates and are usefull. Others are actually only redirects. (The worst one i had is 1000+ and counting sub-templates connected with template {Convert} so do steer clear of that one).

There are about 6 str xxxx templates used by it (that i can see) the problem bit can be the doc pages if not 'cleaned up' of some of the non relevant stuff (or cheat and place a link in a dummy doc page to point to wikipedia for more info about the template and create your own short usage section). I have successfully copied some of these to my wiki - BulldozerD11 17:17, August 4, 2010 (UTC)

As always, thanks for your help Bulldozer OllieMartin 21:34, August 4, 2010 (UTC)