X-Git-Url: https://git.deb.at/?p=pkg%2Fblosxom.git;a=blobdiff_plain;f=blosxom.cgi;h=068b7183d1afb9f85010de247d56f428670346e7;hp=43afa7df017ec0d4152adf1d6d2156e7a68ec7b0;hb=364a736f0bce810faa7f809d4eb6cd74c2972d5b;hpb=a952aeaad22f19a76e52ab9306a6a6128f027afe diff --git a/blosxom.cgi b/blosxom.cgi index 43afa7d..068b718 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -139,10 +139,10 @@ $template = # Bring in the templates %template = (); while () { - last if /^(__END__)?$/; - my($ct, $comp, $txt) = /^(\S+)\s(\S+)\s(.*)$/; + last if /^(__END__)$/; + my($ct, $comp, $txt) = /^(\S+)\s(\S+)\s(.*)$/ or next; $txt =~ s/\\n/\n/mg; - $template{$ct}{$comp} = $txt; + $template{$ct}{$comp} .= $txt . "\n"; } # Plugins: Start @@ -247,7 +247,9 @@ if (!$ENV{GATEWAY_INTERFACE} and param('-password') and $static_password and par if ($indexes{$path} == 1) { # category $path_info = $p; - print $fh_w &generate('static', $p, '', $flavour, $content_type); + # individual story + $path_info =~ s!\.$file_extension$!\.$flavour!; + print $fh_w &generate('static', $path_info, '', $flavour, $content_type); } else { # date local ($path_info_yr,$path_info_mo,$path_info_da, $path_info) = @@ -437,18 +439,73 @@ sub nice_date { # Default HTML and RSS template bits __DATA__ html content_type text/html -html head $blog_title $path_info_da $path_info_mo $path_info_yr
$blog_title
$path_info_da $path_info_mo $path_info_yr

-html story

$title
$body

posted at: $ti | path: $path | permanent link to this entry

\n -html date

$dw, $da $mo $yr

\n -html foot

+ +html head +html head +html head +html head $blog_title $path_info_da $path_info_mo $path_info_yr +html head +html head +html head +html head
+html head $blog_title
+html head $path_info_da $path_info_mo $path_info_yr +html head
+html head

+ +html story

+html story $title
+html story $body
+html story
+html story posted at: $ti | path: $path | permanent link to this entry +html story

+ +html date

$dw, $da $mo $yr

+ +html foot +html foot

+html foot

+html foot +html foot
+html foot +html foot + rss content_type text/xml -rss head \n\n\n\n\n \n $blog_title $path_info_da $path_info_mo $path_info_yr\n $url\n $blog_description\n $blog_language\n -rss story \n $title\n $url/$yr/$mo_num/$da#$fn\n $body\n \n -rss date \n -rss foot \n + +rss head +rss head +rss head +rss head +rss head +rss head +rss head $blog_title $path_info_da $path_info_mo $path_info_yr +rss head $url +rss head $blog_description +rss head $blog_language + +rss story +rss story $title +rss story $url/$yr/$mo_num/$da#$fn +rss story $body +rss story + +rss date + +rss foot +rss foot + error content_type text/html -error head

Error: I'm afraid this is the first I've heard of a "$flavour" flavoured Blosxom. Try dropping the "/+$flavour" bit from the end of the URL.\n\n -error story

$title
$body #

\n -error date

$dw, $da $mo $yr

\n -error foot + +error head +error head +error head

Error: I'm afraid this is the first I've heard of a "$flavour" flavoured Blosxom. Try dropping the "/+$flavour" bit from the end of the URL. + + +error story

$title
+error story $body #

+ +error date

$dw, $da $mo $yr

+ +error foot +error foot __END__