2009-01-23, 12:13 AM
Hi
I am writing one plugin which will check links in post
$plugins->add_hook("parse_message", "linkchecker");
This plugin is hoocked @ parse_message
Here is the actual method code.
I want to pass other parameter along with the message to that function. how can I do that?
I want to call this hook using $plugins->run_hooks("linkchecker"); and along with "linkchecker" i want to pass one more paramerter based on that my plugin will check links...
I am looking for some thing like
$plugins->run_hooks("linkchecker", "true"); --> in misc.php
after that
in function
So when ever user come to visit the post he will get a button in post to check links
and once user clicks on that button that will calll misc.php and from threre it will call the same plugin again with flag "true"...
In this way the forum will be fast...
Please help
I am writing one plugin which will check links in post
$plugins->add_hook("parse_message", "linkchecker");
This plugin is hoocked @ parse_message
Here is the actual method code.
function linkchecker(&$message)
{
........
...........
}
I want to pass other parameter along with the message to that function. how can I do that?
I want to call this hook using $plugins->run_hooks("linkchecker"); and along with "linkchecker" i want to pass one more paramerter based on that my plugin will check links...
I am looking for some thing like
$plugins->run_hooks("linkchecker", "true"); --> in misc.php
after that
in function
function linkchecker(&$message, $flag)
{
if($flag)
{
.........
<This is the actual link check logic>
}
else
{
$message = $message. "<br/><input type="submit" onlcick .....(calll misc.php)..... something like
}
}
So when ever user come to visit the post he will get a button in post to check links
and once user clicks on that button that will calll misc.php and from threre it will call the same plugin again with flag "true"...
In this way the forum will be fast...
Please help