################################################################# # XMLization of Gossamer-Threads' Links 2.0 (non sql version) # ################################################################# 2001-05-05 by John Gotze - john@gotzespace.dk This mod will let you offer dynamically created RSS-feeds from single categories etc. Open search.cgi, save it as searchrss.cgi. This will be a new file, that you must upload and chmod 755. Edit searchrss.cgi as follows: Line 101: Change $category_results .= qq|
$title_linked\n|; to # $link_results .= qq|
$title_linked\n|;
In your site_html_templates.pl
Add this new subroutine, just after site_html_link
sub site_html_rsslink {
# --------------------------------------------------------
# This routine is used to display what a link should look
# like in the lastlink.html webpage.
my %rec = @_;
# Set new and pop to either 1 or 0 for templates.
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});
return &load_template ('rsslink.html', {
detailed_url => "$db_detailed_url/$rec{'ID'}$build_extension",
%rec,
%globals
});
}
Add this new subroutine, just before sub site_html_mailing:
sub site_html_search_rssresults {
# --------------------------------------------------------
# This routine displays the search results.
#
my $term = &urlencode ($in{'query'});
&html_print_headers;
print &load_template ('search_rssresults.html', {
term => $term,
link_results => $link_results,
category_results => $category_results,
next => $next,
cat_hits => $cat_hits,
link_hits => $link_hits,
%in,
%globals
});
}
Create two new templates named rsslink.html and search_rssresults.html. Upload to /templates, chmod 666.
Template rsslink.html should look like this: