FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » How to write a custom field check plugin (validate_custom_fields CUSTOM_FIELD_VALIDATE)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to write a custom field check plugin [message #168548 is a reply to message #168547] Mon, 20 May 2013 17:32 Go to previous messageGo to previous message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma:
Senior Member
Administrator
Core Developer
Sample custom_field_validator.plugin:

<?php
plugin_add_hook
('CUSTOM_FIELD_VALIDATE''plugin_custom_field_validator');

function 
plugin_custom_field_validator($array) {
    list(
$field_id$field_name$field_value) = $array;
    return 
'ERROR: '$field_value .' for '$field_name .' is wrong';
}

function 
custom_field_validator_info() {
    return array(
'name' => 'Custom Field Validator',
                 
'desc' => 'Validate custom profile fields.',
                 
'version' => '1.0');
}
?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Just started working with FUD Forum
Next Topic: Referrals for someone to install for me
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 16:13:12 GMT 2024

Total time taken to generate the page: 0.04506 seconds