By Bastian (TeamAccount) on Monday, 06 March 2017
Posted in Technical Issues
Likes 0
Views 629
Votes 0
I disabled the BB codes with (Settings -> Layout -> BB Code -> Enable BB Code) [as I do not need them]. But my HTML source code still shows some java script which is related to the disabled feature:


Komento.require()
.script('site/form/form')
.done(function($) {

$('[data-kt-form]').implement(Komento.Controller.Form, {
"location": false,
"location_key": "",
"attachments": {
"enabled": false,
"upload_max_size": "2mb",
"upload_max_files": "3",
"extensions": "bmp,csv,doc,gif,ico,jpg,jpeg,odg,odp,ods,odt,pdf,png,ppt,rar,txt,xcf,xls,zip"
},
"bbcode": Komento.bbcode,
"showCode": true,
"showCaptcha": true,
"recaptcha": true,
"markupSet": Komento.bbcodeButtons
});
});


and

[gist type="php"]
settings.markupSet.push({
name: "Bold",
key:'B',
openWith:'',
closeWith:'
',
className:'kmt-markitup-bold'
});

settings.markupSet.push({
name: "Italic",
key:'I',
openWith:'',
closeWith:'
',
className:'kmt-markitup-italic'
});

settings.markupSet.push({
name: "Underline",
key:'U',
openWith:'',
closeWith:'
',
className:'kmt-markitup-underline'
});

settings.markupSet.push({separator:'---------------' });





settings.markupSet.push({
name: "Bullet List",
openWith:'\n',
closeWith:'\n',
className:'kmt-markitup-bullet'
});

settings.markupSet.push({
name: "Numeric List",
openWith:'!]]\n',
closeWith:'\n',
className:'kmt-markitup-numeric'
});

settings.markupSet.push({
name: "Bullet",
openWith:'[*]',
closeWith:'[/*]',
className:'kmt-markitup-list'
});

settings.markupSet.push({separator:'---------------' });

settings.markupSet.push({
name: "Quote",
openWith:'
',
closeWith:'
',
className:'kmt-markitup-quote'
});

settings.markupSet.push({
name: "Code",
openWith:'
',
closeWith:'
',
className:'kmt-markitup-code'
});


settings.markupSet.push({separator:'---------------' });

settings.markupSet.push({
name: "Smile",
openWith:'',
className:'kmt-markitup-smile'
});

settings.markupSet.push({
name: "Happy",
openWith:'',
className:'kmt-markitup-happy'
});

settings.markupSet.push({
name: "Surprised",
openWith:'',
className:'kmt-markitup-surprised'
});

settings.markupSet.push({
name: "Tongue",
openWith:'',
className:'kmt-markitup-tongue'
});

settings.markupSet.push({
name: "Unhappy",
openWith:'',
className:'kmt-markitup-unhappy'
});


settings.markupSet.push({
name: "Wink",
openWith:'',
className:'kmt-markitup-wink'
});

// if($.isArray(Komento.options.config.smileycode)) {
// $.each(Komento.options.config.smileycode, function(index, code) {
// settings.markupSet.push({
// name: code,
// openWith: code,
// className: 'kmt-markitup-custom-' + index
// });
// });
// }

return settings;
[/gist]



As I do not use this feature, why did Komento push the java code to my HTML source code? The reason why i would like to have it changed is, that I try to keep the generated HTML code for my side as small as possible (for mobile devices as this might affect the SEO). So the code section above would not be needed to be transferred, as I do not use this feature.

So is that a bug? If yes can it be fixed? If not can you create a feature request so that it will be fixed ;-).
Hi there,

Yes this fixes will be included on our next release version. Thanks for your understanding
·
Tuesday, 07 March 2017 19:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

It should removed them from your site if you required them to disable them. can you try to upload attached file at this path .../components/com_komento/themes/wireframe/structure/default.js and see how it goes
·
Tuesday, 07 March 2017 11:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Ah that fixed the issue. My problem was that:


if ($this->config->get('bbcode_bold')) {


is on 1 as I disabled the whole feature via "$this->config->get('enable_bbcode')" and didnĀ“t care of any BB options used here .

But what about. I do not use attachments. location and BB code. Can we "fine tune" that as well?


></div><script type="text/javascript">



Komento.require()
.script('site/form/form')
.done(function($) {

$('[data-kt-form]').implement(Komento.Controller.Form, {
"location": false,
"location_key": "",
"attachments": {
"enabled": false,
"upload_max_size": "2mb",
"upload_max_files": "3",
"extensions": "bmp,csv,doc,gif,ico,jpg,jpeg,odg,odp,ods,odt,pdf,png,ppt,rar,txt,xcf,xls,zip"
},
"bbcode": Komento.bbcode,
"showCode": true,
"showCaptcha": true,
"recaptcha": true,
"markupSet": Komento.bbcodeButtons
});
});


</script>
<span id="komento-token" style="display




by the way will that fix be included in the next version? Would really appreciate that
·
Tuesday, 07 March 2017 19:12
·
0 Likes
·
0 Votes
·
0 Comments
·
i edited my posting above while you write that answer. Can you also check the 2nd *.js file?
·
Tuesday, 07 March 2017 19:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Bastian,

But what about. I do not use attachments. location and BB code. Can we "fine tune" that as well?
- I'm sorry but this is not possible to exclude.
·
Wednesday, 08 March 2017 11:27
·
0 Likes
·
0 Votes
·
0 Comments
·
not a problem at all, was only a question .
·
Wednesday, 08 March 2017 19:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

Thanks for your understandings

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Thursday, 09 March 2017 10:01
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post