Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to add more than 5 tags in a discusssion ?
jack_joe
New
Hello,
Can anyone help, need to add more than 5 tags
0
Comments
please @charrondev @R_J guys reply, need to add more than 5 tags in discussion, there is a limit of 5 tags.
There is a setting for that! 😃
Add
$Configuration['Vanilla']['Tagging']['Max'] = 50;
to your /conf/config.php in order to increase the maximum number from 5 (default) to 50.BY the way: I didn't knew that, I found out by investigating. Vanilla uses PHP and JavaScript. If soemthing happens on the browser side, its JavaScript. When the tag input field only allows 5 tags, that must be JavaScript. When you look at the html source, you see that there is one js file included called "tagging.js". If there is a front end limit for tags, that it would make sense to look for it here.
When opening tagging.js and looking for keywords as "limit" or "max" you find
var maxTags = gdn.definition('MaxTagsAllowed', false);
$tagsInput.tokenInput(tagSearch, {
hintText: gdn.definition("TagHint", "Start to type..."),
searchingText: '', // search text gives flickery ux, don't like
searchDelay: 300,
animateDropdown: false,
minChars: 1,
maxLength: 25,
prePopulate: tags,
dataFields: ["#Form_CategoryID"],
allowFreeTagging: tagAdd,
tokenLimit: maxTags,
zindex: 3000,
allowTabOut: true
});
Even if you are not fluent in any programming language its easy to see that "maxTags" and "MaxTagsAllowed" are important here. And now, if you search all through Vanillas source for "maxtags" you find it in several places like that:
$sender->addDefinition('MaxTagsAllowed', c('Vanilla.Tagging.Max', 5));
...
$maxTags = c('Vanilla.Tagging.Max', 5);
...
$Sender->addDefinition('MaxTagsAllowed', c('Vanilla.Tagging.Max', 5));
Now everything you need to know is that Vanillas settings are stored as $Configurations[1][2][3] and accessed as "1.2.3" in the code.