User:Spblat

Setting up Portals in a Wiki


Having trouble. I'm almost there. The problem is was that the boxes created by the templates exclude the text that's supposed to go inside them. See screenshot. I suspect that some code somewhere is noticing that Portal:Box-header is missing a closing "&lt;/div&gt;" at the end, and is (un)helpfully adding it. So Portal:Box-footer provides a redundant "&lt;/div&gt;".

I've been thrashing against this all morning. Please help!

SOLVED!

Search is our friend. http://www.mwusers.com/forums/showthread.php?t=1755&highlight=Portal

Solution summary:


 * Create this file (wiki directory)/extensions/tidy/tidy.config with the following contents:
 * 1) html tidy (http://tidy.sf.net) configuration
 * 2) tidy - validate, correct, and pretty-print HTML files
 * 3) see: man 1 tidy, http://tidy.sourceforge.net/docs/quickref.html

show-body-only: yes force-output: yes tidy-mark: no wrap: 0 wrap-attributes: no literal-attributes: yes output-xhtml: yes numeric-entities: yes enclose-text: yes enclose-block-text: yes quiet: yes quote-nbsp: yes fix-backslash: no fix-uri: no
 * Add "$wgUseTidy = true;" to LocalSettings.php

LocalSettings.php edits
Without the presence of a "Portal" namespace which has subpages enabled, the template wikitext doesn't work. So set up a namespace for your portals.

$wgExtraNamespaces = array(100 => "Portal",            101 => "Portal_Talk"             );

$wgNamespacesWithSubpages = array(       NS_MAIN           => true,        NS_TALK           => true,        NS_USER           => true,        NS_USER_TALK      => true,        NS_PROJECT_TALK   => true,        NS_IMAGE_TALK     => true,        NS_MEDIAWIKI_TALK => true,        NS_TEMPLATE_TALK  => true,        NS_HELP_TALK      => true,        NS_CATEGORY_TALK  => true );

$wgNamespacesWithSubpages[100] = 1;

Creating templates (initial wiki setup)
This all comes from w:en:Wikipedia:Portal/Instructions.
 * Create Template:Box portal skeleton (example)
 * Create Portal:Box-header (example)
 * Create Portal:Box-footer (example)
 * Create Template:Purgepage (example)

Creating a new portal

 * Create Portal:Test with
 * Create Portal:Test/box-header from w:en:Wikipedia:Portal/Instructions
 * Create Portal:Test/box-footer from w:en:Wikipedia:Portal/Instructions
 * Click the edit links to populate the boxes