Post by pepsi on Aug 17, 2022 4:13:51 GMT -8
Hello, I'm a relatively new user and forum admin. In the past I have dabbled in CSS and codes, but those days are long gone and my knowledge of the language and coding doesn't immediately apply to ProBoards.
In the past, on a different platform that allowed mixed HTML/BBCode, I was able to create a custom class with a certain style, something along the lines of:
The code when writing a post would then look something like this:
I used it primarily to highlight parts of text without using, say, italics or bold or colour tags explicitly. This way, if the forum ever changed style or I just changed my mind, I would be able to change all highlights on the fly without having to go back and change every single post.
I would like to do the same here, but I'm a little bit lost. I know the exact same wouldn't be possible because HTML tags aren't allowed on basic ProBoards posts, but I suppose it's possible to use BBCode span tags or div.
I apologize if this is a really basic question. It's a combination of me misremembering things and ProBoards being unfamiliar...
As an aside, I wonder if it's possible at all to define custom BBCode tags. I've seen plugins (Style Tags for example) add custom tags, so I suppose it's possible.
If yes, then I'd probably want to make custom BBCode tags to quickly style the text but I don't know where to start. Style Tags in particular is almost precisely what I would need, but the problem is that the newly defined classes are post-specific. I would like to be able to define new classes globally.
EDIT: I found a workaround, although it uses the Style Tags plugin. It appears that you can't call
If the class ".myclass" is defined in your CSS, it will be applied. As an example, you can paste anywhere in your CSS code the following class:
And you will be able to use it anywhere in your threads.
This is still a bit of a workaround, and I'm not entirely sold on how solid of an implementation this is, but it seems to work. In fact I would still be interested in learning how I can turn this into some BBCode tags of my own.
Moreover it seems to not be mobile-friendly because (I assume) Style Tags is not mobile friendly or I have to change the mobile CSS accordingly as well. I would prefer it to work on mobile, but I guess you can't have everything.
In the past, on a different platform that allowed mixed HTML/BBCode, I was able to create a custom class with a certain style, something along the lines of:
.customhighlight {
font-style: italic;
/* stuff */
}
The code when writing a post would then look something like this:
<span class="customhighlight">My text</span>
I used it primarily to highlight parts of text without using, say, italics or bold or colour tags explicitly. This way, if the forum ever changed style or I just changed my mind, I would be able to change all highlights on the fly without having to go back and change every single post.
I would like to do the same here, but I'm a little bit lost. I know the exact same wouldn't be possible because HTML tags aren't allowed on basic ProBoards posts, but I suppose it's possible to use BBCode span tags or div.
I apologize if this is a really basic question. It's a combination of me misremembering things and ProBoards being unfamiliar...
As an aside, I wonder if it's possible at all to define custom BBCode tags. I've seen plugins (Style Tags for example) add custom tags, so I suppose it's possible.
If yes, then I'd probably want to make custom BBCode tags to quickly style the text but I don't know where to start. Style Tags in particular is almost precisely what I would need, but the problem is that the newly defined classes are post-specific. I would like to be able to define new classes globally.
EDIT: I found a workaround, although it uses the Style Tags plugin. It appears that you can't call
[span class="myclass"]
or similar, possibly because BBCode is specifically designed not to allow this. However, you can force-feed the class into the span by installing Style Tags and writing:[span][attr="class","myclass"][/span]
If the class ".myclass" is defined in your CSS, it will be applied. As an example, you can paste anywhere in your CSS code the following class:
.myclass {
font-style: italic;
/* stuff */
}
And you will be able to use it anywhere in your threads.
This is still a bit of a workaround, and I'm not entirely sold on how solid of an implementation this is, but it seems to work. In fact I would still be interested in learning how I can turn this into some BBCode tags of my own.
Moreover it seems to not be mobile-friendly because (I assume) Style Tags is not mobile friendly or I have to change the mobile CSS accordingly as well. I would prefer it to work on mobile, but I guess you can't have everything.