Template:PodV: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
(Created page with '<noinclude> Use this template like this: <nowiki>{{PodV|3.2|8|amadmin}}</nowiki> -> {{PodV|3.2|8|amadmin}} </noinclude>[http://wiki.zmanda.com/pod/{{{1}}}/{{{3}}}.{{{2}}}.html {…')
 
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
Use this template like this:
Use this template like this:
  <nowiki>{{PodV|3.2|8|amadmin}}</nowiki> -> {{PodV|3.2|8|amadmin}}
  <nowiki>{{podv|3.2|Amanda::Changer}}</nowiki> -> {{podv|3.2|Amanda::Changer}}
</noinclude>[http://wiki.zmanda.com/pod/{{{1}}}/{{{3}}}.{{{2}}}.html {{{3}}}({{{2}}})]
<nowiki>{{podv|3.2}}</nowiki> -> {{podv|3.2}}
</noinclude>[http://wiki.zmanda.com/pod/redirect.php?pod={{{2}}}&version={{{1}}} {{{2}}}]<noinclude>
Note that the contents of <tt>redirect.php</tt> are:
<pre>
<?php
if ($_GET['pod'] and $_GET['version']) {
        header("Location: /pod/" . $_GET['version'] . "/" . str_replace("::", "/", $_GET['pod']) . ".html");
} else if ($_GET['version']) {
        header("Location: /pod/" . $_GET['version'] . "/");
} else if ($_GET['pod']) {
        header("Location: /pod/" . str_replace("::", "/", $_GET['pod']) . ".html");
} else {
        header("Location: /pod/");
}
</pre>
</noinclude>

Revision as of 13:33, 26 November 2010

Use this template like this:

{{podv|3.2|Amanda::Changer}} -> Amanda::Changer
{{podv|3.2}} -> {{{2}}}

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

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