The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Using template hooks vs. manual insertion into template
Hello!
I added some custom options to usercp after I read this great tutorial https://vborg.vbsupport.ru/showthread.php?t=116155 Instead of manually editing a template like in this tutorial I wanted to use a template_hook in order to make a product that is easy install for others. At first I inserted this code directly into the modifyoptions template (as suggested in the tutorial): Code:
<fieldset class="fieldset"> <legend><label for="cb_allowsioc">Export SHA1</label></legend> <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%"> <tr> <td> Export encrypted version of my e-mail address </td> </tr> <tr> <td><label for="cb_allowsioc"><input type="checkbox" name="siocbitoptions[allowsioc]" value="1" id="cb_allowsioc" $checked[allowsioc] />Export SHA1</label><input type="hidden" name="set_options[allowsioc]" value="1" /></td> </tr> </table> </fieldset> But when I add the code to the hook global_start using Code:
$template_hook[usercp_options_privacy] .= ' [same as above] '; When I look at the usercp, the checkbox is never checked - it remains empty even tough in the userinfo I can see a 1 where it should be. Can anyone see where the problem is? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|