<pubDate>20 Oct 05 2:42 PM</pubDate>
<lastBuildDate>14 Nov 2005 22:19:33 GMT</lastBuildDate>
i highlighted the lines I where I think the problem lies with >>> <<<
#! CRADDON 1
#! NAME RSS File Advanced
#! DESCRIPTION Summarize news items in XML RSS format 0.91. RSS is the standard format for automatically exchanging news headlines. The Advanced version provides support for direct links to Maginot static files in multiple (different) profiles, plus Latin1 characters, plus improved formatting and handling of a few additional optional fields. Author: cerberos76@myrealbox.com (enhancing the original RSS File by Elvii)
#! VERSION beta build 5d
#! DOC 1# ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
# RSS File Advanced, rss 0.91 feed from your Coranto news
# © Cerberos76 (cerberos76@myrealbox.com)
# Donationware software (see readme.txt for details on the license)
# No modification and no redistribution is allowed in any form
# ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
# The RSS File Advanced is an enhancement of the "RSS File" beta4 by Elvii
my $addon = new Addon('RSS File Advanced');
$addon->checkBuild(10);
$addon->addProfileType('RSS File');
$addon->registerAdminFunction('rssfile_editprof', 'RSSFile_EditProfile');
$addon->registerAdminFunction('rssfile_editprofsave', 'RSSFile_EditProfileSave');
# Adding a new profile (initialize fields)
my $AddProfile_NewType = <<'END_CODE';
#===== date/time
my @Monthsmall = (q~Jan~, q~Feb~, q~Mar~, q~Apr~, q~May~, q~Jun~, q~Jul~, q~Aug~, q~Sep~, q~Oct~, q~Nov~, q~Dec~);
my $difftime=0; # difference [hours] local time-server time
my ($sec,$min,$hour,$mday,$mon,$year,$wday)=(localtime(time + (3600*$difftime)))[0..6];
$year += 1900; my $mon_ok=$mon+1;
# format rfc822, i.e. 02 Oct 2002 13:00:00 GMT
# time zone alternatives: "UT" / "GMT"
# ; Universal Time
# ; North American : UT
# / "EST" / "EDT" ; Eastern: - 5/ - 4
# / "CST" / "CDT" ; Central: - 6/ - 5
# / "MST" / "MDT" ; Mountain: - 7/ - 6
# / "PST" / "PDT" ; Pacific: - 8/ - 7
my $timezone="GMT";
>>> $rss_advancedpubdate = sprintf ("%0.2d $Monthsmall[$mon] $year %0.2d:%0.2d:%0.2d $timezone", $mday, $hour, $min, $sec); <<<
if ($proftype eq 'RSS File') {
$newsprofiles{$prof} = { 'enabled' => 0,
'textfile' => "$prof.xml",
'cats' => ['AllCategories'],
'agefilter' => '',
'numfilter' => '5',
'filepath' => '',
'type' => 'RSS File',
'channeltitle' => $CConfig{'SiteTitle'},
'channeldesc' => "The latest news from $CConfig{'SiteTitle'}.",
'channeltitlelink' => $CConfig{'SiteLink'},
'channellang' => 'en-gb',
'itemtitle' => '<Field: Subject>',
'itemlink' => 'http://www.mysite.com/news.html<ItemAnchor>',
'pubdate' => "$rss_advancedpubdate",
'ForceFullBuild' => 1};
}
END_CODE
$addon->hook('AddProfile_NewType', \$AddProfile_NewType);
# Display status message on Edit News Profiles
my $ProfileList_NewType_Status = <<'END_CODE';
if ($newsprofiles{$i}->{'type'} eq 'RSS File') {
$status = '';
if (!$newsprofiles{$i}->{'agefilter'} &&!$newsprofiles{$i}->{'numfilter'}) {
$status .= 'This profile is not filtered by time or number. ';
}
else {
$status .= 'A maximum of ';
if ($newsprofiles{$i}->{'agefilter'}) {
$status .= "<b>$newsprofiles{$i}->{'agefilter'} days</b> ";
if ($newsprofiles{$i}->{'numfilter'}) {
$status .= ' or ';
}
}
if ($newsprofiles{$i}->{'numfilter'}) {
$status .= "<b>$newsprofiles{$i}->{'numfilter'} items</b> ";
}
$status .= 'will be included in this profile. ';
}
$status .= 'Profile type: <b>RSS File</b>. ';
}
END_CODE
$addon->hook('ProfileList_NewType_Status', \$ProfileList_NewType_Status);
# Display functions on Edit News Profiles
my $ProfileList_NewType_Functions = <<'END_CODE';
if ($newsprofiles{$i}->{'type'} eq 'RSS File') {
$actions .= '[' . $addon->link({'action' => 'admin', 'adminarea' => 'rssfile_editprof', 'profname' => $i}) . 'Edit</a>] ';
}
END_CODE
$addon->hook('ProfileList_NewType_Functions', \$ProfileList_NewType_Functions);
# Open file prior to building news
my $BuildNews_NewType_Open = <<'END_CODE';
if ($ProfType{$i} eq 'RSS File') {
$FilesOpened{$i} = $addon->open(">$ProfFilePath{$i}/$newsprofiles{$i}->{'textfile'}");
RSSFile_Initialize($addon, $i, $FilesOpened{$i});
}
END_CODE
$addon->hook('BuildNews_NewType_Open', \$BuildNews_NewType_Open);
# Call build routine, if necessary
my $BuildNews_ProfileType = <<'END_CODE';
if ($ProfType{$i} eq 'RSS File') {
RSSFile_BuildItem($i, $FilesOpened{$i});
}
END_CODE
$addon->hook('BuildNews_ProfileType', \$BuildNews_ProfileType);
# Finish off a profile.
my $BuildNews_CloseFile = <<'END_CODE';
if ($ProfType{$key} eq 'RSS File') {
print $value '</channel></rss>';
}
END_CODE
$addon->hook('BuildNews_CloseFile', \$BuildNews_CloseFile);
# Build an RSS File profile (for each news item)
$Subs{'RSSFile_BuildItem'} = <<'END_SUB';
sub RSSFile_BuildItem {
my ($i, $fh) = @_;
my $titlesub = 'RSSFileStyle_' . $i . '_title';
my $linksub = 'RSSFileStyle_' . $i . '_link';
my $descsub = 'RSSFileStyle_' . $i . '_desc';
my $newsht;
print $fh '<item>';
# Title
#=============
$newsht = &$titlesub();
if ($newsht eq ""){ #forgot title....
my $des=$Text;
$newsht = substr(HTMLstrip($des), 0, 20). "...";
}
#character encoding & Latin 1 conversion
#take care of accented characters
$newsht =~ s/([^ \t\n!-~])/sprintf("&#%2d;", ord($1))/eg;
$newsht =~ s/>/>/g; $newsht =~ s/</</g;
$newsht =~ s/&# 147;/"/g; $newsht =~ s/&# 148;/"/g; #remove the space before the numbers...
$newsht =~ s/&(?!(#[0-9]+¦#x[0-9a-fA-F]+¦\w+);)/&/g;
#convert from Latin-1 to UTF-8
$newsht =~ s/([\x80-\xFF])/chr(0xC0¦ord($1)>>6).chr(0x80¦ord($1)&0x3F)/eg;
print $fh '<title>' . substr(HTMLstrip($newsht), 0, 100) . '</title>';
#print "<br>\n title: $newsht";
# Link
#=============
if ($newsprofiles{$i}->{'itemlink'} ne "advanced") {
$newsht = &$linksub();
#print "<br>\n link: $newshtml";
}
else { # added support for multiple maginot profiles
my $adv_link=&rssadv_findURL();
$newsht = $adv_link;
#print "<br>\n advlink: $newsht";
}
#character encoding & Latin 1 conversion
#take care of accented characters
$newsht =~ s/([^ \t\n!-~])/sprintf("&#%2d;", ord($1))/eg;
$newsht =~ s/>/>/g; $newsht =~ s/</</g;
$newsht =~ s/&(?!(#[0-9]+¦#x[0-9a-fA-F]+¦\w+);)/&/g;
#convert from Latin-1 to UTF-8
$newsht =~ s/([\x80-\xFF])/chr(0xC0¦ord($1)>>6).chr(0x80¦ord($1)&0x3F)/eg;
print $fh '<link>' . substr(HTMLstrip($newsht), 0, 500) . '</link>';
# Description
#=============
if ($newsprofiles{$i}->{'itemdesc'}) {
if ($newsprofiles{$i}->{'itemdesc'}!~ /advanced/) {
$newsht = &$descsub();
$newsht = substr(HTMLstrip($newsht), 0, 500);
}
else { #advanced (internal) formatting
my ($advanced, $len) = split(/-/,$newsprofiles{$i}->{'itemdesc'});
my $des=$Text; my $defaultlen=350;
if ($len eq "") {$len=$defaultlen;}
if(length($des) > $len) {
while (substr($des, $len, 1) =~ /\S/) {
$len++ ;
}#end while
$des = substr($des, 0, $len);
$newsht=$des. "...";
}#end if lenght
else {
$newsht= $des;
}
$newsht =~ s/<(br¦BR¦p¦P)>/\n/g ;
#$des =~ s/([\t\n])/sprintf("&#%2d;", ord($1))/eg; #preserve \n and \t
$newsht =~ s/([\t\n])/" "/eg; #preserve \n and \t
$newsht =~ s/<[^>]+>//g; #strips html
}#end else (advanced formatting)
#print "<br>\n descr: $newsht";
#character encoding & Latin 1 conversion
#take care of accented characters
$newsht =~ s/([^ \t\n!-~])/sprintf("&#%2d;", ord($1))/eg;
$newsht =~ s/>/>/g; $newsht =~ s/</</g;
$newsht =~ s/&# 147;/"/g; $newsht =~ s/&# 148;/"/g;
#remove the space before the numbers...
$newsht =~ s/&(?!(#[0-9]+¦#x[0-9a-fA-F]+¦\w+);)/&/g;
#convert from Latin-1 to UTF-8
$newsht =~ s/([\x80-\xFF])/chr(0xC0¦ord($1)>>6).chr(0x80¦ord($1)&0x3F)/eg;
print $fh '<description>' . $newsht . '</description>';
}#end if description
print $fh "</item>\n";
}
END_SUB
#==========================================================
# Routines to find the URL of the current news (internally)
#==========================================================
# routine added to find (internally) the news-URL
# necessary if you use multiple Maginot profiles in the same RSS-feed
# method:
# a/ looks for Maginot Profiles
# (if more than one Maginot profile is found, will select the first in alphabetical order)
# b/ if there is no Maginot profile containing the news, it tries "standard" profile with a call to ViewnewsFixed
# c/ if it is not a standard profile will use an old viewnews call
sub rssadv_findURL {
my @maginotprofiles,@standardprofiles,@otherprofiles; my $ShowNews="";
my ($vnin, $vn);
my ($pcat, $prof);
my $unkownprofoff=0; #=0: display also "unknown" profiles (viewnews link), =1: not display them
my $urlscript = 'http://'.($ENV{'HTTP_HOST'}?$ENV{'HTTP_HOST'} : $ENV{'SERVER_NAME'}).($ENV{'SERVER_PORT'}!= 80 && $ENV{'HTTP_HOST'}!~ /:/? ":$ENV{'SERVER_PORT'}" : ''). $ENV{'SCRIPT_NAME'};
$vnin="viewnews"; $urlscript =~ s/(\w+).(\w+)$/$vnin.$2/g;
$vn="$urlscript";
#ReadProfileInfo();
if ($EnableCategories) {
#find the profiles for the category of the actual news
foreach $prof (keys %newsprofiles) {
unless ( $newsprofiles{$prof}->{enabled} ) { next; }
foreach $pcat (@{$newsprofiles{$prof}->{'cats'}}) {
if (($pcat eq $Category)¦¦($pcat eq "AllCategories")){ #found a good profile ($pcat)!
if (($newsprofiles{$prof}->{'type'}) =~ /Maginot/ ){
push(@maginotprofiles,$prof);}
elsif (($newsprofiles{$prof}->{'type'}) =~ /Standard/ ){
push(@standardprofiles,$prof);}
else {push(@otherprofiles,$prof);}
}#if $pcat eq category
}#foreach pcat
}#foreach $prof
if (@maginotprofiles){
sort @maginotprofiles;
$prof=$maginotprofiles[0];
#============= Maginot
my $magurlnew=&rssadv_MaURL("$prof");
$ShowNews.="$magurlnew";
}#if maginot profile is not empty
elsif (@standardprofiles){
sort @standardprofiles;
$prof=$standardprofiles[0];
#Find the URLs for the given Standard profile
#============= Standard Profile, use ViewnewsFixed
#=== additions (for ViewNews Fixed 1.4+)
#find news (i.e. profile) template file and style
my $newstemplate= $newsprofiles{$prof}->{tmplfile};
my $newsstyle= $newsprofiles{$prof}->{style};
#format those parameters for viewnews fixed
if (($newstemplate =~ /(none)/i)¦¦($newstemplate eq "")) {
$newstemplate = "viewnews.tmpl";
}
$newstemplate =~ /^(.+)\.([^\.]+)$/;
my $fronttmpl = $1; my $exttmpl = $2;
$newsstyle =~ /^(NewsStyle)_([^\.]+)$/;
my $frontstylename = $1; my $stylename = $2;
if ($stylename =~ /Default$/i) {
$stylename = 'Default+News+Style';
} elsif ($stylename =~ /DefaultHeadline$/i) {
$stylename = 'Default+Headline+Style';
} else {
$stylename =~ s/ /+/g;
}
$ShowNews.="$vn?id=$newsid&style=$stylename&tmpl=$fronttmpl";
}#end elsif (i.e.if news is not maginot)
else { #============= Unknown profile
if ($unkownprofoff==0){
$ShowNews.="$vn?id=$newsid";
}#end if $unkownprofoff=0 (i.e. unkown profiles on)
}#end else
}#if enable categories
else { #no category addon...
$ShowNews.="$vn?id=$newsid&style=$stylename&tmpl=$fronttmpl";
}#else (no categories)
return $ShowNews;
}#sub rssadv_findURL
#==============================
# Maginot URL finder subroutine
#==============================
sub rssadv_MaURL {
my $prof = shift;
#ReadConfigInfo();
if ( $newsprofiles{$prof}->{enabled} ) { #go on if enabled
if( $newsprofiles{$prof}->{'type'} eq 'Maginot Static' ) {
$PPStaticOpts{$prof} = {
staticfield => $newsprofiles{$prof}->{'ppstaticfield'} ¦¦ 'newsid',
maxlength => $newsprofiles{$prof}->{'ppstaticmaxfnlength'} ¦¦ 26,
filext => $newsprofiles{$prof}->{'ppstaticfilext'} ¦¦ $CConfig{'ArcHtmlExt'},
dirurl => $newsprofiles{$prof}->{'ppstaticdirurl'} ¦¦ ''
};#ppstatic
}#end if (i.e. Maginot static)
elsif( $newsprofiles{$prof}->{type} eq 'Maginot Static Split' ) {
my( @splitsubs, @splittmpl );
push( @splitsubs, $newsprofiles{$prof}->{style} );
push( @splittmpl, $newsprofiles{$prof}->{tmplfile} ) if( $newsprofiles{$prof}->{tmplfile} );
@_ = split( /;*\s*;\s*;*/, $newsprofiles{$prof}->{ppsplittmpl} );
foreach my $i (@_) {
push( @splittmpl, $i ) if( $i );
}
@_ = split( /;*\s*;\s*;*/, $newsprofiles{$prof}->{ppsplitsubs} );
foreach my $i (@_) {
$i =~ s/[^a-z0-9_]//g;
push( @splitsubs, qq~NewsStyle_$i~ ) if( $i );
}
$PPStaticOpts{$prof} = {
staticfield => $newsprofiles{$prof}->{'ppstaticfield'} ¦¦ 'newsid',
maxlength => $newsprofiles{$prof}->{'ppstaticmaxfnlength'} ¦¦ 26,
filext => $newsprofiles{$prof}->{'ppstaticfilext'} ¦¦ $CConfig{'ArcHtmlExt'},
dirurl => $newsprofiles{$prof}->{'ppstaticdirurl'} ¦¦ ''
};#end ppstatic
@{$PPStaticOpts{$prof}->{splittmpl}} = @splittmpl;
@{$PPStaticOpts{$prof}->{splitsubs}} = @splitsubs;
}#end elseif (i.e. maginot split)
my $f = ${$PPStaticOpts{$prof}->{'staticfield'}};
$f =~ s~[^A-Za-z0-9\-\.]~~g;
$f = substr( $f, 0, $PPStaticOpts{$prof}->{'maxlength'} ) . '.' . $PPStaticOpts{$prof}->{'filext'};
$f = qq~$PPStaticOpts{$prof}->{'dirurl'}/$f~;
#try to prevent user errors (when they use relative URL, instead of full URL in the "Static Page Directory URL")
if (($f!~ /http/)&& ($f!~ /$CConfig{'htmlfile_path'}/)&& ($iuserelativeurls==1)){ #relative path
my $urlmain = 'http://'.($ENV{'HTTP_HOST'}?$ENV{'HTTP_HOST'} : $ENV{'SERVER_NAME'}).($ENV{'SERVER_PORT'}!= 80 && $ENV{'HTTP_HOST'}!~ /:/? ":$ENV{'SERVER_PORT'}" : '');
$f = qq~$urlmain/$f~;
}#end if relative path
return $f;
}#end if profile enabled
else { return "profile $prof is disabled";}
} #end maURL sub
#========================
# end finding the URLs
#========================
# Set up and begin an RSS File profile
$Subs{'RSSFile_Initialize'} = <<'END_SUB';
sub RSSFile_Initialize {
my ($addon, $i, $fh) = @_;
my $set = $newsprofiles{$i};
unless ($set->{'channeltitle'} && $set->{'channeltitlelink'} && $set->{'channeldesc'} &&
$set->{'channellang'} && $set->{'itemtitle'} && $set->{'itemlink'}) {
$addon->minorError("RSS File profile $i is not fully configured. Please configure it via Edit News Profiles.");
}
print $fh q~<?xml version="1.0"?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version="0.91">
<channel>
~;
print $fh '<title>' . substr($set->{'channeltitle'},0,100) . '</title>';
print $fh '<link>' . substr($set->{'channeltitlelink'},0,500) . '</link>';
if ($set->{'channeldesc'}) {
print $fh '<description>' . substr($set->{'channeldesc'},0,500) . '</description>';
}
print $fh '<language>' . substr($set->{'channellang'}, 0, 500) . '</language>';
>>> if ($set->{'pubdate'}) {
print $fh '<pubDate>'.substr(HTMLstrip($set->{'pubdate'}), 0, 100) . "</pubDate>"; <<<
}
#===== date/time
my @Monthsmall = (q~Jan~, q~Feb~, q~Mar~, q~Apr~, q~May~, q~Jun~, q~Jul~, q~Aug~, q~Sep~, q~Oct~, q~Nov~, q~Dec~);
my $difftime=0; # difference [hours] local time-server time
my ($sec,$min,$hour,$mday,$mon,$year,$wday)=(localtime(time + (3600*$difftime)))[0..6];
$year += 1900; my $mon_ok=$mon+1;
# format rfc822, i.e. 02 Oct 2002 13:00:00 GMT
# time zone alternatives: "UT" / "GMT"
# ; Universal Time
# ; North American : UT
# / "EST" / "EDT" ; Eastern: - 5/ - 4
# / "CST" / "CDT" ; Central: - 6/ - 5
# / "MST" / "MDT" ; Mountain: - 7/ - 6
# / "PST" / "PDT" ; Pacific: - 8/ - 7
my $timezone="GMT";
>>> my $date_now = sprintf ("%0.2d $Monthsmall[$mon] $year %0.2d:%0.2d:%0.2d $timezone", $mday, $hour, $min, $sec); <<<
print $fh '<lastBuildDate>'.substr(HTMLstrip($date_now), 0, 100) . "</lastBuildDate>\n";
if ($set->{'imageurl'}) {
print $fh '<image><title>' . substr($set->{'imagealt'},0,100) . '</title>';
print $fh '<url>' . substr($set->{'imageurl'},0,500) . '</url>';
print $fh '<link>' . substr($set->{'imagelink'},0,500) . '</link>';
print $fh '<width>' . $set->{'imagewidth'} . '</width>';
print $fh '<height>' . $set->{'imageheight'}. '</height>';
print $fh '<description>' . substr($set->{'imagedesc'},0,100) . '</description>' if $set->{'imagedesc'};
print $fh "</image>\n";
}
NeedFile('cradmin.pl');
eval StyletoPerl('RSSFileStyle_' . $i . '_title', $set->{'itemtitle'});
$addon->fatalError("Syntax error in item title for profile $i. Error: $@") if $@;
eval StyletoPerl('RSSFileStyle_' . $i . '_link', $set->{'itemlink'});
$addon->fatalError("Syntax error in item link for profile $i. Error: $@") if $@;
if ($set->{'itemdesc'}) {
eval StyletoPerl('RSSFileStyle_' . $i . '_desc', $set->{'itemdesc'});
$addon->fatalError("Syntax error in item description for profile $i. Error: $@") if $@;
}
}
END_SUB
# Display Edit Profile screen
$Subs{'RSSFile_EditProfile'} = <<'END_SUB';
sub RSSFile_EditProfile {
my $addon = shift;
my $prof = $in{'profname'};
$addon->pageHeader(qq~Edit RSS File Profile~,1);
print $addon->form( {'profname' => $prof, 'action' => 'admin', 'adminarea' => 'rssfile_editprofsave'} );
SettingsEngine_Display(RSSFile_EditProfDefinition($prof), $newsprofiles{$prof});
print $addon->submitButton('Save Settings'), '</form>';
$addon->pageFooter();
}
END_SUB
# Save changes from Edit Profile
$Subs{'RSSFile_EditProfileSave'} = <<'END_SUB';
sub RSSFile_EditProfileSave {
my $addon = shift;
my $prof = $in{'profname'};
$addon->fatalError("Invalid profile information") unless ($prof && $newsprofiles{$prof});
# HOOK: EditProfileSave
if($Addons{'EditProfileSave'}){my $w;foreach $w (@{$Addons{'EditProfileSave'}}){my $addon=$w->[2];eval ${$w->[0]};AErr($addon,$@)if $@;};}
$newsprofiles{$prof}->{'ForceFullBuild'} = 1;
SettingsEngine_Save(RSSFile_EditProfDefinition($prof), $newsprofiles{$prof});
WriteProfileInfo();
SettingsConfirm(PageLink({'action' => 'admin', 'adminarea' => 'profilelist'}) . 'Back to Edit Profiles</a>.');
}
END_SUB
# The settings for the Edit Profile screen
$Subs{'RSSFile_EditProfDefinition'} = <<'END_SUB';
sub RSSFile_EditProfDefinition {
my $prof = shift;
my @EditProfileSettings = (
['heading: General Settings'],
['textfile', 'File Name', "The name of the RSS file which this profile will generate (example: $prof.xml)."],
['filepath', 'File Path', "The absolute path to the directory in which files will be created, with no trailing slash. <b>Leave blank</b> to use the default HTML Files path (currently $CConfig{'htmlfile_path'})."],
['agefilter', 'Filter By Time', "The number of days after which news will be considered old. News posted more than the specified number of days ago will not be included in this profile. <b>Leave blank</b> if you do not want to filter by time."],
['numfilter', 'Filter By Number', "The maximum number of news items that will be included in this profile. For instance, if you set this to 10, then the 11th-newest item will not be included. <b>Leave blank</b> if you do not want to filter by number. RSS File profiles will be cut off after 15 news items."]);
# Addons: don't assume that you're on the Edit Profile screen for a Standard profile here!
# New profile types should also incorporate this hook; this is the place to add news-selecting options,
# like a category selection box.
# HOOK: EditProfDefinition_1
if($Addons{'EditProfDefinition_1'}){my $w;foreach $w (@{$Addons{'EditProfDefinition_1'}}){my $addon=$w->[2];eval ${$w->[0]};AErr($addon,$@)if $@;};}
push(@EditProfileSettings,
['draw_line'],
>>> Stuff removed to reduce post <<< ] ],
['heading: Image (Optional)'],
['imageurl', 'Image URL', 'If you would like your channel to include an image, you must enter information for all settings in this section. Here, enter the URL to the image.'],
['imagealt', 'Image ALT Text', 'Alternate text for those unable to view the image. (Required if image.)'],
['imagewidth', 'Image Width', 'Width of image, in pixels. Maximum 144 pixels wide. (Required if image.)'],
['imageheight', 'Image Height', 'Height of image, in pixels. Maximum 400 pixels high. (Required if image.)'],
['imagelink', 'Image Link', "If you'd like the image to be a clickable link, enter the destination URL here. (Optional.)"],
['imagedesc', 'Image Caption', "If you'd like the image to have a caption, enter it here. Maximum 100 characters. (Optional.)"],
['heading: Item Information'],
['itemtitle', 'Item Title', "Controls the title of each individual news item. You may use the same tags as used in Edit News Styles (e.g. <Field: Subject>). (Required.)"],
['itemlink', 'Item Link', "Controls where each individual news item is linked. You may use the same tags as used in Edit News Styles (e.g. http://www.mysite.com/news.html<ItemAnchor>). Use 'advanced' (with no quotes) for automatic single and multiple profile handling (Required.)"],
['itemdesc', 'Item Description', "News items may optionally have a description. You may use the same tags as used in Edit News Styles. Note that descriptions will be cut off if over 500 characters, so use of something like <Snip 450: Field: Text> is recommended. Use 'advanced-450' (with no quotes) for automatic enhanced formatting and truncation preventing (Optional.)"]
);
return \@EditProfileSettings;
}
END_SUB
1;
__END__
Could it be that HTMLstrip is handling $set->{'pubdate'} versus $date_now differently?
#
# pubDate uses $set->{'pubdate'}
#
print $fh '<pubDate>'
.substr(HTMLstrip($set->{'pubdate'}), 0, 100)
. "</pubDate>";
#
#
#
# and lastBuildDate uses $date_now
#
print $fh '<lastBuildDate>'
.substr(HTMLstrip($date_now), 0, 100)
. "</lastBuildDate>\n";
#
#