Difference between revisions of "User:Bry/Create show page helper"

From JoCopedia
Jump to navigation Jump to search
(spaghetti code - oh, it hurts my eyes)
Line 1: Line 1:
 +
<noinclude>
 +
All right, use parameters
 +
* date: Date of show (any reasonable numeric format, actually, is okay, as long as month comes before day)
 +
* city: Location (MUST USE UNDERSCORES)
 +
 +
Generates two links:
 +
* The first takes you to a new page for that show, with the stuff in [[User:Bry/Shows template helper]] preloaded. That's an entirely different kludge, but it's got the contents of a show page set up.
 +
* The second takes you to the page that we have to make into a redirect -- you have to manually put in the "#REDIRECT" part.
 +
 +
This is not elegantly handled at all, but it's at least handled.
 +
</noinclude>
 +
 
<includeonly>
 
<includeonly>
 
{{#if: {{{pagename|}}}
 
{{#if: {{{pagename|}}}
Line 5: Line 17:
  
 
{{#if: {{{date|}}}
 
{{#if: {{{date|}}}
   | [[Shows calendar/Calendar "Shows calendar" {{#time: (n-j-Y) | {{{date}}}}} - Event 1]]
+
   | {{#if: {{{city|}}}
    {{#if: {{{city|}}}
 
 
       | [http://www.jonathancoulton.com/wiki/index.php?title={{{city}}}:_{{#time: Y-m-d | {{{date}}}}}&action=edit&preload=User:Bry/Shows_template_helper {{{city}}}:_{{#time: Y-m-d | {{{date}}}}}]
 
       | [http://www.jonathancoulton.com/wiki/index.php?title={{{city}}}:_{{#time: Y-m-d | {{{date}}}}}&action=edit&preload=User:Bry/Shows_template_helper {{{city}}}:_{{#time: Y-m-d | {{{date}}}}}]
 
     }}
 
     }}
 +
  [[Shows calendar/Calendar "Shows calendar" {{#time: (n-j-Y) | {{{date}}}}} - Event 1]]
 
}}
 
}}
  
 
</includeonly>
 
</includeonly>

Revision as of 16:46, 7 May 2008

All right, use parameters

  • date: Date of show (any reasonable numeric format, actually, is okay, as long as month comes before day)
  • city: Location (MUST USE UNDERSCORES)

Generates two links:

  • The first takes you to a new page for that show, with the stuff in User:Bry/Shows template helper preloaded. That's an entirely different kludge, but it's got the contents of a show page set up.
  • The second takes you to the page that we have to make into a redirect -- you have to manually put in the "#REDIRECT" part.

This is not elegantly handled at all, but it's at least handled.