/**
     * Implements Actioner.
     */
    public function execute($args = NULL)
    {
        $fc =& FrontController::fc();
        $fc->outputHeader($this->title(), 'masterserver');
        $fc->beginPage($this->title(), 'masterserver');
        ?>
<div id="contentbox"><div class="masterbrowser block"><?php 
        // Output a "join us" foreword.
        includeHTML('joinus', self::$name);
        try {
            FrontController::contentCache()->import(self::$serverSummaryCacheName);
            $this->outputJavascript();
        } catch (Exception $e) {
            ?>
<p>A master server listing is not presently available. Please try again later.</p><?php 
        }
        // Output footnotes.
        includeHTML('footnotes', self::$name);
        ?>
</div><?php 
        ?>
<div class="block"><section><p>A server admin is not required to publish their server to this central list (located at <em>http://dengine.net/master.php</em>), however it will then only be findable by clients who enter the IP address manually. A server may be published here but remain "closed" (requiring a password to join). Further information about the master server is available <a href="/dew/index.php?title=Master_server" title="Documentation for the master server">here</a>.</p></section></div><?php 
        ?>
</div><?php 
        $fc->endPage();
    }
    /**
     * Print an HTML representation of the entire builds collection to
     * the output stream.
     */
    private function outputEventIndex()
    {
        ?>
<div class="block"><section class="overview"><?php 
        // Output an overview of the build system.
        includeHTML('overview', self::$name);
        // Generate widgets for the symbolic packages.
        $packageListTitle = '<h3>Downloads for the latest packages</h3>';
        $this->outputPackageList($this->symbolicPackages, NULL, PID_ANY, FALSE, TRUE, -1, $packageListTitle);
        $packageListTitle = '<h3>Downloads for the latest packages (<a class="link-definition" href="dew/index.php?title=Automated_build_system#Unstable" title="What does \'unstable\' mean?">unstable</a>)</h3>';
        $this->outputPackageList($this->symbolicPackages, NULL, PID_ANY, TRUE, TRUE, -1, $packageListTitle);
        ?>
</section></div><?php 
        ?>
<div class="block buildevents"><table><thead><tr><th colspan="2"><?php 
        ?>
Version<?php 
        ?>
</th></tr></thead><?php 
        ?>
<tbody><tr><td><?php 
        $this->includeEventMatrix();
        ?>
</td><td style="padding-left:.6em"><?php 
        ?>
<div class="release-badge"><a href="dew/index.php?title=Roadmap" title="Read the Roadmap at the Wiki">Roadmap</a></div><?php 
        // Output stream info
        includeHTML('streaminfo', self::$name);
        ?>
</td></tr></tbody></table></div><?php 
    }
    /**
     * Implements Actioner.
     */
    public function execute($args = NULL)
    {
        $fc =& FrontController::fc();
        // Build the add-ons collection.
        $addonListXml = file_get_contents(nativePath("plugins/addonrepository/addons.xml"));
        $this->addons = array();
        AddonsParser::parse($addonListXml, $this->addons);
        // Sort the collection.
        uasort($this->addons, array('self', 'packageSorter'));
        // Output the page.
        $fc->outputHeader($this->title(), 'addons');
        $fc->beginPage($this->title(), 'addons');
        ?>
<div id="contentbox" class="addons"><?php 
        includeHTML('overview', self::$name);
        $this->outputFeaturedAddons();
        ?>
<div class="block"><article><h1>DOOM</h1>
<p>The following add-ons are for use with <a href="/doom" title="Tell me more about DOOM">DOOM</a> or a variant of it such as <strong>DOOM2</strong> and <strong>Final Doom: The Plutonia Experiment</strong>.</p>
<?php 
        $this->outputAddonList(self::$doomGameModes);
        ?>
</article></div><?php 
        ?>
<div class="block"><article><h1>Heretic</h1>
<p>The following add-ons are for use with <a href="/heretic" title="Tell me more about Heretic">Heretic</a> and the <strong>Shadow of the Serpent Riders</strong> expansion pack.</p>
<?php 
        $this->outputAddonList(self::$hereticGameModes);
        ?>
</article></div><?php 
        ?>
<div class="block"><article><h1>Hexen</h1>
<p>The following add-ons are for use with <a href="/hexen" title="Tell me more about Hexen">Hexen</a> and the <strong>Deathkings of the Dark Citadel</strong> expansion pack.</p>
<?php 
        $this->outputAddonList(self::$hexenGameModes);
        ?>
</article></div><?php 
        ?>
</div><?php 
        $fc->endPage();
    }
예제 #4
0
 public function generateHTML()
 {
     includeHTML('introduction', self::$name);
 }
    private function outputFooter()
    {
        ?>
<p class="disclaimer"><a href="mailto:webmaster@dengine.net" title="Contact Webmaster">Webmaster</a> - Site design &copy; <?php 
        echo date('Y');
        ?>
 Deng Team - Built by <a href="mailto:<?php 
        echo $this->siteAuthorEmail();
        ?>
" title="Contact <?php 
        echo $this->siteAuthor();
        ?>
"><?php 
        echo $this->siteAuthor();
        ?>
</a></p>
<p class="disclaimer">The Doomsday Engine is licensed under the terms of the <a href="http://www.gnu.org/licenses/gpl.html" rel="nofollow">GNU/GPL License ver 2</a>. The Doomsday Engine logo is Copyright &copy; 2005-<?php 
        echo date('Y');
        ?>
, the Deng Team.</p>
<hr />
<?php 
        includeHTML('legal');
    }
예제 #6
0
    public function execute($args = NULL)
    {
        $fc =& FrontController::fc();
        $fc->outputHeader();
        $fc->beginPage($this->title());
        includeHTML('latestversion', 'z#home');
        ?>
<div id="contentbox"><?php 
        //includeHTML('introduction', 'z#home');
        ?>
<script>
(function (e) {
    e.fn.interpretMasterServerStatus = function (t) {
        var n = {
            serverUri: "http://dengine.net/master.php?xml",
            maxItems: 3,
            generateServerSummaryHtml: 0
        };
        if (t) {
            e.extend(n, t);
        }
        var r = e(this).attr("id");
        e.ajax({
            url: n.serverUri,
            dataType: 'xml',
            success: function (t) {
                e("#" + r).empty();
                var root = $('masterserver', t);
                var serverList = root.find('serverlist')[0];
                var serverCount = serverList.attributes.getNamedItem('size').nodeValue;

                var d = new Date(root.find('channel>pubdate').text());
                var niceDate = $.datepicker.formatDate('MM d, yy', d);
                var minItems = serverCount < n.maxItems? serverCount : n.maxItems;

                var announceTime = d.toLocaleTimeString();

                var html = '<header>'
                         + '<h1><a href="/masterserver" title="View the complete list in the server browser">'
                         + (serverCount > 0? ('Most active servers '
                                              + '<label title="Result limit">' + minItems + '</label>/<label title="Total number of servers">' + serverCount + '</label>')
                                           : 'No active servers')
                         + '</a></h1>'
                         + '<p>' + niceDate + ' @ <label title="' + announceTime + ' (time of the last server announcement)">' + announceTime + '</label></p></header>';

                if(serverCount) {
                    var idx = 0;
                    var playerCount = 0;

                    html += '<ol class="servers">';
                    for(var i = 0; i < serverList.childNodes.length; ++i) {
                        if(serverList.childNodes[i].nodeName != 'server')
                            continue;

                        var server = $(serverList.childNodes[i]);
                        if(n.maxItems <= 0 || idx < n.maxItems)
                        {
                            html += '<li>' + n.generateServerSummaryHtml(n, server) + '</li>';
                        }

                        playerCount += Number(server.find('gameinfo>numplayers').text());
                        idx++;
                    };

                    html += '</ol>';
                    //html += '<span class="summary"><a href="/masterserver" title="See the full listing in the server browser">' + serverCount + ' ' + (serverCount == 1? 'server':'servers') + ' in total, ' + playerCount + ' active ' + (playerCount == 1? 'player':'players') + '</a></span>';
                }

                e("#" + r).append(html);
            }
        })
    }
})(jQuery)

$(document).ready(function () {
    $('#activeservers').interpretMasterServerStatus({
        generateServerSummaryHtml: function (n, info) {

            var name = info.find('name').text();
            var status = info.children('open').text() == 'yes'? 'open' : 'locked';

            var serverMetadataLabel = 'I.P address ' + info.children('ip').text() + ', port ' + info.children('port').text()
                                    + ', ' + status;

            // Any required addons?.
            /*var addonArr = array_filter(explode(';', info['pwads']));
            if(count(addonArr))
            {
                serverMetadataLabel .= 'Add-ons: '. implode(' ', addonArr);
            }*/

            var gameInfo = $(info.children('gameinfo'));
            var gameMode = gameInfo.children('mode').text();

            var mapId = gameInfo.children('map').text();
            if(mapId.substring(0, 3) == 'MAP')
            {
                mapId = 'map ' + mapId.substring(3);
            }
            else if(mapId.substring(0, 1) == 'E' && mapId.substring(2, 3) == 'M')
            {
                mapId = 'episode ' + mapId.substring(1, 2) + ', map ' + mapId.substring(3, 4);
            }
            else
            {
                mapId = 'map \'' + mapId + '\'';
            }

            var gameRules = gameInfo.children('setupstring').text().split(/[ ,]+/);

            for(var i=0; i < gameRules.length; i++)
            {
                if(gameRules[i] == 'dm')
                    gameRules[i] = 'deathmatch';
                else if(gameRules[i] == 'coop')
                    gameRules[i] = 'co-operative';
                else if(gameRules[i] == 'nomonst')
                    gameRules[i] = 'no monsters';
                else if(gameRules[i] == 'jump')
                    gameRules[i] = 'jump enabled';
            }

            var gameRuleStr = gameRules.join(', ');

            var gameMetadataLabel = 'Game; ' + gameMode + '. Server configuration; ' + mapId + ', game-rules; ' + gameRuleStr;

            var playerCount = gameInfo.children('numplayers').text();
            var playerMax   = gameInfo.children('maxplayers').text();

            var playerCountLabel = playerCount + ' players currently in-game';
            var playerMaxLabel = playerMax + ' player limit';

            var html = '<span class="player-summary"><label title="' + playerCountLabel + '">' + playerCount + '</label> / <label title="' + playerMaxLabel + '">' + playerMax + '</label></span> ';

            html += '<span class="name"><label title="Server name \'' + name + '\', ' + serverMetadataLabel + '">' + name + '</label></span> ';
            html += '<span class="game-mode"><label title="' + gameMetadataLabel + '.">' + gameMode + '</label></span>';

            return '<span class="server">' + html + '</span>';
        }
    });
});

(function (e) {
    e.fn.interpretFeed = function (t) {
        var n = { feedUri:          'http://rss.cnn.com/rss/edition.rss',
                  dataType:         'xml',
                  maxItems:         5,
                  clearOnSuccess:   true,
                  useGoogleApi:     false,
                  generateItemHtml: 0
        };
        if(t) {
            e.extend(n, t);
        }
        var r = e(this).attr('id');

        if(n.useGoogleApi)
        {
            e.ajax({
                url: 'http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=' + n.maxItems + '&output=json&q=' + encodeURIComponent(n.feedUri) + '&hl=en&callback=?',
                dataType: n.dataType,
                success: function (t) {

                    if(n.clearOnSuccess)
                    {
                        e("#" + r).empty();
                    }

                    var html = "";
                    e.each(t.responseData.feed.entries, function (e, t) {
                        html += n.generateItemHtml(n, t);
                    });
                    e("#" + r).append('<ol style="list-style-type: none;">' + html + "</ol>");
                }
            });
        }
        else
        {
            e.ajax({
                url: n.feedUri,
                dataType: n.dataType,
                success: function (t) {

                    if(n.clearOnSuccess)
                    {
                        e("#" + r).empty();
                    }

                    var xml = $(t);

                    var html = "";
                    xml.find('item').slice(0, n.maxItems).each(function() {
                        var self = $(this),
                        item = { title:       self.children('title').text(),
                                 link:        self.children('link').text(),
                                 author:      self.children('author').text(),
                                 pubDate:     self.children('pubDate').text(),
                                 atomSummary: self.children('atom\\:summary').text(),
                                 description: self.children('description').text(),
                                 author:      self.children('author').text()
                        }
                        html += n.generateItemHtml(n, item);
                    });

                    e('#' + r).append('<ol style="list-style-type: none;">' + html + '</ol>');
                }
            });
        }
    }
})(jQuery)

$(document).ready(function () {
    $('#recentbuilds').interpretFeed({
        feedUri: 'http://files.dengine.net/builds/events.rss',
        dataType: 'xml',
        maxItems: 3,
        generateItemHtml : function(n, t) {
            var html = '<a href="' + t.link + '" title="' + t.title.toLowerCase() + ' (read more in the repository)">' + t.title + ' completed</a>';
            var d = new Date(t.pubDate);
            var niceDate = $.datepicker.formatDate('MM d, yy', d);
            html += ' ' + niceDate;
            d.setDate(d.getDate() + 2);
            var isNew = (new Date() < d);
            return '<li' + (isNew? ' class="new"' : '') + '>' + html + '</li>';
        }
    });

    /*$('#column1').interpretFeed({
        feedUri: 'http://files.dengine.net/builds/events.rss',
        dataType: 'xml',
        maxItems: 3,
        clearOnSuccess: false,
        generateItemHtml: function (n, t) {
            var html = '<div class="block"><article class="buildevent"><header><h1><a href="' + t.link + '" title="Read more about ' + t.title + ' in the repository">' + t.title + '</a></h1>';

            var d = new Date(t.pubDate);
            var niceDate = $.datepicker.formatDate('MM d, yy', d);
            html += '<p><time datetime="' + d.toISOString() + '" pubdate>' + niceDate + '</time></p>';

            html += '</header><br />';
            html += t.atomSummary;
            html += '</article>';
            html += '<div class="links"><a href="' + n.feedUri + '" class="link-rss" title="Doomsday Engine build events are reported via RSS">All builds</a></div></div>';
            return '<li>' + html + '</li>';
        }
    });*/

    $('#column1').interpretFeed({
        feedUri: 'http://dengine.net/blog/category/news/feed',
        dataType: 'json',
        clearOnSuccess: false,
        useGoogleApi: true,
        maxItems: 1,
        generateItemHtml: function (n, t) {
            var html = '<div class="block"><article class="newspost content"><header><h1><a href="' + t.link + '" title="&#39;' + t.title + '&#39; (full article in the blog)">' + t.title + '</a></h1>';

            var d = new Date(t.publishedDate);
            var niceDate = $.datepicker.formatDate('MM d, yy', d);
            html += '<p><time datetime="' + d.toISOString() + '" pubdate>' + niceDate + '</time></p>';

            html += '</header><br />';
            html += '<div class="articlecontent">' + t.content + '</div>';
            html += '</article>';
            html += '<div class="links"><a href="' + n.feedUri + '" class="link-rss" title="Doomsday Engine news via RSS">All news</a></div></div>';
            return '<li>' + html + '</li>';
        }
    });

    $('#column2').interpretFeed({
        feedUri: 'http://dengine.net/blog/category/dev/feed', 
        dataType: 'json',
        clearOnSuccess: false,
        useGoogleApi: true,
        maxItems: 1,
        generateItemHtml: function (n, t) {
            var html = '<div class="block"><article class="blogpost content"><header><h1><a href="' + t.link + '" title="&#39;' + t.title + '&#39; (full article in the blog)">' + t.title + '</a></h1>';

            var d = new Date(t.publishedDate);
            var niceDate = $.datepicker.formatDate('MM d, yy', d);
            html += '<p><time datetime="' + d.toISOString() + '" pubdate>' + niceDate + '</time></p>';

            html += '</header><br />';
            html += '<div class="articlecontent">' + t.content + '</div>';
            html += '</article>';
            html += '<div class="links"><a href="' + n.feedUri + '" class="link-rss" title="Doomsday Engine development blog via RSS">All blogs</a></div></div>';
            return '<li>' + html + '</li>';
        }
    });
});
</script>
<aside role="complementary" class="block">
<div id="status">
<div class="twocolumn"><article>
<header><h1><a href="/builds" title="View the complete index in the build repository">Most recent builds</a></h1>
<p><script>
<!--
var niceDate = $.datepicker.formatDate('MM d, yy', new Date());
document.write(niceDate);
//-->
</script></p></header><div id="recentbuilds">Contacting build repository...</div></article></div>
<div class="twocolumn"><article id="activeservers"></article></div>
<div class="clear"></div>
</div></aside>
<div id="column1" class="twocolumn collapsible"></div>
<div id="column2" class="twocolumn collapsible"></div>
<div class="clear"></div>
</div>
<?php 
        ?>
<div><div id="downloadbox" class="asidebox"><?php 
        includeHTML('getitnow', 'z#home');
        ?>
</div><?php 
        ?>
<div id="socialbookmarkbox" class="asidebox"><?php 
        includeHTML('socialbookmarks', 'z#home');
        ?>
</div></div><?php 
        $fc->endPage();
    }