1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Media Sites; wildcard in embed html?

Discussion in 'Styling and Customization Questions' started by OwenJames, May 6, 2014.

  1. OwenJames

    OwenJames Active Member

    Hi

    I have the following set as one of my media sites (a cycling GPS website).

    Match URLS;

    ridewithgps.com/routes/{$id}
    http://ridewithgps.com/routes/{$id}
    ridewithgps.com/trips/{$id}
    http://ridewithgps.com/trips/{$id}

    Embed Html;

    <iframe frameborder="0" width="900" height="600" allowtransparency='true' scrolling='no' src="http://www.ridewithgps.com/routes/{$id}"></iframe>

    Now, in the Embed html, the URL is fixed to http://www.ridewithgps.com/routes/{$id}

    If a user inputs a URL including 'trips', instead of 'routes', it just gets parsed as routes, embedding the wrong page.

    Is there a way to put a wildcard in the Embed URL, so the link could be either;

    <iframe frameborder="0" width="900" height="600" allowtransparency='true' scrolling='no' src="http://www.ridewithgps.com/routes/{$id}"></iframe>

    or

    <iframe frameborder="0" width="900" height="600" allowtransparency='true' scrolling='no' src="http://www.ridewithgps.com/trips/{$id}"></iframe>

    Something like;

    <iframe frameborder="0" width="900" height="600" allowtransparency='true' scrolling='no' src="http://www.ridewithgps.com/*/{$id}"></iframe>

    Any ideas?

    Thanks
     
  2. Mike

    Mike XenForo Developer Staff Member

    It sounds like these should be two different embeds to me. There's no way to make a wildcard in the embed HTML.
     
  3. OwenJames

    OwenJames Active Member

    Thanks for the fast reply.

    I have tried to set these up as two separate embeds, but for some reason whatever URL I put it, it always reverts to the first one (RideWithGPS, rather than RideWithGPS2).

    I have set up the following;

    RideWithGPS

    http://www.ridewithgps.com

    ridewithgps.com/routes/{$id}
    http://ridewithgps.com/routes/{$id}

    <iframe frameborder="0" width="900" height="600" allowtransparency='true' scrolling='no' src="http://www.ridewithgps.com/routes/{$id}"></iframe>

    RideWithGPS2

    http://www.ridewithgps.com

    ridewithgps.com/trips/{$id}
    http://ridewithgps.com/trips/{$id}

    <iframe frameborder="0" width="900" height="600" allowtransparency='true' scrolling='no' src="http://www.ridewithgps.com/trips/{$id}"></iframe>

    Both the following initiate RideWithGPS. I want the second URL to initiate RideWithGPS2

    http://www.ridewithgps/routes/276532753

    http://www.ridewithgps/trips/276532753

    Any idea what I am doing wrong? I think it might be something to do with the main site URL being the same on both...
     
  4. OwenJames

    OwenJames Active Member

Share This Page