OSDN Git Service

refactored code, and added license message.
authorTaku Amano <taku@toi-planning.net>
Tue, 24 Feb 2009 07:46:47 +0000 (16:46 +0900)
committerTaku Amano <taku@toi-planning.net>
Wed, 25 Feb 2009 08:36:48 +0000 (17:36 +0900)
12 files changed:
config.yaml
lib/Lovers/App/LoveLetter.pm [moved from lib/Lovers/App.pm with 81% similarity]
lib/Lovers/App/Mote.pm [new file with mode: 0644]
php/block.mtiflovelettercancel.php
php/block.mtifloveletterok.php
php/block.mtloveletter.php
php/block.mtloverspopularwith.php
php/block.mtmote.php
php/function.mtlovelettercancel.php
php/function.mtloveletterok.php
php/function.mtloveletterresponse.php
php/init.Lovers.php

index 79e2462..89c437a 100644 (file)
@@ -29,35 +29,37 @@ author_link: http://mt-acme.sourceforge.jp/
 plugin_link: http://mt-acme.sourceforge.jp/lovers/
 doc_link: http://mt-acme.sourceforge.jp/lovers/
 
-#Localization
+# localization
 l10n_class: Lovers::L10N
 
+# objects
 schema_version: 2
 object_types:
     love_letter: Lovers::LoveLetter
 
-#tag
+# tag
 tags:
     help_url: http://mt-acme.sourceforge.jp/lovers/tags#%t
     function:
-        LoveLetterResponse: Lovers::App::_hdlr_love_letter_response
-        LoveLetterOK: Lovers::App::_hdlr_love_letter_ok
-        LoveLetterCancel: Lovers::App::_hdlr_love_letter_cancel
-
+        LoveLetterResponse: Lovers::App::LoveLetter::_hdlr_love_letter_response
+        LoveLetterOK: Lovers::App::LoveLetter::_hdlr_love_letter_ok
+        LoveLetterCancel: Lovers::App::LoveLetter::_hdlr_love_letter_cancel
     block:
-        LoversPopularWith: Lovers::App::_hdlr_popular_with
-        Mote:  Lovers::App::_hdlr_popular_with
-        LoveLetter: Lovers::App::_hdlr_love_letter
-        IfLoveLetterOK: Lovers::App::_hdlr_if_love_letter_ok
-        IfLoveLetterCancel: Lovers::App::_hdlr_if_love_letter_cancel
+        LoversPopularWith: Lovers::App::Mote::_hdlr_popular_with
+        Mote:  Lovers::App::Mote::_hdlr_popular_with
+        LoveLetter: Lovers::App::LoveLetter::_hdlr_love_letter
+        IfLoveLetterOK: Lovers::App::LoveLetter::_hdlr_if_love_letter_ok
+        IfLoveLetterCancel: Lovers::App::LoveLetter::_hdlr_if_love_letter_cancel
 
+# applications
 applications:
     cms:
         methods:
             love_letter:
-                code: Lovers::App::app_love_letter
+                code: Lovers::App::LoveLetter::app_love_letter
                 requires_login: 0
 
+# callbacks
 callbacks:
-    MT::App::CMS::template_source.rebuilding: Lovers::App::source_rebuilding
-    *::post_build: Lovers::App::post_build
+    MT::App::CMS::template_source.rebuilding: Lovers::App::Mote::source_rebuilding
+    *::post_build: Lovers::App::Mote::post_build
similarity index 81%
rename from lib/Lovers/App.pm
rename to lib/Lovers/App/LoveLetter.pm
index f36fc17..5d1c25d 100644 (file)
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 # THE SOFTWARE.
 
-package Lovers::App;
+package Lovers::App::LoveLetter;
 use strict;
 
