diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-06-03 15:07:00 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-06-03 15:07:00 +0800 |
commit | db2481f2070857efbb17202226f4d958de2347c1 (patch) | |
tree | 9307e73bb752b86405757d9392d520a5982bfb3c | |
parent | 157234a6ed4a6858dd2c5e7a904d49db4a87ab39 (diff) | |
download | pttbbs-db2481f2070857efbb17202226f4d958de2347c1.tar pttbbs-db2481f2070857efbb17202226f4d958de2347c1.tar.gz pttbbs-db2481f2070857efbb17202226f4d958de2347c1.tar.bz2 pttbbs-db2481f2070857efbb17202226f4d958de2347c1.tar.lz pttbbs-db2481f2070857efbb17202226f4d958de2347c1.tar.xz pttbbs-db2481f2070857efbb17202226f4d958de2347c1.tar.zst pttbbs-db2481f2070857efbb17202226f4d958de2347c1.zip |
add Template-Compiled for blog
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@928 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-x | pttbbs/blog/blog.pl | 5 | ||||
-rw-r--r-- | pttbbs/sample/LocalVars.pm | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/pttbbs/blog/blog.pl b/pttbbs/blog/blog.pl index 8568c759..c14ca34a 100755 --- a/pttbbs/blog/blog.pl +++ b/pttbbs/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/pttbbs/sample/LocalVars.pm b/pttbbs/sample/LocalVars.pm index a2ad4ab5..4e52d0f0 100644 --- a/pttbbs/sample/LocalVars.pm +++ b/pttbbs/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'; |