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

Permalink Variable?

DRE

Well-known member
#1
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
 

Mr. Goodie2Shoes

Well-known member
#2
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>
 

DRE

Well-known member
#4
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>
I tried it but it didn't work.
The permalink is just the URL of the blog post.
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>
 

Mr. Goodie2Shoes

Well-known member
#5
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...
 

DRE

Well-known member
#6
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 they will need your permalink...
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/

People love pictures! Increase traffic to your best posts by adding related links with Outbrain's Thumbnail Widget. The widget is free, simple to install and will automatically inherit the look and feel of your site. Set your preferences below and in less than 60 seconds, your readers will begin seeing thumbnail images linking to great content.
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:

 

Mr. Goodie2Shoes

Well-known member
#7
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...
 
#11
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>