I would like to add a page from a website to a conversation.
I'm using the ConvLib library.
I can click 'Run this script' and add a script to the end of the conversation, and it obviously needs to open a iframe.
Now, I looked at an example created by K.V. (link), where the iframe is inserted into a msg command.
But I can't seem to make it work.
I click 'Run this script', then 'Print a message' and then tried to insert this, but it's not working. Can someone help me get this command right:
(<iframe width="100%" height="344" src="https://forkyndelse.dk/undervisning/quest" frameborder="0" allowfullscreen>)
I can't access Quest to test anything at the moment.
Does your code like this? (Same link you posted, but includes backslashes to cancel out the double quotation marks within the call to
msg ("<iframe width=\"100%\" height=\"344\" src=\"https://forkyndelse.dk/undervisning/quest\" frameborder=\"0\" allowfullscreen></iframe>")
Below is the code as it looks now.
I uploaded and tested it, and it gives this error message now:
Error running script: Error compiling expression '"<iframe width=\"100%\" height=\"344\" src=\"https://forkyndelse.dk/undervisning/quest\" frameborder=/"0/" allowfullscreen></iframe>"': SyntaxError: Unexpected token "0" <INTEGER>; expected one of <EOF>Line: 1, Column: 104
And this is the code in the room with the conversation. Oh, and ps: I did try to remove the frameborder thing and reupload. That removed the error message, but just resultet in a grey square. No content in the square.
<object name="D1 D Harpespiller Galinas lejlighed"> <inherit name="editor_room" /> <usedefaultprefix type="boolean">false</usedefaultprefix> <description><![CDATA[Da I ankommer, sidder Galina og øver på sin harpe.<br/>]]></description> <object name="Galina"> <inherit name="editor_object" /> <inherit name="namedfemale" /> <inherit name="talkingchar" /> <object name="mission 1 samtale galina"> <inherit name="editor_object" /> <inherit name="startingtopic" /> <alias>Spørg Galina: Hvad er det på væggen der?</alias> <mission>1</mission> <exchange><![CDATA[Galina svarer: <br/>"Det er et kors."<br/><br/>]]></exchange> <talk type="script"><![CDATA[ msg ("<iframe width=\"100%\" height=\"344\" src=\"https://forkyndelse.dk/undervisning/quest\" frameborder=/"0/" allowfullscreen></iframe>") ]]></talk> </object> <object name="mission 1 samtale galina 2"> <inherit name="editor_object" /> <inherit name="startingtopic" /> <alias>Spørg Galina: Hvem er du?</alias> <mission>1</mission> <exchange>"Mit navn er Galina. Jeg spiller harpe i orkestret."</exchange> </object> </object> <exit alias="entreen" to="D1 D"> <inherit name="northeastdirection" /> </exit> <object name="et kors på væggen"> <inherit name="editor_object" /> <gender>det</gender> <article>det</article> <possessive>dets</possessive> <look><![CDATA[På væggen i stuen hænger et stort kors.<br/>Der er med rød farve malet, så det ser ud, som om der flyder blod på korset.]]></look> </object> </object>
You're going to be mad. . .
It's a very, very little thing. . .
You have this (with forward slashes):
Should be this (with backslashes):
Fret not, though.
All of us make such errors. In fact, I've been known to make that same error.
That was my error!
I fixed it in the code I already posted above.
Whoops! Sorry about that!
That removed the error message, but just resultet in a grey square. No content in the square.
I bet that is a cross-site restriction.
I think when playing online, you can only have iframes linking to pages on the same site. When playing in Quest installed in Windows, the iframes work, but not when playing online. (I think this is true.)
One solution would be to upload your web page(s) to this site in HTML format, as if they were games. You can leave them unlisted; so only people with the link can see them.
K.V., thank you. I'm glad it was just a little thing :-)
I have reuploaded and now the iframe command produces a grey square. There's nothing in it. Just the grey square.
When I right-click the square and look at the code I can see that it is the entire code from the webpage I wanted to insert, but it's just not showing it for some reason.
So I tested this in several different browsers and it's only a problem when I use Google Chrome (maybe because I don't allow third-party cookies in Chrome?)
I can see we both posted at the same time.
So, as I wrote before, I tested this in several different browsers and it's only a problem when I use Google Chrome.
I normally don't allow third-party cookies in Chrome, but I just tried to allow them and - viola! - the iframe now shows the webpage.
Is there a way around this, using code, so that people who use Chrome, and do not allow third-party cookies, can play the game?
I have no idea, but, if there is a way and someone here knows, I'm sure they will chime in.
I'd bet not, though, unfortunately. If there were an easy way around it, that would be a security issue (because it would override the setting in your browser).
Oh; I just visited your link, and I see it's a video.
...and it's a 17 minute video, which probably exceeds this site's maximum upload file size.
You might be able to post your video to YouTube (unless they still have the 15 minute maximum rule; it's been years since I've fooled around with YouTube uploads). If you can, you can leave your video unlisted on YouTube and insert the video via Quest.
If you have other links which do not include video (or audio), you could try my earlier idea, too (which was uploading your website files to this site as if it were a game, which is approved by the site maintainers as long as it ties to a game.