PDA

View Full Version : Problem with usercp hook


Bilderback
11-16-2008, 10:26 PM
I'm trying to display an additional table within the USERCP -> Edit Your Details area from a template
and just cant seem to figure out if my php is wrong or having the wrong hook.

What is attempted below is to hook an area of the template where there is no hook by str_replace.
Hook: cache_templates
$vbulletin->templatecache['modifyprofile'] = str_replace('<if condition="$customfields[\'regular\']">', ''.$vbulletin->templatecache['new_modifyprofile_table'].'<if condition="$customfields[\'regular\']">', $vbulletin->templatecache['modifyprofile']);

My new_modifyprofile_table template is cached via a seperate cache_templates plugin with:
$globaltemplates[] = 'new_modifyprofile_table';


Can anyone help?
Thanks

Gio~Logist
11-17-2008, 01:30 AM
The actual templates aren't stored with "<if>". Echo the template and you'll see what i mean.

echo $vbulletin->templatecache['modifyprofile'];

Dismounted
11-17-2008, 03:58 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=151332" target="_blank">[How-To] Plugins for Template Edits (Adv. Version)</a>