]> git.p6c8.net - selfforum.git/blobdiff - selfforum-cgi/shared/Template/_thread.pm
if is_email and is_URL are called without a parameter, now $_ will be evaluated
[selfforum.git] / selfforum-cgi / shared / Template / _thread.pm
index 7b65d1d2b3a43184bf170a8a11bf0ee13632f137..c47f28c3ee4a577d8b411b0978cfcdba8eca96fa 100644 (file)
@@ -4,27 +4,37 @@ package Template::_thread;
 #                                                                              #
 # File:        shared/Template/_thread.pm                                      #
 #                                                                              #
-# Authors:     Andre Malo <nd@o3media.de>, 2001-04-02                          #
+# Authors:     Andre Malo <nd@o3media.de>, 2001-06-16                          #
 #                                                                              #
 # Description: convert parsed thread to HTML                                   #
 #                                                                              #
 ################################################################################
 
 use strict;
+use vars qw(
+  @EXPORT
+  $VERSION
+);
 
 use Encode::Plain; $Encode::Plain::utf8 = 1;
 use Posting::_lib qw(short_hr_time);
 use Template;
 use Template::_query;
 
+################################################################################
+#
+# Version check
+#
+$VERSION = do { my @r =(q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+
 ################################################################################
 #
 # Export
 #
 use base qw(Exporter);
-@Template::_thread::EXPORT = qw(html_thread);
+@EXPORT = qw(html_thread);
 
-### sub html_thread ($$$) ######################################################
+### html_thread () #############################################################
 #
 # create HTML string
 #
@@ -70,7 +80,9 @@ sub html_thread ($$$) {
              $temp -> {subject} => $_ -> {subject},
              $temp -> {cat}     => $_ -> {cat},
              $temp -> {time}    => plain(short_hr_time ($_ -> {time})),
-             $temp -> {link}    => query_string({$t => $tid, $p => $_ -> {mid}})
+             $temp -> {link}    => query_string({$t => $tid, $p => $_ -> {mid}}),
+             $temp -> {tid}     => $tid,
+             $temp -> {mid}     => $_ -> {mid},
            },
            $par -> {addParam}
           )} .
@@ -90,7 +102,9 @@ sub html_thread ($$$) {
              $temp -> {subject} => $_ -> {subject},
              $temp -> {cat}     => $_ -> {cat},
              $temp -> {time}    => plain(short_hr_time ($_ -> {time})),
-             $temp -> {link}    => query_string({$t => $tid, $p => $_ -> {mid}})
+             $temp -> {link}    => query_string({$t => $tid, $p => $_ -> {mid}}),
+             $temp -> {tid}     => $tid,
+             $temp -> {mid}     => $_ -> {mid},
            },
            $par -> {addParam}
           )}.
@@ -134,7 +148,9 @@ sub html_thread ($$$) {
              $temp -> {subject} => $_ -> {subject},
              $temp -> {cat}     => $_ -> {cat},
              $temp -> {time}    => plain(short_hr_time ($_ -> {time})),
-             $temp -> {link}    => query_string({$t => $tid, $p => $_ -> {mid}})
+             $temp -> {link}    => query_string({$t => $tid, $p => $_ -> {mid}}),
+             $temp -> {tid}     => $tid,
+             $temp -> {mid}     => $_ -> {mid},
            },
            $par -> {addParam}
           )}.
@@ -153,7 +169,9 @@ sub html_thread ($$$) {
              $temp -> {subject} => $_ -> {subject},
              $temp -> {cat}     => $_ -> {cat},
              $temp -> {time}    => plain(short_hr_time ($_ -> {time})),
-             $temp -> {link}    => query_string({$t => $tid, $p => $_ -> {mid}})
+             $temp -> {link}    => query_string({$t => $tid, $p => $_ -> {mid}}),
+             $temp -> {tid}     => $tid,
+             $temp -> {mid}     => $_ -> {mid},
            },
            $par -> {addParam}
           )}.
@@ -165,10 +183,9 @@ sub html_thread ($$$) {
   \$html;
 }
 
-# keep require happy
+# keep 'require' happy
 1;
 
 #
 #
-### end of Template::_thread ###################################################
-
+### end of Template::_thread ###################################################
\ No newline at end of file

patrick-canterino.de