Modify all outgoing links?

Hello everyone, I'm trying to figure what I should edit in order to automatically edit all outgoing links and add my adfly link as a prefix to monetize my links. Does anyone know what I should do to achieve this?
 
You will need to write an add-on to accomplish this. Easiest would be to overwrite the URL bbcode tag to modify the way it functions.
 
I'm looking at doing a similar thing- but since I want the adfly links only to display to guests (and I'd imagine most other admins wouldn't want them showing to members either), and bbcode doesn't work conditionally (afaik), this method wouldn't work, would it?

I tried putting the following into page_container_js_head:

Code:
<xen:if is="!{$visitor.user_id}">
<script type="text/javascript">
    var adfly_id = 2520296;
    var adfly_advert = 'int';
    var exclude_domains = megafora.com
</script>
<script src="https://cdn.adf.ly/js/link-converter.js"></script>
</xen:if>

But that hasn't worked either.

Are there any addons that could be used for this, or any other available workarounds?
 
Back
Top Bottom