MU Soapbox

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Muxify
    • Mustard

    MediaWiki Log Template

    How-Tos
    templates tutorials mediawiki
    2
    5
    4037
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Quibbler
      Quibbler last edited by Quibbler

      Here is a log template. It is essentially Eldritch's log template as of 2015-04-14, minus some styling.

      For this to all work, you're gonna need these three extensions:

      • Dynamic Page List (third party) from https://www.mediawiki.org/wiki/Extension:DynamicPageList_(third-party)
      • Parser Functions from https://www.mediawiki.org/wiki/Extension:ParserFunctions
      • Variables from https://www.mediawiki.org/wiki/Extension:Variables

      We're actually going to set up four templates in total.

      Template:! just contains a pipe, |. That's it. Just put the | in and you're done.
      Template:LB just contains [[. No punctuation, just the two characters.
      Template:RB is just ]]. Same as above.

      Those three templates allow us to use the parser code in the categories without fucking it up.

      And now, Template:Log. This is garishly coloured to be more helpful as a tutorial. If you don't want the explanation and teachable moment, skip to the next post and C&P that.

      Copy and paste the following:

      __NOEDITSECTION__ __NOTOC__
      {| width="70%" style="background: yellow"
      | style="width: 100%; text-align: center; background: orange" |
      <div style="text-transform: capitalize">
      <div style="font-size: 1.3em; background: limegreen">{{{title}}}</div>
      
      <div style="font-style: italic; background: lime">{{{subtitle}}}</div>
      </div>
      <br>
      {| style="width: 100%; text-align: left; background: mediumseagreen"
      |- style="width: 40%; font-weight: bold; background: mediumaquamarine" |
      | Cast
      | style="width: 60%; text-align: right; font-weight: bold" | {{{gamedate}}}
      |- valign="top" style="padding-right: 300px; background: mediumturquoise"
      | {{{cast}}}
      <br>
      | valign="top" style="padding-left: 20px; background: paleturquoise" | <div style="float: right">{{{summary}}}</div>
      <br>
      |-
      | 
      |- 
      | colspan="2" style="border-bottom: 1px solid gray; font-weight: bold; background: skyblue" | {{{location}}}
      |-
      | colspan="2" style="text-indent: 21px; background: powderblue" | 
      {{{log}}}
      |}
      |}
      
      [ [Category:RP Logs]]
      {{#ifeq: {{{categories| }}} | | | [ [Category:{{#dplreplace:{{{categories}}}|,| &nbsp;Logs{{!}}{{BASEPAGENAME}}{{RB}}{{LB}}Category: }} Logs{{!}}{{BASEPAGENAME}} ]] }}
      

      Careful with the category code above. The forum likes to eat square brackets that are next to each other, so it had to be faked out with an extra space between the left square brackets. They should be snuggied up to each other as usual for this to work.

      This is what that looks like:

      tutorial image

      Holy shit, that's ugly.

      Going section by section:

      1. outer template table – yellow
        We didn't want the log to take up the whole page, width-wise, so the table is set to occupy only 70% of the page.
      2. inner template table – orange
        The stuff in the yellow table. This is set to 100%, because we want the log information and log to take up with whole width of the table. The text is aligned in the center because that's where we want the title and subtitle to be.
      3. title – limegreen
        The title, centered, with a larger font size.
      4. subtitle - lime
        The log's subtitle, italicized.
      5. log info section and log – mediumseagreen
        A new table nested inside the orange one.
      6. text: cast – mediumaquamarine
        This table cell takes up 40% of the table row and it's just the word 'cast' in bold. This part of the template never changes. It doesn't have to say 'cast'; it could be 'dramatis personae' or even 'list of shitfucks who appear in this log', though I can't promise that last one wouldn't be too crammed looking.
      7. gamedate – palegreen
        This is where the variable gamedate in the log template shows up, tucked over to the right. It takes up the other 60% of the table row with section 6 – cast. The text is bolded.
      8. cast list – mediumturquoise
        Left-aligned again, nothing special. A bit of padding (300px) from the right side. This is just in case the log has a long cast list, so it doesn't bump up against the edge of section 9 – summary. That would look cramped, if the summary took up more than one line. Some fuckers are verbose, man. It is 40% of the table row's width because it's the cell under 6 – cast. If we didn't put 'valign=top' in there, the cast list would be centered vertically in this cell, which would suck ass.
      9. summary – paleturquoise
        This section of the table is floated to the right. The end of the text will always meet the right edge of the table cell, which makes the table look cleaner. There's a bit of padding (20px) to the left just to make sure things don't get cramped with the cast list. Again, 'valign=top' is there to keep the text up at the top instead of hanging out in the middle vertically.
      10. location – skyblue
        Another call for a variable field taking up the whole width of the table. It spans both columns above, hence 'colspan=2'. Border-bottom adds that line under the location cell.
      11. actual log – powderblue
        It also spans both columns of the table since it is styled 'colspan=2'. There's a text indent of 21px to the left.

      After that, we end the table that makes up section 5 – log info section and log. Under that, we end the whole table.

      Under that is the categories bullshit you need those extensions for. Just don't fucking touch it, it's how the variable log categories get added to the bottom of the log.

      The template you load the log into looks like so:

      {{ Log
      | title = 
      | subtitle = 
      | cast = 
      | summary = 
      | categories = 
      | location = 
      | log = 
      }}
      

      It is used like so:

      • Title is the scene name, so you don't get stuck with the scene's date prepending the title.
      • Subtitle is optional.
      • Cast should include the names of the people in the scene and links to their wiki pages, if applicable, separated by commas.
      cast = [[Bob]], [[Jim]], [[Clancy]]
      
      • Summary is a short explanation of the contents of the log; can also be the TL;DR version.
      summary = Bob and his brother Jim meet Clancy for a cup of coffee and a game of knuckles.
      
      • Categories are the sphere categories pertinent to the log. The template adds 'RP Logs' automatically. Just list the spheres with commas between them; the template will add 'Logs' automatically after each sphere category.
      categories: Vampire, Demon
      
      • Location is the grid square where the scene takes place, if applicable, or even the name of the establishment where the scene takes place.
      location = [[DT1]] or
      location = [[DT1|The Siren]] or even
      location = Paris, France
      
      • Log is where the entirety of the log goes. Step one: cut. Step two: paste. Step three: profit.
      log = It was a dark and stormy night. Clancy is already waiting for Bob and Jim, his knuckles wrapped with masking tape from which shards of glass protruded. Clancy played knuckles to win.
      

      If you want the logs to sort by date with this template, you have to have the date as the beginning of the log page. For example, for a log called 'Knuckles' that takes place on March 23rd of 2015:

      Logs:(2015-03-23) Knuckles
      Logs:2015-03-23 – Knuckles
      Logs:2015_03_23__Knuckles

      ...Or whatever, as long as everyone uses the same format to name their logs.

      Ebla@The Reach's 'gamedate' field is different from mine, if you take a look at it. It's full of code. I don't know how that one works. I tried to figure it out and failed, and that's why my version of organizing logs chronologically is ghetto. Sorry.

      ETA: Edited by @Glitch at request of author.

      Quibbler 1 Reply Last reply Reply Quote 1
      • Quibbler
        Quibbler @Quibbler last edited by Quibbler

        You probably don't want your log template to look like it got splattered by a fucking rainbow, so here's the template sans background colours:

        __NOEDITSECTION__ __NOTOC__
        {| width="70%"
        | style="width: 100%; text-align: center " |
        <div style="text-transform: capitalize">
        <div style="font-size: 1.3em">{{{title}}}</div>
        
        <div style="font-style: italic">{{{subtitle}}}</div>
        </div>
        <br>
        {| style="width: 100%; text-align: left"
        |- style="width: 40%; font-weight: bold" |
        | Cast
        | style="width: 60%; text-align: right; font-weight: bold" | {{{gamedate}}}
        |- valign="top" style="padding-right: 300px"
        | {{{cast}}}
        <br>
        | valign="top" style="padding-left: 20px; text-align: justify" | <div style="float: right">{{{summary}}}</div>
        <br>
        |-
        | 
        |- 
        | colspan="2" style="border-bottom: 1px solid gray; font-weight: bold" | {{{location}}}
        |-
        | colspan="2" style="text-indent: 21px" | 
        {{{log}}}
        |}
        |}
        
        
        [ [Category:RP Logs]]
        {{#ifeq: {{{categories| }}} | | | [ [Category:{{#dplreplace:{{{categories}}}|,| &nbsp;Logs{{!}}{{BASEPAGENAME}}{{RB}}{{LB}}Category: }} Logs{{!}}{{BASEPAGENAME}} ]] }}
        

        Careful with the category code above. The forum likes to eat square brackets that are next to each other, so it had to be faked out with an extra space between the left square brackets. They should be snuggied up to each other as usual for this to work.

        Quibbler 1 Reply Last reply Reply Quote 3
        • Quibbler
          Quibbler @Quibbler last edited by

          This is probably clunkier than it has to be, so if you have suggestions, let's see 'em.

          Also maybe I should have put it in How-Tos.

          1 Reply Last reply Reply Quote 1
          • Glitch
            Glitch last edited by

            Moved to How-Tos.

            Quibbler 1 Reply Last reply Reply Quote 0
            • Quibbler
              Quibbler @Glitch last edited by

              @Glitch - Why is it eating the square brackets down in the category code? I'm not having any luck with unicode.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post