Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Global font and page image?

6 years ago

I used the search function to no avail, then I perused the forums manually. Found several almost useful links, but not exactly what I needed. I was able to figure out how to make a font color appear on every page, but I could not figure out how to do a global page background image as well.

What I have in the global page script for font is:

$PAGETEXT := "<style>p {color: #009999;}</style>" + $PAGETEXT


But unfortunately I'm having to manually past page script for every single page to get the image I want instead of the blank white page.

$PAGETEXT := $PAGETEXT + "<style>body{background:url('INSERT URL');}</style>"

 

Surely there is a way to combine the two commands into a single function? I took C++ once, but that was a while ago and I didn't exactly retain anything... :I

 

**note: there doesn't appear to be a way to do these in the classic editor, so I'm swimming in the deep end.

Global font and page image?

6 years ago

Yeah, you can just combine the two, and even add some whitespace so it's a little easier to look at:

p { color: #009999; } body { background: url('INSERT URL'); }

Put it between the $PAGETEXT and style stuff, naturally. I'd have it like that here if it would have let me.

Global font and page image?

6 years ago

Wonderful. Thanks a lot. I wasn't sure of the syntax at all.

Now if I can only get the opening page pic to work. For some reason when I switched to advanced mode in my test game, it kind of forced the RTE on me, and now when I post <image src [blah blah]> it posts the text instead of the picture. Then when I try to upload it via the RTE, it screws up my text.

But strangely this only has happened for the introduction page.

 

 

I'm not sure what I did, but thanks for this font and pic help.  It works like a charm.

Global font and page image?

6 years ago
You can turn off the RTE in your profile. There's a bug where it eats the title image when you go to edit anyhow.

I find it annoying to do without on the forum but disabling it's almost a necessity to write a game.