Re: Hook requests
Hey Paul,
Sounds really cool but I can't find the arrays, i see more than two,
What are the names of the arrays you're talking about?
Unfortunately no one can be told what FluxBB is - you have to see it for yourself.
You are not logged in. Please login or register.
FluxBB.org Forums » Extensions » Hook requests
Hey Paul,
Sounds really cool but I can't find the arrays, i see more than two,
What are the names of the arrays you're talking about?
how about a hook around line 57 before all the $actions
In footer.php, there are two hooks in a row. We only need one...
Also, I want to display a separate box in front of the forum about box. Which hook should I use?
hook 'pf_view_details_pre_user_sig_info' and 'pf_view_details_pre_user_activity_info' are inside a if statement, i don't think they should be. also id like to see a hook before the </div> before 'pf_view_details_user_info_end'. same with the 'pf_change_details_about_*' hooks.
I need a hook before confirm_current_url(forum_link($forum_url['index'])); in index.php to add a homepage.
Last edited by Herbivor (2008-09-18 17:30:33)
I need a hook before confirm_current_url(forum_link($forum_url['index'])); in index.php to add a homepage.
Could do with a hook in cache.php maybe?
in parser.php could we have the following two hooks ps_do_smilies_start and ps_do_smilies_end
(come in handy with extension for custom set of smilies)
//
// Convert a series of smilies to images
//
function do_smilies($text)
{
global $forum_config, $base_url, $smilies;
$return = ($hook = get_hook('ps_do_smilies_start')) ? eval($hook) : null;
if ($return != null)
return $return;
$text = ' '.$text.' ';
foreach ($smilies as $smiley_text => $smiley_img)
{
if (strpos($text, $smiley_text) !== false)
$text = preg_replace("#(?<=[>\s])".preg_quote($smiley_text, '#')."(?=\W)#m", '<img src="'.$base_url.'/img/smilies/'.$smiley_img.'" width="15" height="15" alt="'.substr($smiley_img, 0, strrpos($smiley_img, '.')).'" />', $text);
}
$return = ($hook = get_hook('ps_do_smilies_end')) ? eval($hook) : null;
return substr($text, 1, -1);
}how it is now around line 759:
//
// Convert a series of smilies to images
//
function do_smilies($text)
{
global $forum_config, $base_url, $smilies;
$text = ' '.$text.' ';
foreach ($smilies as $smiley_text => $smiley_img)
{
if (strpos($text, $smiley_text) !== false)
$text = preg_replace("#(?<=[>\s])".preg_quote($smiley_text, '#')."(?=\W)#m", '<img src="'.$base_url.'/img/smilies/'.$smiley_img.'" width="15" height="15" alt="'.substr($smiley_img, 0, strrpos($smiley_img, '.')).'" />', $text);
}
return substr($text, 1, -1);
}There's no need for a hook there, since ps_start allows you to add new smilies. The smiley function should be changed so that height/width can be specified on a per-smiley basis, but that's about it. There's no need for an extension to overwrite the function just to add new smilies.
FluxBB.org Forums » Extensions » Hook requests
Powered by FluxBB
[ Generated in 0.162 seconds, 7 queries executed ]