Can i add a Prefix to external links

Varma

Member
Hi

I'm about to move a community build on Wordpress to XenForo and i was going through all the resources available out here.

I got a doubt, which is very important for my site ( if i'm going to buy Xenforo) -

Can i add a link prefix to all external URL's posts on the community?

For example - If a user post a external links like http://www.google.com in a thread, can i add a prefix like http://myprefixurl.com/r?http://www.google.com before the acctual url.

Actually it's mainly like a Skimlinks but a personal affiliate manager of mine.

I currently have a Wordpress plugin - http://wordpress.org/plugins/bwp-external-links/ which works exactly intend.

But while searching here in Xenforo couldn't find any thing related to this.

Please tell me if there any resource to achieve this.

Thanks
 
XenForo already has a link proxy, so it adds a prefix that is relative to your current forum URL in front of the actual URL which goes through the link proxy.

This one is from your post:
proxy.php?link=http%3A%2F%2Fwordpress.org%2Fplugins%2Fbwp-external-links%2F&hash=ee260be5cec077513fe92af204e334da

It would no doubt require an add-on or custom development, but it may be possible to modify this system so that it doesn't use proxy.php?link= but some other prefix. I can't guarantee that for definite; but programmatically it should be feasible.
 
I just checked the code.

A very simple add-on would be required, but it should be 100% possible to override the default proxy link and supply your own.
 
Ok, that's great, so Xenforo has a inbuilt system that works exactly what i need.

But i need to get a developer who can edit it to work with my prefix.

Is currently any Addons that can work like this? or is it easy to build of my own ?
 
There's a few options.

You could directly modify the code yourself. Although I don't recommend this, it's an option as the code is pretty straight forward. You would have to keep a record of the changes you made and reapply them to every new XenForo version that is released.

If you already have the skills to modify PHP code, then it's probably only a small few extra steps to turn it into a proper add-on for yourself. There are tutorials on how to extend functions and there'll be help available from the Development Discussions forum.

Lastly, you could employ a developer to do this for you. There's a forum you can post a request in: http://xenforo.com/community/forums/custom-service-development-requests.69/

Depending on what your deadlines are etc. I may be able to develop it for you. Send me a Conversation if you want to discuss the cost of that. But it may depend on your time scales and deadlines as I'm not immediately available.
 
Top Bottom