ID:273583
 
Okay so I have a MotD (Message of the Day) system that I had found in resources. It works exactly how I want it to only there's a problem, when I use the "img" tag to display an image I get from the internet, the browser doesn't show the image at all.

I looked at the DM ref. and I saw that the Browser chooses FALSE as the default for http images. So my question is, where would I put the "enable-http-images = TRUE" in my code so the browser can display any image?
If you are trying to show an image that is in your RSC (source), you need to use browse_rsc(), looking up the reference will show you how to use this to display it.

Then, like all images, you need to do <img src="file location (if any)/filename.ext">
In response to GhostAnime
Actually what I want to do is get it to display an image I get from a URL like http://imageshack/randomimagename.jpg

EDIT: I am sorry for being vague. Imagine you find a funny image that you want to show the players of your game to. That's basically what my MotD is all about, I can implant an image into the games browser and it stays there (because I can save it :P).

So I find an image, and try to post it in the MotD but when I do, the browser doesn't show the image :(
Paul De La Torre wrote:
(...)where would I put the "enable-http-images = TRUE" in (...) the browser

The skin reference explains that this parameter (enable-http-images) is only valid for the two interface elements output and grid. Thus, you can not set such a thing for the browser element.


Paul De La Torre wrote:
(...I use the "img" tag to display an image I get from the internet, the browser doesn't show the image at all.

Please show the HTML code snippet relevant to displaying the image. This is likely the root of your issue.
In response to Schnitzelnagler
        //  Displays the administration's message to Viewer.
motd_DisplayAdministrator(Viewer)
Viewer << output(null,src.motd_out_admin)
Viewer << output(src.motd_admin,src.motd_out_admin)
//----------------------------------------------------------------------------------------
// Displays the developer's message to Viewer.
motd_DisplayDeveloper(Viewer)
Viewer << output(null,src.motd_out_developer)
Viewer << output(src.motd_developer,src.motd_out_developer)
//----------------------------------------------------------------------------------------
// Reads the stored admin message from the saved file.
motd_Load()
if (fexists(src.motd_file))
src.motd_admin = file2text(src.motd_file)
src.motd_admin = copytext(src.motd_admin,1,length(src.motd_admin))
//----------------------------------------------------------------------------------------
// Saves the admin portion of the MOTD.
motd_Save()
if(fexists(src.motd_file))fdel(src.motd_file)
if(!src.motd_admin)return
text2file(src.motd_admin,src.motd_file)
//----------------------------------------------------------------------------------------
// Sets the admin portion of the MOTD.
motd_Set(MOTD)
if(!isnull(MOTD) && !istext(MOTD))
return FALSE
src.motd_admin = MOTD
return TRUE


EDIT: The place the MotD goes to is in fact an Output window not a browser, sorry about the confusion. So yeah were should I put the "enable_http_images = TRUE" at?
In response to Paul De La Torre
If you are using a custom interface you can find the option to allow images in the option tab on the output window.
If not, the command would be:
client
New()
winset(src,"outputwindow.output","enable_http_images=TRUE")
..()

I have not tested this myself, but it should work.
In response to Cybersnake15
Ohh I see now

Well I named the output window a different name so it would be this right?:

client
New()
winset(src,"motd_admin.output","enable_http_images=TRUE")
..()


EDIT: I tested it and it was a no go. All it did was show the image as a hyperlink.

In response to Paul De La Torre
Are you using an img tag to display the picture, or just inserting the URL to it? This, for example, does not work:

for(var/client/c) c << output("my kitty: http://mobiusevalon.tibbius.com/images/fuzzeh.jpg")


...while this does with enable_http_images enables:
for(var/client/c) c << output({"my kitty: <img src="http://mobiusevalon.tibbius.com/images/fuzzeh.jpg">"})