Template:Pod: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
(try this)
(pod link with redirect)
Line 1: Line 1:
<noinclude>
<noinclude>
Use this template like this:
Use this template like this:
  <nowiki>{{pod|Amanda/Changer|Amanda::Changer}}</nowiki> -> {{pod|Amanda/Changer|Amanda::Changer}}
  <nowiki>{{pod|Amanda::Changer}}</nowiki> -> {{pod|Amanda::Changer}}
<nowiki>{{pod|Amanda/Changer}}</nowiki> -> {{pod|Amanda/Changer}}
<nowiki>{{pod|Amanda/Changer}}</nowiki> -> {{pod|Amanda/Changer}}
  <nowiki>{{pod}}</nowiki> -> {{pod}}
  <nowiki>{{pod}}</nowiki> -> {{pod}}
Do '''not''' use
</noinclude>[http://wiki.zmanda.com/pod/redirect.php?pod={{{1}}} {{{1}}}]<noinclude>
<nowiki>{{pod|Amanda::Changer}}</nowiki>
Note that the contents of <tt>redirect.php</tt> are:
because it won't work.
<pre>
</noinclude>[http://wiki.zmanda.com/pod/{{#if:{{{1}}}|{{{1}}}.html {{#if:{{{2}}}|{{{2}}}|{{{1}}}.pm}}}}]
<?php
if ($_GET['pod']) {
        header("Location: /pod/" . str_replace("::", "/", $_GET['pod']) . ".html");
} else {
        header("Location: /pod/");
}
</pre>
</nowiki>

Revision as of 19:41, 26 June 2008

Use this template like this:

{{pod|Amanda::Changer}} -> Amanda::Changer
{{pod}} -> {{{1}}}

{{{1}}} Note that the contents of redirect.php are:

<?php
if ($_GET['pod']) {
        header("Location: /pod/" . str_replace("::", "/", $_GET['pod']) . ".html");
} else {
        header("Location: /pod/");
}

</nowiki>