User:Lykerok/Template:Auto

< User:Lykerok

Template Auto automatically performs actions such as AutoStub. and may others if certain parameters are set. This template should therefore be put on Every Page excluding Talk/UserTalk/CatTalk/Etc, Category, Template and user pages. AutoStub is always on by default, and there should be no need to turn it off.

Contents

Parameters

As default, most of these are automatically set as True but can be changed by different Parameters. These go like this: {{Stub|Parameter=Value|NextParameter=Value}} and so on. Here is a list of currant and future parameters.


    AutoCat

    Automatically Categorizes Pages on their keywords. Off by default. Turn on by |AutoCat=On

    AutoStub

    AutoStub automatically Stubs a page if it is under 750 bytes. This can be changed by going to Template:LocalSettings/AutoStub Size and editing the number. Parameters to turn off: |AutoStub=Off

    Behaviour

    |Behavior=NoGallery
    No gallery on category pages.

    |Behavior=NoEditSection
    Disables the edit links next to sections/headers.

    Keywords

    An important Parameter! Just put in Keywords for the page (Such as Treasure for a Treasure page) separated by commas and this does various functions with it. Supports 10 Keywords.

    Example: {{Auto|Keywords=One,Two,Three,Treasure,Dogs,Foo}}

    TOC

    Adds a TOC, removes a TOC, or aligns a TOC. Possible parameters ONLY USE ONE: (Remove the bits in () and the - )
    |Toc=No - (No Table of Contence)
    |Toc=Yes - (Table of Contence, not used often)
    |Toc=Left - (TOC is on the left)
    |Toc=Right - (TOC is on the right)

Code

Uncompressed

Uncompressed code is easier to edit and understand, but may leave white space. Better to compress it.

<!--- V. 0.2.5BETA --->
{{#ifeq: {{{AutoStub}}} | Off ||{{AutoStub}}}}
{{#switch: {{{Behavior}}}
|NoGalery = __NOGALLERY__
|NoEditSection = __NOEDITSECTION__
}}
{{#ifeq: {{{Keywords}}} | {{{Keywords}}} | |}}
{{#ifeq: {{{AutoCat}}} | On | {{#if: {{{Keywords|}}} |
  {{Cat|{{#explode: {{{Keywords}}} | , | 0}}}}
  {{Cat|{{#explode: {{{Keywords}}} | , | 1}}}}
  {{Cat|{{#explode: {{{Keywords}}} | , | 2}}}}
  {{Cat|{{#explode: {{{Keywords}}} | , | 3}}}}
  {{Cat|{{#explode: {{{Keywords}}} | , | 4}}}}
  {{Cat|{{#explode: {{{Keywords}}} | , | 5}}}}
  {{Cat|{{#explode: {{{Keywords}}} | , | 6}}}}
  {{Cat|{{#explode: {{{Keywords}}} | , | 7}}}}
  {{Cat|{{#explode: {{{Keywords}}} | , | 8}}}}
  {{Cat|{{#explode: {{{Keywords}}} | , | 9}}}}
 }}
}}
{{#ifeq: {{{Toc}}} | No | __NOTOC__ }}
{{#ifeq: {{{Toc}}} | Yes | __TOC__ }}
{{#ifeq: {{{Toc}}} | Left | {{LeftTOC}} }}
{{#ifeq: {{{Toc}}} | Right | {{RightTOC}} }}

Compressed

Compressed code makes white spaces minimal. However, it makes it tough to edit and understand.

<!--- V. 0.2.5BETA --->{{#ifeq: {{{AutoStub}}} | Off ||{{AutoStub}}}}{{#switch: {{{Behavior}}}
|NoGalery = __NOGALLERY__|NoEditSection = __NOEDITSECTION__}}{{#ifeq: {{{ZDex}}} | On |__NOEDITSECTION__}}{{#ifeq: {{{Keywords}}} | {{{Keywords}}} | |}}{{#ifeq: {{{AutoCat}}} | On | {{#if: {{{Keywords|}}} |{{Cat|{{#explode: {{{Keywords}}} | , | 0}}}}{{Cat|{{#explode: {{{Keywords}}} | , | 1}}}}{{Cat|{{#explode: {{{Keywords}}} | , | 2}}}}{{Cat|{{#explode: {{{Keywords}}} | , | 3}}}}{{Cat|{{#explode: {{{Keywords}}} | , | 4}}}}
  {{Cat|{{#explode: {{{Keywords}}} | , | 5}}}}{{Cat|{{#explode: {{{Keywords}}} | , | 6}}}}{{Cat|{{#explode: {{{Keywords}}} | , | 7}}}}{{Cat|{{#explode: {{{Keywords}}} | , | 8}}}}{{Cat|{{#explode: {{{Keywords}}} | , | 9}}}}}}}}{{#ifeq: {{{Toc}}} | No | __NOTOC__ }}{{#ifeq: {{{Toc}}} | Yes | __TOC__ }}{{#ifeq: {{{Toc}}} | Left | {{LeftTOC}} }}{{#ifeq: {{{Toc}}} | Right | {{RightTOC}} }}