Trying to Embed a link into a Post

Discussion in 'Forum Related' started by mtnbikej, Jan 18, 2015.


As a former Amazon Associate I continue to get screwed trying to stay qualified as an Amazon Affiliate. So I quit!


Want to donate to imtbtrails?

  1. mtnbikej

    mtnbikej J-Zilla

    Location:
    Orange
    Name:
    J
    Current Bike:
    SC Chameleon SS, SC Hightower
    Hey there....

    I am trying to embed this into a thread that I created but it is not showing up from Strava:

    <iframe height='405' width='590' frameborder='0' allowtransparency='true' scrolling='no' src='https://www.strava.com/activities/242494664/embed/69c0173575f55b0d00672aaa192d860d3d015a0b'></iframe>

    Am I doing something wrong?
     
  2. Mikie

    Mikie Admin/iMTB Hooligan

    Location:
    NW Arkansas
    Name:
    Mikie Watson
    Current Bike:
    Ibis DV9 / SC Hightower
    I'm not yet exactly sure what it is you are doing yet. Maybe a little more details?
     
  3. mtnbikej

    mtnbikej J-Zilla

    Location:
    Orange
    Name:
    J
    Current Bike:
    SC Chameleon SS, SC Hightower
    Strava has a button that allows us to "embed to a blog".

    I am trying to embed a link to it in a ride report.

    It should bring up a box that looks like the one in this post:

    <a class="postlink" href="http://forums.mtbr.com/california-socal/where-did-you-go-riding-today-thread-935576-2.html#post11710894" onclick="window.open(this.href);return false;">http://forums.mtbr.com/california-socal ... st11710894</a>

    When I enter the link that Strava provides.....on other forums, you get the visual link like the one above at Mtbr.

    When I enter the link on this site....the thread only shows the typing: <iframe height='405' width='590' frameborder='0' allowtransparency='true' scrolling='no' src='https://www.strava.com/activities/242494664/embed/69c0173575f55b0d00672aaa192d860d3d015a0b'></iframe>

    Make sense?
     
  4. Mikie

    Mikie Admin/iMTB Hooligan

    Location:
    NW Arkansas
    Name:
    Mikie Watson
    Current Bike:
    Ibis DV9 / SC Hightower
    Yeah, I get it J. Thanks for taking the time to explain... Let me figure this out.
     
  5. mtnbikej

    mtnbikej J-Zilla

    Location:
    Orange
    Name:
    J
    Current Bike:
    SC Chameleon SS, SC Hightower
    Any update on this?
     
  6. Mikie

    Mikie Admin/iMTB Hooligan

    Location:
    NW Arkansas
    Name:
    Mikie Watson
    Current Bike:
    Ibis DV9 / SC Hightower
    Still trying to figure this one out.
    Thanks J!
     
  7. bigringrider101

    bigringrider101 Well-Known Member

    Location:
    Winnetka CA
    Name:
    Berni Avila
    Current Bike:
    Jones Space Frame Ti truss for
    You mean like this?
    <a class="postlink" href="https://www.strava.com/activities/247993593" onclick="window.open(this.href);return false;">https://www.strava.com/activities/247993593</a>


    Oh I get it Mikie does it all the time. On most of his RRs.
     
  8. mtnbikej

    mtnbikej J-Zilla

    Location:
    Orange
    Name:
    J
    Current Bike:
    SC Chameleon SS, SC Hightower
    No....I can do that.

    Click on the link above to Mtbr....you will see what comes up when you "embed into a blog".
     
  9. Mikie

    Mikie Admin/iMTB Hooligan

    Location:
    NW Arkansas
    Name:
    Mikie Watson
    Current Bike:
    Ibis DV9 / SC Hightower
    Hey J,
    Take a look at this and see if this will do the job. I will look in to building this in as a "quick code" . . .
    <a class="postlink" href="https://strava.zendesk.com/entries/23441759-Sharing-your-activities-with-a-Strava-Widget" onclick="window.open(this.href);return false;">https://strava.zendesk.com/entries/2344 ... ava-Widget</a>
     
  10. mtnbikej

    mtnbikej J-Zilla

    Location:
    Orange
    Name:
    J
    Current Bike:
    SC Chameleon SS, SC Hightower
    I'll look into it when I can get on the laptop.
     
  11. mtnbikej

    mtnbikej J-Zilla

    Location:
    Orange
    Name:
    J
    Current Bike:
    SC Chameleon SS, SC Hightower

    Testing:

    <iframe height='454' width='300' frameborder='0' allowtransparency='true' scrolling='no' src='https://www.strava.com/athletes/2736266/latest-rides/df4ca27c5c7c4118b31ebbda794bdb1062e2903a'></iframe>

    Still doesn't work.

    Plus I just noticed that the widget you are referring to show all of my latest activities.....or my weekly activities. The one I describe below is for a specific activity....for ride reports, etc.

    I go to Strava and go to a specific activity....click on the Share Button:


    Click on Embed on Blog:


    Copy and paste link provided by Strava:


    Should add a box like this to my post:


    When I add the copy/paste into my thread this is how it shows up:


    No box like above.

    Screenshot (11).png

    Screenshot (12).png

    Screenshot (13).png

    Screenshot (14).png

    Screenshot (15).png
     
  12. Mikie

    Mikie Admin/iMTB Hooligan

    Location:
    NW Arkansas
    Name:
    Mikie Watson
    Current Bike:
    Ibis DV9 / SC Hightower
    I like it, I just need to figure out a Mod to make it to it...
    Where there is a will, there is a way. I have the will....
     
  13. Cougar

    Cougar Well-Known Member

    Location:
    Washington City, UT (near St. George)
    Name:
    Craig
    Current Bike:
    '14 Turner Burner
    That looks like raw/near raw HTML code. Do you have the option to allow HTML in posts? Perhaps that is disabled in the forum settings?
     
  14. Mikie

    Mikie Admin/iMTB Hooligan

    Location:
    NW Arkansas
    Name:
    Mikie Watson
    Current Bike:
    Ibis DV9 / SC Hightower
    Phpbb does not have that option. There are Mods out there to allow it, but it is Highly recommended to not allow HTML code in posts to prevent virus's. I would rather build or find a widget I can dupe so it gets what mtnbikej accomplished and continues to keep imtbtrails members secure...
     
  15. burt

    burt Member

    Name:
    burt
    Making your own mod/extension/widget for this is unnecessary in phpbb3, as the developers have made Adding Custom BBCodes part of the admin controls.

    Read the rest of the article to understand the significance of the BBCode fields, or use the following settings:

    Usage:
    Code:
    [strava]{URL}[/strava]
    Replacement:
    Code:
    <iframe height='405' width='590' frameborder='0' allowtransparency='true' scrolling='no' src='{URL}'></iframe>
    Help:
    Code:
    Embed a STRAVA activity: [strava]embed_link_after_src[\strava]
    Enable: Display on posting page

    Testing:

    posting_page.png

    embedded_activity.png
     
  16. Mikie

    Mikie Admin/iMTB Hooligan

    Location:
    NW Arkansas
    Name:
    Mikie Watson
    Current Bike:
    Ibis DV9 / SC Hightower
    Burt! You and I need to talk about some other stuff on imtbtrails as well if you are game...
    Thanks for this...!
    PS: Can we rename the STRAVA button to Herz Factor? ;)
    Mikie
    [strava]https://www.strava.com/activities/334437264/embed/1a73dedce31404c696714fea6b9cd78f037849ec[/strava]


    Hokay! "J", I did what burt suggested. I never thought about a BBC "short code". There is now a button when you are posting called "stava".
    1) Copy your embed code from STRAVA.
    2) Open a post on imtbtrails.
    3) Click in your post where you want the map.
    4) Click the new "strava" button.
    5) "Paste" the embed code in between the strava brackets but strip away all the iFrame code like burt shows above. Works great!
     
  17. burt

    burt Member

    Name:
    burt
    ...well... I do need to point out that the bbcode I gave really isn't specific to strava; it just frames web content. Which means you can stick any old url in the strava tag:

    Code:
    [strava]http://www.sierraclub.org/[/strava]
    Edit, the above example was removed due to the location request it raised.

    If you wish to restrict this custom bbcode to strava activities, then you'll need to have the user specify not the whole url, but the activity id and the embedding hash separately, as found in the strava url.

    As in:
    <a class="postlink" href="https://www.strava.com/activities/" onclick="window.open(this.href);return false;">https://www.strava.com/activities/</a>activity_id/embed/embedding_hash

    Usage:
    Code:
    [strava activity={SIMPLETEXT1}]{SIMPLETEXT2}[/strava]
    Replacement:
    Code:
    <iframe height='405' width='590' frameborder='0' allowtransparency='true' scrolling='no' src='https://www.strava.com/activities/{SIMPLETEXT1}/embed/{SIMPLETEXT2}'></iframe>
    Help:
    Code:
    Embed a STRAVA activity: [strava activity=id]embed_hash[\strava]
    Example:
    Code:
    [strava activity=339362437]f37169dd797d7545e1aacab5c6cbd6fb0604f88c[/strava]
    Both options should be fine for this relatively close knit community. Just wanted to let you know you that have a choice between unrestricted-simple or specific-complex.
     
  18. mtnbikej

    mtnbikej J-Zilla

    Location:
    Orange
    Name:
    J
    Current Bike:
    SC Chameleon SS, SC Hightower

    Thanks Mikie.....and Burt. Works great.

    However, if you click on the map from the link above.....only the corner of the page loads.
     


As a former Amazon Associate I continue to get screwed trying to stay qualified as an Amazon Affiliate. So I quit!


Want to donate to imtbtrails?