Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76048 - website/public_html/beta/common/code
From: dnljms_at_[hidden]
Date: 2011-12-18 15:38:42


Author: danieljames
Date: 2011-12-18 15:38:41 EST (Sun, 18 Dec 2011)
New Revision: 76048
URL: http://svn.boost.org/trac/boost/changeset/76048

Log:
Website: Half-done implementation of 'latest version' link.
Text files modified:
   website/public_html/beta/common/code/boost_filter_basic.php | 2 ++
   website/public_html/beta/common/code/boost_filter_boost_book_basic.php | 1 +
   website/public_html/beta/common/code/boost_filters.php | 13 +++++++++++++
   3 files changed, 16 insertions(+), 0 deletions(-)

Modified: website/public_html/beta/common/code/boost_filter_basic.php
==============================================================================
--- website/public_html/beta/common/code/boost_filter_basic.php (original)
+++ website/public_html/beta/common/code/boost_filter_basic.php 2011-12-18 15:38:41 EST (Sun, 18 Dec 2011)
@@ -22,6 +22,8 @@
         echo '<link rel="stylesheet" type="text/css" href="/style-v2/section-basic.css"'.$tag_end;
         echo $match[0][0];
         virtual("/common/heading-doc.html");
+ echo latest_link($params);
+
         echo prepare_html(remove_html_banner(substr($text, $match[0][1] + strlen($match[0][0]))));
     }
     else {

Modified: website/public_html/beta/common/code/boost_filter_boost_book_basic.php
==============================================================================
--- website/public_html/beta/common/code/boost_filter_boost_book_basic.php (original)
+++ website/public_html/beta/common/code/boost_filter_boost_book_basic.php 2011-12-18 15:38:41 EST (Sun, 18 Dec 2011)
@@ -22,6 +22,7 @@
     echo '<link rel="stylesheet" type="text/css" href="/style-v2/section-basic.css"/>';
     echo substr($text, $pos1, $pos3 - $pos1);
     virtual("/common/heading-doc.html");
+ echo latest_link($params);
     
     $text = preg_replace('@(<div[^>]* )title="[^"]*"([^>]*>)@', '$1$2', substr($text, $pos4));
     echo prepare_html($text);

Modified: website/public_html/beta/common/code/boost_filters.php
==============================================================================
--- website/public_html/beta/common/code/boost_filters.php (original)
+++ website/public_html/beta/common/code/boost_filters.php 2011-12-18 15:38:41 EST (Sun, 18 Dec 2011)
@@ -124,3 +124,16 @@
         return $text;
     }
 }
+
+function latest_link($params)
+{
+ global $boost_current_version;
+ $latest = 'boost_'.implode('_', $boost_current_version);
+
+ if ($latest != $params['version'] && is_file(ARCHIVE_DIR."/$latest/$params[key]"))
+ {
+ echo 'This is the documentation for an old version of boost, click '.
+ '<a href="/doc/libs/release/'.$params['key'].'">'.
+ 'here for the latest version</a>';
+ }
+}
\ No newline at end of file


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk