# Netcenter Channel Addon push(@Addons_Loaded, 'Netcenter Channel'); $Addons_List{'Netcenter Channel 1.01'} = ['npa_netcenter.pl', 'Creates an RSS (RDF Site Summary) 0.9 file containing your 5 latest news items. This file will allow you to add your news as a channel to sites such as Netscape\'s Netcenter.', 'http://amphibian.hypermart.net/addon.cgi?netcenter&1.01']; push(@Addons_AdvancedSettingsLoad, 'AddMNNSettings'); push(@Addons_BuildNews_Post, 'NetcenterBuild'); push(@Addons_LoadHelp, 'NetcenterHelp'); sub AddMNNSettings { @MNNsettings = ('ChannelTitle','ChannelTitleLink','ChannelDescription','ChannelImageURL','ChannelNewsLinks'); $AdvDescr{'NetcenterChannel'} = qq~NewsPro can generate the file necessary to include your news as a channel at Netcenter's My Netscape. Once you enable this, return to the Advanced Settings page, and configure the remaining settings which will appear once this is enabled.~; $AdvDescr{'ChannelTitle'} = qq~For instructions on how to configure your Netcenter channel, and how to submit it to Netscape click here. Title of your channel~; $AdvDescr{'ChannelTitleLink'} = "The URL that your channel title links to."; $AdvDescr{'ChannelDescription'} = "A short (500 character) description."; $AdvDescr{'ChannelImageURL'} = "Optionally, you can have a 88x31 pixel GIF image on your channel. Enter the URL here."; $AdvDescr{'ChannelNewsLinks'} = qq~The link for each news item. See help for more.~; $AdvYesNo{'NetcenterChannel'} = 1; push(@advancedsettings, 'draw_line', 'NetcenterChannel'); if ($NPConfig{'NetcenterChannel'}) { push(@advancedsettings, @MNNsettings); } } sub NetcenterBuild { if ($NPConfig{'NetcenterChannel'}) { &GenerateMNNChannel; } } sub NetcenterHelp { $Help{'netcenter'} = q~Netscape Netcenter's My Netscape page now allows you to create your own channel, and allow users of your site to add it to their page. It does this via a special file on your site called an RDF Site Summary, or RSS file. As long as the Netcenter Channel feature is fully configured and enabled, NewsPro will generate an RSS file called news.cdf in your HTML files directory.

Settings:
ChannelTitle Title of your channel. 40 character maximum.
ChannelTitleLink What you want your title to link to (generally your site's home page).
ChannelDescription A short (500 character) description of your site, for the channel preview page.
ChannelImageURL URL of an 88 by 31 pixel GIF image for your channel. Optional. ChannelNewsLinks This is the most complex setting. It is the URL that each news item (NewsPro will include your 5 most recent news items on the channel) will link to. You can insert any NewsPro variable into this with a "tag" like <InsertFieldnewsname>, which would insert the author's name (which you wouldn't want to do in a link). There are basically three different options for this field:
    -- Use a static URL, same for each news item (i.e. your news page).
    -- Use a specific location on your news page (recommended). To have each news subject link to itself (the full item) on your news page, use: http://www.yoursite.com/news.shtml#newsitem<InsertFieldnewsid> Obviously, change http://www.yoursite.com/news.shtml to reflect your site, but preserve the example beginning with #.
    -- Use a different URL for each news item, by adding another field to your database, and using something like <InsertFielduservar1>

Once you've configured your channel and NewsPro is generating a news.cdf file when you build news, you have to submit your channel to Netscape. To do this, you first have to sign up for My Netscape. Then, visit the My Netscape Network page and follow the simple instructions (remember, NewsPro has already taken care of creating the RSS file). Some other sites, such as UserLand, will also allow you to add your channel, using the same data file.

~; } sub GenerateMNNChannel { unless ($NPConfig{'ChannelTitle'} && $NPConfig{'ChannelTitleLink'} && $NPConfig{'ChannelDescription'} && $NPConfig{'ChannelNewsLinks'}) { &NPdie("You have enabled the Netcenter Channel feature, but you have not fully configured it. Either fully configure the feature via Advanced Settings, or disable it entirely (also via Advanced Settings)."); } $NPConfig{'ChannelTitle'} = substr($NPConfig{'ChannelTitle'}, 0, 40); $NPConfig{'ChannelTitleLink'} = substr($NPConfig{'ChannelTitleLink'}, 0, 500); $NPConfig{'ChannelDescription'} = substr($NPConfig{'ChannelDescription'}, 0, 500); $NPConfig{'ChannelImageURL'} = substr($NPConfig{'ChannelImageURL'}, 0, 500); NPopen('RSSFILE', ">$NPConfig{'htmlfile_path'}/news.cdf"); print RSSFILE qq~ $NPConfig{'ChannelTitle'} $NPConfig{'ChannelTitleLink'} $NPConfig{'ChannelDescription'} ~; if ($NPConfig{'ChannelImageURL'}) { print RSSFILE qq~ $NPConfig{'ChannelTitle'} $NPConfig{'ChannelImageURL'} $NPConfig{'ChannelTitleLink'} ~; } $NewsCounter = 1; while ($NewsCounter <= 5) { $newsnum = (@NewsData - $NewsCounter); if ($newsnum < 0) { last; } &getNDvar($newsnum); $RSSnewssubject = substr($newssubject, 0, 100); $RSSitemlink = $NPConfig{'ChannelNewsLinks'}; $RSSitemlink =~ s//${$1}/gi; $RSSitemlink = substr($RSSitemlink, 0, 500); print RSSFILE qq~ $newssubject $RSSitemlink ~; $NewsCounter++; } print RSSFILE qq~~; } 1;