Changeset 18945


Ignore:
Timestamp:
Nov 6, 2012, 7:58:42 AM (8 years ago)
Author:
rvelices
Message:

akismet for piwigo 2.5

Location:
extensions/rv_akismet
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_akismet/check.inc.php

    r16004 r18945  
    1818    'author' => $comment['author'],
    1919    'body' => $comment['content'],
     20    'comment_author_url' => $comment['website_url'],
     21    'comment_author_email' => $comment['email'],
    2022    'permalink' => $url,
    2123    'referrer' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '',
    2224  );
    23   if (isset($_POST['url']) && strlen($_POST['url']))
    24     $aki_comm['comment_author_url'] = $_POST['url'];
     25  /*if (isset($_POST['url']) && strlen($_POST['url']))
     26    $aki_comm['comment_author_url'] = $_POST['url'];*/
    2527
    2628  $akismet = new Akismet(get_absolute_root_url(), $conf['akismet_api_key'], $aki_comm);
     
    4143    {
    4244      $_POST['cr'][] = 'aki-ok';
    43       if (!isset($_SESSION['csi']) && isset($_POST['url']) && strlen($_POST['url']) )
     45      if (!isset($_SESSION['csi']) /*&& isset($_POST['url']) && strlen($_POST['url']) */)
    4446      {
    45         $action = 'reject';
    46         $_POST['cr'][] = 'csi url';
     47        $action = 'moderate';
     48        $_POST['cr'][] = 'csi';
    4749      }
    4850    }
  • extensions/rv_akismet/main.inc.php

    r16004 r18945  
    11<?php /*
    22Plugin Name: RV Akismet
    3 Version: 2.4.b
     3Version: 2.5.a
    44Description: Uses Akismet online service to check comments agains spam
    55Plugin URI: http://piwigo.org/ext/extension_view.php?eid=192
     
    1616
    1717add_event_handler('get_admin_plugin_menu_links', 'akismet_plugin_admin_menu' );
    18 add_event_handler('init', 'akismet_init' );
    19 
    2018
    2119function akismet_plugin_admin_menu($menu)
     
    2826        }
    2927        $admin_url = get_admin_plugin_menu_link(dirname(__FILE__).'/admin.php');
    30         array_push($menu,
    31                         array(
     28        $menu[] = array(
    3229                                'NAME' => 'Akismet',
    3330                                'URL' => $admin_url
    34                         )
    35                 );
     31                        );
    3632        return $menu;
    3733}
     
    4440        return $action;
    4541}
     42
     43/*add_event_handler('init', 'akismet_init' );
    4644
    4745function akismet_init()
     
    6058        }
    6159        return $source;
    62 }
     60}*/
    6361
    6462function akismet_page_tail()
Note: See TracChangeset for help on using the changeset viewer.