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.
Vanilla 1.1 doesn't save the small/big input setting
Vanilla used to remember what input size you like.
It doesn't do it in vanilla 1.1. The comment page always load with a small input.
Here is the fix:
replace...
In js/vanilla.js, line 140, the ToggleCommentBox function with:
In themes/comment_form.php, line 34:
in themes/discussion_form.php line 43:
It doesn't do it in vanilla 1.1. The comment page always load with a small input.
Here is the fix:
replace...
In js/vanilla.js, line 140, the ToggleCommentBox function with:
function ToggleCommentBox(AjaxUrl, SmallText, BigText, PostBackKey) {
SwitchElementClass('CommentBox', 'CommentBoxController', 'SmallCommentBox', 'LargeCommentBox', BigText, SmallText);
var SwitchVal = 0;
var CommentBox = document.getElementById("CommentBox");
if (CommentBox) {
if (CommentBox.className == "LargeCommentBox") SwitchVal = 1;
var Parameters = "Type=ShowLargeCommentBox&Switch="+SwitchVal+"&PostBackKey="+PostBackKey;
var dm = new DataManager();
dm.RequestCompleteEvent = ToggleCommentBoxComplete;
dm.RequestFailedEvent = HandleFailure;
dm.LoadData(AjaxUrl+"?"+Parameters);
}
}
In themes/comment_form.php, line 34:
."ToggleCommentBox('".$this->Context->Configuration['WEB_ROOT']."ajax/switch.php', '".$this->Context->GetDefinition('SmallInput')."', '".$this->Context->GetDefinition('BigInput')."', '". $this->Context->Session->GetVariable('SessionPostBackKey', 'string')."'); return false;".'">'.$this->Context->GetDefinition($this->Context->Session->User->Preference('ShowLargeCommentBox')?'SmallInput':'BigInput').'</a>';
in themes/discussion_form.php line 43:
."ToggleCommentBox('".$this->Context->Configuration['WEB_ROOT']."ajax/switch.php', '".$this->Context->GetDefinition('SmallInput')."', '".$this->Context->GetDefinition('BigInput')."', '". $this->Context->Session->GetVariable('SessionPostBackKey', 'string')."'); return false;".'">'.$this->Context->GetDefinition($this->Context->Session->User->Preference('ShowLargeCommentBox')?'SmallInput':'BigInput').'</a>';
0
This discussion has been closed.
Comments