Jump to content

Portal:English football/Instructions/Advanced

From Wikipedia, the free encyclopedia

This page gives advanced instructions for users who wish to know how Portal:English football works and what each template does.

Sections

[edit]

Top

[edit]

The majority of the Top section is the same across all Portal tabbed pages. The elements are as follows -

The {{browsebar}} displays the main Portal categories, as per the Portal Manual of Style - this should appear at the top of each page.

The {{Sports portal browsebar}} displays the child portals of Portal:Sports and games - this should appear at the bottom of the page.

{| width="100%" cellpadding="5" cellspacing="5" style="background:#f0fff0; border-style:solid; border-width:1px; border-color: #ADDFAD; border-top:0;" | valign="top" style="padding: 0; margin:0;" | is the table style for the whole portal. Here the colours of the portal are defined. border-top:0; ensures that there is no top border for the best tab display.

Content

[edit]

All content is either called from a static page or is displayed randomly from a pre-configured selection.

Static

[edit]

Static content elements take the form -
{{/box-header|The English football Portal|Portal:English football/Header|}} {{Portal:English football/Header}} {{/box-footer|}}

{{/box-header}} is the template that controls the appearance of the top of each displayed box. Different colours can be set by editing Portal:English football/box-header. {{/box-footer}} is the template that controls the appearance of the bottom of the box including any "read more" links. It can be edited at Portal:English football/box-footer.

Boxes are constructed as below -

{{/box-header| 1 | 2 }}
{{   3   }}
{{/box-footer| 4 }}

Where -

  1. is the Title of the box as displayed on the portal
  2. is the name of the page users are sent to when clicking on edit, you can leave this out if you want but you must keep the pipe (|) or the template will break
  3. is the actual content to be displayed
  4. is a wikilink to an archive or a link in the form of [[Football in England|Read more..]]. Again, this can be left out but you must keep the pipe character.

One part of the portal that excludes these rules is the birthdays. These are updated from a daily queue found at that page, which should be filled in the near future.

Random

[edit]

Random content is displayed using Template:random portal component. This calls a random sub-article from a list and takes the form below - {{Random portal component|max=25|seed=29|header=Selected article|subpage=Selected article}} Where -

max=25 - tells the component that the maximum amount of sub-pages to choose from is 25
seed=29 - gives the component its value for randomness this should be different for every use of this template to stop it displaying the same articles together too often
header= - the displayed box Title
subpage= - the subpage where the list of articles is located

The template will automatically use the values from box-header and box-footer when it chooses new content.

When using any random element the following code should be added to a page -
<div style="text-align:center; margin:-7px; padding-bottom:12px;">{{purge|'''Show new selections'''}}</div>
This generates the following -

Clicking this link purges the pages cache and shows new random selections.

Columns

[edit]

Columns are created with the following code -

<div class="portal-column-left-wide">
...left column content...
</div>

<div class="portal-column-right-narrow">
...right column content...
</div>

The two values when added together should equal 99%, this is to keep the columns inside the main portal border. Column widths are important when considering viewers on screen resolutions of 800x600, 60% is the minimum column width that allows those users to view the Selected picture box without it breaking out of its border.

Anything after the final </div> will display across the page and not in a column.

Bottom

[edit]

The bottom of the main portal page uses the following -

<div style="clear:both; width:100%">
{{portals}}
<center><small>{{purge|''Purge page cache''}}</small></center>
</div>

This is only necessary for the main page, other tabs only need {{portals}} placed on them at the bottom as per the MoS.