dustys
Junior Member
Posts: 443
inherit
258526
0
Nov 21, 2024 18:43:22 GMT -8
dustys
443
May 2019
dustys
|
Post by dustys on Jun 8, 2020 12:04:34 GMT -8
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jun 9, 2020 5:10:09 GMT -8
The usage is given in the third link you posted, if there is something specific you are getting stuck on then please elaborate. If you have a specific domain in mind then post it here and we could walk through it I also noticed that regular members are posting ads not just staff on that forum so the plugin in this post might be a better fit since it restricts based on allowed domains and what they are permitted to do rather than who is the author of the post. It employs sandboxed iframes to finetune what a domain is ultimately permitted to do on the forum and protect from malicious players. Add "ws-na.amazon-adsystem.com" for example so your members can then post ads from that domain
To post they can then add an anchor with name="embed" to the post which will be converted to an iframe provided it is in the allowed list you created in the plugin
|
|
dustys
Junior Member
Posts: 443
inherit
258526
0
Nov 21, 2024 18:43:22 GMT -8
dustys
443
May 2019
dustys
|
Post by dustys on Jun 9, 2020 5:54:36 GMT -8
The usage is given in the third link you posted, if there is something specific you are getting stuck on then please elaborate. If you have a specific domain in mind then post it here and we could walk through it I also noticed that regular members are posting ads not just staff on that forum so the plugin in this post might be a better fit since it restricts based on allowed domains and what they are permitted to do rather than who is the author of the post. It employs sandboxed iframes to finetune what a domain is ultimately permitted to do on the forum and protect from malicious players. Add "ws-na.amazon-adsystem.com" for example so your members can then post ads from that domain
To post they can then add an anchor with name="embed" to the post which will be converted to an iframe provided it is in the allowed list you created in the plugin
I dont understand how I know what to put in each box. Path? Query? I couldnt even get amazon products to work. So what would I do for a news site like fox if I wanted the embed to show me the article title and a blurb?
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jun 9, 2020 7:04:33 GMT -8
The usage is given in the third link you posted, if there is something specific you are getting stuck on then please elaborate. If you have a specific domain in mind then post it here and we could walk through it I dont understand how I know what to put in each box. Path? Query? I couldnt even get amazon products to work. So what would I do for a news site like fox if I wanted the embed to show me the article title and a blurb? The query and path are optional so for example using the following url https://ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ac&ref=qf_sp_asin_til&ad_type=product_link&tracking_id=weilossur0c-20&marketplace=amazon®ion=US&placement=B0051HZKKM&asins=B0051HZKKM&linkId=RBS2KBUI227WIBTK&show_border=true&link_opens_in_new_window=trueYou could simply add ws-na.amazon-adsystem.com as the hosting domain and have the above link work. I however don't want anybody being able to post just any link from that domain on my forum so I add that in addition to the domain being the qualifier the url should also have Operation=GetAdHtml (as opposed to Operation=GetAdJSON theoretically, because we want HTML) and also MarketPlace=US in its query string. It is totally up to you. In both query and path you can add multiple checks by separating them by a space. A query can have a value (e.g resid=1234) or you can leave off the value and it will just check if the query is in the url (e.g. resid=) and move on if not. The permissions are also important. Google docs for example only requires the ability to run scripts in order to properly render meanwhile onedrive in addition requires the ability to set a cookie on your device in order for its script to work (so allow-same-origin). Each domain has its own requirement so the plugin is left open-ended so you can setup for the billions of sites out there. It comes down to simply testing to see what the domain requires in order to work. Some people tend to dislike having to configure a plugin which explains why this one is hidden inside an obscure thread rather than being in the library. This is an iframe so if you are looking for a blurb and title then that blurb and title would have to be placed there on the page by the owner of the page when you open that url in a separate tab or new window. The iframe merely loads a secondary document (amazon for example) inside a primary document (your forum)
|
|
dustys
Junior Member
Posts: 443
inherit
258526
0
Nov 21, 2024 18:43:22 GMT -8
dustys
443
May 2019
dustys
|
Post by dustys on Jun 9, 2020 7:21:26 GMT -8
I dont understand how I know what to put in each box. Path? Query? I couldnt even get amazon products to work. So what would I do for a news site like fox if I wanted the embed to show me the article title and a blurb? The query and path are optional so for example using the following url https://ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ac&ref=qf_sp_asin_til&ad_type=product_link&tracking_id=weilossur0c-20&marketplace=amazon®ion=US&placement=B0051HZKKM&asins=B0051HZKKM&linkId=RBS2KBUI227WIBTK&show_border=true&link_opens_in_new_window=trueYou could simply add ws-na.amazon-adsystem.com as the hosting domain and have the above link work. I however don't want anybody being able to post just any link from that domain on my forum so I add that in addition to the domain being the qualifier the url should also have Operation=GetAdHtml (as opposed to Operation=GetAdJSON theoretically, because we want HTML) and also MarketPlace=US in its query string. It is totally up to you. In both query and path you can add multiple checks by separating them by a space. A query can have a value (e.g resid=1234) or you can leave off the value and it will just check if the query is in the url (e.g. resid=) and move on if not. The permissions are also important. Google docs for example only requires the ability to run scripts in order to properly render meanwhile onedrive in addition requires the ability to set a cookie on your device in order for its script to work (so allow-same-origin). Each domain has its own requirement so the plugin is left open-ended so you can setup for the billions of sites out there. It comes down to simply testing to see what the domain requires in order to work. Some people tend to dislike having to configure a plugin which explains why this one is hidden inside an obscure thread rather than being in the library. This is an iframe so if you are looking for a blurb and title then that blurb and title would have to be placed there on the page by the owner of the page when you open that url in a separate tab or new window. The iframe merely loads a secondary document (amazon for example) inside a primary document (your forum) all i'm getting is a text link to amazon. So let's skip them. How do I do this for fox news?
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jun 9, 2020 9:01:33 GMT -8
all i'm getting is a text link to amazon. So let's skip them. How do I do this for fox news? Sounds like permissions are not set or the name="embed" is not being added if all else is proper, without that name the link will be completely ignored and the plugin goes on to inspecting the next link. Usage:To create an embed simply create a link to the resource and add a name="embed" property to that link. If the resource referenced by that link is in your allowed list and all the other optional criteria (path and query) matches then an embed is created to replace that link. You could also enable the "automatically embed" option on the preferences tab which would then embed any link that matches any hosts you've added to the allowed list (and any additional criteria in path or query) regardless of whether it had the name="embed" property. Instead of the guess this and guess that can you provide an actual link to an actual post where it can be observed. If you want to do a fox news then an actual link to a fox news link placed in a post would probably be best.
|
|
inherit
6871
0
Jun 10, 2024 2:25:35 GMT -8
bigballofyarn
"If you wish to make an apple pie from scratch, you must first invent the universe." -Carl Sagan
7,900
January 2003
bigballofyarn
|
Post by bigballofyarn on Jun 9, 2020 10:01:30 GMT -8
Chris, I think what he wants to achieve is something along the lines of the results you achive when you send a text message to someone containing an outside link. A lot of SMS software will embed the link into the SMS. If it's a YouTube video, you'll see the name of the video and the splash screen you'd see before you press play on a computer. If it's a news article, you'll see the title of the article, an image from the article, and the first few sentences of the article. This is something I've seen supported on different types of forum software. It's possible that ProBoards just doesn't support this.
|
|
dustys
Junior Member
Posts: 443
inherit
258526
0
Nov 21, 2024 18:43:22 GMT -8
dustys
443
May 2019
dustys
|
Post by dustys on Jun 9, 2020 10:15:41 GMT -8
Yes I want to be able to do that but with domains I choose. It doesnt have to be all
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jun 10, 2020 0:43:06 GMT -8
It would have to be Proboards that supports such a feature since plugins are bound by cross-origin limitations which in essence says if the content is on another domain then a script would have no access to it. A script running from a server would not have this limitation but one such as in a plugin that runs within the browser would. When a youtube video gets embedded in a proboards post it is actually scripts from the youtube.com domain that have access to the content on its own domain that ultimately renders the still shot and waits for the play button.
|
|
inherit
206056
0
Oct 22, 2024 12:06:59 GMT -8
adminabp
378
February 2014
adminabp
|
Post by adminabp on Jun 10, 2020 20:09:30 GMT -8
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jun 13, 2020 16:01:40 GMT -8
That is software that gets installed on a server running the discourse platform, so not really something that could be implemented in a Proboards plugin which as previously mentioned does not run on Proboards' servers but only within the user's browser. Ultimately onebox uses the services of iframely or embedly which are in turn services meant to fill in the gaps where sites such as foxnews do not implement their own oEmbed protocol. These services essentially scour the target url in question to generate a preview for you. A plugin feature could be added for sites that implement their own discoverable oEmbed protocol (e.g. fl ickr) and of course CORS. The use of those middleman services for sites that don't implement the oembed protocol would require a paid account for production use and most likely have your paid API Key stolen since it will be very visible in your source code due to the fact that it is running in the browser and not on a server (even if you use the MD5 hash option it can be relatively reverse engineered these days). This is a major issue that limit Proboard plugins from using the plethora of available APIs out there and one of the reasons you occasionally see requests for supporting server side scripts such as PHP.
|
|