예제 #1
0
/**
 * Generates entries, frontpages and archives for a given entry ID.
 *
 * @uses generate_html generates entry (HTML)
 * @uses generate_archive generates archive page
 * @uses generate_frontpage generates front page
 */
function generate_pages($id, $singlepage = TRUE, $frontpage = TRUE, $archive = TRUE, $ping = FALSE, $rss = TRUE)
{
    global $db, $Weblogs, $Current_weblog, $Allow_RSS;
    //LoadTempLanguage();
    $Allow_RSS = $rss;
    // load an entry
    $entry = $db->read_entry($id, TRUE);
    $in_weblogs = find_weblogs_with_cat($entry['category']);
    foreach ($in_weblogs as $in_weblog) {
        $entry = $db->read_entry($id);
        $org_date = $entry['date'];
        $Current_weblog = $in_weblog;
        $template = $Weblogs[$in_weblog]['entry_template'];
        // we generate the single (static) entry only if it's published
        if ($Weblogs[$in_weblog]['live_entries'] != 1 && $entry['status'] == 'publish') {
            generate_html($template, $in_weblog);
        }
        // generate the archives (for this date) only if the entry is
        // published.
        if ($archive && $Weblogs[$Current_weblog]['archive_unit'] != 'none' && $entry['status'] == 'publish') {
            generate_archive($in_weblog, $org_date);
        }
        // generate the frontpage
        if ($frontpage) {
            $filename = generate_frontpage($in_weblog);
        }
        LoadUserLanguage();
    }
    // if we need to ping. do here:
    if ($ping) {
        open_ping_window($in_weblogs);
    }
}
예제 #2
0
/**
 * The screen that's shown when we click 'send pings'.
 *
 */
function send_pings()
{
    global $Weblogs;
    PageHeader(lang('adminbar', 'sendping'), 1);
    PageAnkeiler(lang('adminbar', 'sendping') . ' » ' . lang('adminbar', 'sendping_title'));
    $db = new db();
    $ping_weblogs = array();
    foreach ($Weblogs as $name => $weblog) {
        $ping_weblogs[] = $name;
    }
    open_ping_window($ping_weblogs);
    echo "</p><p><b>" . lang('general', 'done') . "</b></p>";
    PageFooter();
}