WatchNon-threaded

Forums » Advanced Editor Forum » Read Message

Talk about it. Ask for help on it. Compliment it.

Image url?

4 months ago

I was reading this article about making a title page. It says that you can change the background of a page by uploading an image to the website and clicking on it in your "pictures" tab to get the url. Well I tried clicking on it, but that just brought up a dialogue to open the picture on my computer which doesn't provide a url.

Image url?

4 months ago
The article may be out of date, we'll take a look at it at some point, maybe.

Was that the point of this thread, or is it getting the URL of an image in the general sense that you're having a problem with?

Image url?

4 months ago
I'm procrastinating on actual writing by trying to make a title page, and lo and behold I found this convenient article. Right now, I'm trying to give my title page a background image.

Image url?

4 months ago

Yeah, it does say to left click on the image but that isn't the way to do it. You need to right click on it and select "Copy Image Location" or "Copy Image Address" or similar.

Image url?

4 months ago

Okay, I didn't think that would work because the link you obtain doesn't open a webpage showing the image like normal image urls do. Anyhow, I got the link and tried to follow the instructions on the article to add a background image. In my guinea pig story entitled "Story10", I added the following line on the first and only page:

<body background="http://chooseyourstory.com/resources/images/user/56027?56027">

where the URL is the one for the image I'm using. According to the article, this should set the background image of the page, but no image shows up in the preview.

Image url?

4 months ago

Try this instead:


<style><!--
  body {
    background: url('/resources/images/user/56027?56027');
  }
--></style>

Image url?

4 months ago
Nope, no cigar. On a side note, is there any way to change which page is the first page of the story?

Image url?

4 months ago
Just noticed that this link leads to a file that does not have a typical graphics format ending e.g. '.jpg', that has the potential to mess things up.

Image url?

4 months ago
Yeah, the pic itself is broken.

Image url?

4 months ago
I noticed that as well, but that's the link you get from "copy image link" for the pictures uploaded to "My Stuff". Surely, there has to be a way to set background images because I recall seeing stories on this website with background images.

Image url?

4 months ago

Yeah; there's a dropdown to change the chapter start page. To change the very first page of the story, though, the page of course has to be in chapter 1.

Image url?

4 months ago

Oh, thanks! Don't know how I missed that, lol.

Image url?

4 months ago
Is there some reason you're not just using imgur?

Pics uploaded to the site are really only for avatars and maybe inventory icons, the size restriction prevents most other uses.

Image url?

4 months ago
Because the article said to upload to the site. I tried using a different image host just now, but it didn't work either.

Image url?

4 months ago
Well I can't say how to do it right off, but using images for backgrounds does work, lots of people do it.

Your mistake was probably looking at the article, sounds like it may be obsolete. But you can just use regular html to display any image.

Image url?

4 months ago
Okay, this FEELS like a really dumb question, but are you putting your stuff in $PAGETEXT?

Image url?

4 months ago
Anyway, fwiw just double checked one of my older stories from when I was using images from the site and it looks like "$PAGETEXT := "" + $PAGETEXT

E: yes lol, confirmed backgrounds work, but not quite the way I intended to...

Image url?

4 months ago
Lmao, love the new site theme. I don't understand how pagetext works. I haven't scripted before. Is there an article you would recommend?

Image url?

4 months ago
$PAGETEXT is covered in the regular scripting articles, the page script loads before the actual page or the link script does and lets you control what extra text or scripty things appear, based on whatever. It's also how you do things with JavaScript.

The page script box is the one you open from right next to the title when a page is loaded up, or there's a global one under the Scripts tab as well.

Image url?

4 months ago

Yeah, this is the way to do it. Much less to worry about if you're putting it in a page script. The style code I provided goes in between those double quotes. (But don't include that initial quote before $PAGETEXT.)

Image url?

4 months ago

Yeah, that worked. Thank you both! Is there any way to set the image to the size of the window instead of repeating itself over the width and height of the page like it's doing here?

Image url?

4 months ago
Use imgur, upload a bigger image. Seriously, the size restrictions here don't allow for much.

Image url?

4 months ago

Even so, wouldn't I need to fit the image to the window size with some script since the window size isn't fixed?

Image url?

4 months ago
I think style="max-width: 100%;" wedged in there somewhere will do it, but better double check with Brad.

Image url?

4 months ago

Add center / cover right before the semicolon.

Image url?

4 months ago

For some reason, the top part of the image looped to the bottom.

chooseyourstory.com/story/viewer/default.aspx?StoryId=64358

Image url?

4 months ago

Not happening for me but you can add a no-repeat in there too to prevent it.

Image url?

4 months ago

I changed center to top just before you replied, which solved the issue when the window is maximized. No-repeat solves the issue for a non-maximized window as well but leaves a rather large blank space at the bottom. Is that just inevitable or is there a way to solve that as well?

Edit: Actually, no-repeat just removes the top portion of the picture that looped around in the non-maximized window. It's somewhat okay for a landscape picture like the one I used, but if there's important stuff at the top of the picture, it would be problematic.

Image url?

4 months ago

Oh, I see what's going on. You'll need to add this after the opening style tag:

  html {
    min-height: 100vh;
  }

Image url?

4 months ago

That did the trick. Thank you so much for your help!