Exemple #1
0
            break;
        }
        $link = (string) $item->link['href'];
        $title = (string) $item->title;
        $s .= "<li><a href=\"{$link}\">{$title}</a></li>";
    }
    $s .= "</ul>";
    return render_widget("blog", "BrowserPlus: <a href=\"/blog/\">Blog</a>", $s);
}
// IRC Transcript
$irc = new IRC();
$results = $irc->get_rows($irc->get_max_id(), $tableRowsToShow);
$ircnav = l("#browserplus", "/discuss/");
$irctable = render_table($results, "stamp", "who", "utterance", array("show_long_dates" => true, "top_nav" => "<strong>IRC: {$ircnav}</strong>"));
//$ircwidgets = $irc->render_widget("day") . $irc->render_widget("week") . $irc->render_widget("month");
$ircwidgets = $irc->render_widget("week");
// GIT Projects
$git = new GIT();
$results = $git->get_rows($tableRowsToShow);
$gitnav = "<strong>GitHub: <a href=\"http://www.github.com/browserplus/\">BrowserPlus</a></strong>";
$gittable = render_table($results, "tcommit", "project", "msg", array("show_long_dates" => true, "top_nav" => $gitnav, "url_key" => "url", "url_pat" => "%s"));
$gitwidgets = $git->render_project_widget();
// bugzilla issues
$bugzilla = new Bugzilla();
$issuewidget = $bugzilla->render_widget($listItemsToShow);
// Links Widget
$linkswidget = get_links_widget();
// Blog Widget
$blogwidget = get_blog_widget($listItemsToShow);
// Twitter Widgets
$twitter = new Twitter();
Exemple #2
0
        $id = (int) $_GET['id'];
        $id = $max_id - $id < 0 ? $max_id : $id;
    } else {
        $id = $max_id;
    }
    $results = $irc->get_rows($id, IRC_MAX_ROWS);
    $rcount = count($results);
    if ($rcount > 0) {
        $first_id = $results[0]["id"];
        $last_id = $results[count($results) - 1]["id"];
        $next_id = $last_id + IRC_MAX_ROWS - 1;
        $blurb = "To chat with the BrowserPlus community, fire up your favorite IRC client and ";
        $blurb .= "head on over to <tt>#browserplus</tt> on <tt>freenode</tt>.";
        $nav = l("&laquo; Older", "?id={$first_id}", $first_id > 0) . " | " . l("Current", "/discuss/", $id != $max_id) . " | " . l("Newer &raquo;", "?id={$next_id}", $last_id < $max_id);
    }
}
$cfg = array("show_long_date" => false, "top_nav" => $nav, "bot_nav" => $nav);
if ($in_search) {
    $cfg["url_pat"] = "/discuss/?mid=%s";
    $cfg["url_key"] = "id";
}
$table = render_table($results, "stamp", "who", "utterance", $cfg);
$widgets = $irc->render_widget("day") . $irc->render_widget("week") . $irc->render_widget("month");
$body = <<<EOS
<h1>IRC Transcript</h1>
<p>{$blurb}</p>
<div class="irc-logs">
{$table}
</div>
EOS;
render2c("IRC Logs", "Discuss", $body, $widgets);