Changeset 49
- Timestamp:
- 02/22/05 15:13:24
- Files:
-
- trunk/plugins/spamlookup/mt-spamlookup.cgi (modified) (2 diffs)
- trunk/plugins/spamlookup/spamlookup.pl (modified) (2 diffs)
- trunk/plugins/spamlookup/tmpl/comments.tmpl (modified) (2 diffs)
- trunk/plugins/spamlookup/tmpl/config.tmpl (moved) (moved from trunk/plugins/spamlookup/tmpl/spamlookup.tmpl) (4 diffs)
- trunk/plugins/spamlookup/tmpl/despam.tmpl (modified) (2 diffs)
- trunk/plugins/spamlookup/tmpl/pings.tmpl (modified) (2 diffs)
- trunk/plugins/spamlookup/tmpl/slfooter.tmpl (added)
- trunk/plugins/spamlookup/tmpl/slheader.tmpl (added)
- trunk/plugins/spamlookup/tmpl/view_cache.tmpl (modified) (2 diffs)
- trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plugins/spamlookup/mt-spamlookup.cgi
r48 r49 597 597 } 598 598 599 $app->build_page(' spamlookup.tmpl', \%param);599 $app->build_page('config.tmpl', \%param); 600 600 } 601 601 … … 619 619 my($file, $param) = @_; 620 620 $param->{sql} = 1 unless ref(MT::Object->driver) eq 'MT::ObjectDriver::DBM'; 621 my $blog_id = $param->{blog_id}; 622 if (my $auth = $app->{author}) { 623 $param->{author_id} = $auth->id; 624 $param->{author_name} = $auth->name; 625 require MT::Permission; 626 my @perms = MT::Permission->load({ author_id => $auth->id }); 627 my @data; 628 for my $perms (@perms) { 629 next unless $perms->role_mask; 630 my $blog = MT::Blog->load($perms->blog_id) 631 || die "Couldn't load blog; perhaps you have not upgraded your MT database?"; 632 push @data, { top_blog_id => $blog->id, 633 top_blog_name => $blog->name }; 634 $data[-1]{top_blog_selected} = 1 635 if $blog_id && $blog->id == $blog_id; 636 } 637 @data = sort { $a->{top_blog_name} cmp $b->{top_blog_name} } @data; 638 $param->{top_blog_loop} = \@data; 639 } 621 640 $app->SUPER::build_page($file, $param); 622 641 } trunk/plugins/spamlookup/spamlookup.pl
r47 r49 136 136 my ($eh, $app, $obj) = @_; 137 137 138 my $plugin = $eh->{plugin} ;138 my $plugin = $eh->{plugin} || MT::Plugin::SpamLookup->instance(); 139 139 my $data = $plugin->get_config_hash(); 140 if ($data->{ tbpass_enabled} && $obj->entry_id) {140 if ($data->{ping_filter} && $data->{tbpass_enabled} && $obj->entry_id) { 141 141 my $text; 142 142 if (my $field = $data->{tbpass_entryfield}) { … … 167 167 168 168 # pull these from user configuration settings... 169 my $plugin = $eh->{plugin} ;169 my $plugin = $eh->{plugin} || MT::Plugin::SpamLookup->instance(); 170 170 my $data = $plugin->get_config_hash(); 171 171 trunk/plugins/spamlookup/tmpl/comments.tmpl
r48 r49 1 <TMPL_INCLUDE NAME=" header.tmpl">1 <TMPL_INCLUDE NAME="slheader.tmpl"> 2 2 3 3 <div id="list-comment"> … … 175 175 </div> 176 176 177 <TMPL_INCLUDE NAME=" footer.tmpl">177 <TMPL_INCLUDE NAME="slfooter.tmpl"> trunk/plugins/spamlookup/tmpl/config.tmpl
r47 r49 1 <TMPL_INCLUDE NAME=" header.tmpl">1 <TMPL_INCLUDE NAME="slheader.tmpl"> 2 2 3 3 <!-- Begin main content --> … … 17 17 <TMPL_UNLESS TEST_IP> 18 18 19 <h2>SpamLookup Configuration</h2> 20 21 19 22 <TMPL_IF NAME=MESSAGE> 20 23 <p class="message"><TMPL_VAR NAME=MESSAGE></p> … … 34 37 installation-wide. They will apply to all of your weblogs for this Movable 35 38 Type installation. 36 </p>37 38 <p>39 <a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=view&_type=comments">View Comments</a><br />40 <a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=view&_type=pings">View TrackBacks</a><br />41 <a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=despam&_type=comments">Despam existing comments</a><br />42 <a href="<TMPL_VAR NAME=SCRIPT_URL>?__mode=despam&_type=pings">Despam existing TrackBack pings</a>43 39 </p> 44 40 … … 412 408 </div> 413 409 414 <TMPL_INCLUDE NAME="footer.tmpl"> 410 </div> 411 412 413 <TMPL_INCLUDE NAME="slfooter.tmpl"> trunk/plugins/spamlookup/tmpl/despam.tmpl
r48 r49 1 <TMPL_INCLUDE NAME=" header.tmpl">1 <TMPL_INCLUDE NAME="slheader.tmpl"> 2 2 3 3 <script language="javascript" type="text/javascript"> … … 147 147 </TMPL_IF> 148 148 149 <TMPL_INCLUDE NAME=" footer.tmpl">149 <TMPL_INCLUDE NAME="slfooter.tmpl"> trunk/plugins/spamlookup/tmpl/pings.tmpl
r48 r49 1 <TMPL_INCLUDE NAME=" header.tmpl">1 <TMPL_INCLUDE NAME="slheader.tmpl"> 2 2 3 3 <script language="javascript" type="text/javascript"> … … 70 70 </form> 71 71 72 <TMPL_INCLUDE NAME=" footer.tmpl">72 <TMPL_INCLUDE NAME="slfooter.tmpl"> trunk/plugins/spamlookup/tmpl/view_cache.tmpl
r47 r49 1 <TMPL_INCLUDE NAME=" header.tmpl">1 <TMPL_INCLUDE NAME="slheader.tmpl"> 2 2 3 3 <TMPL_IF NAME=MESSAGE> … … 46 46 </form> 47 47 48 <TMPL_INCLUDE NAME=" footer.tmpl">48 <TMPL_INCLUDE NAME="slfooter.tmpl"> trunk/readme.txt
r47 r49 37 37 mt/plugins/spamlookup/tmpl/ 38 38 comments.tmpl 39 config.tmpl 39 40 despam.tmpl 40 41 pings.tmpl 41 spamlookup.tmpl 42 slfooter.tmpl 43 slheader.tmpl 42 44 view_cache.tmpl 43 45
