Jump to the post that solved this thread.
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Add a hook to usercp.php
#1
Not Solved
Is it possible to add a hook to usercp.php

Additional Information
Additional Contact Information


Fields?????
#2
Not Solved
Sounds like you just want to add some custom profile fields: ACP -> Configuration -> Custom Profile Fields
[retired]
#3
Not Solved
Thanks buddy but I want to connect my plugin to those fields and prevent people from posting URLs
#4
Not Solved
Then just use:

$plugins->add_hook("usercp_do_profile_start", "my_function");

function my_function()
{
global $mybb;
// . . .
if (preg_match($regex, $mybb->input['profile_fields']['fid4'])) {
// filter here
}
}

You'll need to replace 'fid4' with 'fidX' X being the id of your new custom profile fields.
[retired]
#5
Not Solved
Buddy I am using this to filter postbit message but what do I have to filter or connect to in there?
if(preg_match($regex, $post->data['message'], $match)
#6
Not Solved
I edited my answer. I had you on the wrong hook. Sorry.
[retired]
#7
Not Solved
OMG dude I love you thanks very much you have just saved the DAY.
Saludos desde España!

How to show an error message on the same page when this code has executed? I am referring to inline error

$message->set_error('ERROR'); doesn't work????
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 2 Guest(s)