Attention:

Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

  ClosedNew TopicNew Poll

 (PARAM#) default value? [SOLVED]
#
hello I want to ask a question
is there any default value available for (PARAM1)/(PARAM2) in custom bbcode?
bcs there's one forum I know that can implement a default value for their params on their custom bbcode

ex. they have a custom bbcode that looks like
CODE
[test][/test]

if the user inputs
CODE
[test=1]hey there[/test]

it'll output 1[hey there], and if the user inputs
CODE
[test]hey there[/test]

it'll output [hey there], without the 1 before the []

so is this possible?

thank you very much

This post has been edited by mrslucky: May 30 2018, 07:33 AM
PM
#
Sorry -- unfortunately, a value must always be specified.

signature
email: admin@jcink.com :: blog: John C.
#
I don't know if this is intended behavior, but sometimes I make two versions of the same BBcode - one with one parameter, and one with two.

So, for instance, I would make two 'test' BBcodes, one like this:

<div class="test"><h1>(PARAM1)</h1>(PARAM2)</div>

And one like this

<div class="test"><h1>Default Value</h1> (PARAM1) </div>

If that makes any sense, and it's always worked for me. Love this little trick, cause it allows a very simple code and a more customized one to exist at the same time / a fallback for people who use some codes incorrectly.

signature
Kindly do not contact me on Discord or PM me for support.

user posted image
#
ok owl, did that, I make 2 bbcodes with same name, I don't show the button for the 2 parameter bbcod, and it works http://files.b1.jcink.com/html/emoticons/biggrin.gif

thank you John & Owl
PM
#
QUOTE (owl @ May 30 2018, 04:18 PM)
I don't know if this is intended behavior, but sometimes I make two versions of the same BBcode - one with one parameter, and one with two.

Well... it's not necessarily intended behavior but not a bad thing, so that's a great workaround. Don't know why I didn't think of that. Great post Owl!

signature
email: admin@jcink.com :: blog: John C.
#
Thank you - I'm just stoked to hear it's not a massive problem that needs to be patched, or something, cause I end up doing something like this on just about every board I run. I'm so happy I could help!

signature
Kindly do not contact me on Discord or PM me for support.

user posted image
#
This topic has been solved. If you need anymore help please post a new thread. Thanks for choosing Jcink services.

signature
email: admin@jcink.com :: blog: John C.
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

Options ClosedNew TopicNew Poll