From 7ec687988746e1037d86d25186c2dd5f2addb15b Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 9 Nov 2015 20:56:37 -0800 Subject: more doco --- doc/hook/validate_channelname.bb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'doc/hook/validate_channelname.bb') diff --git a/doc/hook/validate_channelname.bb b/doc/hook/validate_channelname.bb index c78961017..2ab12bbec 100644 --- a/doc/hook/validate_channelname.bb +++ b/doc/hook/validate_channelname.bb @@ -1 +1,23 @@ [h2]validate_channelname[/h2] + +Called when creating a new channel or changing the channel name in mod/settings.php + +Hook data consists of an array + + array( + 'name' => supplied name + ); + + If the hook handler determines the name is valid, do nothing. If there is an issue with the name, + set $hook_data['message'] to the message text which should be displayed to the member - and the name will + not be accepted. + + + Example: + [code] + if(mb_strlen($hook_data['name']) < 3) + $hook_data['message'] = t('Name too short.'); + [/code] + + + \ No newline at end of file -- cgit v1.2.3