[29011] trunk/www

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 12 22:41:19 PDT 2007


Revision: 29011
          http://trac.macosforge.org/projects/macports/changeset/29011
Author:   jmpp at macports.org
Date:     2007-09-12 22:41:18 -0700 (Wed, 12 Sep 2007)

Log 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).

Modified Paths:
--------------
    trunk/www/includes/common.inc
    trunk/www/includes/email.inc
    trunk/www/includes/header.inc
    trunk/www/index.php
    trunk/www/ports.php

Modified: trunk/www/includes/common.inc
===================================================================
--- trunk/www/includes/common.inc	2007-09-13 04:53:20 UTC (rev 29010)
+++ trunk/www/includes/common.inc	2007-09-13 05:41:18 UTC (rev 29011)
@@ -24,14 +24,14 @@
 ######################################################################
 
 # Some useful URL abstractions:
-$trac_url = 'http://trac.macports.org/projects/macports';
-$svn_url = 'http://svn.macports.org/repository/macports';
-$downloads = $svn_url . '/downloads/MacPorts-' . $mp_version_major;
-$tiger_dmg = $downloads . '/MacPorts-' . $mp_version_major .'-10.4.dmg';
-$panther_dmg = $downloads . '/MacPorts-' . $mp_version_major .'-10.3.dmg';
-$bz2_tarball = $downloads . '/MacPorts-' . $mp_version_major . '.tar.bz2';
-$gz_tarball = $downloads . '/MacPorts-' . $mp_version_major . '.tar.gz';
-$checksums = $downloads .  '/MacPorts-' . $mp_version_major . '.chk.txt';
+$trac_url = 'http://trac.macports.org/projects/macports/';
+$svn_url = 'http://svn.macports.org/repository/macports/';
+$downloads = $svn_url . 'downloads/MacPorts-' . $mp_version_major . '/';
+$tiger_dmg = $downloads . 'MacPorts-' . $mp_version_major .'-10.4.dmg';
+$panther_dmg = $downloads . 'MacPorts-' . $mp_version_major .'-10.3.dmg';
+$bz2_tarball = $downloads . 'MacPorts-' . $mp_version_major . '.tar.bz2';
+$gz_tarball = $downloads . 'MacPorts-' . $mp_version_major . '.tar.gz';
+$checksums = $downloads .  'MacPorts-' . $mp_version_major . '.chk.txt';
 
 
 ######################################################################

Modified: trunk/www/includes/email.inc
===================================================================
--- trunk/www/includes/email.inc	2007-09-13 04:53:20 UTC (rev 29010)
+++ trunk/www/includes/email.inc	2007-09-13 05:41:18 UTC (rev 29011)
@@ -5,7 +5,7 @@
 
 function obfuscate_email($email)
 {
-	return "<span class='email'>".str_replace('@', "<img src='/macports/img/at.gif' alt='at' style='width: 1em; height: 1em;' />", $email)."</span>";
+	return "<span class='email'>".str_replace('@', "<img src='img/at.gif' alt='at' style='width: 1em; height: 1em;' />", $email)."</span>";
 }
 
 ?>

Modified: trunk/www/includes/header.inc
===================================================================
--- trunk/www/includes/header.inc	2007-09-13 04:53:20 UTC (rev 29010)
+++ trunk/www/includes/header.inc	2007-09-13 05:41:18 UTC (rev 29011)
@@ -1,6 +1,6 @@
 <?php
 /* $Id$ */
-global $mp_version_major, $trac_url;
+global $mp_version_major, $trac_url, $svn_url, $downloads;
 ?>
 
 <h1>
@@ -44,10 +44,10 @@
         <dt>Shortcuts</dt>
         <dd>
             <ul>
-                <li><a href="http://svn.macports.org/repository/macports/downloads/MacPorts-<?php print "$mp_version_major"; ?>">MacPorts Downloads</a></li>
-                <li><a href="http://svn.macports.org/repository/macports/">Subversion Repository</a></li>
-                <li><a href="http://trac.macports.org/projects/macports/wiki/FAQ">MacPorts FAQ</a></li>
-                <li><a href="http://trac.macports.org/projects/macports/newticket">Report a Bug</a></li>
+                <li><a href="<?php print $downloads; ?>">MacPorts Downloads</a></li>
+                <li><a href="<?php print $svn_url; ?>">Subversion Repository</a></li>
+                <li><a href="<?php print $trac_url . 'wiki/FAQ'; ?>">MacPorts FAQ</a></li>
+                <li><a href="<?php print $trac_url . 'newticket'; ?>">Report a Bug</a></li>
             </ul>
         </dd>
     </dl>

Modified: trunk/www/index.php
===================================================================
--- trunk/www/index.php	2007-09-13 04:53:20 UTC (rev 29010)
+++ trunk/www/index.php	2007-09-13 05:41:18 UTC (rev 29011)
@@ -14,18 +14,18 @@
       </p>
       <p>
         There are currently about <?php echo ports_count(); ?> completed and
-        usable <a href="/macports/ports.php">ports</a>, with more being added on
+        usable <a href="ports.php">ports</a>, with more being added on
         a regular basis. You can track recently added ports by subscribing to
         the <a href="http://lists.macosforge.org/mailman/listinfo/macports-changes">macports-changes</a>
         mailing list.
       </p>
       <p>
         For more information on obtaining and installing MacPorts, please see
-        the <a href="/macports/getmp.php">Get MacPorts</a> section of this site.
+        the <a href="getmp.php">Get MacPorts</a> section of this site.
         Also be sure to check out the <a
         href="http://geeklair.net/new_macports_guide/">documentation</a>, and if
         and if you have questions or run into problems, you can get help at our
-        <a href="/macports/help.php">help section</a>. The
+        <a href="help.php">help section</a>. The
         <a href="http://trac.macports.org/projects/macports/wiki">MacPorts
         Wiki</a>is also a good resource for general and miscellaneous help,
         specially the ongoing <a
@@ -47,14 +47,14 @@
         duties &amp; benefits from holding a MacPorts account.
       </p>
       <p>
-        <b>Current MacPorts <a href="/macports/getmp.php">release</a>: <?php print "$mp_version_latest"; ?></b>
+        <b>Current MacPorts <a href="getmp.php">release</a>: <?php print "$mp_version_latest"; ?></b>
       </p>
       <div id="news">
         <h2 class="hdr">Project News</h2>
 <?php
   print_headlines();
 ?>
-        <p>You can also browse our <a href="/macports/archives.php">news archives</a>.</p>
+        <p>You can also browse our <a href="archives.php">news archives</a>.</p>
       </div>
     </div>
 <?php

Modified: trunk/www/ports.php
===================================================================
--- trunk/www/ports.php	2007-09-13 04:53:20 UTC (rev 29010)
+++ trunk/www/ports.php	2007-09-13 05:41:18 UTC (rev 29011)
@@ -112,7 +112,7 @@
 <?php
             while ($row = mysql_fetch_assoc($result)) {
 ?>
-                <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>
+                <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>
                 <dd>
                     <?php echo htmlspecialchars($row['description']); ?><br />
 <?php

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070912/fa645cdd/attachment.html


More information about the macports-changes mailing list