Changeset 500281
- Timestamp:
- 02/04/2012 07:00:09 PM (14 years ago)
- Location:
- gab-captcha-2
- Files:
-
- 1 deleted
- 2 edited
- 10 copied
-
tags/1.0.20 (copied) (copied from gab-captcha-2/trunk)
-
tags/1.0.20/gabcaptcha2.php (copied) (copied from gab-captcha-2/trunk/gabcaptcha2.php) (5 diffs)
-
tags/1.0.20/gabcaptcha2_admin.php (copied) (copied from gab-captcha-2/trunk/gabcaptcha2_admin.php)
-
tags/1.0.20/lang/default.po (deleted)
-
tags/1.0.20/lang/default.pot (copied) (copied from gab-captcha-2/trunk/lang/default.pot)
-
tags/1.0.20/lang/gabcaptcha2-fr_FR.mo (copied) (copied from gab-captcha-2/trunk/lang/gabcaptcha2-fr_FR.mo)
-
tags/1.0.20/lang/gabcaptcha2-fr_FR.po (copied) (copied from gab-captcha-2/trunk/lang/gabcaptcha2-fr_FR.po)
-
tags/1.0.20/lang/gabcaptcha2-ru_RU.mo (copied) (copied from gab-captcha-2/trunk/lang/gabcaptcha2-ru_RU.mo)
-
tags/1.0.20/lang/gabcaptcha2-ru_RU.po (copied) (copied from gab-captcha-2/trunk/lang/gabcaptcha2-ru_RU.po)
-
tags/1.0.20/readme.txt (copied) (copied from gab-captcha-2/trunk/readme.txt) (2 diffs)
-
tags/1.0.20/style.css (copied) (copied from gab-captcha-2/trunk/style.css)
-
trunk/gabcaptcha2.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gab-captcha-2/tags/1.0.20/gabcaptcha2.php
r483937 r500281 5 5 Description: Simple captcha plugin for Wordpress comments. 6 6 Author: Gabriel Hautclocq 7 Version: 1.0. 197 Version: 1.0.20 8 8 Author URI: http://www.gabsoftware.com 9 9 Tags: comments, spam, bot, captcha, turing, test, challenge, protection, antispam … … 28 28 $gabcaptcha2_version_maj = 1; 29 29 $gabcaptcha2_version_min = 0; 30 $gabcaptcha2_version_rev = 19;30 $gabcaptcha2_version_rev = 20; 31 31 $gabcaptcha2_version = "{$gabcaptcha2_version_maj}.{$gabcaptcha2_version_min}.{$gabcaptcha2_version_rev}"; 32 32 … … 66 66 * Start session 67 67 */ 68 session_start(); 68 if( ! isset( $_SESSION ) ) 69 { 70 session_start(); 71 } 69 72 if( ! isset( $_SESSION['gabcaptcha2_id'] ) || ! isset( $_SESSION['gabcaptcha2_session'] ) ) 70 73 { … … 915 918 } 916 919 920 921 // IE HACK: Define _importNode for IE since it doesnt support importNode 922 if( ! document.importNode ) 923 { 924 document._importNode = function( oNode, bImportChildren ) 925 { 926 var oNew; 927 if( oNode.nodeType == 1 ) 928 { 929 oNew = document.createElement( oNode.nodeName ); 930 for( var i = 0; i < oNode.attributes.length; i++ ) 931 { 932 if( oNode.attributes[i].nodeValue != null && oNode.attributes[i].nodeValue != '' ) 933 { 934 var attrName = oNode.attributes[i].name; 935 if( attrName == "class" ) 936 { 937 oNew.setAttribute( "className", oNode.attributes[i].value ); 938 } 939 //else 940 //{ 941 oNew.setAttribute( attrName, oNode.attributes[i].value ); 942 //} 943 } 944 } 945 if( oNode.style != null && oNode.style.cssText != null ) 946 { 947 oNew.style.cssText = oNode.style.cssText; 948 } 949 } 950 else if( oNode.nodeType == 3 ) 951 { 952 oNew = document.createTextNode( oNode.nodeValue ); 953 } 954 else if( oNode.nodeType == 8 ) 955 { 956 oNew = document.createComment( oNode.nodeValue ); 957 } 958 else 959 { 960 oNew = document.createTextNode(''); // Skip anything else and prepare to return an empty text node 961 } 962 if( bImportChildren && oNode.hasChildNodes() ) 963 { 964 for( var oChild = oNode.firstChild; oChild; oChild = oChild.nextSibling ) 965 { 966 oNew.appendChild( document._importNode( oChild, true ) ); 967 } 968 } 969 return oNew; 970 } 971 } 972 // IE HACK (end) 973 974 917 975 var captchatarget = gabcaptcha2_getElementByIdUniversal( '<?php echo $_SESSION['gabcaptcha2_id']; ?>' ); 918 976 … … 938 996 var xml = loadXMLString( '<root xmlns="http://www.w3.org/1999/xhtml"><?php echo $gc_final_output; ?></root>' ); 939 997 var nodes = xml.documentElement.childNodes; 940 for( i = 0, n = nodes.length; i < n; i++ ) 941 { 942 node.appendChild( nodes[i].cloneNode( true ) ); 998 var external_node = null; 999 var local_node = null; 1000 for( var i = 0, n = nodes.length; i < n; i++ ) 1001 { 1002 /* import the node from the xml document */ 1003 external_node = nodes[i].cloneNode( true ); 1004 if( document.importNode ) 1005 { 1006 local_node = document.importNode( external_node, true); 1007 node.appendChild( local_node ); 1008 } 1009 else 1010 { 1011 local_node = document._importNode( external_node, true); 1012 node.appendChild( local_node ); 1013 node.innerHTML = node.innerHTML; 1014 } 943 1015 } 944 1016 captchatarget.appendChild( node ); -
gab-captcha-2/tags/1.0.20/readme.txt
r483925 r500281 5 5 Requires at least: 3.0.0 6 6 Tested up to: 3.3.0 7 Stable tag: 1.0. 197 Stable tag: 1.0.20 8 8 9 9 Gab Captcha 2 is a simple captcha plugin for fighting spam in WordPress comments. … … 118 118 == Changelog == 119 119 120 = 1.0.20 = 121 * Corrected a Javascript issue in IE8 122 120 123 = 1.0.19 = 121 124 * Added an option for legacy themes compatibility. Legacy themes often do not use the comment_form() function that brings several actions and filters. Check this option if the captcha doesn't appear since update 1.0.15. The only action used will be "comment_form" and JavaScript will be used compulsory. -
gab-captcha-2/trunk/gabcaptcha2.php
r483937 r500281 5 5 Description: Simple captcha plugin for Wordpress comments. 6 6 Author: Gabriel Hautclocq 7 Version: 1.0. 197 Version: 1.0.20 8 8 Author URI: http://www.gabsoftware.com 9 9 Tags: comments, spam, bot, captcha, turing, test, challenge, protection, antispam … … 28 28 $gabcaptcha2_version_maj = 1; 29 29 $gabcaptcha2_version_min = 0; 30 $gabcaptcha2_version_rev = 19;30 $gabcaptcha2_version_rev = 20; 31 31 $gabcaptcha2_version = "{$gabcaptcha2_version_maj}.{$gabcaptcha2_version_min}.{$gabcaptcha2_version_rev}"; 32 32 … … 66 66 * Start session 67 67 */ 68 session_start(); 68 if( ! isset( $_SESSION ) ) 69 { 70 session_start(); 71 } 69 72 if( ! isset( $_SESSION['gabcaptcha2_id'] ) || ! isset( $_SESSION['gabcaptcha2_session'] ) ) 70 73 { … … 915 918 } 916 919 920 921 // IE HACK: Define _importNode for IE since it doesnt support importNode 922 if( ! document.importNode ) 923 { 924 document._importNode = function( oNode, bImportChildren ) 925 { 926 var oNew; 927 if( oNode.nodeType == 1 ) 928 { 929 oNew = document.createElement( oNode.nodeName ); 930 for( var i = 0; i < oNode.attributes.length; i++ ) 931 { 932 if( oNode.attributes[i].nodeValue != null && oNode.attributes[i].nodeValue != '' ) 933 { 934 var attrName = oNode.attributes[i].name; 935 if( attrName == "class" ) 936 { 937 oNew.setAttribute( "className", oNode.attributes[i].value ); 938 } 939 //else 940 //{ 941 oNew.setAttribute( attrName, oNode.attributes[i].value ); 942 //} 943 } 944 } 945 if( oNode.style != null && oNode.style.cssText != null ) 946 { 947 oNew.style.cssText = oNode.style.cssText; 948 } 949 } 950 else if( oNode.nodeType == 3 ) 951 { 952 oNew = document.createTextNode( oNode.nodeValue ); 953 } 954 else if( oNode.nodeType == 8 ) 955 { 956 oNew = document.createComment( oNode.nodeValue ); 957 } 958 else 959 { 960 oNew = document.createTextNode(''); // Skip anything else and prepare to return an empty text node 961 } 962 if( bImportChildren && oNode.hasChildNodes() ) 963 { 964 for( var oChild = oNode.firstChild; oChild; oChild = oChild.nextSibling ) 965 { 966 oNew.appendChild( document._importNode( oChild, true ) ); 967 } 968 } 969 return oNew; 970 } 971 } 972 // IE HACK (end) 973 974 917 975 var captchatarget = gabcaptcha2_getElementByIdUniversal( '<?php echo $_SESSION['gabcaptcha2_id']; ?>' ); 918 976 … … 938 996 var xml = loadXMLString( '<root xmlns="http://www.w3.org/1999/xhtml"><?php echo $gc_final_output; ?></root>' ); 939 997 var nodes = xml.documentElement.childNodes; 940 for( i = 0, n = nodes.length; i < n; i++ ) 941 { 942 node.appendChild( nodes[i].cloneNode( true ) ); 998 var external_node = null; 999 var local_node = null; 1000 for( var i = 0, n = nodes.length; i < n; i++ ) 1001 { 1002 /* import the node from the xml document */ 1003 external_node = nodes[i].cloneNode( true ); 1004 if( document.importNode ) 1005 { 1006 local_node = document.importNode( external_node, true); 1007 node.appendChild( local_node ); 1008 } 1009 else 1010 { 1011 local_node = document._importNode( external_node, true); 1012 node.appendChild( local_node ); 1013 node.innerHTML = node.innerHTML; 1014 } 943 1015 } 944 1016 captchatarget.appendChild( node ); -
gab-captcha-2/trunk/readme.txt
r483925 r500281 5 5 Requires at least: 3.0.0 6 6 Tested up to: 3.3.0 7 Stable tag: 1.0. 197 Stable tag: 1.0.20 8 8 9 9 Gab Captcha 2 is a simple captcha plugin for fighting spam in WordPress comments. … … 118 118 == Changelog == 119 119 120 = 1.0.20 = 121 * Corrected a Javascript issue in IE8 122 120 123 = 1.0.19 = 121 124 * Added an option for legacy themes compatibility. Legacy themes often do not use the comment_form() function that brings several actions and filters. Check this option if the captcha doesn't appear since update 1.0.15. The only action used will be "comment_form" and JavaScript will be used compulsory.
Note: See TracChangeset
for help on using the changeset viewer.