Develop/Modification1/51

  • 0.0.16同梱のプラグインと対応バージョンとの差は下記の通り
    diff -w html/pukiowikio_edit/pkwk/plugin_default/comment_nospam.inc.php comment_nospam.inc.php
    3c3
    ---
    5c5
    < exist_plugin('comment');
    ---
    > require_once(PLUGIN_DIR . 'comment.inc.php');
    10c10
    < if(!defined('SPAMLIST_PAGE')) define('SPAMLIST_PAGE', 'Setting/SpamList');
    ---
    > //define('SPAMLIST_PAGE', 'SpamList');
    13,14c13
    < //define('NG_WORD', '[url],adult,casino,pharmacy,republika,sex,siski.net,insurance,cloud.prohosting.com,white.prohosting.com,pluto.no,narod.ru,loan,viagra,2www.org,cialis,gatech.edu,digmun.info,homepage,hamburg.de,mortgage,bitdom.com,ac.be,onenight-in-paris,diet,poker,naked,nude,ripway.com,planetsti.info,porn,ewqe-r.info,diazepam,buddyprofile.com,href,xyevdrom.org,nrg-search.net,blogspot.com,forumforfree.com,adsenseru.info');
    < if(!defined('NG_WORD'))define('NG_WORD', 'forumforfree.com,adsenseru.info');
    ---
    > define('NG_WORD', '[/url],<a href=,adult,casino,pharmacy,republika,sex,siski.net,insurance,cloud.prohosting.com,white.prohosting.com,pluto.no,narod.ru,loan,viagra,2www.org,cialis,gatech.edu,digmun.info,homepage,hamburg.de,mortgage,bitdom.com,ac.be,onenight-in-paris,diet,poker,naked,nude,ripway.com,planetsti.info,porn,ewqe-r.info,diazepam,buddyprofile.com,href,xyevdrom.org,nrg-search.net,blogspot.com,forumforfree.com,adsenseru.info');
    17c16
    < if(!defined('NOSPAM_MSG'))define('NOSPAM_MSG', 1);
    ---
    > define('NOSPAM_MSG', 1);
    20c19
    < if(!defined('NOSPAM_NAME'))define('NOSPAM_NAME', 1);
    ---
    > define('NOSPAM_NAME', 1);
    24c23
    < if(!defined('NOSPAM_URL'))define('NOSPAM_URL', 0);
    ---
    > define('NOSPAM_URL', 0);
    27c26
    ---
    30c29
    ---
    33c32
    ---
    39a39,50
    >       static $filetime1, $filetime2;
    >
    >
    >       if(SPAMLIST_PAGE && is_page(SPAMLIST_PAGE)){
    >               $filetime1 = get_filetime(SPAMLIST_PAGE);
    >       }
    >       else{
    >               $filetime1 = filemtime(PLUGIN_DIR . 'comment_nospam.inc.php') - LOCALZONE;
    >       }
    42c53,55
    <       if(!isset($spamlist)) {
    ---
    >       if(!isset($spamlist) || $filetime1 != $filetime2){
    44c57
    <               if(is_page(SPAMLIST_PAGE)){
    ---
    >               if(SPAMLIST_PAGE!='' && is_page(SPAMLIST_PAGE)){
    52,53c65,68
    <  // by ioio           else{
    <               {               // always use by ioio
    ---
    >               else{
    >                       //foreach(split(',', NG_WORD) as $word)
    >
    55c70,71
    <                       foreach(split(',', NG_WORD) as $word){
    ---
    >                       foreach(explode(',', NG_WORD) as $word)
    >                       {
    88,97c104,108
    <       /* for fview */
    <       /* permit to make a page if there is an attach file of the same name. */
    <       $page = isset($vars['page']) ? $vars['page'] : '';
    <       if(!is_page($page)) {
    <               $pos = strrpos($page, PLUGIN_FVIEW_PAGENAMERULE);
    <               $attachfile = substr($page, $pos + strlen(PLUGIN_FVIEW_PAGENAMERULE));
    <               $basepage = substr($page, 0, $pos);
    <               if(file_exists(UPLOAD_DIR . encode($basepage) . '_' . encode(preg_replace('#^.*/#', '', $attachfile)))) {
    <                       page_write($page, PLUGIN_FVIEW_DEFAULTPAGECONTENT, FALSE, TRUE);        /* no related-link update */
    <                       $vars['digest'] = md5(get_source($page, TRUE, TRUE));
    ---
    >       /*
    >       foreach(split(',', NG_WORD) as $word){
    >               if(NOSPAM_MSG==1 && isset($vars['msg']) && preg_match("/" . $word . "/", $vars['msg'])){
    >                       return array('msg'=>NG_WARNING);
    98a110,111
    >               else if(NOSPAM_NAME==1 && isset($vars['name']) && preg_match("/" . $word . "/", $vars['name'])){
    >                       return array('msg'=>NG_WARNING);
    99a113,115
    >       }
    >       */
    >
    101,103c117
    <       global $editable_flag;
    <       $editable_flag = TRUE;
    <       return plugin_comment_action('comment_nospam');
    ---
    >       return plugin_comment_action();
    109c123,171
    <       return plugin_comment_convert('comment_nospam');
    ---
    >       /*
    >         <input type="hidden" name="plugin" value="comment_nospam" />
    >       */
    >       global $vars, $digest, $_btn_comment, $_btn_name, $_msg_comment;
    >       static $numbers = array();
    >       static $comment_cols = PLUGIN_COMMENT_SIZE_MSG;
    >
    >       if (PKWK_READONLY) return ''; // Show nothing
    >
    >       if (! isset($numbers[$vars['page']])) $numbers[$vars['page']] = 0;
    >       $comment_no = $numbers[$vars['page']]++;
    >
    >       $options = func_num_args() ? func_get_args() : array();
    >       if (in_array('noname', $options)) {
    >               $nametags = '<label for="_p_comment_comment_' . $comment_no . '">' .
    >                       $_msg_comment . '</label>';
    >       } else {
    >               $nametags = '<label for="_p_comment_name_' . $comment_no . '">' .
    >                       $_btn_name . '</label>' .
    >                       '<input type="text" name="name" id="_p_comment_name_' .
    >                       $comment_no .  '" size="' . PLUGIN_COMMENT_SIZE_NAME .
    >                       '" />' . "\n";
    >       }
    >       $nodate = in_array('nodate', $options) ? '1' : '0';
    >       $above  = in_array('above',  $options) ? '1' :
    >               (in_array('below', $options) ? '0' : PLUGIN_COMMENT_DIRECTION_DEFAULT);
    >
    >       $script = get_script_uri();
    >       $s_page = htmlspecialchars($vars['page']);
    >       $string = <<<EOD
    > <br />
    > <form action="$script" method="post">
    >  <div>
    >   <input type="hidden" name="plugin" value="comment_nospam" />
    >   <input type="hidden" name="refer"  value="$s_page" />
    >   <input type="hidden" name="comment_no" value="$comment_no" />
    >   <input type="hidden" name="nodate" value="$nodate" />
    >   <input type="hidden" name="above"  value="$above" />
    >   <input type="hidden" name="digest" value="$digest" />
    >   $nametags
    >   <input type="text"   name="msg" id="_p_comment_comment_{$comment_no}" size="$comment_cols" />
    >   <input type="submit" name="comment" value="$_btn_comment" />
    >  </div>
    > </form>
    > EOD;
    >
    >       return $string;
    

トップ 編集凍結差分バックアップ添付複製名前変更リロード 新規一覧 単語検索 最終更新  ヘルプ  最終更新のRSS
Last-modified: 2010-09-12 (日) 12:00:50 (4054d)