svnno****@sourc*****
svnno****@sourc*****
2008年 5月 20日 (火) 10:12:51 JST
Revision: 660 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=660 Author: tach Date: 2008-05-20 10:12:51 +0900 (Tue, 20 May 2008) Log Message: ----------- Add feature to create slashhead/slashfoot file for mobile mode Modified Paths: -------------- slashjp/branches/2.5.0.192/debian/changelog slashjp/branches/2.5.0.192/themes/slashcode/tasks/new_headfoot.pl -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-05-19 12:53:04 UTC (rev 659) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-05-20 01:12:51 UTC (rev 660) @@ -18,8 +18,9 @@ * Add feature to write static html file for mobile mode * Add feature to enable/disable PERL / RAWPERL directives on Template - use constant 'enable_template_evalperl' + * Add feature to create slashhead/slashfoot file for mobile mode - -- Taku YASUI <tach****@osdn*****> Mon, 19 May 2008 10:05:33 +0000 + -- Taku YASUI <tach****@osdn*****> Tue, 20 May 2008 01:11:50 +0000 slash (2.5.0.192-12) unstable; urgency=low Modified: slashjp/branches/2.5.0.192/themes/slashcode/tasks/new_headfoot.pl =================================================================== --- slashjp/branches/2.5.0.192/themes/slashcode/tasks/new_headfoot.pl 2008-05-19 12:53:04 UTC (rev 659) +++ slashjp/branches/2.5.0.192/themes/slashcode/tasks/new_headfoot.pl 2008-05-20 01:12:51 UTC (rev 660) @@ -38,6 +38,31 @@ my $cssbase = slashDisplay("html-header", { only_css => 1}, { Return => 1 }); print $fh $cssbase; + # mobile mode + if ($constants->{mobile_enabled} && $constants->{mobile_staticdir}) { + $file = "$constants->{mobile_staticdir}/slashhead.inc"; + open $fh, ">$file" or die "Can't open $file : $!"; + binmode $fh, ':utf8'; + setCurrentForm('ssi', 1); + setCurrentUser("mobile", 1); + $header = header("", "", { noheader => 1, Return => 1 }); + setCurrentUser("mobile", 0); + setCurrentForm('ssi', 0); + print $fh $header; + close $fh; + + $file = "$constants->{mobile_staticdir}/slashfoot.inc"; + open $fh, ">$file" or die "Can't open $file : $!"; + binmode $fh, ':utf8'; + setCurrentForm('ssi', 1); + setCurrentUser("mobile", 1); + $header = footer({ noheader => 1, Return => 1, }); + setCurrentUser("mobile", 0); + setCurrentForm('ssi', 0); + print $fh $header; + close $fh; + } + return; };