DanSud
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] PHP preg match ErrorOops. Sorry, I didn’t notice that!
I’ll try running a newer version. Thanks again.
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] PHP preg match ErrorI ran a Version Test:
http://antarcticacruise.org/blogtesting/xPHPversion.phpForum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] PHP preg match ErrorMy Hostgator server is running PHP Ver 5.4.38
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] PHP preg match ErrorHi, this is the error I got:
<br /> <b>Warning</b>: json_encode() expects exactly 1 parameter, 2 given in <b>/home2/danzman/public_html/antarcticacruise.org/blogtesting/wp-content/plugins/validated-field-for-acf/validated_field_v4.php</b> on line <b>450</b><br />Really appreciate your effort. Thanks.
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] PHP preg match ErrorHere’s the screen shot of the error:
http://antarcticacruise.org/blogtesting/error.jpgForum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] PHP preg match ErrorI can’t find ACF5. The links isn’t working for me:
https://github.com/AdvancedCustomFields/acf5-betaForum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] PHP preg match ErrorHi Justin,
I upgraded to the new version. But it still produces an error.
Here’s my validation code, to check for a ClickBank hoplink.
<?php $urlalone = substr($value, 7); $urlparts = explode(".", $urlalone, 3); $passflag = "N"; if (strlen($urlparts[0]) > 10 or strlen($urlparts[0]) < 5) { $passflag = "N"; } else { $passflag = "Y"; } if (strlen($urlparts[1]) > 10 or strlen($urlparts[1]) < 5) { $passflag = "N"; } else { $passflag = "Y"; } $pos = strpos($urlparts[2], 'hop.clickbank.net'); if ($pos === false) { $passflag = "N"; } else { $passflag = "Y"; } if ($passflag == "Y") return true; else return false; ?>And here’s how it breaks up the hoplink for testing:
http://antarcticacruise.org/blogtesting/xhoplinktest.phpThanks for your time.
Dan
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] PHP preg match ErrorHi, thanks for your prompt response. I am not sure the plugin works with the current version of ACF (ver 4.4.2) or WP (Version 4.2.2). Even after removing the validation code, it still keeps giving a validation error.