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

Link Proxy Question and Interstitial pages

Discussion in 'XenForo Development Discussions' started by SneakyDave, Sep 30, 2014.

  1. SneakyDave

    SneakyDave Well-Known Member

    Hello, I'm trying to get my addon here to work with proxied links. It works fine without them, and I can get them to work if the proxy is on, but only if there is an interstitial page displayed between the click and the redirect to the external site. This add-on just adds an affiliate tag to an amazon URL in a message.

    To get this addon to work, I've extended the BbCode Formatter Base class, and work with the text of the message in the renderTagUrl method.

    This displays the simple amazon link, with the affiliate added to the url (in the status bar).

    When the link is clicked, this interstitial is displayed. Note: The address URL

    which doesn't appear to be malformed in any way, at least by my investigation.


    I thought this interstitial page was displayed when the referrer didn't match or the hash didn't match, but maybe I'm missing something else.

    Basically, all I'm doing is changing this URL in the message

    <a href="http://www.amazon.co.jp/Dracula-Bram-Stoker/dp/1484884272"
    target="_blank" class="externalLink ProxyLink"
    data-proxy-href="proxy.php?link=http%3A%2F%2Fwww.amazon.co.jp%2FDracula-Bram-Stoker%2Fdp%2F1484884272&amp;hash=4d51177f9f5521ec0eefed5729ae22fc" rel="nofollow">http://www.amazon.co.jp/Dracula-Bram-Stoker/dp/1484884272</a>

    To this URL (adding the &tag=<affiliateid>)

    <a href="http://www.amazon.co.jp/Dracula-Bram-Stoker/dp/1484884272/?tag=fdsfdsafdsa"
    target="_blank" class="externalLink ProxyLink"
    data-proxy-href="proxy.php?link=http%3A%2F%2Fwww.amazon.co.jp%2FDracula-Bram-Stoker%2Fdp%2F1484884272%2F%3Ftag%3Dfdsfdsafdsa&amp;hash=4d51177f9f5521ec0eefed5729ae22fc" rel="nofollow">http://www.amazon.co.jp/Dracula-Bram-Stoker/dp/1484884272</a>

    But no matter what I seem to try, I get the interstitial page displayed.

    Anybody have any idea what I'm doing wrong? Maybe the URL's don't match between the hash in the database and what's on the page?
    Last edited: Sep 30, 2014
  2. SneakyDave

    SneakyDave Well-Known Member

    ok, I think I know what's going on, the ProxyOutput class is telling me that I have an invalid hash, and I guess the hash is built on the URL, so that is probably what's going on, not sure how to get around that, except maybe create a new hash

Share This Page