Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
how to use categoryList delegate?
i'm trying to write a plugin that will add some text to the categoryGird(preferably just after Discussions, Options), but i don't really know how to use the categoryList delegate, i tried the following:
however the text doesn't get added to categoryGrid, does anyone know how to do it? (i don't want to do the nasty way - customize the themes/categories.php file).
function CategoryGridView_Add(&$CategoryList)
{
$CategoryList .= '<li class=CategoryView"><span>stuff</span>100</li>';
}
$Context->AddToDelegate("CategoryList"," ","CategoryGridView_add");
however the text doesn't get added to categoryGrid, does anyone know how to do it? (i don't want to do the nasty way - customize the themes/categories.php file).
0
This discussion has been closed.
Comments
1 - the name of the control which has the delegate you want to attach your function to
2 - the actual name of the delegate
3 - the name of the function you want to attach to the delegate
CallDelegate()
methods placed in the Vanilla source code. Leaving that second parameter as a space would tell Vanilla to execute your code when the " " delegate is called.Since there are no delegates in the
themes/categories.php
theme file, you will need to request a delegate (recommended) or make a new theme file (easiest).Delegation Documentation