Changeset 29011


Ignore:
Timestamp:
Sep 13, 2007, 5:41:18 AM (13 years ago)
Author:
jmpp@…
Message:

Rework the URL abstraction variables and extend their usage to the remaining pages.
Also correct some href's to reflect the flat directory layout we now have for all
our pages (that is, no more hardcoded 'macports' dir).

Location:
trunk/www
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/includes/common.inc

    r28994 r29011  
    2525
    2626# Some useful URL abstractions:
    27 $trac_url = 'http://trac.macports.org/projects/macports';
    28 $svn_url = 'http://svn.macports.org/repository/macports';
    29 $downloads = $svn_url . '/downloads/MacPorts-' . $mp_version_major;
    30 $tiger_dmg = $downloads . '/MacPorts-' . $mp_version_major .'-10.4.dmg';
    31 $panther_dmg = $downloads . '/MacPorts-' . $mp_version_major .'-10.3.dmg';
    32 $bz2_tarball = $downloads . '/MacPorts-' . $mp_version_major . '.tar.bz2';
    33 $gz_tarball = $downloads . '/MacPorts-' . $mp_version_major . '.tar.gz';
    34 $checksums = $downloads .  '/MacPorts-' . $mp_version_major . '.chk.txt';
     27$trac_url = 'http://trac.macports.org/projects/macports/';
     28$svn_url = 'http://svn.macports.org/repository/macports/';
     29$downloads = $svn_url . 'downloads/MacPorts-' . $mp_version_major . '/';
     30$tiger_dmg = $downloads . 'MacPorts-' . $mp_version_major .'-10.4.dmg';
     31$panther_dmg = $downloads . 'MacPorts-' . $mp_version_major .'-10.3.dmg';
     32$bz2_tarball = $downloads . 'MacPorts-' . $mp_version_major . '.tar.bz2';
     33$gz_tarball = $downloads . 'MacPorts-' . $mp_version_major . '.tar.gz';
     34$checksums = $downloads .  'MacPorts-' . $mp_version_major . '.chk.txt';
    3535
    3636
  • trunk/www/includes/email.inc

    r28649 r29011  
    66function obfuscate_email($email)
    77{
    8         return "<span class='email'>".str_replace('@', "<img src='/macports/img/at.gif' alt='at' style='width: 1em; height: 1em;' />", $email)."</span>";
     8        return "<span class='email'>".str_replace('@', "<img src='img/at.gif' alt='at' style='width: 1em; height: 1em;' />", $email)."</span>";
    99}
    1010
  • trunk/www/includes/header.inc

    r28994 r29011  
    11<?php
    22/* $Id$ */
    3 global $mp_version_major, $trac_url;
     3global $mp_version_major, $trac_url, $svn_url, $downloads;
    44?>
    55
     
    4545        <dd>
    4646            <ul>
    47                 <li><a href="http://svn.macports.org/repository/macports/downloads/MacPorts-<?php print "$mp_version_major"; ?>">MacPorts Downloads</a></li>
    48                 <li><a href="http://svn.macports.org/repository/macports/">Subversion Repository</a></li>
    49                 <li><a href="http://trac.macports.org/projects/macports/wiki/FAQ">MacPorts FAQ</a></li>
    50                 <li><a href="http://trac.macports.org/projects/macports/newticket">Report a Bug</a></li>
     47                <li><a href="<?php print $downloads; ?>">MacPorts Downloads</a></li>
     48                <li><a href="<?php print $svn_url; ?>">Subversion Repository</a></li>
     49                <li><a href="<?php print $trac_url . 'wiki/FAQ'; ?>">MacPorts FAQ</a></li>
     50                <li><a href="<?php print $trac_url . 'newticket'; ?>">Report a Bug</a></li>
    5151            </ul>
    5252        </dd>
  • trunk/www/index.php

    r28994 r29011  
    1515      <p>
    1616        There are currently about <?php echo ports_count(); ?> completed and
    17         usable <a href="/macports/ports.php">ports</a>, with more being added on
     17        usable <a href="ports.php">ports</a>, with more being added on
    1818        a regular basis. You can track recently added ports by subscribing to
    1919        the <a href="http://lists.macosforge.org/mailman/listinfo/macports-changes">macports-changes</a>
     
    2222      <p>
    2323        For more information on obtaining and installing MacPorts, please see
    24         the <a href="/macports/getmp.php">Get MacPorts</a> section of this site.
     24        the <a href="getmp.php">Get MacPorts</a> section of this site.
    2525        Also be sure to check out the <a
    2626        href="http://geeklair.net/new_macports_guide/">documentation</a>, and if
    2727        and if you have questions or run into problems, you can get help at our
    28         <a href="/macports/help.php">help section</a>. The
     28        <a href="help.php">help section</a>. The
    2929        <a href="http://trac.macports.org/projects/macports/wiki">MacPorts
    3030        Wiki</a>is also a good resource for general and miscellaneous help,
     
    4848      </p>
    4949      <p>
    50         <b>Current MacPorts <a href="/macports/getmp.php">release</a>: <?php print "$mp_version_latest"; ?></b>
     50        <b>Current MacPorts <a href="getmp.php">release</a>: <?php print "$mp_version_latest"; ?></b>
    5151      </p>
    5252      <div id="news">
     
    5555  print_headlines();
    5656?>
    57         <p>You can also browse our <a href="/macports/archives.php">news archives</a>.</p>
     57        <p>You can also browse our <a href="archives.php">news archives</a>.</p>
    5858      </div>
    5959    </div>
  • trunk/www/ports.php

    r28916 r29011  
    113113            while ($row = mysql_fetch_assoc($result)) {
    114114?>
    115                 <dt><b><a href="http://trac.macports.org/projects/macports/browser/trunk/dports/<?php echo $row['path']; ?>/Portfile"><?php echo htmlspecialchars($row['name']); ?></a></b> <?php echo htmlspecialchars($row['version']); ?></dt>
     115                <dt><b><a href="<?php print $trac_url . 'browser/trunk/dports/' . $row['path'] . '/Portfile'; ?>"><?php echo htmlspecialchars($row['name']); ?></a></b> <?php echo htmlspecialchars($row['version']); ?></dt>
    116116                <dd>
    117117                    <?php echo htmlspecialchars($row['description']); ?><br />
Note: See TracChangeset for help on using the changeset viewer.