Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Backgrounds~

9 years ago

Crap, people have posted this before, but I need quick help. Can somebody please walk me through it or show me the guideline article for it? Sorry, I haven't been paying enough attention xD

Backgrounds~

9 years ago

Background image: <style>body{background-image: url('http://image.jpg');}</style>

BG color: <style>body{background-color: red;}</style>

Something like that.

Backgrounds~

9 years ago

Thanks Brad.

EDIT: Wait Brad, I'm kind of stupid at the moment. How do you insert it?

Backgrounds~

9 years ago

(EDIT ^^)

Backgrounds~

9 years ago

Click the source button if you're using the RTE and paste it in there. If there's no source button, turn off the RTE in the profile settings, at least for the time being.

If you're putting it in a page script, it's: $PAGETEXT := "<style>...</style>" + $PAGETEXT

Backgrounds~

9 years ago

Oh, thanks. You're my go-to guy on advanced stuff ^_^

And Iavatus, I like to bug the hell out of him :P

Backgrounds~

9 years ago

It, er, I, won't work. Can you tell me what's wrong? (The stuff is still on the bottom of my page)

Backgrounds~

9 years ago

Well, for one, "page script" refers to a script in a storygame, not your profile, so all you need is the <style>body{background-image: url('http://image.jpg');}</style> part. Second, you need to change the 'http://image.jpg' to the url of the actual image, and third, it doesn't look like you actually disabled the RTE, because the text is showing up on the page.

Backgrounds~

9 years ago

Oh, okay. Trying that.

Backgrounds~

9 years ago


$PAGETEXT := $PAGETEXT + <body background='URL HERE'>  is a snippet I have in my Note section here from...some thread, eons ago, with a note about making it a global script. Would that work in a game too? Or is this another victory for that evil mandatory <style> dealie that means I never know how to do html anymore. :(

But yeah, the profile page is an entirely different thing, Mason.

 

Backgrounds~

9 years ago

wink

Backgrounds~

9 years ago

$PAGETEXT := "<body background='URL HERE'>" + $PAGETEXT (don't forget the quotes) works, sometimes, but is overall worse than using $PAGETEXT := "<style>body{background-image:url('URL HERE');}</style>" + $PAGETEXT

It so happens that CSS is just better.

Backgrounds~

9 years ago

I see far more weird brackets and punctuation marks, your statement of 'better' is objectively false, I'll have you know. <style>, ugh, it's the bane of my existence. :[

Just curious, what makes the simple version for babies worse? Does it just not work in some situations?

And while we're on the subject of html, how do we put links in our profiles? I tried the <a href=blahblah> stuff and it didn't work.

Backgrounds~

9 years ago

It's less customizable, for one (which, I admit, really doesn't matter to most people), and, in regard to just using valid HTML, a style element in the body is the lesser evil compared to a duplicate body element. But yeah; the biggest problem is that sometimes, it just won't work.

It looks like the rich text editor doesn't have a "hyperlink" or "edit source" button for whatever reason, so the only solution is to disable it, if only temporarily to enter <a href=URL>hyperlink text</a>.

Backgrounds~

9 years ago

I got it working, but the problem is, it couldn't be done in a temporary way. Switching the RTE back on afterwards just removed the link.

So apparently, if I want a clickable link in my profile I have to disable rich text for the entire site, forums and my games included.

This is...less than ideal.