Question for programmers

Get help using Construct 2

Post » Sun Mar 05, 2017 8:08 pm

the iframe code i posted, is working only with a specific c2 format exporting setting, which is scale outer.



you might also want to add this script to force the right center position to center of the div u place it in :

Code: Select all
<script>$(window).on( 'resize', function () {
    $('.js-height-full').height( $(window).width() / 1.5 );
}).resize();</script>


the script /code basically detects what is the screen ratio of the device being desktop or mobile and gives a proportional aspect ratio to position the c2 embed code dead center... or right in middle. without the outerscale to get in its way... however ... the script might not be allowed by ebay or what ever website u place it in unless u have ftp rights.


you might also want for the app made in c2 to have some sort of retina 1.2 or scale layout to fit your needs. its a bit tedious... but i modified it so it fits my need ... not sure if will even help u at all.


easiest way would be to use the object embed... but on embed i think instead of source you have "data:yourlink;" and then "height:;" and "width:;" separated or with a break between them something like this :

Code: Select all
<embed
data: yourlink ;
width:100%;
height:auto;>
</embed>
B
76
S
22
G
69
Posts: 1,353
Reputation: 43,833

Post » Mon Mar 06, 2017 5:59 pm

menasheh wrote:That doesn't seem like a large-scale solution. You could get it to "work," but what if other people view the site? You can't force everyone else to also use an apache proxy... I'm sure there's some detail I'm missing here, but if you can't get the standard ebay.com to do it, how does it help?

Proxying in general is a very large-scale solution, and it is the only secure solution to this guy's problem. Proxying it through his own site will place the remote site "in domain" under his domain and make the iFrame fall naturally under the "ORIGIN" access control which most browsers (and Scirra's export) operate on.

You don't need to 'force' anyone to use a proxy. You set it up for yourself and it simply funnels traffic through your domain to another site and back. Think of it like a tunnel from your server to the site of interest.

I actually use this exactly to get our blog site to run in an iFrame on our website.

delgado wrote:interesting, can you show example?

Look at our website and blog. Or do you mean a Construct example?

I do like @gamecorpstudio 's solution too.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Mon Mar 06, 2017 6:10 pm

gumshoe2029 wrote:
menasheh wrote:That doesn't seem like a large-scale solution. You could get it to "work," but what if other people view the site? You can't force everyone else to also use an apache proxy... I'm sure there's some detail I'm missing here, but if you can't get the standard ebay.com to do it, how does it help?

Proxying in general is a very large-scale solution, and it is the only secure solution to this guy's problem. Proxying it through his own site will place the remote site "in domain" under his domain and make the iFrame fall naturally under the "ORIGIN" access control which most browsers (and Scirra's export) operate on.

You don't need to 'force' anyone to use a proxy. You set it up for yourself and it simply funnels traffic through your domain to another site and back. Think of it like a tunnel from your server to the site of interest.

I actually use this exactly to get our blog site to run in an iFrame on our website.

delgado wrote:interesting, can you show example?

Look at our website and blog. Or do you mean a Construct example?

I do like @gamecorpstudio 's solution too.



i mean example of fixed my code or new code example, ready to paste in my ebay description
in code should be included this url: https://igamedeveloper.github.io/balon/
B
110
S
27
G
47
Posts: 1,887
Reputation: 35,799

Post » Mon Mar 06, 2017 6:13 pm

gumshoe2029 wrote:
menasheh wrote:That doesn't seem like a large-scale solution. You could get it to "work," but what if other people view the site? You can't force everyone else to also use an apache proxy... I'm sure there's some detail I'm missing here, but if you can't get the standard ebay.com to do it, how does it help?

Proxying in general is a very large-scale solution, and it is the only secure solution to this guy's problem. Proxying it through his own site will place the remote site "in domain" under his domain and make the iFrame fall naturally under the "ORIGIN" access control which most browsers (and Scirra's export) operate on.

You don't need to 'force' anyone to use a proxy. You set it up for yourself and it simply funnels traffic through your domain to another site and back. Think of it like a tunnel from your server to the site of interest.

I actually use this exactly to get our blog site to run in an iFrame on our website.

delgado wrote:interesting, can you show example?

Look at our website and blog. Or do you mean a Construct example?

I do like @gamecorpstudio 's solution too.



i mean example of fixed my code or new code example, ready to paste in my ebay description
in code should be included this url: https://igamedeveloper.github.io/balon/
B
110
S
27
G
47
Posts: 1,887
Reputation: 35,799

Post » Mon Mar 06, 2017 6:14 pm

Wait... you are trying to post your website INTO Ebays? Just include a URL. You can't touch their webservers.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Tue Mar 07, 2017 4:16 am

gumshoe2029 wrote:Wait... you are trying to post your website INTO Ebays? Just include a URL. You can't touch their webservers.


yes he tries to embed /iframe his website/game into ebay description... its truly impossible ebay doesn't let embed codes. however they do let video embed codes from youtube... so it might be possible... he only needs to fake the embed to look like its youtube... which it would be easy if ebays system worked on a simple word detection then he just needed to change the embed name to class="youtube.something.gibirrish" and should have'd work, but it wont ebay doesn't allows it, since it seems on the discussion from back in 2016 that ebay basically deprecated all embed forms from their website.

so then gumshoe2029 solution is the best. just add a link to your website in the description. like
Code: Select all
Play the demo <a href="yourlink"> >> here << </a>


if the description takes html code then should take also css so you could also case everything in a more powerful thing like this


Code: Select all
<strong style="color: yourcolor;">Play the demo <u><a href="yourlink" style="text-decoration: none;"> >> here << </a></u></strong>

(you can place the color in what format you want either text like blue,red etc... or code FFF123 or even #321444)



https://productforums.google.com/forum/ ... Fkg_Jqb5t8 see embed code for ebay.


i tried adding a product in listing this is what i got from ebay


Code: Select all
Required Details*
Your listing cannot contain javascript (".cookie", "cookie(", "replace(", IFRAME, META, or includes), cookies or base href.


so to OP forget about embeding something on ebay just place a link. not even a hyperlink just a link
B
76
S
22
G
69
Posts: 1,353
Reputation: 43,833

Post » Tue Mar 07, 2017 5:20 pm

gamecorpstudio wrote:yes he tries to embed /iframe his website/game into ebay description... its truly impossible ebay doesn't let embed codes.

Yea, that is madness. You WANT link traffic back to your webserver, so there is no reason to point a URL back to your stuff...
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests