Add the metadata about each type of download to a php array and just
reference the array. This kind of separates model from view... but
more importantly it will allow /download/ to
show identical content to what's on /download//
-<p>We do not provide pre-built packages for most Linux and Unix distributions. We recommend installing Pidgin using your operating system's standard package management tool.</p>
-
-<p>If your operating system doesn't provide a pre-built package, or if their pre-built package is out of date and you want to upgrade, then you can try <a href="/download/source/">building from source</a>.</p>
+<?php echo $download_types[$me]['body'] ?>
</div>
--- a/htdocs/download/mac/index.php Thu May 03 04:52:36 2012 +0000
+++ b/htdocs/download/mac/index.php Thu May 03 05:56:07 2012 +0000
@@ -1,9 +1,13 @@
<?php
- // Update these to match the current page.
- $page['title'] = "Download Pidgin for Mac OS X";
-<p>For a native Mac OS X experience we recommend <a href="http://adium.im" onClick="javascript:pageTracker._trackPageview('/external/adium.im');">Adium</a>, which uses libpurple (the core of Pidgin) for much of its protocol support.</p>
-<p>If you're sure you want to use Pidgin on OS X, you may find the packages provided through <a href="http://finkproject.org/download/" onClick="javascript:pageTracker._trackPageview('/external/finkproject.org');">Fink</a> or <a href="http://www.macports.org/install.php" onClick="javascript:pageTracker._trackPageview('/external/macports.org');">Macports</a> more convenient than compiling from source. Please note, <i>we do not provide support for issues related to installing Fink, Macports, or their packages of Pidgin</i>. Contact those projects directly with questions or concerns.</p>
-<p>If you're sure you want to use Pidgin on OS X and you don't want to use Fink or Macports, you can <a href="/download/source/">download the Pidgin source</a> and compile.</p>
+<?php echo $download_types[$me]['body'] ?>
</div>
--- a/htdocs/download/source/index.php Thu May 03 04:52:36 2012 +0000
+++ b/htdocs/download/source/index.php Thu May 03 05:56:07 2012 +0000
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(script, s);
-})();
-</script>
-</p>
-
-<p>This download is for the source code of Pidgin <?php echo $pidgin_version; ?>.</p>
-<p>If you want to <b>use</b> Pidgin, you should first look for pre-built packages from us (see the links on the left) or your operating system distribution.</p>
-<p>If you are looking to <b>modify</b> Pidgin, you may want to look at our <a href="http://developer.pidgin.im/wiki/UsingPidginMonotone">instructions for checking out the code from our repository</a>.</p>
+<?php echo $download_types[$me]['body'] ?>
</div>
--- a/htdocs/download/ubuntu/index.php Thu May 03 04:52:36 2012 +0000
+++ b/htdocs/download/ubuntu/index.php Thu May 03 05:56:07 2012 +0000
-<p>Ubuntu ships Pidgin but does not update it after a release (except for security issues and high-severity bugs). For those users who desire new releases of Pidgin, we have packaged Pidgin in <a href="https://launchpad.net/~pidgin-developers/+archive/ppa/">a PPA</a>. If you encounter problems with these packages, try <a href="../source">building from source</a> and <a href="/support">report the bug</a>.</p>
-<p>To setup <a href="https://launchpad.net/~pidgin-developers/+archive/ppa/">the PPA</a>, follow these steps: <br />
- 1. Click to download the <a href="https://launchpad.net/~pidgin-developers/+archive/ppa/+files/pidgin-ppa_0.0.7_all.deb">Pidgin PPA package</a>.<br />
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(script, s);
-})();
-</script>
-</p>
-
-<p>This version of Pidgin downloads an appropriate version of GTK+. GTK+ is now installed locally for Pidgin, and not system-wide, thus Pidgin will not interfere with other GTK+ apps on your system.</p>
-<p>If you would like to have GTK+ included in the installer, we have an <a href="http://sourceforge.net/projects/pidgin/files/Pidgin/<?php echo $pidgin_win32_version; ?>/pidgin-<?php echo $pidgin_win32_version; ?>-offline.exe/download">offline installer</a> that bundles everything except spell-checking dictionaries. </p>
+<?php echo $download_types[$me]['body'] ?>
</div>
-
</div>
</div>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/downloads.inc Thu May 03 05:56:07 2012 +0000
@@ -0,0 +1,97 @@
+<?php
+
+// The keys in this array are available download types. They should
+// match the piece of the URL following "/download/" For example,
+// "source" or "windows"
+// The values in this array are arrays containing info about the
+// download type. The keys in these arrays are things like "name"
+// and "description."
+$download_types = array(
+ 'windows' => array(
+ 'title' => 'Download Pidgin for Windows',
+ 'subsect' => 'Windows',
+ 'description' => 'Download the free Pidgin universal chat client for Windows',
+ var s = document.getElementsByTagName("script")[0];
+ s.parentNode.insertBefore(script, s);
+})();
+</script>
+</p>
+
+<p>This version of Pidgin downloads an appropriate version of GTK+. GTK+ is now installed locally for Pidgin, and not system-wide, thus Pidgin will not interfere with other GTK+ apps on your system.</p>
+<p>If you would like to have GTK+ included in the installer, we have an <a href="http://sourceforge.net/projects/pidgin/files/Pidgin/<?php echo $pidgin_win32_version; ?>/pidgin-<?php echo $pidgin_win32_version; ?>-offline.exe/download">offline installer</a> that bundles everything except spell-checking dictionaries. </p>',
+ ),
+
+ 'ubuntu' => array(
+ 'title' => 'Download Pidgin for Ubuntu Linux',
+ 'subsect' => 'Ubuntu',
+ 'description' => 'Download the free Pidgin universal chat client for Ubuntu Linux',
+ 'body' => '<p>Ubuntu ships Pidgin but does not update it after a release (except for security issues and high-severity bugs). For those users who desire new releases of Pidgin, we have packaged Pidgin in <a href="https://launchpad.net/~pidgin-developers/+archive/ppa/">a PPA</a>. If you encounter problems with these packages, try <a href="../source">building from source</a> and <a href="/support">report the bug</a>.</p>
+<p>To setup <a href="https://launchpad.net/~pidgin-developers/+archive/ppa/">the PPA</a>, follow these steps: <br />
+ 1. Click to download the <a href="https://launchpad.net/~pidgin-developers/+archive/ppa/+files/pidgin-ppa_0.0.7_all.deb">Pidgin PPA package</a>.<br />
+<p>Future Pidgin updates will show up in Update Manager along with the usual Ubuntu updates.</p>
+
+<p>This PPA often lags behind the source releases a couple of days, so please be patient.</p>
+
+<p><b>This PPA supports Ubuntu Lucid (10.04) and newer.</b></p>',
+ ),
+
+ 'linux' => array(
+ 'title' => 'Download Pidgin for Linux',
+ 'subsect' => 'Linux',
+ 'description' => 'Download the free Pidgin universal chat client for Linux',
+ 'body' => '<p>We do not provide pre-built packages for most Linux and Unix distributions. We recommend installing Pidgin using your operating system\'s standard package management tool.</p>
+
+<p>If your operating system doesn\'t provide a pre-built package, or if their pre-built package is out of date and you want to upgrade, then you can try <a href="/download/source/">building from source</a>.</p>',
+ ),
+
+ 'mac' => array(
+ 'title' => 'Download Pidgin for Mac OS X',
+ 'subsect' => 'Mac OS X',
+ 'description' => 'Download the free Pidgin universal chat client for Mac OS X',
+ 'body' => '<p>For a native Mac OS X experience we recommend <a href="http://adium.im" onClick="javascript:pageTracker._trackPageview("/external/adium.im");">Adium</a>, which uses libpurple (the core of Pidgin) for much of its protocol support.</p>
+<p>If you\'re sure you want to use Pidgin on OS X, you may find the packages provided through <a href="http://finkproject.org/download/" onClick="javascript:pageTracker._trackPageview("/external/finkproject.org");">Fink</a> or <a href="http://www.macports.org/install.php" onClick="javascript:pageTracker._trackPageview("/external/macports.org");">Macports</a> more convenient than compiling from source. Please note, <i>we do not provide support for issues related to installing Fink, Macports, or their packages of Pidgin</i>. Contact those projects directly with questions or concerns.</p>
+<p>If you\'re sure you want to use Pidgin on OS X and you don\'t want to use Fink or Macports, you can <a href="/download/source/">download the Pidgin source</a> and compile.</p>',
+ ),
+
+ 'source' => array(
+ 'title' => 'Download Pidgin Source',
+ 'subsect' => 'Source',
+ 'description' => 'Download the source code for the free Pidgin universal chat client',
+ var s = document.getElementsByTagName("script")[0];
+ s.parentNode.insertBefore(script, s);
+})();
+</script>
+</p>
+
+<p>This download is for the source code of Pidgin <?php echo $pidgin_version; ?>.</p>
+<p>If you want to <b>use</b> Pidgin, you should first look for pre-built packages from us (see the links on the left) or your operating system distribution.</p>
+<p>If you are looking to <b>modify</b> Pidgin, you may want to look at our <a href="http://developer.pidgin.im/wiki/UsingPidginMonotone">instructions for checking out the code from our repository</a>.</p>',