summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-03 15:07:00 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-03 15:07:00 +0800
commit796e3cd5ab96471fea69e2ec766c018c1cc435af (patch)
tree593c721a527a5c0333cd91439589918df1f6e903
parentaab2e007ac5ff632835653a727d01b1d4de3a9eb (diff)
downloadpttbbs-796e3cd5ab96471fea69e2ec766c018c1cc435af.tar
pttbbs-796e3cd5ab96471fea69e2ec766c018c1cc435af.tar.gz
pttbbs-796e3cd5ab96471fea69e2ec766c018c1cc435af.tar.bz2
pttbbs-796e3cd5ab96471fea69e2ec766c018c1cc435af.tar.lz
pttbbs-796e3cd5ab96471fea69e2ec766c018c1cc435af.tar.xz
pttbbs-796e3cd5ab96471fea69e2ec766c018c1cc435af.tar.zst
pttbbs-796e3cd5ab96471fea69e2ec766c018c1cc435af.zip
add Template-Compiled for blog
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@928 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-xblog/blog.pl5
-rw-r--r--sample/LocalVars.pm8
2 files changed, 10 insertions, 3 deletions
diff --git a/blog/blog.pl b/blog/blog.pl
index 8568c759..c14ca34a 100755
--- a/blog/blog.pl
+++ b/blog/blog.pl
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $Id: blog.pl,v 1.17 2003/06/03 02:50:38 in2 Exp $
+# $Id: blog.pl,v 1.18 2003/06/03 07:06:59 in2 Exp $
use CGI qw/:standard/;
use lib qw/./;
use LocalVars;
@@ -205,11 +205,14 @@ sub main
}
# 用 Template Toolkit 輸出
+ mkdir "$BLOGCACHE/$brdname";
$tmpl = Template->new({INCLUDE_PATH => '.',
ABSOLUTE => 0,
RELATIVE => 0,
RECURSION => 0,
EVAL_PERL => 0,
+ COMPILE_EXT => '.pl',
+ COMPILE_DIR => "$BLOGCACHE/$brdname/",
});
chdir "$BLOGDATA/$brdname/";
$tmpl->process($fn, \%th) ||
diff --git a/sample/LocalVars.pm b/sample/LocalVars.pm
index a2ad4ab5..4e52d0f0 100644
--- a/sample/LocalVars.pm
+++ b/sample/LocalVars.pm
@@ -6,7 +6,7 @@ require Exporter;
$hostname $MYHOSTNAME $FQDN $SMTPSERVER
$BBSHOME $JOBSPOOL $TMP
$TAR $LYNX $GREP
- $BLOGDATA
+ $BLOGDATA $BLOGCACHE
/;
# host
@@ -25,5 +25,9 @@ $TAR = '/usr/bin/tar';
$LYNX = '/usr/local/bin/lynx'; # /usr/ports/www/lynx
$GREP = '/usr/bin/grep';
-# blog
+# BLOG:
+# $BLOGDATA 是用來放置 Blog 資料的路徑
+# $BLOGCACHE是用來放置 Template compiled 資料的路徑,
+# 須為 apache owner 可寫入
$BLOGDATA = '/home/bbs/blog/data';
+$BLOGCACHE = '/home/bbs/blog/cache';