Beispiel #1
0
$rssfile->setPublisher($publisher);
$rssfile->setCreator($creator);
$rssfile->setRights($rights);
$rssfile->setCoverage($coverage);
$rssfile->setContributor($contributor);
# hourly / daily / weekly / ...
$period = (string) 'daily';
# every X hours/days/...
$frequency = (int) 1;
$base = (string) date('Y-m-d\\TH:i:sO');
# add missing : in the O part of the date.  PHP 5 supports a 'c' format which will output the format
# exactly as we want it.
# // 2002-10-02T10:00:00-0500 -> // 2002-10-02T10:00:00-05:00
$base = substr($base, 0, 22) . ':' . substr($base, -2);
$rssfile->addSYdata($period, $frequency, $base);
$news_rows = news_get_limited_rows(0, $f_project_id);
# Loop through results
for ($i = 0; $i < count($news_rows); $i++) {
    $row = $news_rows[$i];
    extract($row, EXTR_PREFIX_ALL, 'v');
    # skip news item if private, or
    # belongs to a private project (will only happen
    if (VS_PRIVATE == $v_view_state) {
        continue;
    }
    $v_headline = string_rss_links($v_headline);
    $v_body = string_rss_links($v_body);
    $v_date_posted = date('Y-m-d\\TH:i:sO', $v_date_posted);
    $about = $link = config_get('path') . "news_view_page.php?news_id={$v_id}";
    $title = $v_headline;
    $description = $v_body;
Beispiel #2
0
    echo lang_get('open_and_assigned_to_me') . ': ';
    echo '<a class="subtle" href="view_all_set.php?type=1&amp;handler_id=' . auth_get_current_user_id() . '&amp;hide_status=' . RESOLVED . '">' . current_user_get_assigned_open_bug_count() . '</a>';
    echo '</div>';
    echo '<div class="quick-summary-right">';
    echo lang_get('open_and_reported_to_me') . ': ';
    echo '<a class="subtle" href="view_all_set.php?type=1&amp;reporter_id=' . auth_get_current_user_id() . '&amp;hide_status=' . RESOLVED . '">' . current_user_get_reported_open_bug_count() . '</a>';
    echo '</div>';
    echo '<div class="quick-summary-left">';
    echo lang_get('last_visit') . ': ';
    echo print_date(config_get('normal_date_format'), db_unixtimestamp(current_user_get_field('last_visit')));
    echo '</div>';
}
echo '<br />';
echo '<br />';
echo '<br />';
$t_news_rows = news_get_limited_rows($f_offset, $t_project_id);
$t_news_count = count($t_news_rows);
# Loop through results
for ($i = 0; $i < $t_news_count; $i++) {
    $t_row = $t_news_rows[$i];
    # only show VS_PRIVATE posts to configured threshold and above
    if (VS_PRIVATE == $t_row['view_state'] && !access_has_project_level(config_get('private_news_threshold'))) {
        continue;
    }
    print_news_entry_from_row($t_row);
    echo '<br />';
}
# end for loop
echo '<div align="center">';
print_bracket_link('news_list_page.php', lang_get('archives'));
$t_news_view_limit = config_get('news_view_limit');
Beispiel #3
0
# hourly / daily / weekly / ...
$period = (string) 'daily';

# every X hours/days/...
$frequency = (int) 1;

$base = (string) date('Y-m-d\TH:i:sO');

# add missing : in the O part of the date.  PHP 5 supports a 'c' format which will output the format
# exactly as we want it.
# // 2002-10-02T10:00:00-0500 -> // 2002-10-02T10:00:00-05:00
$base = utf8_substr( $base, 0, 22 ) . ':' . utf8_substr( $base, -2 );

$rssfile->addSYdata( $period, $frequency, $base );

$news_rows = news_get_limited_rows( 0 /* offset */, $f_project_id );
$t_news_count = count( $news_rows );

# Loop through results
for ( $i = 0; $i < $t_news_count; $i++ ) {
	$row = $news_rows[$i];
	extract( $row, EXTR_PREFIX_ALL, 'v' );

	# skip news item if private, or
	# belongs to a private project (will only happen
	if ( VS_PRIVATE == $v_view_state ) {
		continue;
	}

	$v_headline 	= string_rss_links( $v_headline );
	$v_body 	= string_rss_links( $v_body );