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

Permalink Variable?

Discussion in 'Styling and Customization Questions' started by DRE, May 22, 2012.

  1. DRE

    DRE Well-Known Member

    I am adding a widget to my forum pages and it's asking for the blog post permalink variable.

    Outbrain Widget (Needs Permalink)
    Code:
     
    <script language='JavaScript'>
    var OB_langJS = 'http://widgets.outbrain.com/lang_en.js'; var OBITm = 'xxxxxx;var OB_raterMode = 'none';var OB_recMode = 'dualBox';
     
    var OutbrainPermaLink='DROP_PERMALINK_HERE';
     
    if ( typeof(OB_Script)!='undefined' )OutbrainStart(); else { var OB_Script = true; var str = unescape("%3Cscript src=\'http://widgets.outbrain.com/OutbrainWidget.js\' type=\'text/javascript\'%3E%3C/script%3E"); document.write(str); }
    </script>

    I also asked here: https://getsatisfaction.com/outbrain/topics/how_do_i_find_my_post_permalink
     
  2. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    Try adding this code to the PAGE_CONTAINER template...
    Code:
    <script language='JavaScript'>
    var OB_langJS = 'http://widgets.outbrain.com/lang_en.js'; var OBITm = 'xxxxxx;var OB_raterMode = 'none';var OB_recMode = 'dualBox';
     
    var OutbrainPermaLink='{$requestPaths.requestUri}';
     
    if ( typeof(OB_Script)!='undefined' )OutbrainStart(); else { var OB_Script = true; var str = unescape("%3Cscript src=\'http://widgets.outbrain.com/OutbrainWidget.js\' type=\'text/javascript\'%3E%3C/script%3E"); document.write(str); }
    </script>
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The permalink is just the URL of the blog post.
     
  4. DRE

    DRE Well-Known Member

    I tried it but it didn't work.
    So I can use the link of the page for instance? Not working. http://www.8thos.com/pages/test

    Code:
    <div align="center"><script language='JavaScript'>
    var OB_langJS = 'http://widgets.outbrain.com/lang_en.js'; var OBITm = '1337668517274';var OB_raterMode = 'none';var OB_recMode = 'dualBox';
     
    var OutbrainPermaLink='http://www.8thos.com/pages/test';
     
    if ( typeof(OB_Script)!='undefined' )OutbrainStart(); else { var OB_Script = true; var str = unescape("%3Cscript src=\'http://widgets.outbrain.com/OutbrainRater.js\' type=\'text/javascript\'%3E%3C/script%3E"); document.write(str); }
    </script></div>
     
  5. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    I think they work in a different... first they will cache the page and then add the widget?
    else I don't see any reason why they will need your permalink...
     
  6. DRE

    DRE Well-Known Member

    I dunno. I've been looking for a way to rate games either in my arcade or as a page with embedded flash games.

    This is how I found them:
    Rate your Blogger Posts with 5 Star Ratings

    https://www.outbrain.com/

    You're in Good Company with Outbrain

    Installed on over 70,000
    blogs and websites
    Running over 30 billion recommendations a month
    Used by top publishers:

    • [​IMG]
    • [​IMG]
    • [​IMG]
    • [​IMG]
    • [​IMG]
    • [​IMG]
    • [​IMG]
    • [​IMG]
    • [​IMG]
     
  7. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    okay, try this:
    Code:
    <div align="center"><script language='JavaScript'>
    var OB_langJS = 'http://widgets.outbrain.com/lang_en.js'; var OBITm = '1337668517274';var OB_raterMode = 'none';var OB_recMode = 'dualBox';
     
    var OutbrainPermaLink='{xen:raw $url}';
     
    if ( typeof(OB_Script)!='undefined' )OutbrainStart(); else { var OB_Script = true; var str = unescape("%3Cscript src=\'http://widgets.outbrain.com/OutbrainRater.js\' type=\'text/javascript\'%3E%3C/script%3E"); document.write(str); }
    </script></div>
    if this doesn't work, then I am all out...
     
  8. DRE

    DRE Well-Known Member

    Thanks! Not working so it might be on their side.
     
  9. Digital Doctor

    Digital Doctor Well-Known Member

    Outbrain seems popular.
    I've seen it on the NYTimes, now CNN.
    What did you think of it ?
     
  10. DRE

    DRE Well-Known Member

    I never got it to work.
     
  11. Bob Hennessey

    Bob Hennessey Member

    I'm having this same issue with implementing Outbrain - they give you HTML to paste onto the page, but there's a section in there that needs to reflect the permalink of each page as its loaded.

    Is there a way while using something like [bd] Widget Framework - Advanced HTML to paste the Outbrain widget HTML and somehow insert some PHP code /variable reference or something that would get executed to insert the permalink? My hunch is no because under the HTML block it says it will get served as-is.

    I tried writing out all of the HTML using javascript doc.writes but that didn't work. The HTML looks something like

    Code:
    <div class="OUTBRAIN" data-src="DROP_PERMALINK_HERE" data-widget-id="12345" data-ob-template=""></div>
    
     

Share This Page