View Issue Details

IDProjectCategoryView StatusLast Update
0006681mantisbtfeaturepublic2006-02-07 07:34
Reporterdma Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status newResolutionopen 
Product Version1.0.0rc5 
Target VersionFixed in Version 
Summary0006681: easier subscription to RSS feeds on "Manage Filters" page
Description

The RSS feeds displayed on the "Manage Filters" page (query_view_page.php)
should also be added to the head section of the page, so that a user can
subscribe to an RSS feed by clicking the RSS icon in the browser status bar
and selecting the desired RSS feed in the listbox that pops up.

I include a patch rss.diff that adds this functionality.

Additional Information

Description of the patch:

The functions html_rss_link() and html_set_rss_link() in html_api.php
do not support multiple rss feeds on one page. So, add the following
two more flexible functions to core/html_api.php:

function html_head_other() {
    global $g_head_other;
    echo $g_head_other;
}

function html_head_append( $p_header ) {
    global $g_head_other;
    $g_head_other = $g_head_other . $p_header;
}

And add a call to html_head_other() in html_page_top1():

function html_page_top1( $p_page_title = null ) {
            ...
    html_title( $p_page_title );
    html_head_other();
    html_head_javascript();
}

Then, add the following loop to query_view_page.php,
just before html_page_top1() is called:

foreach( $t_query_arr as $t_id => $t_name ) {
$rss_url = 'issues_rss.php?project_id=' . helper_get_current_project() . '&filter_id=' . $t_id;
$rss_link = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"" . $t_name . "\" href=\"$rss_url\" />";
html_head_append($rss_link);
}

Finished. Enjoy the new feature.

TagsNo tags attached.

Activities

2006-02-07 07:34

 

rss.diff (1,290 bytes)
*** mantis-1.0.0rc5/query_view_page.php	Tue Feb  7 12:52:14 2006
--- mantis-1.0.0dma/query_view_page.php	Tue Feb  7 12:53:01 2006
***************
*** 27,32 ****
--- 27,38 ----
  
  	compress_enable();
  
+         foreach( $t_query_arr as $t_id => $t_name ) {
+ 	    $rss_url = 'issues_rss.php?project_id=' . helper_get_current_project() . '&amp;filter_id=' . $t_id;
+             $rss_link = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"" . $t_name . "\" href=\"$rss_url\" />";
+             html_head_append($rss_link);
+         }
+ 
  	html_page_top1();
  	html_page_top2();
  
*** mantis-1.0.0rc5/core/html_api.php	Tue Jan 10 12:38:07 2006
--- mantis-1.0.0dma/core/html_api.php	Tue Feb  7 13:00:52 2006
***************
*** 93,101 ****
--- 93,112 ----
  		include( config_get( 'meta_include_file' ) );
  		html_rss_link();
  		html_title( $p_page_title );
+ 		html_head_other();
  		html_head_javascript();
  	}
  
+ 	function html_head_other() {
+ 		global $g_head_other;
+ 		echo $g_head_other;
+ 	}
+ 
+ 	function html_head_append( $p_header ) {
+ 		global $g_head_other;
+ 		$g_head_other = $g_head_other . $p_header;
+ 	}
+ 
  	# --------------------
  	# Print the part of the page that comes after meta tags, but before the
  	#  actual page content
rss.diff (1,290 bytes)

Issue History

Date Modified Username Field Change
2006-02-07 07:34 dma New Issue
2006-02-07 07:34 dma File Added: rss.diff