• When posting, please be aware that artistic nudity is still nudity and not allowed under RpNation rules. Please edit your pictures accordingly!

    Remember to credit artists when using work not your own.

Closed button scripts help!!!!!

Uxie

ଘ(੭ˊ꒳ˋ)੭* ੈ‧₊❀˖°
i'm making buttons using this code:
[script class=button on=click]
hide tabscontent
removeClass bselect button

set currentTab (getText)

if (eq ${currentTab} "content in button") (button action)
[script]
however!! the content inside my button makes use of fontawesome icons, and whenever i try to call out with the exact content in the button, it doesn't work,, i've tried with [fa]fa-star[/fa], just fa-star without the [fa][/fa] too ):
is there any way to change the script so that it doesn't search for the exact same string of words in the contents of the div, but rather looks for whether the div contains a word?? i was thinking of putting in a separate display:none div that contains a number instead !! otherwise if there's simply jsut a way to get fontawesome icons to work with scripts then that would be good (:
 
Generally I do the display: none since getText can't pick up fa icons. If you want to search if a string contains a keyword, you'll have to use bbscript2 and (contains currentab "keyword")
 
Generally I do the display: none since getText can't pick up fa icons. If you want to search if a string contains a keyword, you'll have to use bbscript2 and (contains currentab "keyword")

i don't exactly understand the first bit; how would that be done if it looks for the whole content if you put a div inside?? ):
and how would the second look like in action?? like if (contains currentTab "keyword") (addClass etc) ?
thank you!!

edit about the first part:
right now my button code (in action) looks like [div class="button buttonone][fa]fa-star[/fa][/div]
i tried adding a display:none, like [div class="button buttonone][fa]fa-star[/fa][div=display:none]1[/div][/div] and switching the script code to if (eq ${currentTab} 1) (addClass bselect buttonone) but it's not working

 
Last edited:
that is supposed to be how it looks like, what does the full bbscript look like?

As for doing bbscript2, you'd have to rewrite your code in bbscript2 format, but that's generally how it'd look like.
 
that is supposed to be how it looks like, what does the full bbscript look like?

As for doing bbscript2, you'd have to rewrite your code in bbscript2 format, but that's generally how it'd look like.

omg!! sorry this is kind of dumb but i found out that it wasn't showing up when i preview'd bc i ended up editing my mobile buttons instead of the one on pc!! it's working now thank you so much!!
though that said i am still really curious to figure out bbscript 2!! do you have any codes/recommended tutorials for me to read up more on it !!!
 
no problem!

Errr... there isn't a good bbscript 2 guide. You kinda just have to read up on it on the BBCode+ guide. Uhh, there are these you can look at:

I recommend starting with reading the BBCode+ guide then learning from the snippets tutorial and some of my newer codes.
 

Users who are viewing this thread

Back
Top