-sub _hdlr_popular_with {
-    my($ctx, $args, $cond) = @_;
-       my $app = MT->instance;
-       my $plugin = MT->component('Lovers');
-
-    my $res = '';
-    my $builder = $ctx->stash('builder');
-    my $tokens = $ctx->stash('tokens');
-
-    defined($res = $builder->build($ctx, $tokens, $cond))
-        or return $ctx->error( $builder->errstr );
-
-       $app->session(
-        'lovers_message',
-        $res || $plugin->translate('My heart begins to throb...')
-    );
-       $app->session('lovers_type', $args->{'type'} || '');
-}
-
-sub source_rebuilding {
-       my ($cb, $app, $tmpl) = @_;
-       my $plugin = $app->component('Lovers');
-       my $blog_id = $app->param('blog_id');
-       my ($old, $new);
-
-       if (my $text = $app->param('text')) {
-               if ($text =~ m/<mt:?mote([^>]*)>(.*)<\/mt:?mote>/is) {
-                       $app->session('lovers_message', $2);
-
-                       my $args = $1;
-                       $args =~ m/type\s*=\s*"?(\w+)/is;
-                       $app->session('lovers_type', $1 || '');
-               }
-       }
-
-       my $msg = $app->session('lovers_message');
-       my $type = $app->session('lovers_type') || 'heat';
-
-       if (! $msg) {
-               return;
-       }
-
-       my $uri = $app->static_path . 'plugins/Lovers/icon/' . $type . '.gif';
-
-       if ($type eq 'persistent') {
-               $new = <<__EOF__;
-<style type="text/css">
-div.msg-publishing {
-    background-color:#FFFFFF;
-       background-image: none;
-}
-</style>
-__EOF__
-       }
-       else {
-               $new = <<__EOF__;
-<style type="text/css">
-div.msg-publishing {
-    background-color:#FFFFFF;
-    background-image:url($uri);
-}
-</style>
-__EOF__
-       }
-       $old = '<mt:if name="is_one_index">';
-       $$tmpl =~ s/($old)/$new\n$1/;
-
-    $old = '\s+<__trans phrase="Publishing.*';
-    $new = $msg;
-
-       if ($type eq 'persistent') {
-               require MT::Util;
-               $new =
-                       '<script type="text/javascript">' .
-                       join('', map({
-                               $_ =~ s/^\s*|\s*$//gs;
-                               if ($_) {
-                                       "alert('" . MT::Util::encode_js($_) . "');\n";
-                               }
-                               else {
-                                       '';
-                               }
-                       } split(/\n/, $new))) .
-                       '</script>';
-       }
-       else {
-               $new =~ s/^\s*|\s*$//gs;
-               $new =~ s/\r?\n/<br>/g;
-               $new =~ s/([\w._-~]+@[\w._-~]+)/<a href="$1">$1<\/a>/;
-       }
-
-       $$tmpl =~ s/($old)/$new/g;
-}
-
 sub _hdlr_love_letter_response {
     my($ctx, $args, $cond) = @_;
     my $width = $args->{'width'} ? ' width: ' . $args->{'width'} : '';
@@ -150,13 +56,6 @@ sub _hdlr_love_letter {
        my $plugin = MT->component('Lovers');
        my $password = $args->{'password'} || '';
 
-    my $res = '';
-    my $builder = $ctx->stash('builder');
-    my $tokens = $ctx->stash('tokens');
-
-    defined($res = $builder->build($ctx, $tokens, $cond))
-        or return $ctx->error( $builder->errstr );
-
     my $entry = $ctx->stash('entry');
     my $entry_id = $entry ? $entry->id : 0;
     my $love_letter_id = $args->{'id'} || 0;
@@ -215,6 +114,14 @@ sub _hdlr_love_letter {
 
        $obj->save;
 
+
+    my $res = '';
+    my $builder = $ctx->stash('builder');
+    my $tokens = $ctx->stash('tokens');
+
+    defined($res = $builder->build($ctx, $tokens, $cond))
+        or return $ctx->error( $builder->errstr );
+
        if ($password) {
                require Crypt::CBC;
                require MIME::Base64;
@@ -442,8 +349,6 @@ __EOF__
 
 sub _hdlr_if_love_letter_ok {
     my($ctx, $args, $cond) = @_;
-    my $tmpl = $ctx->stash('template');
-    my $app = MT->instance;
 
     my $res = '';
     my $builder = $ctx->stash('builder');
@@ -452,19 +357,15 @@ sub _hdlr_if_love_letter_ok {
     defined($res = $builder->build($ctx, $tokens, $cond))
         or return $ctx->error( $builder->errstr );
 
-    $res = <<__EOF__;
+    <<__EOF__;
 <div name="if_love_letter_ok" style="display: none">
 $res
 </div>
 __EOF__
-
-    $res;
 }
 
 sub _hdlr_if_love_letter_cancel {
     my($ctx, $args, $cond) = @_;
-    my $tmpl = $ctx->stash('template');
-    my $app = MT->instance;
 
     my $res = '';
     my $builder = $ctx->stash('builder');
@@ -473,20 +374,23 @@ sub _hdlr_if_love_letter_cancel {
     defined($res = $builder->build($ctx, $tokens, $cond))
         or return $ctx->error( $builder->errstr );
 
-    $res = <<__EOF__;
+    <<__EOF__;
 <div name="if_love_letter_cancel" style="display: none">
 $res
 </div>
 __EOF__
-
-    $res;
 }
 
 sub app_love_letter {
        my ($app) = @_;
-
        my $plugin = MT->component('Lovers');
 
+       my $message = sub {
+               <<__MSG__;
+<message>@{[ $_[0] ]}</message>
+__MSG__
+       };
+
     my $ll_class = $app->model('love_letter');
        my $ll = $ll_class->load({
                entry_id => $app->param('entry_id') || 0,
@@ -495,19 +399,15 @@ sub app_love_letter {
        });
 
        if (! $ll) {
-               return <<__MSG__;
-<message>@{[
-       $plugin->translate('unknown love letter')
-]}</message>
-__MSG__
+               return $message->(
+                       $plugin->translate('unknown love letter')
+               );
        }
 
        if (! $app->param('ok') && ! $app->param('cancel')) {
-               return <<__MSG__;
-<message>@{[
-       $plugin->translate('vague response')
-]}</message>
-__MSG__
+               return $message->(
+                       $plugin->translate('vague response')
+               );
        }
 
        my $param = $ll->mail_param;
@@ -533,18 +433,7 @@ __MSG__
        MT::Mail->send( \%head, $body )
                or return $app->error( MT::Mail->errstr() );
 
-       return <<__MSG__;
-<message>ok</message>
-__MSG__
-
-}
-
-sub post_build {
-       my ($cb) = @_;
-
-       my $app = MT->instance;
-       my $msg = $app->session('lovers_message', '');
-       my $type = $app->session('lovers_type', '');
+       return $message->('ok');
 }
 
 1;
diff --git a/lib/Lovers/App/Mote.pm b/lib/Lovers/App/Mote.pm
new file mode 100644 (file)
index 0000000..ca47115
--- /dev/null
@@ -0,0 +1,126 @@
+# Copyright (c) 2008 Movable Type ACME Plugin Project, All rights reserved.
+# 
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+# 
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+package Lovers::App::Mote;
+use strict;
+
+sub source_rebuilding {
+       my ($cb, $app, $tmpl) = @_;
+       my $plugin = $app->component('Lovers');
+       my $blog_id = $app->param('blog_id');
+       my ($old, $new);
+
+       if (my $text = $app->param('text')) {
+               if ($text =~ m/<mt:?mote([^>]*)>(.*)<\/mt:?mote>/is) {
+                       $app->session('lovers_message', $2);
+
+                       my $args = $1;
+                       $args =~ m/type\s*=\s*"?(\w+)/is;
+                       $app->session('lovers_type', $1 || '');
+               }
+       }
+
+       my $msg = $app->session('lovers_message');
+       my $type = $app->session('lovers_type') || 'heat';
+
+       if (! $msg) {
+               return;
+       }
+
+       my $uri = $app->static_path . 'plugins/Lovers/icon/' . $type . '.gif';
+
+       if ($type eq 'persistent') {
+               $new = <<__EOF__;
+<style type="text/css">
+div.msg-publishing {
+    background-color:#FFFFFF;
+       background-image: none;
+}
+</style>
+__EOF__
+       }
+       else {
+               $new = <<__EOF__;
+<style type="text/css">
+div.msg-publishing {
+    background-color:#FFFFFF;
+    background-image:url($uri);
+}
+</style>
+__EOF__
+       }
+       $old = '<mt:if name="is_one_index">';
+       $$tmpl =~ s/($old)/$new\n$1/;
+
+    $old = '\s+<__trans phrase="Publishing.*';
+    $new = $msg;
+
+       if ($type eq 'persistent') {
+               require MT::Util;
+               $new =
+                       '<script type="text/javascript">' .
+                       join('', map({
+                               $_ =~ s/^\s*|\s*$//gs;
+                               if ($_) {
+                                       "alert('" . MT::Util::encode_js($_) . "');\n";
+                               }
+                               else {
+                                       '';
+                               }
+                       } split(/\n/, $new))) .
+                       '</script>';
+       }
+       else {
+               $new =~ s/^\s*|\s*$//gs;
+               $new =~ s/\r?\n/<br>/g;
+               $new =~ s/([\w._-~]+@[\w._-~]+)/<a href="$1">$1<\/a>/;
+       }
+
+       $$tmpl =~ s/($old)/$new/g;
+}
+
+sub _hdlr_popular_with {
+    my($ctx, $args, $cond) = @_;
+       my $app = MT->instance;
+       my $plugin = MT->component('Lovers');
+
+    my $res = '';
+    my $builder = $ctx->stash('builder');
+    my $tokens = $ctx->stash('tokens');
+
+    defined($res = $builder->build($ctx, $tokens, $cond))
+        or return $ctx->error( $builder->errstr );
+
+       $app->session(
+        'lovers_message',
+        $res || $plugin->translate('My heart begins to throb...')
+    );
+       $app->session('lovers_type', $args->{'type'} || '');
+}
+
+sub post_build {
+       my ($cb) = @_;
+
+       my $app = MT->instance;
+       my $msg = $app->session('lovers_message', '');
+       my $type = $app->session('lovers_type', '');
+}
+
+1;
index d5c9072..af59b73 100644 (file)
@@ -1,7 +1,28 @@
 <?php
+# Copyright (c) 2008 Movable Type ACME Plugin Project, All rights reserved.
+# 
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+# 
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 function smarty_block_MTIfLoveLetterCancel($args, $content, &$ctx, &$repeat) {
        return
                preg_replace('/^[^\.]*\.([^\.]*).*/', '$1', __FILE__)
                . ' is not yet implemented.';
 }
+
 ?>
index 3213b89..30e00a2 100644 (file)
@@ -1,7 +1,28 @@
 <?php
+# Copyright (c) 2008 Movable Type ACME Plugin Project, All rights reserved.
+# 
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+# 
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 function smarty_block_MTIfLoveLetterOK($args, $content, &$ctx, &$repeat) {
        return
                preg_replace('/^[^\.]*\.([^\.]*).*/', '$1', __FILE__)
                . ' is not yet implemented.';
 }
+
 ?>
index 71af80c..96a2ce8 100644 (file)
@@ -1,7 +1,28 @@
 <?php
+# Copyright (c) 2008 Movable Type ACME Plugin Project, All rights reserved.
+# 
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+# 
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 function smarty_block_MTLoveLetter($args, $content, &$ctx, &$repeat) {
        return
                preg_replace('/^[^\.]*\.([^\.]*).*/', '$1', __FILE__)
                . ' is not yet implemented.';
 }
+
 ?>
index 52c6667..dcee389 100644 (file)
@@ -1,5 +1,26 @@
 <?php
+# Copyright (c) 2008 Movable Type ACME Plugin Project, All rights reserved.
+# 
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+# 
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 function smarty_block_MTLoversPopularWith($args, $content, &$ctx, &$repeat) {
        return lovers_popular_with($args, $content, $ctx, $repeat);
 }
+
 ?>
index 90106a3..607030b 100644 (file)
@@ -1,5 +1,26 @@
 <?php
+# Copyright (c) 2008 Movable Type ACME Plugin Project, All rights reserved.
+# 
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+# 
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 function smarty_block_MTMote($args, $content, &$ctx, &$repeat) {
        return lovers_popular_with($args, $content, $ctx, $repeat);
 }
+
 ?>
index 0a549f4..4643578 100644 (file)
@@ -1,7 +1,28 @@
 <?php
+# Copyright (c) 2008 Movable Type ACME Plugin Project, All rights reserved.
+# 
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+# 
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 function smarty_function_MTLoveLetterCancel($args, &$ctx) {
        return
                preg_replace('/^[^\.]*\.([^\.]*).*/', '$1', __FILE__)
                . ' is not yet implemented.';
 }
+
 ?>
index 15871b5..7ced843 100644 (file)
@@ -1,7 +1,28 @@
 <?php
+# Copyright (c) 2008 Movable Type ACME Plugin Project, All rights reserved.
+# 
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+# 
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 function smarty_function_MTLoveLetterOK($args, &$ctx) {
        return
                preg_replace('/^[^\.]*\.([^\.]*).*/', '$1', __FILE__)
                . ' is not yet implemented.';
 }
+
 ?>
index 5b45036..9869866 100644 (file)
@@ -1,7 +1,28 @@
 <?php
+# Copyright (c) 2008 Movable Type ACME Plugin Project, All rights reserved.
+# 
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+# 
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 function smarty_function_MTLoveLetterResponse($args, &$ctx) {
        return
                preg_replace('/^[^\.]*\.([^\.]*).*/', '$1', __FILE__)
                . ' is not yet implemented.';
 }
+
 ?>
index f75d65f..1ce0f19 100644 (file)
@@ -1,4 +1,23 @@
 <?php
+# Copyright (c) 2008 Movable Type ACME Plugin Project, All rights reserved.
+# 
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+# 
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
 
 function lovers_popular_with($args, $content, &$ctx, &$repeat) {
        return '';