I want to add a custom kotlin code BBcode
4 posters
Page 1 of 1
I want to add a custom kotlin code BBcode
I searched a lot in the ACP but I didn't find anywhere where I can add custom BBcode.
megamein- Forumember
- Posts : 74
Reputation : 3
Language : english
Re: I want to add a custom kotlin code BBcode
There is not a default way to add custom BBCode in the AP. There might be a way with coding.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: I want to add a custom kotlin code BBcode
What forum version are you using?
If you are using Invision, this should work, if something else, just write which one.
This code will replace [g] and [/g] tags as bold. Tell me what exactly code you need so I can do it differently.
You only need to modify variables code and replacement.
Ask if you have any questions
Javascript code: (enable it In topics)
If you are using Invision, this should work, if something else, just write which one.
This code will replace [g] and [/g] tags as bold. Tell me what exactly code you need so I can do it differently.
You only need to modify variables code and replacement.
Ask if you have any questions
Javascript code: (enable it In topics)
- Code:
$(function() {
var elements = document.getElementsByClassName("post-entry");
var code = /\[g\](.*?)\[\/g\]/g;
var replacement = "<b>$1</b>";
for (var i = 0, l = elements.length; i < l; i++) {
elements[i].innerHTML = elements[i].innerHTML.replace(code, replacement);
}
});
Re: I want to add a custom kotlin code BBcode
Or if you need few custom bbcodes, you can use arrays and one more for loop like this:
- Code:
$(function() {
var elements = document.getElementsByClassName("post-entry");
var code = [/\[g\](.*?)\[\/g\]/g, /\[m\](.*?)\[\/m\]/g];
var replacement = ["<b>$1</b>", "<i>$1</i>"];
for (var i = 0, l = elements.length; i < l; i++) {
for (t = 0; t < code.length; ++t) {
elements[i].innerHTML = elements[i].innerHTML.replace(code[t], replacement[t]);
}
}
});
Re: I want to add a custom kotlin code BBcode
Soo... Is this helpful and do you need anything else on this topic?... I mean, do you understand regex code and all, what forum version you have, is this working?...
I see you were online today so just asking if you solved this or need any other help
I see you were online today so just asking if you solved this or need any other help
Similar topics
» How do I add custom BBCode?
» BBCode code tag not copying properly
» I want to create a bbcode to insert an html code
» Custom BBCode (don't know...?)
» Custom BBcode in profile fields
» BBCode code tag not copying properly
» I want to create a bbcode to insert an html code
» Custom BBCode (don't know...?)
» Custom BBcode in profile fields
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum