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.
Adding to the Indentity Form
I'm trying to add 'blog name' and 'blog url' into the user identity area, but I'm just missing something. Any help is appreciated!
Here's my code:
Here's my code:
// Add the Blog Info setting to the forum preferences form
if ($Context->SelfUrl == "account.php" && $Context->Session->UserID > 0) {
$PostBackAction = ForceIncomingString("PostBackAction", "");
if ($PostBackAction == "Identity") {
$BlogName = ($Context->Session->User->Setting("BlogName",0)==0) ? "": $Context->Session->User->Setting("BlogName");
$BlogURL = ($Context->Session->User->Setting("BlogURL",0)==0) ? "": $Context->Session->User->Setting("BlogURL");
$BlogInfoOption = "<h2>".$Context->GetDefinition("Blog Information")." - Ignore for now</h2>
<dl>
<dt>".$Context->GetDefinition("Blog URL")."</dt>
<dd><input type=\"text\" name=\"BlogURL\" value=\"".$BlogURL."\" maxlength=\"50\" class=\"SmallInput\" id=\"txtBlogURL\" /></dd>
</dl>
<dl>
<dt>".$Context->GetDefinition("Blog Name")."</dt>
<dd><input type=\"text\" name=\"BlogName\" value=\"".$BlogName."\" maxlength=\"50\" class=\"SmallInput\" id=\"txtBlogName\" /></dd>
</dl>";
$Context->ObjectFactory->AddControlString("AccountForm", "RenderCustomPreferences", $BlogInfoOption);
//$Context->ObjectFactory->AddControlString("IdentityForm", "RenderCustomPreferences", $BlogInfoOption);
}
}
0
This discussion has been closed.
Comments
Once that works, I will move on to saving it.
thanks!