Template:ImageLinkTV: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
(changing one class to id)
Tag: sourceedit
m (Giving these templates their own CSS ID.)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!--  
<!--  


A few words about philosophy.  The first part of this template -- that is, the bit that works on category pages, looks for the third-to-last word in the category page title.  This is because all these categories should be in the format "<story name> media something images".  So, TV story image, comic story images, CON episode images, whatever.  All you have to do is simply change the result based on whether it detects "TV", "CON", "comic" or what have you.  The only thing doesn't work for is the TVM.  Thus, the second switch here really is just checking for the TVM.  If later on down the line we find other exceptions, we can add them to the second switch (that is, the one immediately after Category=).  Don't think there will be other exceptions, but there's an allowance for it, anyway.
A few words about philosophy.  The first part of this template -- that is, the bit that works on category pages, looks for the third-to-last word in the category page title.  This is because all these categories should be in the format "<story name> media something images".  So, TV story image, comic story images, CON episode images, whatever.  All you have to do is simply change the result based on whether it detects "TV", "CON", "comic" or what have you.  


--><includeonly>{{#switch:{{NAMESPACE}}
--><includeonly>{{#switch:{{NAMESPACE}}
|Category={{#switch:{{PAGENAME}}
|Category={{#switch:{{PAGENAME}}
|Doctor Who (1996) TV story images=<div id="license"><div id="ssh">The images below come from, or are related to, the [[Doctor Who universe|''Doctor Who'' universe]] televised story, [[Doctor Who (1996)|''Doctor Who'' (1996)]].</div>
<div id=ss>If you see images below which '''have ''nothing'' to do with''' [[Doctor Who (1996)|''Doctor Who'' (1996)]] please remove them. </div></div>
|#default={{#switch:{{#explode:{{PAGENAME}}| |-3}}
|#default={{#switch:{{#explode:{{PAGENAME}}| |-3}}
|TV=<div id="license"><div id="ssh">The images below come from, or are related to, the [[Doctor Who universe|''Doctor Who'' universe]] televised story, ''[[{{#replace:{{PAGENAME}}|TV story images|(TV story)}}|{{#replace:{{PAGENAME}}|TV story images|}}]]''</div>
|TV=<div id="license"><div id="ssh">The images below come from, or are related to, the [[Doctor Who universe|''Doctor Who'' universe]]-related televised story, ''[[{{#replace:{{PAGENAME}}|TV story images|(TV story)}}|{{#replace:{{PAGENAME}}|TV story images|}}]]''</div>
<div id=ss>If you see images below which '''have ''nothing'' to do with''' ''[[{{#replace:{{PAGENAME}}|TV story images|(TV story)}}|{{#replace:{{PAGENAME}}|TV story images|}}]]'' please remove them. </div></div>
<div id=ss>If you see images below which '''have ''nothing'' to do with''' ''[[{{#replace:{{PAGENAME}}|TV story images|(TV story)}}|{{#replace:{{PAGENAME}}|TV story images|}}]]'' please remove them. </div></div>
|CON=<div id="license"><div id="ssh">The images below come from the ''[[Doctor Who Confidential]]'' episode, ''[[{{#replace:{{PAGENAME}}|CON episode images|(CON episode)}}|{{#replace:{{PAGENAME}}|CON episode images|}}]]''</div>
|CON=<div id="license"><div id="ssh">The images below come from the ''[[Doctor Who Confidential]]'' episode, ''[[{{#replace:{{PAGENAME}}|CON episode images|(CON episode)}}|{{#replace:{{PAGENAME}}|CON episode images|}}]]''</div>
<div id=ss>If you see images below which '''did not''' come from ''[[{{#replace:{{PAGENAME}}|CON episode images|(CON episode)}}|{{#replace:{{PAGENAME}}|CON episode images|}}]]'' please remove them. </div></div>}}<!--This ends the switch for the default condition-->  
<div id=ss>If you see images below which '''did not''' come from ''[[{{#replace:{{PAGENAME}}|CON episode images|(CON episode)}}|{{#replace:{{PAGENAME}}|CON episode images|}}]]'' please remove them. </div></div>}}<!--This ends the switch for the default condition-->  
}}<!--This ends the DW 1996 switch-->
}}<!--This ends the DW 1996 switch-->
|#default=<div id="stub-type">{{#switch:{{#explode:{{PAGENAME}}|(|1}}
|#default={{#switch:{{#explode:{{PAGENAME}}|(|1}}
|TV story)=<div id="stub-type">[[File:ImagesAvailable.png|link=:Category:{{#replace:{{PAGENAME}}|(TV story)|}} TV story images]]</div>
|TV story)=<div class="stub-type" id="image-link">[[File:ImagesAvailable.png|link=:Category:{{#replace:{{PAGENAME}}|(TV story)|}} TV story images]]</div>
|1996)=<div class="stub-type">[[File:ImagesAvailable.png|link=:Category:{{#replace:{{PAGENAME}}|(1996)|}} (1996) TV story images]]</div>
|1996)=<div class="stub-type" id="image-link">[[File:ImagesAvailable.png|link=:Category:{{#replace:{{PAGENAME}}|(1996)|}} (1996) TV story images]]</div>
|CON episode)=<div id="stub-type">[[File:ImagesAvailable.png|link=:Category:{{#replace:{{PAGENAME}}|(CON episode)|}} CON episode images]]</div>}}</div>}}</includeonly><noinclude>{{documentation}}[[Category:category templates]][[Category:Image link templates]]{{lock}}</noinclude>
|CON episode)=<div class="stub-type" id="image-link">[[File:ImagesAvailable.png|link=:Category:{{#replace:{{PAGENAME}}|(CON episode)|}} CON episode images]]</div>}}}}</includeonly><noinclude>{{documentation}}[[Category:category templates]][[Category:Image link templates]]{{lock}}</noinclude>

Latest revision as of 20:23, 2 April 2024

Instructions for {{ImageLinkTV}}
{{ImageLinkTV}}, formerly known as {{StoryImages}}, is a template that works differently in different namespaces. In the category namespace it provides a link to the story page from which the images are drawn. In the main namespace, it provides a little tag that looks. Users can then click on that image and go to the relevant category of images.

Usage

Usage is easy. Just place {{ImageLinkTV}} on both the story page and the related category page. So, you'd put {{ImageLinkTV}} on both Castrovalva (TV story) and Category:Castrovalva TV story images.

Example

ImagesAvailable.png

It's impossible to show all that this template does in the template namespace, because it's not designed to work in this namespace. But the tag which is displayed on a story page is shown at right.

Template classification

This template is deliberately classified as "unknown" so that it will show up on a variety of devices, including phones. This is different from the policy used for the similar-looking stub tags, which we class as "notice" templates.

See also

  • {{ImageLink}}, a similar template that works for people, things and concepts.
  • {{ImageLinkComics}}, a similar template that works for comic stories
LockedTab.png