diff --git a/common/code/boost_config.php b/common/code/boost_config.php index 0c01c762..1e7c04d6 100644 --- a/common/code/boost_config.php +++ b/common/code/boost_config.php @@ -20,7 +20,7 @@ switch ($_SERVER['HTTP_HOST']) case 'localhost': case 'boost.borg.redshift-software.com': { - define('BOOST_CONFIG_FILE','/DevRoots/Boost-SVN/website/workplace/config.php'); + define('BOOST_CONFIG_FILE','/DevRoots/Boost/website/workplace/config.php'); define('ARCHIVE_PREFIX', '/DevRoots/Boost/boost_'); define('UNZIP', 'unzip'); } diff --git a/common/code/boost_irc_stats.php b/common/code/boost_irc_stats.php new file mode 100644 index 00000000..8bc4b46c --- /dev/null +++ b/common/code/boost_irc_stats.php @@ -0,0 +1,160 @@ +content_ = file_get_contents($uri,false,$context); + + if ($this->content_ && $this->content_ != '') + { + $this->_init_html(); + } + + $this->head_content_ .= << + +HTML + ; + } + + function content_head() + { + print $this->head_content_; + } + + function content() + { + if ($this->content_ && $this->content_ != '') + { + $this->_content_html(); + } + } + + function _init_html() + { + preg_match('@text/html; charset=([^\s"]+)@i',$this->content_,$charset); + if (isset($charset[1])) + { + $this->head_content_ .= << +HTML + ; + } + else + { + $this->head_content_ .= << +HTML + ; + } + + preg_match('@([^<]+)@i',$this->content_,$title); + if (isset($title[1])) + { + $this->head_content_ .= <<Boost C++ Libraries - ${title[1]} +HTML + ; + } + else + { + $this->head_content_ .= <<Boost C++ Libraries - Wiki +HTML + ; + } + } + + function _content_html() + { + $text = $this->content_; + + $text = preg_replace( + '@href="?http://www.boost.org/?([^"\s]*)"?@i', + 'href="/${1}"', + $text ); + $text = preg_replace( + '@href="?(?:\.\./)+people/(.*\.htm)"?@i', + 'href="/users/people/${1}l"', + $text ); + $text = preg_replace( + '@href="?(?:\.\./)+(LICENSE_.*\.txt)"?@i', + 'href="/${1}"', + $text ); + $text = preg_replace( + '@@i',$text,$body_begin,PREG_OFFSET_CAPTURE); + preg_match('@@i',$text,$body_end,PREG_OFFSET_CAPTURE); + if (!isset($body_begin[0])) + { + return; + } + else if (!isset($body_end[0])) + { + $text = substr($text, + $body_begin[0][1]+strlen($body_begin[0][0])); + } + else + { + $text = substr($text, + $body_begin[0][1]+strlen($body_begin[0][0]), + $body_end[0][1]-($body_begin[0][1]+strlen($body_begin[0][0])) ); + } + + $text = preg_replace( + '@<[/]?(font|hr)[^>]*>@i', + '', + $text ); + $text = preg_replace( + '@[\s]+(border|cellpadding|cellspacing|width|height|valign|align|frame|rules|naturalsizeflag|background|wrap)=[^\s>]+@i', + '', + $text ); + + print $text; + } +} +?> diff --git a/common/menu-community.html b/common/menu-community.html index bf8ebca5..3be0f53e 100644 --- a/common/menu-community.html +++ b/common/menu-community.html @@ -29,4 +29,13 @@
  • Vault >
  • + +
  • + IRC > + + +
  • diff --git a/community/irc_stats_ibd.php b/community/irc_stats_ibd.php new file mode 100644 index 00000000..7420766a --- /dev/null +++ b/community/irc_stats_ibd.php @@ -0,0 +1,59 @@ + + + + + + content_head(); ?> + + + + + + +
    + +
    + +
    +
    +
    +

    Boost C++ Libraries - IRC Stats (#ibd)

    +
    + +
    + content(); ?> +
    +
    + + + +
    +
    + + + +