<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — How to rewrite ebay links (affiliation)]]></title>
		<link>https://punbb.informer.com/forums/topic/21223/how-to-rewrite-ebay-links-affiliation/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/21223/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to rewrite ebay links (affiliation).]]></description>
		<lastBuildDate>Mon, 02 Mar 2009 14:21:58 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[How to rewrite ebay links (affiliation)]]></title>
			<link>https://punbb.informer.com/forums/post/125169/#p125169</link>
			<description><![CDATA[<p>Hello, </p><p>After googling for a few hours, I really need advice because I have found nothing that matches what I was looking for. </p><p>The situation is as follows: </p><p>I have a site with a forum based on PunBB 1.2. I use a system of affiliation displaying ebay ads on the site, but it happens regularly that members post links directly to ebay, and in this case visitors who click on these links do not pass through the tracker which recognizes my clicks on my affiliate program, they will go directly on ebay without my little cookie affiliation ... </p><p>So I thought it would be wise to rewrite all links like:</p><div class="codebox"><pre><code>http://cgi.ebay.fr/BLABLABLA

and

http://stores.ebay.fr/BLABLA</code></pre></div><p>So that they will go through my affiliate program. I need the rewrite to output those urls:</p><div class="codebox"><pre><code>http://rover.ebay.com/rover/1/700-11111-22222-0/1?type=4&amp;campid=0000000000&amp;toolid=10001&amp;customid=0000&amp;mpre=http%3A%2F%2Fcgi.ebay.fr%2FBLABLABLA

or

http://rover.ebay.com/rover/1/700-11111-22222-0/1?type=4&amp;campid=0000000000&amp;toolid=10001&amp;customid=0000&amp;mpre=http%3A%2F%2Fstores.ebay.fr%2FBLABLA</code></pre></div><p>I think this can be done with a regex, and probably somewhere in parser.php, around line 447 where there is</p><div class="codebox"><pre><code>//
// Make hyperlinks clickable
//
function do_clickable($text)</code></pre></div><p>Or somewhere around it.</p><p>Could someone help me setting up something to rewrite the ebay links on my forum?</p>]]></description>
			<author><![CDATA[null@example.com (Etoile)]]></author>
			<pubDate>Mon, 02 Mar 2009 14:21:58 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/125169/#p125169</guid>
		</item>
	</channel>
</rss>
