Replies

Aug 4, 2017 8 years ago
Elementary, my dear
Written
User Avatar

You know how if you have a wishlist on your profile, it shows a few random items from your list, and every time you refresh it shows you a different set of items?

Well, I was thinking of trying something like that with a pet's treasure chest, but I don't know how it's done.

Is this something that is doable, or is this something like Javascript or something else on the backend that is not easily produced with CSS/HTML?

The past is written, but the future is left for us to write. ~ Picard

Aug 5, 2017 8 years ago
Tashamon
is lost in space
User Avatar
Signal

You can't do it with the TC itself (or HTML or CSS), but there's some BBCode that may do what you want with the item images themselves: [imghttp://img.subeta.net/items/food_iku_feduitfrui.gif[/img]--------]

above example

[imghttp://img.subeta.net/items/food_iku_feduitfrui.gif[/img]--------]

or for a pet page

each item to be randomised is separated by --

Edit: The above example might not work in the forums but if you preview the code in a new post several times it will change. The pet page code works, however. I used it time ago (2012) to randomise some text. It used to be on the scode reference page :0

Aug 10, 2017 8 years ago
Bug
User Avatar
Segfault

Just a heads up, we don't officially support the random BBCode tag, so I would not rely on it.

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Aug 11, 2017 8 years ago
Elementary, my dear
Written
User Avatar

I'm glad you answered because I deleted the event and forgot completely about it!

That sounds interesting. I might try it out some time - I'm guessing it may work even though Bug says it's not supported? It's something, at least. :)

The past is written, but the future is left for us to write. ~ Picard

Aug 11, 2017 8 years ago
Tashamon
is lost in space
User Avatar
Signal

It's an interesting bit of code, but if there's ever an update that breaks how it works (such as it not working in forums anymore - everyone used to use it to make randomised signatures, as far as I remember!) then it won't be fixed. So I wouldn't use it if you'd be particularly upset about it breaking one day. But I will add that it hasn't been supported for a few years and still works on profiles!

Aug 17, 2017 8 years ago
Shark
is getting bi
User Avatar
Tegan and Sara

Thanks for this! I know it's not really supported and could break sometime but for now I'm going to enjoy being able to have it so I can have randomized snippets of lyrics for my Tegan and Sara fanpet. (This works for more than just images, which is nice!)

There's also this host, which I use for pets like B.Va and Crossfade (mentioning them in case anyone wants examples of it in action) but you have to use html coding not bbc for it to show up. Mentioning it in case it's helpful for anyone!


wanted: any pet with a March 22[sup]nd[/sup] 2019 birthday
event clickables ❤ ❤ [egg=shark] ❤ [tp=shark] ❤ ❤ ❤ ❤

Please log in to reply to this topic.